Drake
BasicIdIndex Class Reference

Basic general-purpose concrete implementation of the RoadGeometry::IdIndex interface. More...

#include <drake/automotive/maliput/api/basic_id_index.h>

Public Member Functions

 BasicIdIndex ()=default
 
 ~BasicIdIndex () override=default
 
void AddLane (const Lane *lane)
 Adds lane to the index. More...
 
void AddSegment (const Segment *segment)
 Adds segment to the index. More...
 
void AddJunction (const Junction *junction)
 Adds junction to the index. More...
 
void AddBranchPoint (const BranchPoint *branch_point)
 Adds branch_point to the index. More...
 
void WalkAndAddAll (const RoadGeometry *road_geometry)
 Walks the object graph rooted at road_geometry and adds all components (Lane, Segment, Junction, BranchPoint) to the index. More...
 
Does not allow copy, move, or assignment
 BasicIdIndex (const BasicIdIndex &)=delete
 
BasicIdIndexoperator= (const BasicIdIndex &)=delete
 
 BasicIdIndex (BasicIdIndex &&)=delete
 
BasicIdIndexoperator= (BasicIdIndex &&)=delete
 
- Public Member Functions inherited from RoadGeometry::IdIndex
virtual ~IdIndex ()=default
 
const LaneGetLane (const LaneId &id) const
 Returns the Lane identified by id, or nullptr if id is unknown. More...
 
const SegmentGetSegment (const SegmentId &id) const
 Returns the Segment identified by id, or nullptr if id is unknown. More...
 
const JunctionGetJunction (const JunctionId &id) const
 Returns the Junction identified by id, or nullptr if id is unknown. More...
 
const BranchPointGetBranchPoint (const BranchPointId &id) const
 Returns the BranchPoint identified by id, or nullptr if id is unknown. More...
 
 IdIndex (const IdIndex &)=delete
 
IdIndexoperator= (const IdIndex &)=delete
 
 IdIndex (IdIndex &&)=delete
 
IdIndexoperator= (IdIndex &&)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from RoadGeometry::IdIndex
 IdIndex ()=default
 

Detailed Description

Basic general-purpose concrete implementation of the RoadGeometry::IdIndex interface.

Constructor & Destructor Documentation

◆ BasicIdIndex() [1/3]

BasicIdIndex ( const BasicIdIndex )
delete

◆ BasicIdIndex() [2/3]

BasicIdIndex ( BasicIdIndex &&  )
delete

◆ BasicIdIndex() [3/3]

BasicIdIndex ( )
default

◆ ~BasicIdIndex()

~BasicIdIndex ( )
overridedefault

Member Function Documentation

◆ AddBranchPoint()

void AddBranchPoint ( const BranchPoint branch_point)

Adds branch_point to the index.

Exceptions
std::exceptionif branch_point's id() already exists in the index.
Precondition
branch_point is not nullptr.

◆ AddJunction()

void AddJunction ( const Junction junction)

Adds junction to the index.

Exceptions
std::exceptionif junction's id() already exists in the index.
Precondition
junction is not nullptr.

◆ AddLane()

void AddLane ( const Lane lane)

Adds lane to the index.

Exceptions
std::exceptionif lane's id() already exists in the index.
Precondition
lane is not nullptr.

◆ AddSegment()

void AddSegment ( const Segment segment)

Adds segment to the index.

Exceptions
std::exceptionif segment's id() already exists in the index.
Precondition
segment is not nullptr.

◆ operator=() [1/2]

BasicIdIndex& operator= ( BasicIdIndex &&  )
delete

◆ operator=() [2/2]

BasicIdIndex& operator= ( const BasicIdIndex )
delete

◆ WalkAndAddAll()

void WalkAndAddAll ( const RoadGeometry road_geometry)

Walks the object graph rooted at road_geometry and adds all components (Lane, Segment, Junction, BranchPoint) to the index.

Exceptions
std::exceptionif the graph of road_geometry contains any duplicate id's, or if any of its id's already exist in the index.
Precondition
road_geometry is not nullptr.

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