scenario_simulator_v2 C++ API
routing_configuration.hpp
Go to the documentation of this file.
1 // Copyright 2015 TIER IV, Inc. 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 #ifndef TRAFFIC_SIMULATOR__DATA_TYPE__ROUTING_CONFIGURATIONS_HPP_
16 #define TRAFFIC_SIMULATOR__DATA_TYPE__ROUTING_CONFIGURATIONS_HPP_
17 
18 #include <iostream>
20 
21 namespace traffic_simulator
22 {
24 {
25  bool allow_lane_change = false;
27  traffic_simulator::RoutingGraphType::VEHICLE_WITH_ROAD_SHOULDER;
28 
29  bool operator==(const RoutingConfiguration & routing_configuration) const
30  {
31  return allow_lane_change == routing_configuration.allow_lane_change &&
32  routing_graph_type == routing_configuration.routing_graph_type;
33  }
34 
35  friend std::ostream & operator<<(std::ostream & os, const RoutingConfiguration & rc)
36  {
37  os << "{ allow_lane_change: " << (rc.allow_lane_change ? "true" : "false")
38  << ", routing_graph_type: " << to_string(rc.routing_graph_type) << " }";
39  return os;
40  }
41 };
42 } // namespace traffic_simulator
43 
44 #endif // TRAFFIC_SIMULATOR__DATA_TYPE__ROUTING_CONFIGURATIONS_HPP_
RoutingGraphType
Definition: routing_graph_type.hpp:24
char const * to_string(const RoutingGraphType &)
Definition: routing_graph_type.cpp:21
Definition: api.hpp:48
Definition: routing_configuration.hpp:24
bool allow_lane_change
Definition: routing_configuration.hpp:25
traffic_simulator::RoutingGraphType routing_graph_type
Definition: routing_configuration.hpp:26
bool operator==(const RoutingConfiguration &routing_configuration) const
Definition: routing_configuration.hpp:29
friend std::ostream & operator<<(std::ostream &os, const RoutingConfiguration &rc)
Definition: routing_configuration.hpp:35