Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tracking for the top level categories in each pack. #357

Merged
10 changes: 8 additions & 2 deletions xml_converter/integration_tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def run_xml_converter(
input_proto: Optional[List[str]] = None,
output_proto: Optional[List[str]] = None,
split_output_proto: Optional[str] = None,
additional_arguments: Optional[List[str]] = None,
AsherGlick marked this conversation as resolved.
Show resolved Hide resolved
) -> Tuple[str, str, int]:

# Build the command to execute the C++ program with the desired function and arguments
Expand All @@ -35,6 +36,8 @@ def run_xml_converter(
cmd += ["--output-guildpoint-path"] + output_proto
if split_output_proto:
cmd += ["--output-split-guildpoint-path"] + [split_output_proto]
if additional_arguments:
cmd += additional_arguments

# Run the C++ program and capture its output
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
Expand Down Expand Up @@ -174,6 +177,7 @@ def main() -> bool:
input_proto=testcase.proto_input_paths,
output_xml=[xml_output_dir_path],
output_proto=[proto_output_dir_path],
additional_arguments=testcase.additional_arguments
)

# Sanitize and denoise the lines
Expand Down Expand Up @@ -206,8 +210,10 @@ def main() -> bool:
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}")

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)
if os.path.exists(testcase.expected_output_xml_path):
testcase_passed &= diff_dirs(xml_output_dir_path, testcase.expected_output_xml_path)
if os.path.exists(testcase.expected_output_proto_path):
testcase_passed &= diff_dirs(proto_output_dir_path, testcase.expected_output_proto_path)

if testcase_passed:
print(f"Success: test {testcase.name}")
Expand Down
12 changes: 11 additions & 1 deletion xml_converter/integration_tests/src/testcase_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Testcase:
expected_stdout: List[str]
expected_stderr: List[str]
expected_returncode: int
additional_arguments: List[str]


################################################################################
Expand Down Expand Up @@ -58,6 +59,7 @@ def load_testcase(path: str) -> Optional[Testcase]:
# Load all of the input paths into either xml input or proto inputs
xml_input_paths: List[str] = []
proto_input_paths: List[str] = []
additional_arguments: 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}")
Expand Down Expand Up @@ -104,6 +106,13 @@ def load_testcase(path: str) -> Optional[Testcase]:
print(f"Invalid Test, expecting string value for 'expected_returncode' in {path}")
return None

if "additional_arguments" in data:
if not isinstance(data["additional_arguments"], str):
print(f"Invalid Test, expecting string value for 'additional_arguments' in {path}")
return None
else:
additional_arguments = to_lines(data["additional_arguments"])

return Testcase(
name=os.path.basename(path),
xml_input_paths=xml_input_paths,
Expand All @@ -112,7 +121,8 @@ def load_testcase(path: str) -> Optional[Testcase]:
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"]
expected_returncode=data["expected_returncode"],
additional_arguments=additional_arguments
)


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<OverlayData>
<MarkerCategory DisplayName="MyCategory" Name="Mycategory">
</MarkerCategory>

<POIs>
<POI Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
</POIs>
</OverlayData>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin.textproto._old	2024-09-30 00:43:16.418871175 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin.textproto._new	2024-09-30 00:43:16.426871135 +0000
@@ -0,0 +1,12 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin.textproto._old	2024-10-02 03:05:21.892076970 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin.textproto._new	2024-10-02 03:05:21.900077036 +0000
@@ -0,0 +1,12 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin.textproto._old	2024-11-11 02:57:11.383991655 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin.textproto._new	2024-11-11 02:57:11.391991647 +0000
@@ -0,0 +1,12 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin.textproto._old	2024-11-13 00:22:41.909758062 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin.textproto._new	2024-11-13 00:22:41.917758143 +0000
@@ -0,0 +1,12 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin.textproto._old	2024-11-14 07:24:27.334909730 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin.textproto._new	2024-11-14 07:24:27.342909771 +0000
@@ -0,0 +1,12 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

+

