maliput_sparse
|
Builder class for maliput::api::Segments.
#include <include/maliput_sparse/builder/builder.h>
Public Member Functions | |
SegmentBuilder (JunctionBuilder *parent) | |
Construct a new Segment Builder object. More... | |
SegmentBuilder & | Id (const maliput::api::SegmentId &segment_id) |
Sets the maliput::api::SegmentId of the maliput::api::Segment. More... | |
LaneBuilder | StartLane () |
Starts the Lane builder for this Segment. More... | |
JunctionBuilder & | EndSegment () |
Finalizes the construction process of this Segment by inserting the Segment into the parent JunctionBuilder. More... | |
void | SetLane (maliput::common::Passkey< LaneBuilder >, std::unique_ptr< maliput::geometry_base::Lane > lane) |
Sets a maliput::geometry_base::Lane into this builder to fill in the Segment. More... | |
Public Member Functions inherited from NestedBuilder< JunctionBuilder > | |
virtual | ~NestedBuilder ()=default |
NestedBuilder (JunctionBuilder *parent) | |
Construct a new nested builder object. More... | |
JunctionBuilder & | End () |
JunctionBuilder * | Parent () |
|
explicit |
Construct a new Segment Builder object.
parent | The parent JunctionBuilder. It must not be nullptr. |
JunctionBuilder & EndSegment | ( | ) |
Finalizes the construction process of this Segment by inserting the Segment into the parent JunctionBuilder.
maliput::common::assertion_error | When there is no lane to be set into the Segment. |
SegmentBuilder & Id | ( | const maliput::api::SegmentId & | segment_id | ) |
Sets the maliput::api::SegmentId of the maliput::api::Segment.
segment_id | The maliput::api::SegmentId. |
void SetLane | ( | maliput::common::Passkey< LaneBuilder > | , |
std::unique_ptr< maliput::geometry_base::Lane > | lane | ||
) |
Sets a maliput::geometry_base::Lane into this builder to fill in the Segment.
This method is only intended to be called by LaneBuilder instances. Call this method in order to determine a specific rigth to left ordering for this Segment.
lane | A lane to be stored into the Segment. It must not be nullptr. |
maliput::common::assertion_error | When lane is nullptr. |
LaneBuilder StartLane | ( | ) |
Starts the Lane builder for this Segment.
Lanes should be added from right to left as the order they are set will determine the index they will receive in consecutive natural numbers (0 to +inf). That order must follow the indexing order required by the maliput::api::Segment::index() contract. This builder makes no assertion of that.