Apollo 10.0
自动驾驶开放平台
util_xml_parser.h
浏览该文件的文档.
1/* Copyright 2017 The Apollo Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14=========================================================================*/
15#pragma once
16
17#include <string>
18
19#include <tinyxml2.h>
20
23
24namespace apollo {
25namespace hdmap {
26namespace 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
A general class to denote the return status of an API call.
Definition status.h:43
static void WGS84ToUTM(const double x, const double y, const double z, double *output_x, double *output_y, double *output_z)
static Status ParseGeometry(const tinyxml2::XMLElement &xml_node, PbCurveSegment *curve_segment)
static std::string ToUpper(const std::string &s)
static double CurveLength(const PbCurve &curve)
static tinyxml2::XMLError QueryStringAttribute(const tinyxml2::XMLElement &xml_node, const std::string &name, std::string *value)
static Status ParsePointSet(const tinyxml2::XMLElement &xml_node, PbLineSegment *line_segment)
static Status ParseCurve(const tinyxml2::XMLElement &xml_node, PbCurve *curve)
static Status ParseOutline(const tinyxml2::XMLElement &xml_node, PbPolygon *polygon)
static Status ParsePoint(const tinyxml2::XMLElement &xml_node, PbPoint3D *pt)
class register implement
Definition arena_queue.h:37