Public Member Functions | List of all members
ignition::rndf::Exit Class Reference

An exit clas that shows how to go from an exit waypoint to an entry waypoint. More...

#include <Exit.hh>

Public Member Functions

 Exit ()=default
 Default constructor. More...
 
 Exit (const UniqueId &_exit, const UniqueId &_entry)
 Constructor. More...
 
 Exit (const Exit &_other)
 Copy constructor. More...
 
virtual ~Exit ()
 Destructor. More...
 
const UniqueIdEntryId () const
 EntryId. More...
 
UniqueIdEntryId ()
 Get a mutable reference to the unique Id of the entry waypoint. More...
 
const UniqueIdExitId () const
 ExitId. More...
 
UniqueIdExitId ()
 Get a mutable reference to the unique Id of the exit waypoint. More...
 
bool Load (std::ifstream &_rndfFile, const int _x, const int _y, int &_lineNumber)
 Parsing. More...
 
bool operator!= (const Exit &_other) const
 Inequality. More...
 
Exitoperator= (const Exit &_other)
 Assignment operator. More...
 
bool operator== (const Exit &_other) const
 Operators. More...
 
bool Valid () const
 Validation. More...
 

Detailed Description

An exit clas that shows how to go from an exit waypoint to an entry waypoint.

The waypoints are represented with their unique Id.

Constructor & Destructor Documentation

ignition::rndf::Exit::Exit ( )
default

Default constructor.

ignition::rndf::Exit::Exit ( const UniqueId _exit,
const UniqueId _entry 
)
explicit

Constructor.

Parameters
[in]_exitThe unique ID of the exit waypoint.
[in]_entryThe unique ID of the entry waypoint.
See also
Valid.
ignition::rndf::Exit::Exit ( const Exit _other)

Copy constructor.

Parameters
[in]_otherOther Exit.
virtual ignition::rndf::Exit::~Exit ( )
virtual

Destructor.

Member Function Documentation

const UniqueId& ignition::rndf::Exit::EntryId ( ) const

EntryId.

Get the unique Id of the entry waypoint.

Returns
The unique Id of the entry waypoint.
UniqueId& ignition::rndf::Exit::EntryId ( )

Get a mutable reference to the unique Id of the entry waypoint.

Returns
A mutable reference to the unique Id of the entry waypoint.
const UniqueId& ignition::rndf::Exit::ExitId ( ) const

ExitId.

Get the unique Id of the exit waypoint.

Returns
The unique Id of the exit waypoint.
UniqueId& ignition::rndf::Exit::ExitId ( )

Get a mutable reference to the unique Id of the exit waypoint.

Returns
A mutable reference to the unique Id of the exit waypoint.
bool ignition::rndf::Exit::Load ( std::ifstream &  _rndfFile,
const int  _x,
const int  _y,
int &  _lineNumber 
)

Parsing.

Load an exit 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]_xThe expected "x" value from an x.y.z Id.
[in]_yThe expected "y" value from an x.y.z Id.
[in,out]_lineNumberLine number pointed by the stream position indicator.
Returns
True if a zone block was found and parsed or false otherwise (e.g.: EoF or incorrect format found).
bool ignition::rndf::Exit::operator!= ( const Exit _other) const

Inequality.

Parameters
[in]_otherExit to check for inequality.
Returns
true if this != _other
Exit& ignition::rndf::Exit::operator= ( const Exit _other)

Assignment operator.

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

Operators.

Equality operator, result = this == _other

Parameters
[in]_otherExit to check for equality.
Returns
true if this == _other
bool ignition::rndf::Exit::Valid ( ) const

Validation.

Returns
True if the exit is valid.

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