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
42 {
44 
46 
47  explicit SpeedAction(const pugi::xml_node &, Scope &);
48 
49  std::unordered_map<Entity, Boolean> accomplishments;
50 
51  auto accomplished() -> bool;
52 
53  auto endsImmediately() const -> bool;
54 
55  auto run() -> void;
56 
57  auto start() -> void;
58 };
59 } // namespace syntax
60 } // namespace openscenario_interpreter
61 
62 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__SPEED_ACTION_HPP_
Definition: scope.hpp:154
Definition: hypot.hpp:22
Definition: speed_action_target.hpp:39
Definition: speed_action.hpp:42
const SpeedActionTarget speed_action_target
Definition: speed_action.hpp:45
auto endsImmediately() const -> bool
Definition: speed_action.cpp:106
auto run() -> void
Definition: speed_action.cpp:111
auto start() -> void
Definition: speed_action.cpp:113
std::unordered_map< Entity, Boolean > accomplishments
Definition: speed_action.hpp:49
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:43
Definition: transition_dynamics.hpp:38