scenario_simulator_v2 C++ API
command.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__COMMAND_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__COMMAND_HPP_
17 
18 #include <iostream>
19 
21 {
22 inline namespace syntax
23 {
24 struct Command
25 {
26  enum value_type {
29  nop,
31  } value;
32 
33  Command() = default;
34 
35  constexpr operator value_type() const noexcept { return value; }
36 
37  auto operator=(const value_type &) -> Command &;
38 };
39 
40 auto operator>>(std::istream &, Command &) -> std::istream &;
41 
42 auto operator<<(std::ostream &, const Command &) -> std::ostream &;
43 } // namespace syntax
44 } // namespace openscenario_interpreter
45 
46 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__COMMAND_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: command.hpp:25
enum openscenario_interpreter::syntax::Command::value_type value
value_type
Definition: command.hpp:26
@ nop
Definition: command.hpp:29
@ exitFailure
Definition: command.hpp:27
@ print
Definition: command.hpp:30
@ exitSuccess
Definition: command.hpp:28
auto operator=(const value_type &) -> Command &
Definition: command.cpp:26