scenario_simulator_v2 C++ API
init_actions.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__INIT_ACTIONS_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__INIT_ACTIONS_HPP_
17 
18 #include <boost/json.hpp>
21 #include <pugixml.hpp>
22 
24 {
25 inline namespace syntax
26 {
27 /* ---- InitActions ------------------------------------------------------------
28  *
29  * <xsd:complexType name="InitActions">
30  * <xsd:sequence>
31  * <xsd:element name="GlobalAction" type="GlobalAction" minOccurs="0" maxOccurs="unbounded"/>
32  * <xsd:element name="UserDefinedAction" type="UserDefinedAction" minOccurs="0" maxOccurs="unbounded"/>
33  * <xsd:element name="Private" minOccurs="0" maxOccurs="unbounded" type="Private"/>
34  * </xsd:sequence>
35  * </xsd:complexType>
36  *
37  * -------------------------------------------------------------------------- */
39 {
40  explicit InitActions(const pugi::xml_node &, Scope &);
41 
42  auto evaluate() -> Object override;
43 
44  auto accomplished() const -> bool override;
45 
46  auto endsImmediately() const -> bool;
47 
48  auto run() -> void override;
49 
50  auto runInstantaneousActions() -> void;
51 
52  auto runNonInstantaneousActions() -> void;
53 
54  auto start() -> void override;
55 
56  auto startInstantaneousActions() -> void;
57 
58  auto startNonInstantaneousActions() -> void;
59 
63 
64  friend auto operator<<(boost::json::object &, const InitActions &) -> boost::json::object &;
65 };
66 } // namespace syntax
67 } // namespace openscenario_interpreter
68 
69 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__INIT_ACTIONS_HPP_
Definition: scope.hpp:154
Definition: storyboard_element.hpp:37
Definition: escape_sequence.hpp:22
std::list< Object > Elements
Definition: object.hpp:56
Definition: init_actions.hpp:39
InitActions(const pugi::xml_node &, Scope &)
Definition: init_actions.cpp:27
auto endsImmediately() const -> bool
Definition: init_actions.cpp:66
auto runInstantaneousActions() -> void
Definition: init_actions.cpp:127
auto run() -> void override
Definition: init_actions.cpp:64
friend auto operator<<(boost::json::object &, const InitActions &) -> boost::json::object &
Definition: init_actions.cpp:157
auto accomplished() const -> bool override
Definition: init_actions.cpp:47
auto start() -> void override
Definition: init_actions.cpp:85
auto startInstantaneousActions() -> void
Definition: init_actions.cpp:88
auto evaluate() -> Object override
Definition: init_actions.cpp:45
Elements user_defined_actions
Definition: init_actions.hpp:61
Elements privates
Definition: init_actions.hpp:62
Elements global_actions
Definition: init_actions.hpp:60
auto runNonInstantaneousActions() -> void
Definition: init_actions.cpp:143
auto startNonInstantaneousActions() -> void
Definition: init_actions.cpp:112