scenario_simulator_v2 C++ API
route_strategy.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 OPENSCENARIO_INTERPRETER__SYNTAX__ROUTE_STRATEGY_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__ROUTE_STRATEGY_HPP_
17 
18 #include <iostream>
19 
21 {
22 inline namespace syntax
23 {
24 /* ---- RouteStrategy ----------------------------------------------------------
25  *
26  * <xsd:simpleType name="RouteStrategy">
27  * <xsd:union>
28  * <xsd:simpleType>
29  * <xsd:restriction base="xsd:string">
30  * <xsd:enumeration value="fastest"/>
31  * <xsd:enumeration value="shortest"/>
32  * <xsd:enumeration value="leastIntersections"/>
33  * <xsd:enumeration value="random"/>
34  * </xsd:restriction>
35  * </xsd:simpleType>
36  * <xsd:simpleType>
37  * <xsd:restriction base="parameter"/>
38  * </xsd:simpleType>
39  * </xsd:union>
40  * </xsd:simpleType>
41  *
42  * -------------------------------------------------------------------------- */
44 {
45  enum value_type {
46  shortest, // Shortest route.
47  fastest, // Fastest route.
48  leastIntersections, // Route with the least number of intersections.
49  random, // Random route.
50  } value;
51 
52  RouteStrategy() = default;
53 
54  constexpr operator value_type() const noexcept { return value; }
55 };
56 
57 auto operator>>(std::istream &, RouteStrategy &) -> std::istream &;
58 
59 auto operator<<(std::ostream &, const RouteStrategy &) -> std::ostream &;
60 } // namespace syntax
61 } // namespace openscenario_interpreter
62 
63 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__ROUTE_STRATEGY_HPP_
auto operator>>(std::istream &, Boolean &) -> std::istream &
Definition: boolean.cpp:52
auto operator<<(std::ostream &, const Boolean &) -> std::ostream &
Definition: boolean.cpp:46
Definition: escape_sequence.hpp:22
Definition: route_strategy.hpp:44
enum openscenario_interpreter::syntax::RouteStrategy::value_type value
value_type
Definition: route_strategy.hpp:45
@ random
Definition: route_strategy.hpp:49
@ shortest
Definition: route_strategy.hpp:46
@ leastIntersections
Definition: route_strategy.hpp:48
@ fastest
Definition: route_strategy.hpp:47