scenario_simulator_v2 C++ API
Public Member Functions | List of all members
openscenario_interpreter::syntax::Entity Struct Reference

#include <entity.hpp>

Inheritance diagram for openscenario_interpreter::syntax::Entity:
Inheritance graph
[legend]
Collaboration diagram for openscenario_interpreter::syntax::Entity:
Collaboration graph
[legend]

Public Member Functions

 Entity ()=default
 
 Entity (const ScenarioObject &)
 
 Entity (const EntitySelection &)
 
 Entity (const String &, const Scope &)
 
 Entity (const pugi::xml_node &, const Scope &)
 
auto name () const -> String
 
auto objects () const -> std::set< Entity >
 
auto objectTypes () const -> std::set< ObjectType::value_type >
 
template<typename Function >
auto apply (const Function &function) const
 
 operator EntityRef () const
 
- Public Member Functions inherited from openscenario_interpreter::Pointer< Expression >
decltype(auto) rebind (Ts &&... xs)
 
decltype(auto) binding () const
 
auto type () const -> const std::type_info &
 
auto is () const -> bool
 
auto is_also () const
 
auto as () const -> U &
 
decltype(auto) evaluate (Ts &&... xs) const
 
decltype(auto) accomplished (Ts &&... xs) const
 
decltype(auto) description (Ts &&... xs) const
 

Additional Inherited Members

- Static Public Member Functions inherited from openscenario_interpreter::Pointer< Expression >
static Pointer bind (Ts &&... xs)
 

Constructor & Destructor Documentation

◆ Entity() [1/5]

openscenario_interpreter::syntax::Entity::Entity ( )
default

◆ Entity() [2/5]

openscenario_interpreter::syntax::Entity::Entity ( const ScenarioObject object)

◆ Entity() [3/5]

openscenario_interpreter::syntax::Entity::Entity ( const EntitySelection selection)

◆ Entity() [4/5]

openscenario_interpreter::syntax::Entity::Entity ( const String name,
const Scope scope 
)

◆ Entity() [5/5]

openscenario_interpreter::syntax::Entity::Entity ( const pugi::xml_node &  node,
const Scope scope 
)

Member Function Documentation

◆ apply()

template<typename Function >
auto openscenario_interpreter::syntax::Entity::apply ( const Function &  function) const
inline

◆ name()

auto openscenario_interpreter::syntax::Entity::name ( ) const -> String

◆ objects()

auto openscenario_interpreter::syntax::Entity::objects ( ) const -> std::set<Entity>

◆ objectTypes()

auto openscenario_interpreter::syntax::Entity::objectTypes ( ) const -> std::set<ObjectType::value_type>

◆ operator EntityRef()

openscenario_interpreter::syntax::Entity::operator EntityRef ( ) const

This function is for ScenarioObject only.

Exceptions
std::runtime_errorif the entity is not a ScenarioObject.
Note
To iterate over all objects, use apply function instead.
To get the name of the entity, use name function instead.

The documentation for this struct was generated from the following files: