#include <RORouteDef_OrigDest.h>

Definition at line 51 of file RORouteDef_OrigDest.h.
Public Member Functions | |
| void | addAlternative (SUMOAbstractRouter< ROEdge, ROVehicle > &router, const ROVehicle *const, RORoute *current, SUMOTime begin) |
| Adds the build route to the container. | |
| RORoute * | buildCurrentRoute (SUMOAbstractRouter< ROEdge, ROVehicle > &router, SUMOTime begin, const ROVehicle &veh) const |
| Builds the current route from the given information (perform routing, here). | |
| RORouteDef * | copy (const std::string &id) const |
| Returns a copy of the route definition. | |
| const RGBColor *const | getColor () const |
| Returns the color of the route. | |
| const std::string & | getID () const throw () |
| Returns the id. | |
| bool | isSaved () const throw () |
| Returns the information whether this item was already saved. | |
| void | markSaved () throw () |
| Marks the item as saved. | |
| RORouteDef_OrigDest (const std::string &id, const RGBColor *const color, const ROEdge *from, const ROEdge *to, bool removeFirst=false) throw () | |
| Constructor. | |
| virtual OutputDevice & | writeXMLDefinition (SUMOAbstractRouter< ROEdge, ROVehicle > &router, OutputDevice &dev, const ROVehicle *const veh, bool asAlternatives, bool withExitTimes) const |
| Saves the built route / route alternatives. | |
| virtual | ~RORouteDef_OrigDest () throw () |
| Destructor. | |
Protected Member Functions | |
| const RGBColor *const | copyColorIfGiven () const throw () |
Protected Attributes | |
| const RGBColor *const | myColor |
| The color the route shall have. | |
| RORoute * | myCurrent |
| The complete route (after building). | |
| const ROEdge * | myFrom |
| The origin and the destination edge of the route. | |
| std::string | myID |
| The name of the object. | |
| bool | myRemoveFirst |
| Information whether the first edge shall be removed. | |
| SUMOTime | myStartTime |
| The begin of the trip. | |
| const ROEdge * | myTo |
Private Member Functions | |
| RORouteDef_OrigDest & | operator= (const RORouteDef_OrigDest &src) |
| Invalidated assignment operator. | |
| RORouteDef_OrigDest (const RORouteDef_OrigDest &src) | |
| Invalidated copy constructor. | |
| RORouteDef_OrigDest::RORouteDef_OrigDest | ( | const std::string & | id, | |
| const RGBColor *const | color, | |||
| const ROEdge * | from, | |||
| const ROEdge * | to, | |||
| bool | removeFirst = false | |||
| ) | throw () |
Constructor.
Definition at line 51 of file RORouteDef_OrigDest.cpp.
Referenced by copy().
00056 : RORouteDef(id, color), myFrom(from), myTo(to), myCurrent(0), 00057 myRemoveFirst(removeFirst) {}
| RORouteDef_OrigDest::~RORouteDef_OrigDest | ( | ) | throw () [virtual] |
Destructor.
Definition at line 60 of file RORouteDef_OrigDest.cpp.
References myCurrent.
00060 { 00061 delete myCurrent; 00062 }
| RORouteDef_OrigDest::RORouteDef_OrigDest | ( | const RORouteDef_OrigDest & | src | ) | [private] |
Invalidated copy constructor.
| void RORouteDef_OrigDest::addAlternative | ( | SUMOAbstractRouter< ROEdge, ROVehicle > & | router, | |
| const ROVehicle * const | veh, | |||
| RORoute * | current, | |||
| SUMOTime | begin | |||
| ) | [virtual] |
Adds the build route to the container.
Here, the currently new route is added
Implements RORouteDef.
Definition at line 79 of file RORouteDef_OrigDest.cpp.
References RORoute::getEdgeVector(), myCurrent, myStartTime, SUMOAbstractRouter< E, V >::recomputeCosts(), and RORoute::setCosts().
00080 { 00081 myCurrent = current; 00082 myStartTime = begin; 00083 current->setCosts(router.recomputeCosts(current->getEdgeVector(), veh, begin)); 00084 }
| RORoute * RORouteDef_OrigDest::buildCurrentRoute | ( | SUMOAbstractRouter< ROEdge, ROVehicle > & | router, | |
| SUMOTime | begin, | |||
| const ROVehicle & | veh | |||
| ) | const [virtual] |
Builds the current route from the given information (perform routing, here).
Implements RORouteDef.
Definition at line 66 of file RORouteDef_OrigDest.cpp.
References SUMOAbstractRouter< E, V >::compute(), RORouteDef::copyColorIfGiven(), myFrom, Named::myID, myRemoveFirst, and myTo.
00067 { 00068 std::vector<const ROEdge*> edges; 00069 router.compute(myFrom, myTo, &veh, begin, edges); 00070 if (myRemoveFirst&&edges.size()>2) { 00071 edges.erase(edges.begin()); 00072 edges.erase(edges.end()-1); 00073 } 00074 return new RORoute(myID, 0, 1, edges, copyColorIfGiven()); 00075 }
| RORouteDef * RORouteDef_OrigDest::copy | ( | const std::string & | id | ) | const [virtual] |
Returns a copy of the route definition.
Implements RORouteDef.
Definition at line 88 of file RORouteDef_OrigDest.cpp.
References RORouteDef::copyColorIfGiven(), myFrom, myRemoveFirst, myTo, and RORouteDef_OrigDest().
00088 { 00089 return new RORouteDef_OrigDest(id, copyColorIfGiven(), myFrom, myTo, 00090 myRemoveFirst); 00091 }
| const RGBColor *const RORouteDef::copyColorIfGiven | ( | ) | const throw () [protected, inherited] |
Definition at line 63 of file RORouteDef.cpp.
References RORouteDef::myColor.
Referenced by buildCurrentRoute(), RORouteDef_Complete::buildCurrentRoute(), RORouteDef_Alternatives::buildCurrentRoute(), copy(), and RORouteDef_Complete::copy().
00063 { 00064 if (myColor==0) { 00065 return 0; 00066 } 00067 return new RGBColor(*myColor); 00068 }
| const RGBColor* const RORouteDef::getColor | ( | ) | const [inline, inherited] |
Returns the color of the route.
Definition at line 92 of file RORouteDef.h.
References RORouteDef::myColor.
00092 { 00093 return myColor; 00094 }
| const std::string& Named::getID | ( | ) | const throw () [inline, inherited] |
Returns the id.
Definition at line 59 of file Named.h.
References Named::myID.
Referenced by RORouteDef_Alternatives::addAlternative(), MSRouteProbe::addRoute(), MSEmitter::MSEmitter_FileTriggeredChild::buildAndScheduleFlowVehicle(), MSCalibrator::MSCalibrator_FileTriggeredChild::buildAndScheduleFlowVehicle(), RORouteDef_Complete::buildCurrentRoute(), ODDistrictHandler::closeDistrict(), NBTrafficLightDefinition::collectLinks(), NBTrafficLightDefinition::compute(), GUIPointOfInterest::drawGL(), MSInductLoop::enterDetectorByMove(), MSVTypeProbe::execute(), MSNet::getBusStopID(), GUITriggeredRerouter::getMicrosimID(), GUIPointOfInterest::getMicrosimID(), GUILaneSpeedTrigger::getMicrosimID(), GUIInductLoop::MyWrapper::getMicrosimID(), GUIEmitter::getMicrosimID(), GUIBusStop::getMicrosimID(), GUI_E2_ZS_Collector::MyWrapper::getMicrosimID(), traci::TraCIServer::handlePoiDomain(), RORDLoader_SUMOBase::myCharacters(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), MSTriggeredRerouter::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSEmitter::MSEmitter_FileTriggeredChild::myStartElement(), MSCalibrator::MSCalibrator_FileTriggeredChild::myStartElement(), NBLoadedTLDef::SignalGroup::patchTYellow(), TraCIServerAPI_Vehicle::processGet(), MSVehicle::replaceRoute(), MSVehicle::saveState(), NBOwnTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), RORDLoader_SUMOBase::startRoute(), GUIEmitter::GUIEmitterChild_UserTriggeredChild::wrappedExecute(), NBTrafficLightLogic::writeXML(), MSRouteProbe::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and MSVehicle::~MSVehicle().
00059 { 00060 return myID; 00061 }
| bool ReferencedItem::isSaved | ( | ) | const throw () [inline, inherited] |
Returns the information whether this item was already saved.
Definition at line 58 of file ReferencedItem.h.
References ReferencedItem::myWasSaved.
Referenced by RONet::computeRoute(), and ROVehicle::saveAllAsXML().
00058 { 00059 return myWasSaved; 00060 }
| void ReferencedItem::markSaved | ( | ) | throw () [inline, inherited] |
Marks the item as saved.
Definition at line 65 of file ReferencedItem.h.
References ReferencedItem::myWasSaved.
00065 { 00066 myWasSaved = true; 00067 }
| RORouteDef_OrigDest& RORouteDef_OrigDest::operator= | ( | const RORouteDef_OrigDest & | src | ) | [private] |
Invalidated assignment operator.
| OutputDevice & RORouteDef_OrigDest::writeXMLDefinition | ( | SUMOAbstractRouter< ROEdge, ROVehicle > & | router, | |
| OutputDevice & | dev, | |||
| const ROVehicle *const | veh, | |||
| bool | asAlternatives, | |||
| bool | withExitTimes | |||
| ) | const [virtual] |
Saves the built route / route alternatives.
Writes the route into the given stream.
| [in] | dev | The device to write the route into |
| [in] | asAlternatives | Whether the route shall be saved as route alternatives |
Implements RORouteDef.
Definition at line 95 of file RORouteDef_OrigDest.cpp.
References myCurrent, and RORoute::writeXMLDefinition().
00096 { 00097 return myCurrent->writeXMLDefinition(router, dev, veh, asAlternatives, withExitTimes); 00098 }
const RGBColor* const RORouteDef::myColor [protected, inherited] |
The color the route shall have.
Definition at line 114 of file RORouteDef.h.
Referenced by RORouteDef::copyColorIfGiven(), RORouteDef::getColor(), RORouteDef_Complete::writeXMLDefinition(), RORouteDef_Alternatives::writeXMLDefinition(), and RORouteDef::~RORouteDef().
RORoute* RORouteDef_OrigDest::myCurrent [protected] |
The complete route (after building).
Definition at line 82 of file RORouteDef_OrigDest.h.
Referenced by addAlternative(), writeXMLDefinition(), and ~RORouteDef_OrigDest().
const ROEdge* RORouteDef_OrigDest::myFrom [protected] |
The origin and the destination edge of the route.
Definition at line 79 of file RORouteDef_OrigDest.h.
Referenced by buildCurrentRoute(), and copy().
std::string Named::myID [protected, inherited] |
The name of the object.
Definition at line 66 of file Named.h.
Referenced by buildCurrentRoute(), RORouteDef_Complete::buildCurrentRoute(), RORouteDef_Alternatives::buildCurrentRoute(), and Named::getID().
bool RORouteDef_OrigDest::myRemoveFirst [protected] |
Information whether the first edge shall be removed.
Definition at line 89 of file RORouteDef_OrigDest.h.
Referenced by buildCurrentRoute(), and copy().
SUMOTime RORouteDef_OrigDest::myStartTime [protected] |
The begin of the trip.
Definition at line 85 of file RORouteDef_OrigDest.h.
Referenced by addAlternative().
const ROEdge * RORouteDef_OrigDest::myTo [protected] |
1.5.6