ROLoader::EdgeFloatTimeLineRetriever_EdgeTravelTime Class Reference

#include <ROLoader.h>

Inheritance diagram for ROLoader::EdgeFloatTimeLineRetriever_EdgeTravelTime:

SAXWeightsHandler::EdgeFloatTimeLineRetriever

Detailed Description

Obtains edge travel times from a weights handler and stores them within the edges.

See also:
SAXWeightsHandler::EdgeFloatTimeLineRetriever

Definition at line 173 of file ROLoader.h.


Public Member Functions

void addEdgeWeight (const std::string &id, SUMOReal val, SUMOReal beg, SUMOReal end) const throw ()
 Adds a travel time for a given edge and time period.
 EdgeFloatTimeLineRetriever_EdgeTravelTime (RONet &net) throw ()
 Constructor.
 ~EdgeFloatTimeLineRetriever_EdgeTravelTime () throw ()
 Destructor.

Private Attributes

RONetmyNet
 The network edges shall be obtained from.

Constructor & Destructor Documentation

ROLoader::EdgeFloatTimeLineRetriever_EdgeTravelTime::EdgeFloatTimeLineRetriever_EdgeTravelTime ( RONet net  )  throw () [inline]

Constructor.

Definition at line 176 of file ROLoader.h.

00176 : myNet(net) {}

ROLoader::EdgeFloatTimeLineRetriever_EdgeTravelTime::~EdgeFloatTimeLineRetriever_EdgeTravelTime (  )  throw () [inline]

Destructor.

Definition at line 179 of file ROLoader.h.

00179 {}


Member Function Documentation

void ROLoader::EdgeFloatTimeLineRetriever_EdgeTravelTime::addEdgeWeight ( const std::string &  id,
SUMOReal  val,
SUMOReal  beg,
SUMOReal  end 
) const throw () [virtual]

Adds a travel time for a given edge and time period.

Parameters:
[in] id The id of the object to add a weight for
[in] val The travel time
[in] beg The begin of the interval the weight is valid for
[in] end The end of the interval the weight is valid for
See also:
SAXWeightsHandler::EdgeFloatTimeLineRetriever::addEdgeWeight

Implements SAXWeightsHandler::EdgeFloatTimeLineRetriever.

Definition at line 66 of file ROLoader.cpp.

References ROEdge::addTravelTime(), MsgHandler::getErrorInstance(), and MsgHandler::inform().

00067                                                                 {
00068     ROEdge *e = myNet.getEdge(id);
00069     if (e!=0) {
00070         e->addTravelTime(val, beg, end);
00071     } else {
00072         if (id[0]!=':') {
00073             MsgHandler::getErrorInstance()->inform("Trying to set a weight for the unknown edge '" + id + "'.");
00074         }
00075     }
00076 }


Field Documentation

The network edges shall be obtained from.

Definition at line 194 of file ROLoader.h.


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