A general rule or limitation for a lanelet (abstract base class) More...
#include <RegulatoryElement.h>
Public Types | |
using | Category = traits::RegulatoryElementTag |
using | const_iterator = RuleParameterMap::const_iterator |
using | ConstType = RegulatoryElement |
using | iterator = RuleParameterMap::iterator |
using | MutableType = GenericRegulatoryElement |
using | ThreeDType = RegulatoryElement |
using | TwoDType = RegulatoryElement |
![]() | |
using | DataType = RegulatoryElementData |
Public Member Functions | |
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 () |
![]() | |
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 [] = "basic_regulatory_element" |
![]() | |
static constexpr bool | IsConst |
Protected Member Functions | |
void | applyVisitor (internal::MutableParameterVisitor &visitor) const |
const_iterator | begin () const |
RegulatoryElementDataPtr | data () |
const_iterator | end () const |
template<typename T > | |
std::vector< T > | getParameters (RoleName role) |
RuleParameterMap & | parameters () |
const RuleParameterMap & | parameters () const |
RegulatoryElement (const RegulatoryElementDataPtr &data) | |
RegulatoryElement (Id id=InvalId, const RuleParameterMap &members=RuleParameterMap(), const AttributeMap &attributes=AttributeMap()) | |
![]() | |
ConstPrimitive (const ConstPrimitive &rhs)=default | |
ConstPrimitive (ConstPrimitive &&rhs) noexcept=default | |
ConstPrimitive & | operator= (const ConstPrimitive &rhs)=default |
ConstPrimitive & | operator= (ConstPrimitive &&rhs) noexcept=default |
~ConstPrimitive () noexcept=default | |
Friends | |
class | LaneletMap |
class | RegulatoryElementFactory |
A general rule or limitation for a lanelet (abstract base class)
Definition at line 174 of file primitives/RegulatoryElement.h.
Definition at line 182 of file primitives/RegulatoryElement.h.
Definition at line 183 of file primitives/RegulatoryElement.h.
Definition at line 178 of file primitives/RegulatoryElement.h.
Definition at line 184 of file primitives/RegulatoryElement.h.
Definition at line 179 of file primitives/RegulatoryElement.h.
Definition at line 181 of file primitives/RegulatoryElement.h.
Definition at line 180 of file primitives/RegulatoryElement.h.
|
virtualdefault |
|
inlineexplicitprotected |
Definition at line 259 of file primitives/RegulatoryElement.h.
|
inlineexplicitprotected |
Definition at line 262 of file primitives/RegulatoryElement.h.
|
protected |
Definition at line 155 of file RegulatoryElement.cpp.
void lanelet::RegulatoryElement::applyVisitor | ( | RuleParameterVisitor & | visitor | ) | const |
applies a visitor to every parameter in the regulatory element
Definition at line 146 of file RegulatoryElement.cpp.
|
inlineprotected |
Definition at line 242 of file primitives/RegulatoryElement.h.
|
inlineprotected |
Definition at line 247 of file primitives/RegulatoryElement.h.
|
inline |
returns true if this object contains no parameters
Definition at line 233 of file primitives/RegulatoryElement.h.
|
inlineprotected |
Definition at line 243 of file primitives/RegulatoryElement.h.
Finds a parameter by its id, independent of the role.
Definition at line 407 of file primitives/RegulatoryElement.h.
|
inline |
Definition at line 422 of file primitives/RegulatoryElement.h.
|
inline |
Definition at line 434 of file primitives/RegulatoryElement.h.
Definition at line 447 of file primitives/RegulatoryElement.h.
ConstRuleParameterMap lanelet::RegulatoryElement::getParameters | ( | ) | const |
Returns all parameters as const object (coversion overhead for const)
Definition at line 137 of file RegulatoryElement.cpp.
|
inline |
Returns a vector of all RuleParameters that could be converted to T.
Definition at line 202 of file primitives/RegulatoryElement.h.
|
inline |
Definition at line 462 of file primitives/RegulatoryElement.h.
|
inlineprotected |
Definition at line 249 of file primitives/RegulatoryElement.h.
|
inline |
Returns a vector of all RuleParameters that could be converted to T (enum version).
Definition at line 214 of file primitives/RegulatoryElement.h.
|
inline |
Definition at line 470 of file primitives/RegulatoryElement.h.
|
inlineprotected |
Definition at line 246 of file primitives/RegulatoryElement.h.
|
inlineprotected |
Definition at line 245 of file primitives/RegulatoryElement.h.
|
inline |
returns all the roles this regulatory element has
Definition at line 224 of file primitives/RegulatoryElement.h.
|
inlinenoexcept |
Definition at line 195 of file primitives/RegulatoryElement.h.
|
inline |
get the number of roles in this regulatoryElement
Definition at line 236 of file primitives/RegulatoryElement.h.
|
friend |
Definition at line 258 of file primitives/RegulatoryElement.h.
|
friend |
Definition at line 257 of file primitives/RegulatoryElement.h.
|
staticconstexpr |
Definition at line 185 of file primitives/RegulatoryElement.h.