Apollo  6.0
Open source self driving car software
signals_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:
32  const tinyxml2::XMLElement& xml_node,
33  std::vector<TrafficLightInternal>* traffic_lights);
34  static Status ParseStopSigns(const tinyxml2::XMLElement& xml_node,
35  std::vector<StopSignInternal>* stop_signs);
36  static Status ParseYieldSigns(const tinyxml2::XMLElement& xml_node,
37  std::vector<YieldSignInternal>* yield_signs);
38 
39  private:
40  static Status ToPbSignalType(const std::string& xml_type,
41  PbSignalType* signal_type);
42  static Status ToPbSubSignalType(const std::string& xml_type,
43  PbSubSignalType* sub_signal_type);
44  static Status to_pb_sign_info_type(const std::string& xml_type,
45  PbSignInfoType* sign_info_type);
46  static Status ToPbStopSignType(const std::string& xml_type,
47  PbStopSignType* stop_type);
48 };
49 
50 } // namespace adapter
51 } // namespace hdmap
52 } // namespace apollo
Definition: signals_xml_parser.h:29
apollo::hdmap::StopSign_StopType PbStopSignType
Definition: common_define.h:62
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
static Status ParseTrafficLights(const tinyxml2::XMLElement &xml_node, std::vector< TrafficLightInternal > *traffic_lights)
static Status ParseStopSigns(const tinyxml2::XMLElement &xml_node, std::vector< StopSignInternal > *stop_signs)
apollo::hdmap::Signal_Type PbSignalType
Definition: common_define.h:60
apollo::hdmap::SignInfo::Type PbSignInfoType
Definition: common_define.h:65
static Status ParseYieldSigns(const tinyxml2::XMLElement &xml_node, std::vector< YieldSignInternal > *yield_signs)
apollo::hdmap::Subsignal_Type PbSubSignalType
Definition: common_define.h:61
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