maliput
SimpleRulebook Class Reference

Detailed Description

SimpleRulebook is a simple concrete implementation of the api::rules::RoadRulebook abstract interface.

#include <include/maliput/base/simple_rulebook.h>

Inheritance diagram for SimpleRulebook:
[legend]

Public Member Functions

 MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (SimpleRulebook)
 
 SimpleRulebook ()
 Constructs an empty SimpleRulebook (i.e., containing no rules). More...
 
 ~SimpleRulebook () override
 
void RemoveAll ()
 Removes all rules. More...
 
void AddRule (const api::rules::RightOfWayRule &rule)
 Adds a new RightOfWayRule. More...
 
void RemoveRule (const api::rules::RightOfWayRule::Id &id)
 Removes the RightOfWayRule labeled by id. More...
 
void AddRule (const api::rules::SpeedLimitRule &rule)
 Adds a new SpeedLimitRule. More...
 
void RemoveRule (const api::rules::SpeedLimitRule::Id &id)
 Removes the SpeedLimitRule labeled by id. More...
 
void AddRule (const api::rules::DirectionUsageRule &rule)
 Adds a new DirectionUsageRule. More...
 
void RemoveRule (const api::rules::DirectionUsageRule::Id &id)
 Removes the DirectionUsageRule labeled by id. More...
 
- Public Member Functions inherited from RoadRulebook
 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...
 

Additional Inherited Members

- Protected Member Functions inherited from RoadRulebook
 RoadRulebook ()=default
 

Constructor & Destructor Documentation

◆ SimpleRulebook()

Constructs an empty SimpleRulebook (i.e., containing no rules).

◆ ~SimpleRulebook()

~SimpleRulebook ( )
override

Member Function Documentation

◆ AddRule() [1/3]

void AddRule ( const api::rules::DirectionUsageRule &  rule)

Adds a new DirectionUsageRule.

Exceptions
maliput::common::assertion_errorif a rule with the same ID already exists in the SimpleRulebook.

◆ AddRule() [2/3]

void AddRule ( const api::rules::RightOfWayRule &  rule)

Adds a new RightOfWayRule.

Exceptions
maliput::common::assertion_errorif a rule with the same ID already exists in the SimpleRulebook.

◆ AddRule() [3/3]

void AddRule ( const api::rules::SpeedLimitRule &  rule)

Adds a new SpeedLimitRule.

Exceptions
maliput::common::assertion_errorif a rule with the same ID already exists in the SimpleRulebook.

◆ MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN ( SimpleRulebook  )

◆ RemoveAll()

void RemoveAll ( )

Removes all rules.

◆ RemoveRule() [1/3]

void RemoveRule ( const api::rules::DirectionUsageRule::Id &  id)

Removes the DirectionUsageRule labeled by id.

Exceptions
maliput::common::assertion_errorif no such rule exists.

◆ RemoveRule() [2/3]

void RemoveRule ( const api::rules::RightOfWayRule::Id &  id)

Removes the RightOfWayRule labeled by id.

Exceptions
maliput::common::assertion_errorif no such rule exists.

◆ RemoveRule() [3/3]

void RemoveRule ( const api::rules::SpeedLimitRule::Id &  id)

Removes the SpeedLimitRule labeled by id.

Exceptions
maliput::common::assertion_errorif no such rule exists.

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