Apollo  6.0
Open source self driving car software
util_xml_parser.h
Go to the documentation of this file.
1 /* Copyright 2017 The Apollo Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7  http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 =========================================================================*/
15 #pragma once
16 
17 #include <string>
18 
19 #include <tinyxml2.h>
20 
23 
24 namespace apollo {
25 namespace hdmap {
26 namespace adapter {
27 
29  public:
30  static Status ParseCurve(const tinyxml2::XMLElement& xml_node,
31  PbCurve* curve);
32  static Status ParseGeometry(const tinyxml2::XMLElement& xml_node,
33  PbCurveSegment* curve_segment);
34  static Status ParsePointSet(const tinyxml2::XMLElement& xml_node,
35  PbLineSegment* line_segment);
36  static Status ParseOutline(const tinyxml2::XMLElement& xml_node,
37  PbPolygon* polygon);
38  static Status ParsePoint(const tinyxml2::XMLElement& xml_node, PbPoint3D* pt);
39 
40  static std::string ToUpper(const std::string& s);
41 
42  static void WGS84ToUTM(const double x, const double y, const double z,
43  double* output_x, double* output_y, double* output_z);
44 
45  static double CurveLength(const PbCurve& curve);
46 
47  static tinyxml2::XMLError QueryStringAttribute(
48  const tinyxml2::XMLElement& xml_node, const std::string& name,
49  std::string* value);
50 };
51 
52 } // namespace adapter
53 } // namespace hdmap
54 } // namespace apollo
static Status ParseGeometry(const tinyxml2::XMLElement &xml_node, PbCurveSegment *curve_segment)
static Status ParsePointSet(const tinyxml2::XMLElement &xml_node, PbLineSegment *line_segment)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
apollo::common::PointENU PbPoint3D
Definition: common_define.h:47
static Status ParseCurve(const tinyxml2::XMLElement &xml_node, PbCurve *curve)
static Status ParsePoint(const tinyxml2::XMLElement &xml_node, PbPoint3D *pt)
apollo::hdmap::CurveSegment PbCurveSegment
Definition: common_define.h:45
apollo::hdmap::Curve PbCurve
Definition: common_define.h:46
static void WGS84ToUTM(const double x, const double y, const double z, double *output_x, double *output_y, double *output_z)
apollo::hdmap::Polygon PbPolygon
Definition: common_define.h:53
static tinyxml2::XMLError QueryStringAttribute(const tinyxml2::XMLElement &xml_node, const std::string &name, std::string *value)
static double CurveLength(const PbCurve &curve)
static Status ParseOutline(const tinyxml2::XMLElement &xml_node, PbPolygon *polygon)
static std::string ToUpper(const std::string &s)
apollo::cyber::base::std value
A general class to denote the return status of an API call. It can either be an OK status for success...
Definition: status.h:43
apollo::hdmap::LineSegment PbLineSegment
Definition: common_define.h:44
Definition: util_xml_parser.h:28