scenario_simulator_v2 C++ API
reference_context.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__REFERENCE_CONTEXT_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__REFERENCE_CONTEXT_HPP_
17 
19 #include <string>
20 
22 {
23 inline namespace syntax
24 {
25 /* ---- ReferenceContext -------------------------------------------------------
26  *
27  * <xsd:simpleType name="ReferenceContext">
28  * <xsd:union>
29  * <xsd:simpleType>
30  * <xsd:restriction base="xsd:string">
31  * <xsd:enumeration value="relative"/>
32  * <xsd:enumeration value="absolute"/>
33  * </xsd:restriction>
34  * </xsd:simpleType>
35  * <xsd:simpleType>
36  * <xsd:restriction base="parameter"/>
37  * </xsd:simpleType>
38  * </xsd:union>
39  * </xsd:simpleType>
40  *
41  * -------------------------------------------------------------------------- */
43 {
44  enum value_type {
45  relative, // NOTE: DEFAULT (DON'T REORDER THIS ENUMERATION)
47  } value;
48 
49  ReferenceContext() = default;
50 
51  constexpr operator value_type() const noexcept { return value; }
52 };
53 
54 auto operator>>(std::istream &, ReferenceContext &) -> std::istream &;
55 
56 auto operator<<(std::ostream &, const ReferenceContext &) -> std::ostream &;
57 } // namespace syntax
58 } // namespace openscenario_interpreter
59 
60 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__REFERENCE_CONTEXT_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: reference_context.hpp:43
value_type
Definition: reference_context.hpp:44
@ relative
Definition: reference_context.hpp:45
@ absolute
Definition: reference_context.hpp:46
enum openscenario_interpreter::syntax::ReferenceContext::value_type value