Public Member Functions | Static Public Attributes | List of all members
lanelet::GenericRegulatoryElement Class Referencefinal

A GenericRegulatoryElement can hold any parameters. More...

#include <RegulatoryElement.h>

Inheritance diagram for lanelet::GenericRegulatoryElement:
Inheritance graph
[legend]

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 &parameters=RuleParameterMap(), const AttributeMap &attributes=AttributeMap())
 Construct generically from id, parameters and attributes. More...
 
RuleParameterMapparameters () noexcept
 getter for all parameters of a regulatory element. More...
 
- Public Member Functions inherited from lanelet::Primitive< RegulatoryElement >
AttributeMapattributes () 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< ConstRuleParameterfind (Id id) const
 
template<>
boost::optional< ConstLaneletfind (Id id) const
 
template<>
boost::optional< ConstAreafind (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< ConstLaneletgetParameters (const std::string &role) const
 
template<typename T >
std::vector< T > getParameters (RoleName role) const
 
template<>
std::vector< ConstLaneletgetParameters (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 Attributeattribute (AttributeName name) const
 retrieve an attribute (enum version) More...
 
const Attributeattribute (const std::string &name) const
 retrieve an attribute More...
 
attributeOr (AttributeName name, T defaultVal) const
 retrieve an attribute (enum version) More...
 
attributeOr (const std::string &name, T defaultVal) const noexcept
 retrieve an attribute (string version) More...
 
const AttributeMapattributes () 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
 

Additional Inherited Members

- Public Types inherited from lanelet::Primitive< RegulatoryElement >
using DataType = typename RegulatoryElement ::DataType
 
- Public Types inherited from lanelet::RegulatoryElement
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
 
- Public Types inherited from lanelet::ConstPrimitive< RegulatoryElementData >
using DataType = RegulatoryElementData
 
- Protected Member Functions inherited from lanelet::Primitive< RegulatoryElement >
std::shared_ptr< DataTypedata () const
 
Primitiveoperator= (const Primitive &rhs) noexcept
 
Primitiveoperator= (Primitive &&rhs) noexcept
 
 Primitive (const Primitive &rhs) noexcept
 
 Primitive (Primitive &&rhs) noexcept
 
 ~Primitive () noexcept=default
 
- Protected Member Functions inherited from lanelet::RegulatoryElement
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)
 
RuleParameterMapparameters ()
 
const RuleParameterMapparameters () const
 
 RegulatoryElement (const RegulatoryElementDataPtr &data)
 
 RegulatoryElement (Id id=InvalId, const RuleParameterMap &members=RuleParameterMap(), const AttributeMap &attributes=AttributeMap())
 
- Protected Member Functions inherited from lanelet::ConstPrimitive< RegulatoryElementData >
 ConstPrimitive (const ConstPrimitive &rhs)=default
 
 ConstPrimitive (ConstPrimitive &&rhs) noexcept=default
 
ConstPrimitiveoperator= (const ConstPrimitive &rhs)=default
 
ConstPrimitiveoperator= (ConstPrimitive &&rhs) noexcept=default
 
 ~ConstPrimitive () noexcept=default
 

Detailed Description

A GenericRegulatoryElement can hold any parameters.

Definition at line 270 of file primitives/RegulatoryElement.h.

Constructor & Destructor Documentation

◆ GenericRegulatoryElement() [1/2]

lanelet::GenericRegulatoryElement::GenericRegulatoryElement ( const RegulatoryElementDataPtr data)
inlineexplicit

Definition at line 273 of file primitives/RegulatoryElement.h.

◆ GenericRegulatoryElement() [2/2]

lanelet::GenericRegulatoryElement::GenericRegulatoryElement ( Id  id = InvalId,
const RuleParameterMap parameters = RuleParameterMap(),
const AttributeMap attributes = AttributeMap() 
)
inlineexplicit

Construct generically from id, parameters and attributes.

Definition at line 277 of file primitives/RegulatoryElement.h.

Member Function Documentation

◆ addParameter() [1/2]

template<typename PrimitiveT >
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.

◆ addParameter() [2/2]

template<typename PrimitiveT >
void lanelet::GenericRegulatoryElement::addParameter ( RoleName  role,
const PrimitiveT &  primitive 
)

Add a (mutable) primitive (RoleName version)

Definition at line 402 of file primitives/RegulatoryElement.h.

◆ parameters()

RuleParameterMap& lanelet::GenericRegulatoryElement::parameters ( )
inlinenoexcept

getter for all parameters of a regulatory element.

Definition at line 292 of file primitives/RegulatoryElement.h.

Member Data Documentation

◆ RuleName

constexpr char lanelet::GenericRegulatoryElement::RuleName = "regulatory_element"
staticconstexpr

Definition at line 272 of file primitives/RegulatoryElement.h.


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


lanelet2_core
Author(s): Fabian Poggenhans
autogenerated on Thu Mar 6 2025 03:25:52