Drake
TrivialRightOfWayStateProvider Class Referencefinal

A trivial implementation of an api::rules::RightOfWayStateProvider. More...

#include <drake/automotive/trivial_right_of_way_state_provider.h>

Public Member Functions

 TrivialRightOfWayStateProvider ()
 Default constructor. More...
 
 ~TrivialRightOfWayStateProvider () final=default
 
void AddState (const maliput::api::rules::RightOfWayRule::Id &id, const maliput::api::rules::RightOfWayRule::State::Id &initial_state)
 Adds a dynamic state to this provider. More...
 
void SetState (const maliput::api::rules::RightOfWayRule::Id &id, const maliput::api::rules::RightOfWayRule::State::Id &state)
 Sets the dynamic state of a RightOfWayRule within this provider. More...
 
Does not allow copy, move, or assignment
 TrivialRightOfWayStateProvider (const TrivialRightOfWayStateProvider &)=delete
 
TrivialRightOfWayStateProvideroperator= (const TrivialRightOfWayStateProvider &)=delete
 
 TrivialRightOfWayStateProvider (TrivialRightOfWayStateProvider &&)=delete
 
TrivialRightOfWayStateProvideroperator= (TrivialRightOfWayStateProvider &&)=delete
 
- Public Member Functions inherited from RightOfWayStateProvider
virtual ~RightOfWayStateProvider ()=default
 
drake::optional< ResultGetState (const RightOfWayRule::Id &id) const
 Gets the state of the RightOfWayRule identified by id. More...
 
 RightOfWayStateProvider (const RightOfWayStateProvider &)=delete
 
RightOfWayStateProvideroperator= (const RightOfWayStateProvider &)=delete
 
 RightOfWayStateProvider (RightOfWayStateProvider &&)=delete
 
RightOfWayStateProvideroperator= (RightOfWayStateProvider &&)=delete
 

Additional Inherited Members

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

Detailed Description

A trivial implementation of an api::rules::RightOfWayStateProvider.

Constructor & Destructor Documentation

◆ TrivialRightOfWayStateProvider() [1/3]

◆ TrivialRightOfWayStateProvider() [2/3]

◆ TrivialRightOfWayStateProvider() [3/3]

Default constructor.

◆ ~TrivialRightOfWayStateProvider()

~TrivialRightOfWayStateProvider ( )
finaldefault

Member Function Documentation

◆ AddState()

void AddState ( const maliput::api::rules::RightOfWayRule::Id id,
const maliput::api::rules::RightOfWayRule::State::Id initial_state 
)

Adds a dynamic state to this provider.

Exceptions
std::logic_errorif a RightOfWayRule with an ID of id already exists in this provider.
std::runtime_errorif the dynamic state failed to be added.

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ SetState()

Sets the dynamic state of a RightOfWayRule within this provider.

Exceptions
std::out_of_rangeif no dynamic state with id exists in this provider.

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