All Classes Namespaces Files Functions Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
manifold::rndf::Waypoint Class Reference

A reference point. More...

#include <Waypoint.hh>

Public Member Functions

 Waypoint ()
 Default constructor. More...
 
 Waypoint (const int _id, const ignition::math::SphericalCoordinates &_location)
 Constructor. More...
 
 Waypoint (const Waypoint &_other)
 Copy constructor. More...
 
virtual ~Waypoint ()
 Destructor. More...
 
int Id () const
 Id. More...
 
bool Load (std::ifstream &_rndfFile, const int _segmentId, const int _laneId, int &_lineNumber)
 Parsing. More...
 
ignition::math::SphericalCoordinates & Location ()
 Location. More...
 
bool operator!= (const Waypoint &_other) const
 Inequality. More...
 
Waypointoperator= (const Waypoint &_other)
 Assignment operator. More...
 
bool operator== (const Waypoint &_other) const
 Operators. More...
 
bool SetId (const int _id)
 Set the identifier of the waypoint. More...
 
bool Valid () const
 Validation. More...
 

Detailed Description

A reference point.

Constructor & Destructor Documentation

manifold::rndf::Waypoint::Waypoint ( )

Default constructor.

manifold::rndf::Waypoint::Waypoint ( const int  _id,
const ignition::math::SphericalCoordinates &  _location 
)

Constructor.

Parameters
[in]_idWaypoint Id (a positive number).
[in]_locationLocation of the waypoint in decimal-degrees, using ITRF00 reference frame and the GRS80 ellipsoid.
See Also
Valid.
manifold::rndf::Waypoint::Waypoint ( const Waypoint _other)

Copy constructor.

Parameters
[in]_otherOther waypoint.
virtual manifold::rndf::Waypoint::~Waypoint ( )
virtual

Destructor.

Member Function Documentation

int manifold::rndf::Waypoint::Id ( ) const

Id.

Get the unique identifier of the waypoint.

Returns
The waypoint Id.
bool manifold::rndf::Waypoint::Load ( std::ifstream &  _rndfFile,
const int  _segmentId,
const int  _laneId,
int &  _lineNumber 
)

Parsing.

Load a waypoint from an input stream coming from a text file. The expected format is the one specified on the RNDF spec.

Parameters
[in,out]_rndfFileInput file stream.
[in]_segmentIdThe segment Id in which the waypoint is located.
[in]_laneIdThe lane Id in which the waypoint is located.
[in,out]_lineNumberLine number pointed by the stream position indicator.
Returns
True if a waypoint block was found and parsed or false otherwise (e.g.: EoF or incorrect format found).
ignition::math::SphericalCoordinates& manifold::rndf::Waypoint::Location ( )

Location.

Get a mutable reference to the waypoint location.

Returns
A mutable reference to the waypoint location.
bool manifold::rndf::Waypoint::operator!= ( const Waypoint _other) const

Inequality.

Parameters
[in]_otherWaypoint to check for inequality.
Returns
true if this != _other
Waypoint& manifold::rndf::Waypoint::operator= ( const Waypoint _other)

Assignment operator.

Parameters
[in]_otherThe new Waypoint.
Returns
A reference to this instance.
bool manifold::rndf::Waypoint::operator== ( const Waypoint _other) const

Operators.

Equality operator, result = this == _other

Parameters
[in]_otherWaypoint to check for equality.
Returns
true if this == _other
bool manifold::rndf::Waypoint::SetId ( const int  _id)

Set the identifier of the waypoint.

Parameters
[in]_idNew unique Id.
Returns
True if the operation succeed or false otherwise. If the Id is not valid, the operation won't have any effect.
bool manifold::rndf::Waypoint::Valid ( ) const

Validation.

Returns
True if the waypoint Id is valid. A valid waypoint Id is a positive number.

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