scenario_simulator_v2 C++ API
following_mode.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__FOLLOWING_MODE_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__FOLLOWING_MODE_HPP_
17 
18 #include <iostream>
19 
21 {
22 inline namespace syntax
23 {
24 /* ---- FollowingMode 1.2 ------------------------------------------------------
25  *
26  * <xsd:simpleType name="FollowingMode">
27  * <xsd:union>
28  * <xsd:simpleType>
29  * <xsd:restriction base="xsd:string">
30  * <xsd:enumeration value="follow"/>
31  * <xsd:enumeration value="position"/>
32  * </xsd:restriction>
33  * </xsd:simpleType>
34  * <xsd:simpleType>
35  * <xsd:restriction base="parameter"/>
36  * </xsd:simpleType>
37  * </xsd:union>
38  * </xsd:simpleType>
39  *
40  * -------------------------------------------------------------------------- */
42 {
43  enum value_type {
44  follow, /*
45  Follow the lateral and/or longitudinal target value as good as possible
46  by observing the dynamic constraints of the entity (e.g. for a driver
47  model). */
48 
50  Follow the trajectory, shape or profile exactly by ignoring the dynamic
51  constraints of the entity. */
52  } value;
53 
54  constexpr operator value_type() const noexcept { return value; }
55 };
56 
57 auto operator>>(std::istream &, FollowingMode &) -> std::istream &;
58 
59 auto operator<<(std::ostream &, const FollowingMode &) -> std::ostream &;
60 } // namespace syntax
61 } // namespace openscenario_interpreter
62 
63 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__FOLLOWING_MODE_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: following_mode.hpp:42
value_type
Definition: following_mode.hpp:43
@ position
Definition: following_mode.hpp:49
@ follow
Definition: following_mode.hpp:44
enum openscenario_interpreter::syntax::FollowingMode::value_type value