A GenericRegulatoryElement can hold any parameters. More...
#include <RegulatoryElement.h>

Public Member Functions | |
| template<typename PrimitiveT > | |
| void | addParameter (const std::string &role, const PrimitiveT &primitive) |
| Add a (mutable) primitive to the regulatory element. More... | |
| template<typename PrimitiveT > | |
| void | addParameter (RoleName role, const PrimitiveT &primitive) |
| Add a (mutable) primitive (RoleName version) More... | |
| GenericRegulatoryElement (const RegulatoryElementDataPtr &data) | |
| GenericRegulatoryElement (Id id=InvalId, const RuleParameterMap ¶meters=RuleParameterMap(), const AttributeMap &attributes=AttributeMap()) | |
| Construct generically from id, parameters and attributes. More... | |
| RuleParameterMap & | parameters () noexcept |
| getter for all parameters of a regulatory element. More... | |
Public Member Functions inherited from lanelet::Primitive< RegulatoryElement > | |
| AttributeMap & | attributes () noexcept |
| get the attributes in a mutable way More... | |
| Primitive ()=default | |
| Primitive (const Primitive< OtherT > &rhs) | |
| Construct from another primitive. Only works if both share the same. More... | |
| Primitive (const std::shared_ptr< const DataType > &)=delete | |
| Primitive (const std::shared_ptr< DataType > &data) | |
| Construct a new primitive from shared_ptr to its data. More... | |
| void | setAttribute (AttributeName name, const Attribute &attribute) |
| set or overwrite an attribute (enum version) More... | |
| void | setAttribute (const std::string &name, const Attribute &attribute) |
| set or overwrite an attribute More... | |
| void | setId (Id id) noexcept |
| set a new id for this primitive More... | |
Public Member Functions inherited from lanelet::RegulatoryElement | |
| void | applyVisitor (RuleParameterVisitor &visitor) const |
| applies a visitor to every parameter in the regulatory element More... | |
| bool | empty () const |
| returns true if this object contains no parameters More... | |
| template<typename T > | |
| Optional< T > | find (Id id) const |
| Finds a parameter by its id, independent of the role. More... | |
| template<> | |
| Optional< ConstRuleParameter > | find (Id id) const |
| template<> | |
| boost::optional< ConstLanelet > | find (Id id) const |
| template<> | |
| boost::optional< ConstArea > | find (Id id) const |
| ConstRuleParameterMap | getParameters () const |
| Returns all parameters as const object (coversion overhead for const) More... | |
| template<typename T > | |
| std::vector< T > | getParameters (const std::string &role) const |
| Returns a vector of all RuleParameters that could be converted to T. More... | |
| template<> | |
| std::vector< ConstLanelet > | getParameters (const std::string &role) const |
| template<typename T > | |
| std::vector< T > | getParameters (RoleName role) const |
| template<> | |
| std::vector< ConstLanelet > | getParameters (RoleName role) const |
| std::vector< std::string > | roles () const |
| returns all the roles this regulatory element has More... | |
| void | setId (Id id) noexcept |
| size_t | size () const |
| get the number of roles in this regulatoryElement More... | |
| virtual | ~RegulatoryElement () |
Public Member Functions inherited from lanelet::ConstPrimitive< RegulatoryElementData > | |
| const Attribute & | attribute (AttributeName name) const |
| retrieve an attribute (enum version) More... | |
| const Attribute & | attribute (const std::string &name) const |
| retrieve an attribute More... | |
| T | attributeOr (AttributeName name, T defaultVal) const |
| retrieve an attribute (enum version) More... | |
| T | attributeOr (const std::string &name, T defaultVal) const noexcept |
| retrieve an attribute (string version) More... | |
| const AttributeMap & | attributes () const |
| get the attributes of this primitive More... | |
| const std::shared_ptr< const RegulatoryElementData > & | constData () const |
| get the internal data of this primitive More... | |
| ConstPrimitive (const std::shared_ptr< const RegulatoryElementData > &data) | |
| Construct from a pointer to the data. More... | |
| bool | hasAttribute (AttributeName name) const noexcept |
| check for an attribute (enum version) More... | |
| bool | hasAttribute (const std::string &name) const noexcept |
| check whether this primitive has a specific attribute More... | |
| Id | id () const noexcept |
| get the unique id of this primitive More... | |
| bool | operator!= (const ConstPrimitive &rhs) const |
| bool | operator== (const ConstPrimitive &rhs) const |
Static Public Attributes | |
| static constexpr char | RuleName [] = "regulatory_element" |
Static Public Attributes inherited from lanelet::Primitive< RegulatoryElement > | |
| static constexpr bool | IsConst |
Static Public Attributes inherited from lanelet::RegulatoryElement | |
| static constexpr char | RuleName [] = "basic_regulatory_element" |
Static Public Attributes inherited from lanelet::ConstPrimitive< RegulatoryElementData > | |
| static constexpr bool | IsConst |
A GenericRegulatoryElement can hold any parameters.
Definition at line 270 of file primitives/RegulatoryElement.h.
|
inlineexplicit |
Definition at line 273 of file primitives/RegulatoryElement.h.
|
inlineexplicit |
Construct generically from id, parameters and attributes.
Definition at line 277 of file primitives/RegulatoryElement.h.
| void lanelet::GenericRegulatoryElement::addParameter | ( | const std::string & | role, |
| const PrimitiveT & | primitive | ||
| ) |
Add a (mutable) primitive to the regulatory element.
Definition at line 397 of file primitives/RegulatoryElement.h.
| void lanelet::GenericRegulatoryElement::addParameter | ( | RoleName | role, |
| const PrimitiveT & | primitive | ||
| ) |
Add a (mutable) primitive (RoleName version)
Definition at line 402 of file primitives/RegulatoryElement.h.
|
inlinenoexcept |
getter for all parameters of a regulatory element.
Definition at line 292 of file primitives/RegulatoryElement.h.
|
staticconstexpr |
Definition at line 272 of file primitives/RegulatoryElement.h.