maliput
RoadRulebook Class Referenceabstract

Detailed Description

Abstract interface for querying "rules of the road".

This interface provides access to static information about a road network (i.e., information determined prior to the beginning of a simulation). Some rule types may refer to additional dynamic information which will be provided by other interfaces. (For example, see RightOfWayRule.)

Concrete implementations of this interface shall be provided by implementing the pure virtual methods declared in private scope.

#include <include/maliput/api/rules/road_rulebook.h>

Inheritance diagram for RoadRulebook:
[legend]

Classes

struct  QueryResults
 Results of a FindRules() query. More...
 

Public Member Functions

 MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (RoadRulebook)
 
virtual ~RoadRulebook ()=default
 
QueryResults FindRules (const std::vector< LaneSRange > &ranges, double tolerance) const
 Returns a QueryResults structure which contains any rules which are applicable to the provided ranges. More...
 
QueryResults Rules () const
 Returns all the rules in this RoadRulebook. More...
 
RightOfWayRule GetRule (const RightOfWayRule::Id &id) const
 Returns the RightOfWayRule with the specified id. More...
 
SpeedLimitRule GetRule (const SpeedLimitRule::Id &id) const
 Returns the SpeedLimitRule with the specified id. More...
 
DirectionUsageRule GetRule (const DirectionUsageRule::Id &id) const
 Returns the DirectionUsageRule with the specified id. More...
 
DiscreteValueRule GetDiscreteValueRule (const Rule::Id &id) const
 Returns the DiscreteValueRule with the specified id. More...
 
RangeValueRule GetRangeValueRule (const Rule::Id &id) const
 Returns the RangeValueRule with the specified id. More...
 

Protected Member Functions

 RoadRulebook ()=default
 

Constructor & Destructor Documentation

◆ ~RoadRulebook()

virtual ~RoadRulebook ( )
virtualdefault

◆ RoadRulebook()

RoadRulebook ( )
protecteddefault

Member Function Documentation

◆ FindRules()

QueryResults FindRules ( const std::vector< LaneSRange > &  ranges,
double  tolerance 
) const

Returns a QueryResults structure which contains any rules which are applicable to the provided ranges.

tolerance is the acceptable linear-tolerance in longitudinal s-coordinate in each range and must be non-negative. A non-zero tolerance makes the query more permissive. However, a non-zero tolerance does not permit matching across BranchPoints (past the s-bounds of a Lane).

Exceptions
maliput::common::assertion_errorif tolerance is negative.

◆ GetDiscreteValueRule()

DiscreteValueRule GetDiscreteValueRule ( const Rule::Id id) const

Returns the DiscreteValueRule with the specified id.

Exceptions
std::out_of_rangeif id is unknown.

◆ GetRangeValueRule()

RangeValueRule GetRangeValueRule ( const Rule::Id id) const

Returns the RangeValueRule with the specified id.

Exceptions
std::out_of_rangeif id is unknown.

◆ GetRule() [1/3]

DirectionUsageRule GetRule ( const DirectionUsageRule::Id &  id) const

Returns the DirectionUsageRule with the specified id.

Exceptions
std::out_of_rangeif id is unknown.

◆ GetRule() [2/3]

RightOfWayRule GetRule ( const RightOfWayRule::Id &  id) const

Returns the RightOfWayRule with the specified id.

Exceptions
std::out_of_rangeif id is unknown.

◆ GetRule() [3/3]

SpeedLimitRule GetRule ( const SpeedLimitRule::Id &  id) const

Returns the SpeedLimitRule with the specified id.

Exceptions
std::out_of_rangeif id is unknown.

◆ MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN ( RoadRulebook  )

◆ Rules()

QueryResults Rules ( ) const

Returns all the rules in this RoadRulebook.


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