scenario_simulator_v2 C++ API
speed_action.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__SPEED_ACTION_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__SPEED_ACTION_HPP_
17 
23 #include <pugixml.hpp>
24 #include <unordered_map>
25 
27 {
28 inline namespace syntax
29 {
30 /* ---- SpeedAction ------------------------------------------------------------
31  *
32  * <xsd:complexType name="SpeedAction">
33  * <xsd:all>
34  * <xsd:element name="SpeedActionDynamics" type="TransitionDynamics"/>
35  * <xsd:element name="SpeedActionTarget" type="SpeedActionTarget"/>
36  * </xsd:all>
37  * </xsd:complexType>
38  *
39  * -------------------------------------------------------------------------- */
40 struct SpeedAction : private Scope, // NOTE: Required for access to actors
43 {
45 
47 
48  explicit SpeedAction(const pugi::xml_node &, Scope &);
49 
50  std::unordered_map<Entity, Boolean> accomplishments;
51 
52  auto accomplished() -> bool;
53 
54  auto endsImmediately() const -> bool;
55 
56  auto run() -> void;
57 
58  auto start() -> void;
59 };
60 } // namespace syntax
61 } // namespace openscenario_interpreter
62 
63 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__SPEED_ACTION_HPP_
Definition: scope.hpp:154
Definition: escape_sequence.hpp:22
Definition: speed_action_target.hpp:39
Definition: speed_action.hpp:43
const SpeedActionTarget speed_action_target
Definition: speed_action.hpp:46
auto endsImmediately() const -> bool
Definition: speed_action.cpp:100
auto run() -> void
Definition: speed_action.cpp:105
auto start() -> void
Definition: speed_action.cpp:107
std::unordered_map< Entity, Boolean > accomplishments
Definition: speed_action.hpp:50
SpeedAction(const pugi::xml_node &, Scope &)
Definition: speed_action.cpp:26
auto accomplished() -> bool
Definition: speed_action.cpp:43
const TransitionDynamics speed_action_dynamics
Definition: speed_action.hpp:44
Definition: transition_dynamics.hpp:38