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