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

#include <Perimeter.hh>

Public Member Functions

 PerimeterHeader ()
 Default constructor. More...
 
 ~PerimeterHeader ()=default
 Destructor. More...
 
bool AddExit (const Exit &_newExit)
 Add a new exit. 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...
 
bool Load (std::ifstream &_rndfFile, const int _zoneId, const int _spotId, int &_lineNumber)
 Parsing. More...
 
unsigned int NumExits () const
 Exits. More...
 
bool RemoveExit (const Exit &_exit)
 Remove an existing exit. More...
 

Constructor & Destructor Documentation

manifold::rndf::PerimeterHeader::PerimeterHeader ( )

Default constructor.

manifold::rndf::PerimeterHeader::~PerimeterHeader ( )
default

Destructor.

Member Function Documentation

bool manifold::rndf::PerimeterHeader::AddExit ( const Exit _newExit)

Add a new exit.

Parameters
[in]_newExitThe exit to add.
Returns
True when the exit was successfully added or false otherwise (e.g. if the exit was already existing or invalid).
std::vector<Exit>& manifold::rndf::PerimeterHeader::Exits ( )

Get a mutable reference to the vector of exits.

Returns
A mutable reference to the vector of exits.
const std::vector<Exit>& manifold::rndf::PerimeterHeader::Exits ( ) const

Get the vector of stops.

The elements are waypoint Ids.

Returns
The vector of stops.
bool manifold::rndf::PerimeterHeader::Load ( std::ifstream &  _rndfFile,
const int  _zoneId,
const int  _spotId,
int &  _lineNumber 
)

Parsing.

Load a perimeter header 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]_zoneIdThe zone Id in which the spot is located.
[in]_perimeterIdThe perimeter Id.
[in,out]_lineNumberLine number pointed by the stream position indicator.
Returns
True if a perimeter header block was found and parsed or false otherwise (e.g.: EoF or incorrect format found).
unsigned int manifold::rndf::PerimeterHeader::NumExits ( ) const

Exits.

Get the number of exits stored.

Returns
The number of exits in the current lane.
bool manifold::rndf::PerimeterHeader::RemoveExit ( const Exit _exit)

Remove an existing exit.

Parameters
[in]_exitThe exit to be removed.
Returns
True when the exit was successfully deleted or false otherwise (e.g. if the exit was not found or invalid).

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