scenario_simulator_v2 C++ API
scenario_definition.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__SCENARIO_DEFINITION_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__SCENARIO_DEFINITION_HPP_
17 
18 #include <nlohmann/json.hpp>
24 #include <pugixml.hpp>
25 
27 {
28 inline namespace syntax
29 {
30 /* ---- ScenarioDefinition -----------------------------------------------------
31  *
32  * <xsd:group name="ScenarioDefinition">
33  * <xsd:sequence>
34  * <xsd:element name="ParameterDeclarations" type="ParameterDeclarations" minOccurs="0"/>
35  * <xsd:element name="CatalogLocations" type="CatalogLocations"/>
36  * <xsd:element name="RoadNetwork" type="RoadNetwork"/>
37  * <xsd:element name="Entities" type="Entities"/>
38  * <xsd:element name="Storyboard" type="Storyboard"/>
39  * </xsd:sequence>
40  * </xsd:group>
41  *
42  * -------------------------------------------------------------------------- */
44 {
46 
48 
50 
52 
54 
55  explicit ScenarioDefinition(const pugi::xml_node &, Scope &);
56 
57  auto evaluate() -> Object;
58 
59  friend auto operator<<(std::ostream &, const ScenarioDefinition &) -> std::ostream &;
60 
61  friend auto operator<<(nlohmann::json &, const ScenarioDefinition &) -> nlohmann::json &;
62 };
63 
64 } // namespace syntax
65 } // namespace openscenario_interpreter
66 
67 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__SCENARIO_DEFINITION_HPP_
Definition: scope.hpp:154
Definition: escape_sequence.hpp:22
Pointer< Expression > Object
Definition: object.hpp:26
Definition: catalog_locations.hpp:44
Definition: parameter_declarations.hpp:36
Definition: road_network.hpp:39
Definition: scenario_definition.hpp:44
Storyboard storyboard
Definition: scenario_definition.hpp:53
friend auto operator<<(std::ostream &, const ScenarioDefinition &) -> std::ostream &
Definition: scenario_definition.cpp:42
RoadNetwork road_network
Definition: scenario_definition.hpp:49
const Entities entities
Definition: scenario_definition.hpp:51
auto evaluate() -> Object
Definition: scenario_definition.cpp:32
ScenarioDefinition(const pugi::xml_node &, Scope &)
Definition: scenario_definition.cpp:23
const ParameterDeclarations parameter_declarations
Definition: scenario_definition.hpp:45
const CatalogLocations catalog_locations
Definition: scenario_definition.hpp:47