scenario_simulator_v2 C++ API
Classes | Typedefs | Functions | Variables
openscenario_interpreter::reader Namespace Reference

Classes

struct  Value
 
struct  Grammar
 

Typedefs

using Cardinality = typename std::iterator_traits< typename pugi::xml_node::iterator >::difference_type
 

Functions

template<typename Scope >
auto substitute (std::string attribute, Scope &scope)
 
template<typename T , typename Node , typename Scope >
auto readAttribute (const std::string &name, const Node &node, const Scope &scope) -> T
 
template<typename T , typename Node , typename Scope >
auto readAttribute (const std::string &name, const Node &node, const Scope &scope, T &&value)
 
template<typename T , typename Node , typename Scope >
auto readAttribute (const std::string &name, const Node &node, const Scope &scope, std::nullopt_t)
 
template<typename T , typename Node , typename Scope >
readContent (const Node &node, const Scope &)
 
template<Cardinality MinOccurs, Cardinality MaxOccurs, typename F >
auto traverse (const pugi::xml_node &parent, const std::string &name, F &&f) -> void
 
template<typename T , typename Scope >
auto readElement (const std::string &name, const pugi::xml_node &parent, Scope &scope)
 
template<typename T , typename U , typename Scope >
auto readElement (const std::string &name, const pugi::xml_node &parent, Scope &scope, U &&value)
 
template<typename T , Cardinality MinOccurs, Cardinality MaxOccurs = unbounded, typename... Ts>
auto readElements (const std::string &name, const pugi::xml_node &node, Ts &&... xs)
 
template<typename GroupT , Cardinality MinOccurs, Cardinality MaxOccurs = unbounded, typename... Ts>
auto readGroups (const pugi::xml_node &node, Ts &&... xs)
 
template<typename... Ts>
auto choice (const pugi::xml_node &node, Ts &&... xs) -> decltype(auto)
 
std::string evaluate (const std::string &, const Scope &)
 
template<>
auto Value::cast< Value::Numeric > () const -> Value
 

Variables

constexpr auto unbounded = std::numeric_limits<Cardinality>::max()
 

Typedef Documentation

◆ Cardinality

using openscenario_interpreter::reader::Cardinality = typedef typename std::iterator_traits<typename pugi::xml_node::iterator>::difference_type

Function Documentation

◆ choice()

template<typename... Ts>
auto openscenario_interpreter::reader::choice ( const pugi::xml_node &  node,
Ts &&...  xs 
) -> decltype(auto)

◆ evaluate()

std::string openscenario_interpreter::reader::evaluate ( const std::string &  expression,
const Scope scope 
)

◆ readAttribute() [1/3]

template<typename T , typename Node , typename Scope >
auto openscenario_interpreter::reader::readAttribute ( const std::string &  name,
const Node &  node,
const Scope scope 
) -> T

◆ readAttribute() [2/3]

template<typename T , typename Node , typename Scope >
auto openscenario_interpreter::reader::readAttribute ( const std::string &  name,
const Node &  node,
const Scope scope,
std::nullopt_t   
)

◆ readAttribute() [3/3]

template<typename T , typename Node , typename Scope >
auto openscenario_interpreter::reader::readAttribute ( const std::string &  name,
const Node &  node,
const Scope scope,
T &&  value 
)

◆ readContent()

template<typename T , typename Node , typename Scope >
T openscenario_interpreter::reader::readContent ( const Node &  node,
const Scope  
)

◆ readElement() [1/2]

template<typename T , typename Scope >
auto openscenario_interpreter::reader::readElement ( const std::string &  name,
const pugi::xml_node &  parent,
Scope scope 
)

◆ readElement() [2/2]

template<typename T , typename U , typename Scope >
auto openscenario_interpreter::reader::readElement ( const std::string &  name,
const pugi::xml_node &  parent,
Scope scope,
U &&  value 
)

◆ readElements()

template<typename T , Cardinality MinOccurs, Cardinality MaxOccurs = unbounded, typename... Ts>
auto openscenario_interpreter::reader::readElements ( const std::string &  name,
const pugi::xml_node &  node,
Ts &&...  xs 
)

◆ readGroups()

template<typename GroupT , Cardinality MinOccurs, Cardinality MaxOccurs = unbounded, typename... Ts>
auto openscenario_interpreter::reader::readGroups ( const pugi::xml_node &  node,
Ts &&...  xs 
)

◆ substitute()

template<typename Scope >
auto openscenario_interpreter::reader::substitute ( std::string  attribute,
Scope scope 
)

◆ traverse()

template<Cardinality MinOccurs, Cardinality MaxOccurs, typename F >
auto openscenario_interpreter::reader::traverse ( const pugi::xml_node &  parent,
const std::string &  name,
F &&  f 
) -> void

◆ Value::cast< Value::Numeric >()

template<>
auto openscenario_interpreter::reader::Value::cast< Value::Numeric > ( ) const -> Value

Variable Documentation

◆ unbounded

constexpr auto openscenario_interpreter::reader::unbounded = std::numeric_limits<Cardinality>::max()
constexpr