Apollo 10.0
自动驾驶开放平台
lanes_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#include <vector>
19
20#include <tinyxml2.h>
21
24
25namespace apollo {
26namespace hdmap {
27namespace adapter {
28
30 public:
31 static Status Parse(const tinyxml2::XMLElement& xml_node,
32 const std::string& road_id,
33 std::vector<RoadSectionInternal>* sections);
34
35 private:
36 static Status ParseLaneSection(const tinyxml2::XMLElement& xml_node,
37 std::vector<LaneInternal>* lanes);
38
39 static Status ParseSectionBoundary(const tinyxml2::XMLElement& xml_node,
40 PbBoundaryPolygon* boundary);
41
42 static Status ToPbBoundaryType(const std::string& type,
43 PbBoundaryEdgeType* boundary_type);
44 static Status ParseLane(const tinyxml2::XMLElement& xml_node,
45 LaneInternal* lane_internal);
46 static Status ParseDirection(const tinyxml2::XMLElement& xml_node,
47 PbLane* lane);
48 static Status ParseCenterCurve(const tinyxml2::XMLElement& xml_node,
49 PbLane* lane);
50 static Status ParseSpeed(const tinyxml2::XMLElement& xml_node, PbLane* lane);
51 static Status ParseSampleAssociates(const tinyxml2::XMLElement& xml_node,
52 PbLane* lane);
53 static Status ParseSingleSideRoadSampleAssociates(
54 const tinyxml2::XMLElement& xml_node, bool bleft, PbLane* lane);
55 static Status ParseLeftRoadSampleAssociates(
56 const tinyxml2::XMLElement& xml_node, PbLane* lane);
57 static Status ParseRightRoadSampleAssociates(
58 const tinyxml2::XMLElement& xml_node, PbLane* lane);
59 static Status ParseRoadSampleAssociates(const tinyxml2::XMLElement& xml_node,
60 PbLane* lane);
61 static Status ParseObjectOverlapGroup(
62 const tinyxml2::XMLElement& xml_node,
63 std::vector<OverlapWithLane>* object_overlaps);
64 static Status ParseSignalOverlapGroup(
65 const tinyxml2::XMLElement& xml_node,
66 std::vector<OverlapWithLane>* signal_overlaps);
67 static Status ParseJunctionOverlapGroup(
68 const tinyxml2::XMLElement& xml_node,
69 std::vector<OverlapWithLane>* junction_overlaps);
70 static Status ParseLaneOverlapGroup(
71 const tinyxml2::XMLElement& xml_node,
72 std::vector<OverlapWithLane>* lane_overlaps);
73
74 static Status ToPbLaneType(const std::string& type, PbLaneType* pb_type);
75 static Status ToPbTurnType(const std::string& type, PbTurnType* pb_turn_type);
76 static Status ToPbDirection(const std::string& type,
77 PbLaneDirection* pb_direction);
78
79 static void ParseLaneLink(const tinyxml2::XMLElement& xml_node, PbLane* lane);
80 static Status ParseLaneBorderMark(const tinyxml2::XMLElement& xml_node,
81 PbLaneBoundaryTypeType* boundary_type);
82 static Status ToPbLaneMarkType(const std::string& type,
83 const std::string& color,
84 PbLaneBoundaryTypeType* boundary_type);
85 static Status ParseRegionOverlap(
86 const tinyxml2::XMLElement& xml_node,
87 std::vector<PbRegionOverlap>* region_overlaps);
88};
89
90} // namespace adapter
91} // namespace hdmap
92} // namespace apollo
A general class to denote the return status of an API call.
Definition status.h:43
static Status Parse(const tinyxml2::XMLElement &xml_node, const std::string &road_id, std::vector< RoadSectionInternal > *sections)
apollo::hdmap::BoundaryEdge_Type PbBoundaryEdgeType
apollo::hdmap::Lane_LaneType PbLaneType
apollo::hdmap::Lane_LaneDirection PbLaneDirection
apollo::hdmap::LaneBoundaryType_Type PbLaneBoundaryTypeType
apollo::hdmap::Lane_LaneTurn PbTurnType
class register implement
Definition arena_queue.h:37