ROAbstractRouteDefLoader Class Reference

#include <ROAbstractRouteDefLoader.h>

Inheritance diagram for ROAbstractRouteDefLoader:

ROTypedXMLRoutesLoader RORDLoader_SUMOBase RORDLoader_TripDefs RORDGenerator_ODAmounts

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 55 of file ROAbstractRouteDefLoader.h.


Public Member Functions

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

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.
RONetmyNet
 The network to add routes to.

Private Member Functions

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

Constructor & Destructor Documentation

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

Constructor.

Parameters:
[in] net The network to add loaded route definitions to
[in] begin Vehicles departing before this time shall not be loaded
[in] end Vehicles departing after this time shall not be loaded

Definition at line 47 of file ROAbstractRouteDefLoader.cpp.

00049         : myNet(net), myBegin(begin), myEnd(end) {}

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

Destructor.

Definition at line 52 of file ROAbstractRouteDefLoader.cpp.

00052 {}

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

Invalidated copy constructor.


Member Function Documentation

virtual bool ROAbstractRouteDefLoader::ended (  )  const throw () [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 throw () [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 
) throw (ProcessError) [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] time The time until which route definitions shall be loaded
[in] skipping Whether routes shall not be added
Exceptions:
ProcessError If 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 110 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:

Generated on Wed May 5 00:06:59 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6