scenario_simulator_v2 C++ API
coordinate_system.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__COORDINATE_SYSTEM_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__COORDINATE_SYSTEM_HPP_
17 
18 #include <iostream>
19 #include <type_traits>
20 
22 {
23 inline namespace syntax
24 {
25 /*
26  CoordinateSystem (OpenSCENARIO XML 1.3)
27 
28  Definition of the coordinate system to be used for calculations.
29  If used in a condition, then the coordinate system relates to the triggering entity.
30  If used in an action, the coordinate system relates to the actor.
31 
32  <xsd:simpleType name="CoordinateSystem">
33  <xsd:union>
34  <xsd:simpleType>
35  <xsd:restriction base="xsd:string">
36  <xsd:enumeration value="entity"/>
37  <xsd:enumeration value="lane"/>
38  <xsd:enumeration value="road"/>
39  <xsd:enumeration value="trajectory"/>
40  <xsd:enumeration value="world"/>
41  </xsd:restriction>
42  </xsd:simpleType>
43  <xsd:simpleType>
44  <xsd:restriction base="parameter"/>
45  </xsd:simpleType>
46  </xsd:union>
47  </xsd:simpleType>
48 */
50 {
51  enum value_type {
56  } value;
57 
58  CoordinateSystem() = default;
59 
61 
62  constexpr operator value_type() const noexcept { return value; }
63 };
64 
65 auto operator>>(std::istream &, CoordinateSystem &) -> std::istream &;
66 
67 auto operator<<(std::ostream &, const CoordinateSystem &) -> std::ostream &;
68 } // namespace syntax
69 } // namespace openscenario_interpreter
70 
71 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__COORDINATE_SYSTEM_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: hypot.hpp:22
Definition: coordinate_system.hpp:50
value_type
Definition: coordinate_system.hpp:51
@ trajectory
Definition: coordinate_system.hpp:55
@ road
Definition: coordinate_system.hpp:54
@ entity
Definition: coordinate_system.hpp:52
@ lane
Definition: coordinate_system.hpp:53
constexpr CoordinateSystem(value_type value)
Definition: coordinate_system.hpp:60
enum openscenario_interpreter::syntax::CoordinateSystem::value_type value