MyCategory 2B\Ï)Cf¦RC{ÔWCB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<OverlayData>
<MarkerCategory DisplayName="MyCategory" Name="Mycategory">
</MarkerCategory>

<POIs>
<POI Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
</POIs>
</OverlayData>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/output_proto/markers.bin.textproto._old	2024-09-30 00:43:16.435871091 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/output_proto/markers.bin.textproto._new	2024-09-30 00:43:16.442871057 +0000
@@ -0,0 +1,28 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/output_proto/markers.bin.textproto._old	2024-10-02 03:05:21.908077101 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/output_proto/markers.bin.textproto._new	2024-10-02 03:05:21.916077166 +0000
@@ -0,0 +1,28 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/output_proto/markers.bin.textproto._old	2024-11-11 02:57:11.399991639 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/output_proto/markers.bin.textproto._new	2024-11-11 02:57:11.407991629 +0000
@@ -0,0 +1,28 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/output_proto/markers.bin.textproto._old	2024-11-13 00:22:41.961758593 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/output_proto/markers.bin.textproto._new	2024-11-13 00:22:41.969758675 +0000
@@ -0,0 +1,28 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/output_proto/markers.bin.textproto._old	2024-11-14 07:24:27.354909833 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/output_proto/markers.bin.textproto._new	2024-11-14 07:24:27.358909854 +0000
@@ -0,0 +1,28 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

U

MyCategory 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWCB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<OverlayData>
<MarkerCategory DisplayName="MyCategory" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
<POI Type="mycategory" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI Type="mycategory" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI Type="mycategory" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
</POIs>
</OverlayData>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
input_paths:
"pack": "xml"
"pack2": "proto"
"pack3": "xml"
expected_stdout: |
The following top level categories were found in more than one pack
mycategory
mycategory
expected_stderr: |
expected_returncode: 0
additional_arguments: |
--allow-duplicates
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<OverlayData>
<MarkerCategory DisplayName="MyCategory" Name="Mycategory">
</MarkerCategory>

<POIs>
<POI Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
</POIs>
</OverlayData>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin.textproto._old	2024-09-30 00:43:16.449871023 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin.textproto._new	2024-09-30 00:43:16.457870984 +0000
@@ -0,0 +1,12 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin.textproto._old	2024-10-02 03:05:21.923077223 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin.textproto._new	2024-10-02 03:05:21.931077289 +0000
@@ -0,0 +1,12 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin.textproto._old	2024-11-11 02:57:11.415991621 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin.textproto._new	2024-11-11 02:57:11.423991613 +0000
@@ -0,0 +1,12 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin.textproto._old	2024-11-13 00:22:41.977758756 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin.textproto._new	2024-11-13 00:22:41.985758838 +0000
@@ -0,0 +1,12 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin.textproto._old	2024-11-14 07:24:27.366909895 +0000
+++ xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin.textproto._new	2024-11-14 07:24:27.374909938 +0000
@@ -0,0 +1,12 @@
+category {
+  name: "MyCategory"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

+

MyCategory 2B\Ï)Cf¦RC{ÔWCB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<OverlayData>
<MarkerCategory DisplayName="MyCategory" Name="Mycategory">
</MarkerCategory>

<POIs>
<POI Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
</POIs>
</OverlayData>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
input_paths:
"pack": "xml"
"pack2": "proto"
"pack3": "xml"
expected_stdout: |
The following top level categories were found in more than one pack
mycategory
mycategory
Did not write due to duplicates in categories. If you want to bypass this, use '--allow-duplicates'
expected_stderr: |
expected_returncode: 0
9 changes: 6 additions & 3 deletions xml_converter/src/packaging_protobin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ using namespace std;
////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////
void parse_guildpoint_categories(
string parse_guildpoint_categories(
string full_category_name,
::guildpoint::Category proto_category,
map<string, Category>* marker_categories,
Expand Down Expand Up @@ -57,25 +57,28 @@ void parse_guildpoint_categories(
for (int i = 0; i < proto_category.children_size(); i++) {
parse_guildpoint_categories(full_category_name + ".", proto_category.children(i), &(this_category->children), parsed_pois, state);
}
return category_name;
}

////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////
void read_protobuf_file(string proto_filepath, const string marker_pack_root_directory, map<string, Category>* marker_categories, vector<Parseable*>* parsed_pois) {
set<string> read_protobuf_file(string proto_filepath, const string marker_pack_root_directory, map<string, Category>* marker_categories, vector<Parseable*>* parsed_pois) {
fstream infile;
guildpoint::Guildpoint proto_message;
ProtoReaderState state;
state.marker_pack_root_directory = marker_pack_root_directory;
set<string> category_names;

infile.open(proto_filepath, ios::in | ios::binary);
proto_message.ParseFromIstream(&infile);

state.textures = proto_message.textures();

for (int i = 0; i < proto_message.category_size(); i++) {
parse_guildpoint_categories("", proto_message.category(i), marker_categories, parsed_pois, &state);
category_names.insert(parse_guildpoint_categories("", proto_message.category(i), marker_categories, parsed_pois, &state));
}
return category_names;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
3 changes: 2 additions & 1 deletion xml_converter/src/packaging_protobin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <fstream>
#include <map>
#include <set>
#include <string>
#include <vector>

Expand All @@ -10,7 +11,7 @@
#include "parseable.hpp"
#include "string_hierarchy.hpp"

void read_protobuf_file(
std::set<std::string> read_protobuf_file(
std::string proto_filepath,
const std::string marker_pack_root_directory,
std::map<std::string, Category>* marker_categories,
Expand Down
11 changes: 8 additions & 3 deletions xml_converter/src/packaging_xml.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "packaging_xml.hpp"

#include <set>
#include <utility>

#include "hash_helpers.hpp"
Expand All @@ -16,7 +17,7 @@ using namespace std;
////////////////////////////////////////////////////////////////////////////////

unsigned int UNKNOWN_CATEGORY_COUNTER = 0;
void parse_marker_categories(
string parse_marker_categories(
rapidxml::xml_node<>* node,
map<string, Category>* marker_categories,
Category* parent,
Expand Down Expand Up @@ -82,9 +83,11 @@ void parse_marker_categories(
for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) {
parse_marker_categories(child_node, &(category->children), category, errors, state, depth + 1);
}
return name;
}
else {
errors->push_back(new XMLNodeNameError("Unknown MarkerCategory Tag", node));
return "";
AsherGlick marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down Expand Up @@ -189,12 +192,13 @@ vector<Parseable*> parse_pois(rapidxml::xml_node<>* root_node, map<string, Categ
//
// A function which parses a single XML file into their corrisponding classes.
////////////////////////////////////////////////////////////////////////////////
void parse_xml_file(string xml_filepath, const string marker_pack_root_directory, map<string, Category>* marker_categories, vector<Parseable*>* parsed_pois) {
set<string> parse_xml_file(string xml_filepath, const string marker_pack_root_directory, map<string, Category>* marker_categories, vector<Parseable*>* parsed_pois) {
vector<XMLError*> errors;
rapidxml::xml_document<> doc;
rapidxml::xml_node<>* root_node;
XMLReaderState state;
state.marker_pack_root_directory = marker_pack_root_directory;
set<string> category_names;

rapidxml::file<> xml_file(xml_filepath.c_str());
doc.parse<rapidxml::parse_non_destructive | rapidxml::parse_no_data_nodes>(xml_file.data(), xml_filepath.c_str());
Expand All @@ -210,7 +214,7 @@ void parse_xml_file(string xml_filepath, const string marker_pack_root_directory

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, nullptr, &errors, &state);
category_names.insert(parse_marker_categories(node, marker_categories, nullptr, &errors, &state));
}
else if (get_node_name(node) == "POIs") {
vector<Parseable*> temp_vector = parse_pois(node, marker_categories, &errors, &state);
Expand All @@ -224,6 +228,7 @@ void parse_xml_file(string xml_filepath, const string marker_pack_root_directory
for (auto error : errors) {
error->print_error();
}
return category_names;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
3 changes: 2 additions & 1 deletion xml_converter/src/packaging_xml.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <map>
#include <set>
#include <string>
#include <vector>

Expand All @@ -10,7 +11,7 @@
#include "rapidxml-1.13/rapidxml_utils.hpp"
#include "state_structs/xml_reader_state.hpp"

void parse_xml_file(
std::set<std::string> parse_xml_file(
std::string xml_filepath,
const std::string marker_pack_root_directory,
std::map<std::string, Category>* marker_categories,
Expand Down
Loading
Loading