scenario_simulator_v2 C++ API
parameter_type.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__PARAMETER_TYPE_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__PARAMETER_TYPE_HPP_
17 
18 #include <iostream>
25 
27 {
28 inline namespace syntax
29 {
30 /* ---- ParameterType ----------------------------------------------------------
31  *
32  * <xsd:simpleType name="ParameterType">
33  * <xsd:union>
34  * <xsd:simpleType>
35  * <xsd:restriction base="xsd:string">
36  * <xsd:enumeration value="integer"/>
37  * <xsd:enumeration value="double"/>
38  * <xsd:enumeration value="string"/>
39  * <xsd:enumeration value="unsignedInt"/>
40  * <xsd:enumeration value="unsignedShort"/>
41  * <xsd:enumeration value="boolean"/>
42  * <xsd:enumeration value="dateTime"/>
43  * </xsd:restriction>
44  * </xsd:simpleType>
45  * <xsd:simpleType>
46  * <xsd:restriction base="parameter"/>
47  * </xsd:simpleType>
48  * </xsd:union>
49  * </xsd:simpleType>
50  *
51  * -------------------------------------------------------------------------- */
53 {
54  enum value_type {
62  } value;
63 
64  ParameterType() = default;
65 
66  constexpr operator value_type() const noexcept { return value; }
67 };
68 
69 auto operator>>(std::istream &, ParameterType &) -> std::istream &;
70 
71 auto operator<<(std::ostream &, const ParameterType &) -> std::ostream &;
72 } // namespace syntax
73 } // namespace openscenario_interpreter
74 
75 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__PARAMETER_TYPE_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: parameter_type.hpp:53
enum openscenario_interpreter::syntax::ParameterType::value_type value
value_type
Definition: parameter_type.hpp:54
@ DATE_TIME
Definition: parameter_type.hpp:56
@ UNSIGNED_SHORT
Definition: parameter_type.hpp:61
@ BOOLEAN
Definition: parameter_type.hpp:55
@ UNSIGNED_INT
Definition: parameter_type.hpp:60
@ INTEGER
Definition: parameter_type.hpp:58
@ DOUBLE
Definition: parameter_type.hpp:57
@ STRING
Definition: parameter_type.hpp:59