maliput_sparse
LaneBuilder Class Referencefinal

Detailed Description

Builder class for maliput::api::Lanes.

#include <include/maliput_sparse/builder/builder.h>

Inheritance diagram for LaneBuilder:
[legend]

Public Member Functions

 LaneBuilder (SegmentBuilder *parent)
 Construct a new Lane Builder object. More...
 
LaneBuilderId (const maliput::api::LaneId &lane_id)
 Sets the maliput::api::LaneId of the maliput::api::Lane. More...
 
LaneBuilderHeightBounds (const maliput::api::HBounds &hbounds)
 Sets the maliput::api::maliput::api::HBounds of the maliput::api::Lane. More...
 
LaneGeometryBuilder StartLaneGeometry ()
 Starts the LaneGeometry builder for this Lane. More...
 
LaneBuilderLeftBoundaryId (const maliput::api::LaneBoundary::Id &boundary_id)
 Sets the boundary ID on the left side of this lane. More...
 
LaneBuilderRightBoundaryId (const maliput::api::LaneBoundary::Id &boundary_id)
 Sets the boundary ID on the right side of this lane. More...
 
LaneBuilderLaneType (maliput::api::LaneType lane_type)
 Sets the type of this lane (e.g., driving, shoulder, parking). More...
 
LaneBuilderLeftBoundaryMarkings (const std::vector< parser::BoundaryMarkings > &markings)
 Sets markings for the left boundary of this lane. More...
 
LaneBuilderRightBoundaryMarkings (const std::vector< parser::BoundaryMarkings > &markings)
 Sets markings for the right boundary of this lane. More...
 
SegmentBuilderEndLane ()
 Finalizes the construction process of this Lane by inserting the Lane into the parent SegmentBuilder. More...
 
void SetLaneGeometry (maliput::common::Passkey< LaneGeometryBuilder >, std::unique_ptr< maliput_sparse::geometry::LaneGeometry > lane_geometry)
 Sets a maliput_sparse::geometry::LaneGeometry into this builder to fill in the Lane. More...
 
- Public Member Functions inherited from NestedBuilder< SegmentBuilder >
virtual ~NestedBuilder ()=default
 
 NestedBuilder (SegmentBuilder *parent)
 Construct a new nested builder object. More...
 
SegmentBuilderEnd ()
 
SegmentBuilderParent ()
 

Constructor & Destructor Documentation

◆ LaneBuilder()

LaneBuilder ( SegmentBuilder parent)
explicit

Construct a new Lane Builder object.

Parameters
parentThe parent SegmentBuilder. It must not be nullptr.

Member Function Documentation

◆ EndLane()

SegmentBuilder & EndLane ( )

Finalizes the construction process of this Lane by inserting the Lane into the parent SegmentBuilder.

Exceptions
maliput::common::assertion_errorWhen there is no LaneGeometry to be set into the Lane.
Returns
A reference to the SegmentBuilder.

◆ HeightBounds()

LaneBuilder & HeightBounds ( const maliput::api::HBounds &  hbounds)

Sets the maliput::api::maliput::api::HBounds of the maliput::api::Lane.

Parameters
hboundsA maliput::api::HBounds to set to the Lane.
Returns
A reference to this LaneBuilder.

◆ Id()

LaneBuilder & Id ( const maliput::api::LaneId &  lane_id)

Sets the maliput::api::LaneId of the maliput::api::Lane.

Parameters
lane_idThe maliput::api::LaneId.
Returns
A reference to this LaneBuilder.

◆ LaneType()

LaneBuilder & LaneType ( maliput::api::LaneType  lane_type)

Sets the type of this lane (e.g., driving, shoulder, parking).

Parameters
lane_typeThe maliput::api::LaneType to set.
Returns
A reference to this LaneBuilder.

◆ LeftBoundaryId()

LaneBuilder & LeftBoundaryId ( const maliput::api::LaneBoundary::Id &  boundary_id)

Sets the boundary ID on the left side of this lane.

Parameters
boundary_idThe boundary ID to set.
Returns
A reference to this LaneBuilder.

◆ LeftBoundaryMarkings()

LaneBuilder & LeftBoundaryMarkings ( const std::vector< parser::BoundaryMarkings > &  markings)

Sets markings for the left boundary of this lane.

Parameters
markingsBoundary markings associated with the left boundary.
Returns
A reference to this LaneBuilder.

◆ RightBoundaryId()

LaneBuilder & RightBoundaryId ( const maliput::api::LaneBoundary::Id &  boundary_id)

Sets the boundary ID on the right side of this lane.

Parameters
boundary_idThe boundary ID to set.
Returns
A reference to this LaneBuilder.

◆ RightBoundaryMarkings()

LaneBuilder & RightBoundaryMarkings ( const std::vector< parser::BoundaryMarkings > &  markings)

Sets markings for the right boundary of this lane.

Parameters
markingsBoundary markings associated with the right boundary.
Returns
A reference to this LaneBuilder.

◆ SetLaneGeometry()

void SetLaneGeometry ( maliput::common::Passkey< LaneGeometryBuilder ,
std::unique_ptr< maliput_sparse::geometry::LaneGeometry lane_geometry 
)

Sets a maliput_sparse::geometry::LaneGeometry into this builder to fill in the Lane.

This method is only intended to be called by LaneGeometryBuilder instances.

See also
maliput::common::Passkey class description for further details.
Parameters
lane_geometryA maliput_sparse::geometry::LaneGeometry to be stored into the Lane. It must not be nullptr.
Exceptions
maliput::common::assertion_errorWhen lane_geometry is nullptr.

◆ StartLaneGeometry()

LaneGeometryBuilder StartLaneGeometry ( )

Starts the LaneGeometry builder for this Lane.

Returns
A LaneGeometryBuilder.

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