Apollo  6.0
Open source self driving car software
objects_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 #include <vector>
19 
20 #include <tinyxml2.h>
21 
24 
25 namespace apollo {
26 namespace hdmap {
27 namespace adapter {
28 
30  public:
31  static Status ParseCrosswalks(const tinyxml2::XMLElement& xml_node,
32  std::vector<PbCrosswalk>* crosswalks);
33  static Status ParseClearAreas(const tinyxml2::XMLElement& xml_node,
34  std::vector<PbClearArea>* clear_areas);
35  static Status ParseSpeedBumps(const tinyxml2::XMLElement& xml_node,
36  std::vector<PbSpeedBump>* speed_bumps);
37  static Status ParseStopLines(const tinyxml2::XMLElement& xml_node,
38  std::vector<StopLineInternal>* stop_lines);
39  static Status ParseParkingSpaces(const tinyxml2::XMLElement& xml_node,
40  std::vector<PbParkingSpace>* parking_spaces);
41  static Status ParsePNCJunctions(const tinyxml2::XMLElement& xml_node,
42  std::vector<PbPNCJunction>* pnc_junctions);
43  static Status ParsePassageGroup(const tinyxml2::XMLElement& xml_node,
44  PbPNCJunction* pnc_junction);
45 
46  static Status ParsePassage(const tinyxml2::XMLElement& xml_node,
47  PbPassageGroup* passage_group);
48  static Status ParsePassageIds(const tinyxml2::XMLElement& xml_node,
49  const std::string& child_node_name,
50  std::vector<std::string>* passage_node_ids);
51  static Status ToPassageType(const std::string& type,
52  PbPassageType* passage_type);
53 
54  static Status ParseRSUs(const tinyxml2::XMLElement& xml_node,
55  std::vector<RSUInternal>* rsus);
56 
57  static Status ParseObjects(const tinyxml2::XMLElement& xml_node,
58  ObjectInternal* objects);
59 };
60 
61 } // namespace adapter
62 } // namespace hdmap
63 } // namespace apollo
static Status ParsePassageGroup(const tinyxml2::XMLElement &xml_node, PbPNCJunction *pnc_junction)
static Status ParseStopLines(const tinyxml2::XMLElement &xml_node, std::vector< StopLineInternal > *stop_lines)
apollo::hdmap::PNCJunction PbPNCJunction
Definition: common_define.h:57
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
static Status ParseObjects(const tinyxml2::XMLElement &xml_node, ObjectInternal *objects)
Definition: objects_xml_parser.h:29
static Status ParseParkingSpaces(const tinyxml2::XMLElement &xml_node, std::vector< PbParkingSpace > *parking_spaces)
Definition: common_define.h:156
static Status ParsePassageIds(const tinyxml2::XMLElement &xml_node, const std::string &child_node_name, std::vector< std::string > *passage_node_ids)
static Status ParseCrosswalks(const tinyxml2::XMLElement &xml_node, std::vector< PbCrosswalk > *crosswalks)
static Status ParseSpeedBumps(const tinyxml2::XMLElement &xml_node, std::vector< PbSpeedBump > *speed_bumps)
static Status ParsePassage(const tinyxml2::XMLElement &xml_node, PbPassageGroup *passage_group)
apollo::hdmap::Passage_Type PbPassageType
Definition: common_define.h:66
static Status ParsePNCJunctions(const tinyxml2::XMLElement &xml_node, std::vector< PbPNCJunction > *pnc_junctions)
apollo::hdmap::PassageGroup PbPassageGroup
Definition: common_define.h:67
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
static Status ParseRSUs(const tinyxml2::XMLElement &xml_node, std::vector< RSUInternal > *rsus)
static Status ToPassageType(const std::string &type, PbPassageType *passage_type)
static Status ParseClearAreas(const tinyxml2::XMLElement &xml_node, std::vector< PbClearArea > *clear_areas)