SUMO - Simulation of Urban MObility

ROAbstractRouteDefLoader Class Reference

The abstract base class for loading routes or route definitions. More...

#include <ROAbstractRouteDefLoader.h>

Inheritance diagram for ROAbstractRouteDefLoader:
ROTypedXMLRoutesLoader RORDLoader_SUMOBase RORDLoader_TripDefs RORDGenerator_ODAmounts

Public Member Functions

 ROAbstractRouteDefLoader (RONet &net, SUMOTime begin, SUMOTime end)
 Constructor.
virtual ~ROAbstractRouteDefLoader ()
 Destructor.
Methods to be implemented
virtual bool readRoutesAtLeastUntil (SUMOTime time, bool skipping)=0
 Adds routes from the file until the given time is reached.
virtual SUMOTime getLastReadTimeStep () const =0
 Returns the time the current (last read) route starts at.
virtual bool ended () const =0
 Returns the information whether no routes are available from this loader anymore.

Protected Attributes

SUMOTime myBegin
 The time for which the first route shall be loaded.
SUMOTime myEnd
 The time for which the first route shall be loaded.
RONet & myNet
 The network to add routes to.

Private Member Functions

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

Detailed Description

The abstract base class for loading routes or route definitions.

XML-reading loaders are not derived directly, but use the derived ROTypedXMLRoutesLoader class as their upper class.

Definition at line 57 of file ROAbstractRouteDefLoader.h.


Constructor & Destructor Documentation

ROAbstractRouteDefLoader::ROAbstractRouteDefLoader ( RONet &  net,
SUMOTime  begin,
SUMOTime  end 
)

Constructor.

Parameters:
[in]netThe network to add loaded route definitions to
[in]beginVehicles departing before this time shall not be loaded
[in]endVehicles departing after this time shall not be loaded

Definition at line 49 of file ROAbstractRouteDefLoader.cpp.

ROAbstractRouteDefLoader::~ROAbstractRouteDefLoader ( ) [virtual]

Destructor.

Definition at line 54 of file ROAbstractRouteDefLoader.cpp.

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

Invalidated copy constructor.


Member Function Documentation

virtual bool ROAbstractRouteDefLoader::ended ( ) const [pure virtual]

Returns the information whether no routes are available from this loader anymore.

Returns:
Whether the whole input has been processed

Implemented in ROTypedXMLRoutesLoader.

virtual SUMOTime ROAbstractRouteDefLoader::getLastReadTimeStep ( ) const [pure virtual]

Returns the time the current (last read) route starts at.

Returns:
The least time step that was read by this reader

Implemented in RORDLoader_SUMOBase, and RORDLoader_TripDefs.

Referenced by ROTypedXMLRoutesLoader::readRoutesAtLeastUntil().

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

Invalidated assignment operator.

virtual bool ROAbstractRouteDefLoader::readRoutesAtLeastUntil ( SUMOTime  time,
bool  skipping 
) [pure virtual]

Adds routes from the file until the given time is reached.

If any error occurs that may not be handled (false input, f.e.), a ProcessError which contains the error message should be thrown.

Parameters:
[in]timeThe time until which route definitions shall be loaded
[in]skippingWhether routes shall not be added
Exceptions:
ProcessErrorIf a major error occured
Returns:
Whether any errors occured
Todo:
Recheck usage of exceptions vs. return value

Implemented in RORDGenerator_ODAmounts, and ROTypedXMLRoutesLoader.


Field Documentation

The time for which the first route shall be loaded.

Definition at line 112 of file ROAbstractRouteDefLoader.h.

Referenced by RORDGenerator_ODAmounts::buildForTimeStep(), RORDLoader_SUMOBase::closeVehicle(), and RORDLoader_TripDefs::myEndElement().


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