Drake
SimpleRulebook Class Reference

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

#include <drake/automotive/maliput/simplerulebook/simple_rulebook.h>

Public Member Functions

 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 labelled 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 labelled by id. More...
 
template<class T >
void AddAnyRule (const T &rule, IdIndex< T > *map)
 
template<class T >
T GetAnyRule (const typename T::Id &id, const IdIndex< T > &map) const
 
template<class T >
void RemoveAnyRule (const typename T::Id &id, IdIndex< T > *map)
 
Does not allow copy, move, or assignment
 SimpleRulebook (const SimpleRulebook &)=delete
 
SimpleRulebookoperator= (const SimpleRulebook &)=delete
 
 SimpleRulebook (SimpleRulebook &&)=delete
 
SimpleRulebookoperator= (SimpleRulebook &&)=delete
 
- Public Member Functions inherited from 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...
 
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...
 
 RoadRulebook (const RoadRulebook &)=delete
 
RoadRulebookoperator= (const RoadRulebook &)=delete
 
 RoadRulebook (RoadRulebook &&)=delete
 
RoadRulebookoperator= (RoadRulebook &&)=delete
 

Additional Inherited Members

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

Detailed Description

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

Constructor & Destructor Documentation

SimpleRulebook ( const SimpleRulebook )
delete
SimpleRulebook ( SimpleRulebook &&  )
delete

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

~SimpleRulebook ( )
overridedefault

Member Function Documentation

void AddAnyRule ( const T rule,
IdIndex< T > *  map 
)
void AddRule ( const api::rules::RightOfWayRule rule)

Adds a new RightOfWayRule.

Throws std::runtime_error if a rule with the same ID already exists in the SimpleRulebook.

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

Adds a new SpeedLimitRule.

Throws std::runtime_error if a rule with the same ID already exists in the SimpleRulebook.

T GetAnyRule ( const typename T::Id &  id,
const IdIndex< T > &  map 
) const
SimpleRulebook& operator= ( SimpleRulebook &&  )
delete
SimpleRulebook& operator= ( const SimpleRulebook )
delete
void RemoveAll ( )

Removes all rules.

void RemoveAnyRule ( const typename T::Id &  id,
IdIndex< T > *  map 
)
void RemoveRule ( const api::rules::RightOfWayRule::Id id)

Removes the RightOfWayRule labelled by id.

Throws std::runtime_error if no such rule exists.

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

Removes the SpeedLimitRule labelled by id.

Throws std::runtime_error if no such rule exists.


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