15 #ifndef OPENSCENARIO_INTERPRETER__SYNTAX__PROPERTIES_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__PROPERTIES_HPP_
21 #include <pugixml.hpp>
22 #include <unordered_map>
26 inline namespace syntax
69 auto get(
const String & name,
const T & default_value)
const ->
auto
72 if (
const auto [name, property] = *iter; not
property.value.empty()) {
73 return boost::lexical_cast<T>(property.value);
85 return get<T>(name, T());
Definition: scope.hpp:154
std::string String
Definition: string.hpp:24
Definition: properties.hpp:42
auto get(const String &name, const T &default_value) const -> auto
Definition: properties.hpp:69
auto get(const String &name) const -> auto
Definition: properties.hpp:83
std::unordered_map< String, Property > properties
Definition: properties.hpp:48
auto contains(const String &name) const -> bool
Definition: properties.hpp:63
std::list< File > files
Definition: properties.hpp:57