scenario_simulator_v2 C++ API
object_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__OBJECT_TYPE_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__OBJECT_TYPE_HPP_
17 
18 #include <istream>
19 #include <ostream>
20 
22 {
23 inline namespace syntax
24 {
25 /* ---- ObjectType -------------------------------------------------------------
26  *
27  * <xsd:simpleType name="ObjectType">
28  * <xsd:union>
29  * <xsd:simpleType>
30  * <xsd:restriction base="xsd:string">
31  * <xsd:enumeration value="pedestrian"/>
32  * <xsd:enumeration value="vehicle"/>
33  * <xsd:enumeration value="miscellaneous"/>
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  * -------------------------------------------------------------------------- */
43 struct ObjectType
44 {
45  enum value_type {
47 
51  } value;
52 
53  ObjectType() = default;
54 
55  operator value_type() const noexcept { return value; }
56 };
57 
58 auto operator>>(std::istream &, ObjectType &) -> std::istream &;
59 
60 auto operator<<(std::ostream &, const ObjectType &) -> std::ostream &;
61 } // namespace syntax
62 } // namespace openscenario_interpreter
63 
64 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__OBJECT_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: object_type.hpp:44
value_type
Definition: object_type.hpp:45
@ pedestrian
Definition: object_type.hpp:50
@ miscellaneous
Definition: object_type.hpp:49
@ vehicle
Definition: object_type.hpp:46
@ external
Definition: object_type.hpp:48
enum openscenario_interpreter::syntax::ObjectType::value_type value