SUMO - Simulation of Urban MObility

ROVehicle Class Reference

A vehicle as used by router. More...

#include <ROVehicle.h>

Public Member Functions

virtual ROVehicle * copy (const std::string &id, unsigned int depTime, RORouteDef *newRoute) throw ()
 Returns a copy of the vehicle using a new id, departure time and route.
SUMOTime getDepartureTime () const throw ()
 Returns the time the vehicle starts at.
const std::string & getID () const throw ()
 Returns the id of the vehicle.
RORouteDef * getRouteDefinition () const throw ()
 Returns the definition of the route the vehicle takes.
const SUMOVTypeParameter * getType () const throw ()
 Returns the type of the vehicle.
 ROVehicle (const SUMOVehicleParameter &pars, RORouteDef *route, SUMOVTypeParameter *type) throw ()
 Constructor.
void saveAllAsXML (SUMOAbstractRouter< ROEdge, ROVehicle > &router, OutputDevice &os, OutputDevice *const altos, bool withExitTimes) const throw (IOError)
 Saves the complete vehicle description.
virtual ~ROVehicle () throw ()
 Destructor.

Protected Attributes

SUMOVehicleParameter myParameter
 The vehicle's parameter.
RORouteDef * myRoute
 The route the vehicle takes.
SUMOVTypeParameter * myType
 The type of the vehicle.

Private Member Functions

ROVehicle & operator= (const ROVehicle &src)
 Invalidated assignment operator.
 ROVehicle (const ROVehicle &src)
 Invalidated copy constructor.

Detailed Description

A vehicle as used by router.

Definition at line 57 of file ROVehicle.h.


Constructor & Destructor Documentation

ROVehicle::ROVehicle ( const SUMOVehicleParameter &  pars,
RORouteDef *  route,
SUMOVTypeParameter *  type 
) throw ()

Constructor.

Parameters:
[in]parsParameter of this vehicle
[in]routeThe definition of the route the vehicle shall use
[in]typeThe type of the vehicle
Todo:
Why is the vehicle builder given?

Definition at line 52 of file ROVehicle.cpp.

ROVehicle::~ROVehicle ( ) throw () [virtual]

Destructor.

Definition at line 57 of file ROVehicle.cpp.

ROVehicle::ROVehicle ( const ROVehicle &  src) [private]

Invalidated copy constructor.


Member Function Documentation

ROVehicle * ROVehicle::copy ( const std::string &  id,
unsigned int  depTime,
RORouteDef *  newRoute 
) throw () [virtual]

Returns a copy of the vehicle using a new id, departure time and route.

Parameters:
[in]idthe new id to use
[in]depTimeThe new vehicle's departure time
[in]newRouteThe new vehicle's route
Returns:
The new vehicle
Todo:
Is this used? What for if everything is replaced?

Definition at line 94 of file ROVehicle.cpp.

References SUMOVehicleParameter::depart, and SUMOVehicleParameter::id.

Referenced by RORDGenerator_ODAmounts::FlowDef::addSingleRoute().

SUMOTime ROVehicle::getDepartureTime ( ) const throw () [inline]

Returns the time the vehicle starts at.

Returns:
The vehicle's depart time

Definition at line 110 of file ROVehicle.h.

References SUMOVehicleParameter::depart, and myParameter.

Referenced by RONet::computeRoute(), RONet::saveAndRemoveRoutesUntil(), RORouteDef_Complete::writeXMLDefinition(), RORouteDef_Alternatives::writeXMLDefinition(), and RORoute::writeXMLDefinition().

const std::string& ROVehicle::getID ( ) const throw () [inline]

Returns the id of the vehicle.

Returns:
The id of the vehicle

Definition at line 101 of file ROVehicle.h.

References SUMOVehicleParameter::id, and myParameter.

Referenced by RORouteDef_Alternatives::addAlternative(), RORouteDef_Complete::buildCurrentRoute(), RONet::computeRoute(), ROVehicleCont::erase(), and RONet::saveAndRemoveRoutesUntil().

RORouteDef* ROVehicle::getRouteDefinition ( ) const throw () [inline]

Returns the definition of the route the vehicle takes.

Returns:
The vehicle's route definition
Todo:
Why not return a reference?

Definition at line 81 of file ROVehicle.h.

References myRoute.

Referenced by RONet::computeRoute().

const SUMOVTypeParameter* ROVehicle::getType ( ) const throw () [inline]

Returns the type of the vehicle.

Returns:
The vehicle's type
Todo:
Why not return a reference?

Definition at line 92 of file ROVehicle.h.

References myType.

ROVehicle& ROVehicle::operator= ( const ROVehicle &  src) [private]

Invalidated assignment operator.

void ROVehicle::saveAllAsXML ( SUMOAbstractRouter< ROEdge, ROVehicle > &  router,
OutputDevice &  os,
OutputDevice *const  altos,
bool  withExitTimes 
) const throw (IOError)

Saves the complete vehicle description.

Saves the vehicle type if it was not saved before. Saves the vehicle route if it was not saved before. Saves the vehicle itself.

Parameters:
[in]osThe routes - output device to store the vehicle's description into
[in]altosThe route alternatives - output device to store the vehicle's description into
[in]route!!!describe
Exceptions:
IOErrorIf something fails (not yet implemented)
Todo:
What is the given route definition?

Definition at line 61 of file ROVehicle.cpp.

References OptionsCont::getOptions().

Referenced by RONet::saveAndRemoveRoutesUntil().


Field Documentation

The vehicle's parameter.

Definition at line 145 of file ROVehicle.h.

Referenced by getDepartureTime(), and getID().

The route the vehicle takes.

Definition at line 151 of file ROVehicle.h.

Referenced by getRouteDefinition().

The type of the vehicle.

Definition at line 148 of file ROVehicle.h.

Referenced by getType().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines