maliput
SimplePhaseRingBook Class Reference

Detailed Description

A simple concrete implementation of the api::rules::PhaseRingBook abstract interface.

It allows users to obtain the ID of the PhaseRing that includes a particular RightOfWayRule.

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

Inheritance diagram for SimplePhaseRingBook:
[legend]

Public Member Functions

 MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (SimplePhaseRingBook)
 
 SimplePhaseRingBook ()
 
 ~SimplePhaseRingBook () override
 
void AddPhaseRing (const api::rules::PhaseRing &ring)
 Adds ring to this SimplePhaseRingBook. More...
 
void RemovePhaseRing (const api::rules::PhaseRing::Id &ring_id)
 Removes an api::rules::PhaseRing with an ID of ring_id from this SimplePhaseRingBook. More...
 
- Public Member Functions inherited from PhaseRingBook
 MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (PhaseRingBook)
 
virtual ~PhaseRingBook ()=default
 
std::vector< PhaseRing::IdGetPhaseRings () const
 Gets a list of all PhaseRings within this book. More...
 
std::optional< PhaseRingGetPhaseRing (const PhaseRing::Id &ring_id) const
 Gets the specified PhaseRing. More...
 
std::optional< PhaseRingFindPhaseRing (const RightOfWayRule::Id &rule_id) const
 Finds and returns the PhaseRing containing the specified RightOfWayRule. More...
 
std::optional< PhaseRingFindPhaseRing (const Rule::Id &rule_id) const
 Finds and returns the PhaseRing containing the specified Rule. More...
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ SimplePhaseRingBook()

◆ ~SimplePhaseRingBook()

~SimplePhaseRingBook ( )
override

Member Function Documentation

◆ AddPhaseRing()

void AddPhaseRing ( const api::rules::PhaseRing ring)

Adds ring to this SimplePhaseRingBook.

Exceptions
std::exceptionif an api::rules::PhaseRing with the same ID already exists, or if ring contains a rule that already exists in a previously added api::rules::PhaseRing.

◆ MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN ( SimplePhaseRingBook  )

◆ RemovePhaseRing()

void RemovePhaseRing ( const api::rules::PhaseRing::Id ring_id)

Removes an api::rules::PhaseRing with an ID of ring_id from this SimplePhaseRingBook.

Exceptions
std::exceptionif the specified api::rules::PhaseRing does not exist.

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