Class RegulatoryElement

Inheritance Relationships

Base Types

Derived Types

Class Documentation

class RegulatoryElement : public lanelet::ConstPrimitive<RegulatoryElementData>, private boost::noncopyable

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

Subclassed by lanelet::Primitive< RegulatoryElement >, lanelet::AllWayStop, lanelet::RightOfWay, lanelet::TrafficLight, lanelet::TrafficSign

Public Types

using ConstType = RegulatoryElement
using MutableType = GenericRegulatoryElement
using TwoDType = RegulatoryElement
using ThreeDType = RegulatoryElement
using Category = traits::RegulatoryElementTag
using const_iterator = RuleParameterMap::const_iterator
using iterator = RuleParameterMap::iterator

Public Functions

virtual ~RegulatoryElement()
inline void setId(Id id) noexcept
ConstRuleParameterMap getParameters() const

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

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

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

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

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

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

returns all the roles this regulatory element has

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

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

inline bool empty() const

returns true if this object contains no parameters

inline size_t size() const

get the number of roles in this regulatoryElement

void applyVisitor(RuleParameterVisitor &visitor) const

applies a visitor to every parameter in the regulatory element

template<>
inline Optional<ConstRuleParameter> find(Id id) const
template<>
inline boost::optional<ConstLanelet> find(Id id) const
template<>
inline boost::optional<ConstArea> find(Id id) const
template<>
inline std::vector<ConstLanelet> getParameters(const std::string &role) const
template<>
inline std::vector<ConstLanelet> getParameters(RoleName role) const
template<>
inline std::vector<ConstArea> getParameters(const std::string &role) const
template<>
inline std::vector<ConstArea> getParameters(RoleName role) const

Public Static Attributes

static constexpr char RuleName[] = "basic_regulatory_element"

Protected Functions

inline const_iterator begin() const
inline const_iterator end() const
void applyVisitor(internal::MutableParameterVisitor &visitor) const
inline const RuleParameterMap &parameters() const
inline RuleParameterMap &parameters()
inline RegulatoryElementDataPtr data()
template<typename T>
inline std::vector<T> getParameters(RoleName role)
inline explicit RegulatoryElement(Id id = InvalId, const RuleParameterMap &members = RuleParameterMap(), const AttributeMap &attributes = AttributeMap())
inline explicit RegulatoryElement(const RegulatoryElementDataPtr &data)

Friends

friend class RegulatoryElementFactory
friend class LaneletMap