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  RoutingConfiguration() = default;
28 
29  bool allow_lane_change = false;
31  traffic_simulator::RoutingGraphType::VEHICLE_WITH_ROAD_SHOULDER;
32 
33  bool operator==(const RoutingConfiguration & routing_configuration) const
34  {
35  return allow_lane_change == routing_configuration.allow_lane_change &&
36  routing_graph_type == routing_configuration.routing_graph_type;
37  }
38 
39  friend std::ostream & operator<<(std::ostream & os, const RoutingConfiguration & rc)
40  {
41  os << "{ allow_lane_change: " << (rc.allow_lane_change ? "true" : "false")
42  << ", routing_graph_type: " << to_string(rc.routing_graph_type) << " }";
43  return os;
44  }
45 };
46 } // namespace traffic_simulator
47 
48 #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:32
Definition: routing_configuration.hpp:24
bool allow_lane_change
Definition: routing_configuration.hpp:29
RoutingConfiguration(const bool allow_lane_change)
Definition: routing_configuration.hpp:26
traffic_simulator::RoutingGraphType routing_graph_type
Definition: routing_configuration.hpp:30
bool operator==(const RoutingConfiguration &routing_configuration) const
Definition: routing_configuration.hpp:33
friend std::ostream & operator<<(std::ostream &os, const RoutingConfiguration &rc)
Definition: routing_configuration.hpp:39