Skip to content

Commit

Permalink
Added intents in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
klingbolt committed Aug 7, 2023
1 parent 63764cd commit 38a3f00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions xml_converter/generators/cpp_templates/class_template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ vector<string> {{cpp_class}}::as_xml() const {
}

{% if cpp_class == "Category": %}
waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(string full_category_name, map<string, vector<Parseable*>>* parsed_pois) const {
full_category_name += this->name;
waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(string full_category_name, map<string, vector<Parseable*>>* 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": %}
Expand Down
4 changes: 2 additions & 2 deletions xml_converter/generators/cpp_templates/class_template.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class {{cpp_class}} : public Parseable {
virtual std::string classname();
bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector<XMLError*>* errors, std::string base_dir = "");
{% if cpp_class == "Category": %}
waypoint::{{cpp_class}} as_protobuf(std::string full_category_name, std::map<std::string, std::vector<Parseable*>>* parsed_pois) const;
waypoint::{{cpp_class}} as_protobuf(std::string full_category_name, std::map<std::string, std::vector<Parseable*>>* 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 %}
Expand Down

0 comments on commit 38a3f00

Please sign in to comment.