Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
lanelet::RegulatoryElement Class Reference

A general rule or limitation for a lanelet (abstract base class) More...

#include <RegulatoryElement.h>

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

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
 
- Public Types inherited from lanelet::ConstPrimitive< RegulatoryElementData >
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< 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 [] = "basic_regulatory_element"
 
- Static Public Attributes inherited from lanelet::ConstPrimitive< RegulatoryElementData >
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)
 
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
 

Friends

class LaneletMap
 
class RegulatoryElementFactory
 

Detailed Description

A general rule or limitation for a lanelet (abstract base class)

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

Member Typedef Documentation

◆ Category

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

◆ const_iterator

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

◆ ConstType

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

◆ iterator

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

◆ MutableType

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

◆ ThreeDType

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

◆ TwoDType

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

Constructor & Destructor Documentation

◆ ~RegulatoryElement()

lanelet::RegulatoryElement::~RegulatoryElement ( )
virtualdefault

◆ RegulatoryElement() [1/2]

lanelet::RegulatoryElement::RegulatoryElement ( Id  id = InvalId,
const RuleParameterMap members = RuleParameterMap(),
const AttributeMap attributes = AttributeMap() 
)
inlineexplicitprotected

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

◆ RegulatoryElement() [2/2]

lanelet::RegulatoryElement::RegulatoryElement ( const RegulatoryElementDataPtr data)
inlineexplicitprotected

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

Member Function Documentation

◆ applyVisitor() [1/2]

void lanelet::RegulatoryElement::applyVisitor ( internal::MutableParameterVisitor visitor) const
protected

Definition at line 155 of file RegulatoryElement.cpp.

◆ applyVisitor() [2/2]

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.

◆ begin()

const_iterator lanelet::RegulatoryElement::begin ( ) const
inlineprotected

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

◆ data()

RegulatoryElementDataPtr lanelet::RegulatoryElement::data ( )
inlineprotected

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

◆ empty()

bool lanelet::RegulatoryElement::empty ( ) const
inline

returns true if this object contains no parameters

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

◆ end()

const_iterator lanelet::RegulatoryElement::end ( ) const
inlineprotected

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

◆ find() [1/4]

template<typename T >
Optional< T > lanelet::RegulatoryElement::find ( Id  id) const

Finds a parameter by its id, independent of the role.

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

◆ find() [2/4]

template<>
Optional<ConstRuleParameter> lanelet::RegulatoryElement::find ( Id  id) const
inline

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

◆ find() [3/4]

template<>
boost::optional<ConstLanelet> lanelet::RegulatoryElement::find ( Id  id) const
inline

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

◆ find() [4/4]

template<>
boost::optional<ConstArea> lanelet::RegulatoryElement::find ( Id  id) const
inline

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

◆ getParameters() [1/6]

ConstRuleParameterMap lanelet::RegulatoryElement::getParameters ( ) const

Returns all parameters as const object (coversion overhead for const)

Definition at line 137 of file RegulatoryElement.cpp.

◆ getParameters() [2/6]

template<typename T >
std::vector<T> lanelet::RegulatoryElement::getParameters ( const std::string &  role) const
inline

Returns a vector of all RuleParameters that could be converted to T.

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

◆ getParameters() [3/6]

template<>
std::vector< ConstArea > lanelet::RegulatoryElement::getParameters ( const std::string &  role) const
inline

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

◆ getParameters() [4/6]

template<typename T >
std::vector<T> lanelet::RegulatoryElement::getParameters ( RoleName  role)
inlineprotected

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

◆ getParameters() [5/6]

template<typename T >
std::vector<T> lanelet::RegulatoryElement::getParameters ( RoleName  role) const
inline

Returns a vector of all RuleParameters that could be converted to T (enum version).

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

◆ getParameters() [6/6]

template<>
std::vector< ConstArea > lanelet::RegulatoryElement::getParameters ( RoleName  role) const
inline

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

◆ parameters() [1/2]

RuleParameterMap& lanelet::RegulatoryElement::parameters ( )
inlineprotected

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

◆ parameters() [2/2]

const RuleParameterMap& lanelet::RegulatoryElement::parameters ( ) const
inlineprotected

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

◆ roles()

std::vector<std::string> lanelet::RegulatoryElement::roles ( ) const
inline

returns all the roles this regulatory element has

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

◆ setId()

void lanelet::RegulatoryElement::setId ( Id  id)
inlinenoexcept

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

◆ size()

size_t lanelet::RegulatoryElement::size ( ) const
inline

get the number of roles in this regulatoryElement

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

Friends And Related Function Documentation

◆ LaneletMap

friend class LaneletMap
friend

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

◆ RegulatoryElementFactory

friend class RegulatoryElementFactory
friend

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

Member Data Documentation

◆ RuleName

constexpr char lanelet::RegulatoryElement::RuleName = "basic_regulatory_element"
staticconstexpr

Definition at line 185 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:53