maliput
BasicIdIndex Class Reference

Detailed Description

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

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

Inheritance diagram for BasicIdIndex:
[legend]

Public Member Functions

 MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (BasicIdIndex)
 
 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...
 
- 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 std::unordered_map< LaneId, const Lane * > & GetLanes () const
 
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...
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ BasicIdIndex()

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.

◆ MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN ( BasicIdIndex  )

◆ 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: