maliput
ManualRulebook Class Reference

Detailed Description

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

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

Inheritance diagram for ManualRulebook:
[legend]

Public Member Functions

 MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (ManualRulebook)
 
 ManualRulebook ()
 Constructs an empty ManualRulebook (i.e., containing no rules). More...
 
 ~ManualRulebook () 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 with the specified 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 with the specified 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 with the specified id. More...
 
void AddRule (const api::rules::DiscreteValueRule &rule)
 Adds a new DiscreteValueRule. More...
 
void AddRule (const api::rules::RangeValueRule &rule)
 Adds a new RangeValueRule. More...
 
void RemoveRule (const api::rules::Rule::Id &id)
 Removes the Rule with the specified 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

◆ ManualRulebook()

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

◆ ~ManualRulebook()

~ManualRulebook ( )
overridedefault

Member Function Documentation

◆ AddRule() [1/5]

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 ManualRulebook.

◆ AddRule() [2/5]

void AddRule ( const api::rules::DiscreteValueRule rule)

Adds a new DiscreteValueRule.

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

◆ AddRule() [3/5]

void AddRule ( const api::rules::RangeValueRule rule)

Adds a new RangeValueRule.

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

◆ AddRule() [4/5]

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 ManualRulebook.

◆ AddRule() [5/5]

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 ManualRulebook.

◆ MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN ( ManualRulebook  )

◆ RemoveAll()

void RemoveAll ( )

Removes all rules.

◆ RemoveRule() [1/4]

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

Removes the DirectionUsageRule with the specified id.

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

◆ RemoveRule() [2/4]

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

Removes the RightOfWayRule with the specified id.

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

◆ RemoveRule() [3/4]

void RemoveRule ( const api::rules::Rule::Id id)

Removes the Rule with the specified id.

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

◆ RemoveRule() [4/4]

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

Removes the SpeedLimitRule with the specified id.

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

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