scenario_simulator_v2 C++ API
reach_position_condition.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__REACH_POSITION_CONDITION_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__REACH_POSITION_CONDITION_HPP_
17 
24 #include <pugixml.hpp>
25 #include <valarray>
26 
28 {
29 inline namespace syntax
30 {
31 /* ---- ReachPositionCondition -------------------------------------------------
32  *
33  * <xsd:complexType name="ReachPositionCondition">
34  * <xsd:all>
35  * <xsd:element name="Position" type="Position"/>
36  * </xsd:all>
37  * <xsd:attribute name="tolerance" type="Double" use="required"/>
38  * </xsd:complexType>
39  *
40  * -------------------------------------------------------------------------- */
42 {
44 
46 
47  const Rule compare;
48 
50 
51  std::vector<std::valarray<double>> results; // for description
52 
53  const bool consider_z;
54 
55  explicit ReachPositionCondition(const pugi::xml_node &, Scope &, const TriggeringEntities &);
56 
57  auto description() const -> String;
58 
59  auto evaluate() -> Object;
60 };
61 } // namespace syntax
62 } // namespace openscenario_interpreter
63 
64 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__REACH_POSITION_CONDITION_HPP_
Definition: scope.hpp:154
std::string String
Definition: string.hpp:24
Definition: escape_sequence.hpp:22
Definition: reach_position_condition.hpp:42
ReachPositionCondition(const pugi::xml_node &, Scope &, const TriggeringEntities &)
Definition: reach_position_condition.cpp:28
auto description() const -> String
Definition: reach_position_condition.cpp:43
std::vector< std::valarray< double > > results
Definition: reach_position_condition.hpp:51
const Position position
Definition: reach_position_condition.hpp:45
const Double tolerance
Definition: reach_position_condition.hpp:43
const Rule compare
Definition: reach_position_condition.hpp:47
const TriggeringEntities triggering_entities
Definition: reach_position_condition.hpp:49
const bool consider_z
Definition: reach_position_condition.hpp:53
auto evaluate() -> Object
Definition: reach_position_condition.cpp:62
Definition: triggering_entities.hpp:40