Dynamical system model
Loading...
Searching...
No Matches
dsf::mobility::Itinerary Class Reference

The Itinerary class represents an itinerary in the network. More...

#include <Itinerary.hpp>

Public Member Functions

 Itinerary (Id id, Id destination)
 Construct a new Itinerary object.
 
 Itinerary (Itinerary &&)=default
 
Itineraryoperator= (Itinerary &&)=default
 
 Itinerary (const Itinerary &)=delete
 
Itineraryoperator= (const Itinerary &)=delete
 
void load (const std::string &fileName)
 
void setPath (PathCollection pathCollection)
 Set the itinerary's path.
 
auto id () const noexcept
 Get the itinerary's id.
 
auto destination () const noexcept
 Get the itinerary's destination.
 
auto const & path () const noexcept
 Get the itinerary's path.
 
auto empty () const noexcept
 Check if the itinerary's path is empty.
 
void save (const std::string &fileName) const
 Save the itinerary to a binary file.
 

Detailed Description

The Itinerary class represents an itinerary in the network.

Template Parameters
IdThe type of the itinerary's id. It must be an unsigned integral type.

Constructor & Destructor Documentation

◆ Itinerary()

dsf::mobility::Itinerary::Itinerary ( Id id,
Id destination )

Construct a new Itinerary object.

Parameters
destinationThe itinerary's destination

Member Function Documentation

◆ destination()

auto dsf::mobility::Itinerary::destination ( ) const
inlinenoexcept

Get the itinerary's destination.

Returns
Id, The itinerary's destination

◆ empty()

auto dsf::mobility::Itinerary::empty ( ) const
inlinenoexcept

Check if the itinerary's path is empty.

Returns
true if the itinerary's path is empty, false otherwise

◆ id()

auto dsf::mobility::Itinerary::id ( ) const
inlinenoexcept

Get the itinerary's id.

Returns
Id, The itinerary's id

◆ path()

auto const & dsf::mobility::Itinerary::path ( ) const
inlinenoexcept

Get the itinerary's path.

Returns
PathCollection const&, The itinerary's path

◆ save()

void dsf::mobility::Itinerary::save ( const std::string & fileName) const

Save the itinerary to a binary file.

Parameters
fileNameThe name of the file to save the itinerary to

◆ setPath()

void dsf::mobility::Itinerary::setPath ( PathCollection pathCollection)

Set the itinerary's path.

Parameters
pathCollectionA dsf::mobility::PathCollection representing all equivalent paths to the destination

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