maliput
|
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>
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... | |
![]() | |
MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (PhaseRingBook) | |
virtual | ~PhaseRingBook ()=default |
std::vector< PhaseRing::Id > | GetPhaseRings () const |
Gets a list of all PhaseRings within this book. More... | |
std::optional< PhaseRing > | GetPhaseRing (const PhaseRing::Id &ring_id) const |
Gets the specified PhaseRing. More... | |
std::optional< PhaseRing > | FindPhaseRing (const RightOfWayRule::Id &rule_id) const |
Finds and returns the PhaseRing containing the specified RightOfWayRule. More... | |
std::optional< PhaseRing > | FindPhaseRing (const Rule::Id &rule_id) const |
Finds and returns the PhaseRing containing the specified Rule. More... | |
Additional Inherited Members | |
![]() | |
PhaseRingBook ()=default | |
|
override |
void AddPhaseRing | ( | const api::rules::PhaseRing & | ring | ) |
Adds ring
to this SimplePhaseRingBook.
std::exception | if 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 | ( | SimplePhaseRingBook | ) |
void RemovePhaseRing | ( | const api::rules::PhaseRing::Id & | ring_id | ) |
Removes an api::rules::PhaseRing with an ID of ring_id
from this SimplePhaseRingBook.
std::exception | if the specified api::rules::PhaseRing does not exist. |