A class that represents a road lane composed by a set of waypoints. More...
#include <Lane.hh>
Public Member Functions | |
| Lane () | |
| Default constructor. More... | |
| Lane (const int _id) | |
| Constructor. More... | |
| Lane (const Lane &_other) | |
| Copy constructor. More... | |
| virtual | ~Lane () |
| Destructor. More... | |
| bool | AddCheckpoint (const rndf::Checkpoint &_newCheckpoint) |
| Add a new checkpoint. More... | |
| bool | AddExit (const Exit &_newExit) |
| Add a new exit. More... | |
| bool | AddStop (const int _waypointId) |
| Add a new stop. More... | |
| bool | AddWaypoint (const rndf::Waypoint &_newWaypoint) |
| Add a new waypoint. More... | |
| bool | Checkpoint (const int _cpId, rndf::Checkpoint &_cp) const |
| Get the details of one of the checkpoints with Id _cpId. More... | |
| std::vector< rndf::Checkpoint > & | Checkpoints () |
| Get a mutable reference to the vector of checkpoints;. More... | |
| const std::vector < rndf::Checkpoint > & | Checkpoints () const |
| Get the vector of checkpoints;. More... | |
| std::vector< Exit > & | Exits () |
| Get a mutable reference to the vector of exits. More... | |
| const std::vector< Exit > & | Exits () const |
| Get the vector of stops. More... | |
| int | Id () const |
| Id. More... | |
| Marking | LeftBoundary () const |
| Boundaries. More... | |
| bool | Load (std::ifstream &_rndfFile, const int _segmentId, int &_lineNumber) |
| Parsing. More... | |
| unsigned int | NumCheckpoints () const |
| Checkpoints. More... | |
| unsigned int | NumExits () const |
| Exits. More... | |
| unsigned int | NumStops () const |
| Stops. More... | |
| unsigned int | NumWaypoints () const |
| Waypoints. More... | |
| bool | operator!= (const Lane &_other) const |
| Inequality. More... | |
| Lane & | operator= (const Lane &_other) |
| Assignment operator. More... | |
| bool | operator== (const Lane &_other) const |
| Operators. More... | |
| bool | RemoveCheckpoint (const int _cpId) |
| Remove an existing checkpoint. More... | |
| bool | RemoveExit (const Exit &_exit) |
| Remove an existing exit. More... | |
| bool | RemoveStop (const int _waypointId) |
| Remove an existing stop. More... | |
| bool | RemoveWaypoint (const int _wpId) |
| Remove an existing waypoint. More... | |
| Marking | RightBoundary () const |
| Get the right boundary type. More... | |
| bool | SetId (const int _id) |
| Set the identifier of the lane. More... | |
| void | SetLeftBoundary (const Marking &_boundary) |
| Set the new left boundary type. More... | |
| void | SetRightBoundary (const Marking &_boundary) |
| Set the new right boundary type. More... | |
| bool | SetWidth (const double _newWidth) |
| Set the lane width. More... | |
| std::vector< int > & | Stops () |
| Get a mutable reference to the vector of stops. More... | |
| const std::vector< int > & | Stops () const |
| Get the vector of stops. More... | |
| bool | UpdateCheckpoint (const rndf::Checkpoint &_cp) |
| Update an existing checkpoint. More... | |
| bool | UpdateWaypoint (const rndf::Waypoint &_wp) |
| Update an existing waypoint. More... | |
| bool | Valid () const |
| Validation. More... | |
| bool | Waypoint (const int _wpId, rndf::Waypoint &_wp) const |
| Get the details of one of the waypoints with Id _wpId. More... | |
| std::vector< rndf::Waypoint > & | Waypoints () |
| Get a mutable reference to the vector of waypoints. More... | |
| const std::vector < rndf::Waypoint > & | Waypoints () const |
| Get the vector of waypoints. More... | |
| double | Width () const |
| Width. More... | |
A class that represents a road lane composed by a set of waypoints.
| manifold::rndf::Lane::Lane | ( | ) |
Default constructor.
|
explicit |
|
explicit |
|
virtual |
Destructor.
| bool manifold::rndf::Lane::AddCheckpoint | ( | const rndf::Checkpoint & | _newCheckpoint | ) |
Add a new checkpoint.
| [in] | _newCheckpoint | A new checkpoint to be added. |
| bool manifold::rndf::Lane::AddExit | ( | const Exit & | _newExit | ) |
Add a new exit.
| [in] | _newExit | The exit to add. |
| bool manifold::rndf::Lane::AddStop | ( | const int | _waypointId | ) |
Add a new stop.
| [in] | _waypointId | The Id of a new waypoint considered a stop. |
| bool manifold::rndf::Lane::AddWaypoint | ( | const rndf::Waypoint & | _newWaypoint | ) |
Add a new waypoint.
| [in] | _newWaypoint | A new waypoint to be added. |
| bool manifold::rndf::Lane::Checkpoint | ( | const int | _cpId, |
| rndf::Checkpoint & | _cp | ||
| ) | const |
Get the details of one of the checkpoints with Id _cpId.
| [in] | _cpId | The checkpoint Id. |
| [out] | _cp | The checkpoint requested. |
| std::vector<rndf::Checkpoint>& manifold::rndf::Lane::Checkpoints | ( | ) |
Get a mutable reference to the vector of checkpoints;.
| const std::vector<rndf::Checkpoint>& manifold::rndf::Lane::Checkpoints | ( | ) | const |
Get the vector of checkpoints;.
| std::vector<Exit>& manifold::rndf::Lane::Exits | ( | ) |
Get a mutable reference to the vector of exits.
| const std::vector<Exit>& manifold::rndf::Lane::Exits | ( | ) | const |
Get the vector of stops.
| int manifold::rndf::Lane::Id | ( | ) | const |
Id.
Get the unique identifier of the lane.
| Marking manifold::rndf::Lane::LeftBoundary | ( | ) | const |
Boundaries.
Get the left boundary type.
| bool manifold::rndf::Lane::Load | ( | std::ifstream & | _rndfFile, |
| const int | _segmentId, | ||
| int & | _lineNumber | ||
| ) |
Parsing.
Load a lane from an input stream coming from a text file. The expected format is the one specified on the RNDF spec.
| [in,out] | _rndfFile | Input file stream. |
| [in,out] | _segmentId | Expected segment Id. |
| unsigned int manifold::rndf::Lane::NumCheckpoints | ( | ) | const |
Checkpoints.
Get the number of checkpoints stored.
| unsigned int manifold::rndf::Lane::NumExits | ( | ) | const |
Exits.
Get the number of exits stored.
| unsigned int manifold::rndf::Lane::NumStops | ( | ) | const |
Stops.
Get the number of stops stored.
| unsigned int manifold::rndf::Lane::NumWaypoints | ( | ) | const |
Waypoints.
Get the number of waypoints stored.
| bool manifold::rndf::Lane::operator!= | ( | const Lane & | _other | ) | const |
Assignment operator.
| [in] | _other | The new lane. |
| bool manifold::rndf::Lane::operator== | ( | const Lane & | _other | ) | const |
Operators.
Equality operator, result = this == _other
| [in] | _other | Lane to check for equality. |
| bool manifold::rndf::Lane::RemoveCheckpoint | ( | const int | _cpId | ) |
Remove an existing checkpoint.
| [in] | _cpId | The checkpoint Id to be removed. |
| bool manifold::rndf::Lane::RemoveExit | ( | const Exit & | _exit | ) |
Remove an existing exit.
| [in] | _exit | The exit to be removed. |
| bool manifold::rndf::Lane::RemoveStop | ( | const int | _waypointId | ) |
Remove an existing stop.
| [in] | _waypointId | The waypoint Id (of a stop sign) to be removed. |
| bool manifold::rndf::Lane::RemoveWaypoint | ( | const int | _wpId | ) |
Remove an existing waypoint.
| [in] | _wpId | The waypoint Id to be removed. |
| Marking manifold::rndf::Lane::RightBoundary | ( | ) | const |
Get the right boundary type.
| bool manifold::rndf::Lane::SetId | ( | const int | _id | ) |
Set the identifier of the lane.
| [in] | _id | New unique Id. |
| void manifold::rndf::Lane::SetLeftBoundary | ( | const Marking & | _boundary | ) |
Set the new left boundary type.
| [in] | _boundary | The new left boundary type. |
| void manifold::rndf::Lane::SetRightBoundary | ( | const Marking & | _boundary | ) |
Set the new right boundary type.
| [in] | _boundary | The new right boundary type. |
| bool manifold::rndf::Lane::SetWidth | ( | const double | _newWidth | ) |
Set the lane width.
| [in] | _newWidth | The new width in meters. |
| std::vector<int>& manifold::rndf::Lane::Stops | ( | ) |
Get a mutable reference to the vector of stops.
The elements are waypoint Ids.
| const std::vector<int>& manifold::rndf::Lane::Stops | ( | ) | const |
Get the vector of stops.
The elements are waypoint Ids.
| bool manifold::rndf::Lane::UpdateCheckpoint | ( | const rndf::Checkpoint & | _cp | ) |
Update an existing checkpoint.
| [in] | _cp | The updated checkpoint. |
| bool manifold::rndf::Lane::UpdateWaypoint | ( | const rndf::Waypoint & | _wp | ) |
Update an existing waypoint.
| [in] | _wp | The updated waypoint. |
| bool manifold::rndf::Lane::Valid | ( | ) | const |
Validation.
| bool manifold::rndf::Lane::Waypoint | ( | const int | _wpId, |
| rndf::Waypoint & | _wp | ||
| ) | const |
Get the details of one of the waypoints with Id _wpId.
| [in] | _wpId | The waypoint Id. |
| [out] | _wp | The waypoint requested. |
| std::vector<rndf::Waypoint>& manifold::rndf::Lane::Waypoints | ( | ) |
Get a mutable reference to the vector of waypoints.
| const std::vector<rndf::Waypoint>& manifold::rndf::Lane::Waypoints | ( | ) | const |
Get the vector of waypoints.
| double manifold::rndf::Lane::Width | ( | ) | const |
Width.
Get the lane width in meters.