xml_utils.h
Go to the documentation of this file.
1 /*+-------------------------------------------------------------------------+
2  | MultiVehicle simulator (libmvsim) |
3  | |
4  | Copyright (C) 2014-2020 Jose Luis Blanco Claraco |
5  | Copyright (C) 2017 Borys Tymchenko (Odessa Polytechnic University) |
6  | Distributed under 3-clause BSD License |
7  | See COPYING |
8  +-------------------------------------------------------------------------+ */
9 #pragma once
10 
12 #include <mvsim/basic_types.h>
13 
14 #include <map>
15 #include <rapidxml.hpp>
16 #include <string>
17 
18 // Fwd decl:
19 namespace mrpt::math
20 {
21 class TPolygon2D;
22 } // namespace mrpt::math
23 
24 namespace mvsim
25 {
27  const rapidxml::xml_node<char>& xml_node,
29  const std::map<std::string, std::string>& variableNamesValues = {},
30  const char* functionNameContext = "");
31 
37  const rapidxml::xml_node<char>& xml_node,
38  const TParameterDefinitions& params,
39  const std::map<std::string, std::string>& variableNamesValues = {},
40  const char* functionNameContext = "");
41 
45  const rapidxml::xml_node<char>& xml_node,
46  const TParameterDefinitions& params,
47  const std::map<std::string, std::string>& variableNamesValues = {},
48  const char* functionNameContext = "");
49 
50 template <class NODE_LIST>
52  NODE_LIST& lst_nodes, const TParameterDefinitions& params,
53  const char* functionNameContext = "")
54 {
55  for (auto& node : lst_nodes)
56  parse_xmlnode_children_as_param(*node, params, functionNameContext);
57 }
58 
59 // Bits:
60 
67  const std::string& s, bool allow_missing_angle = false,
68  double default_angle_radians = 0.0);
69 
75  const rapidxml::xml_node<char>& xml_node, mrpt::math::TPolygon2D& out_poly,
76  const char* functionNameContext = "");
77 } // namespace mvsim
This file contains rapidxml parser and DOM implementation.
void parse_xmlnodelist_children_as_param(NODE_LIST &lst_nodes, const TParameterDefinitions &params, const char *functionNameContext="")
Definition: xml_utils.h:51
std::map< std::string, TParamEntry > TParameterDefinitions
void parse_xmlnode_children_as_param(const rapidxml::xml_node< char > &xml_node, const TParameterDefinitions &params, const std::map< std::string, std::string > &variableNamesValues={}, const char *functionNameContext="")
Definition: xml_utils.cpp:179
bool parse_xmlnode_as_param(const rapidxml::xml_node< char > &xml_node, const TParameterDefinitions &params, const std::map< std::string, std::string > &variableNamesValues={}, const char *functionNameContext="")
Definition: xml_utils.cpp:157
void parse_xmlnode_attribs(const rapidxml::xml_node< char > &xml_node, const TParameterDefinitions &params, const std::map< std::string, std::string > &variableNamesValues={}, const char *functionNameContext="")
Definition: xml_utils.cpp:140
GLdouble s
GLfloat * params
void parse_xmlnode_shape(const rapidxml::xml_node< char > &xml_node, mrpt::math::TPolygon2D &out_poly, const char *functionNameContext="")
Definition: xml_utils.cpp:222
mrpt::math::TPose2D parseXYPHI(const std::string &s, bool allow_missing_angle=false, double default_angle_radians=0.0)
Definition: xml_utils.cpp:198


mvsim
Author(s):
autogenerated on Fri May 7 2021 03:05:51