MSTriggeredRerouter::Setter Class Reference

#include <MSTriggeredRerouter.h>

Inheritance diagram for MSTriggeredRerouter::Setter:

MSMoveReminder

Detailed Description

Responsible for setting a new route to a vehicle which arrives at a single lane.

Definition at line 87 of file MSTriggeredRerouter.h.


Public Member Functions

const MSLane *const getLane () const throw ()
 Returns the lane the reminder works on.
 Setter (MSTriggeredRerouter *const parent, MSLane *const lane) throw ()
 Constructor.
 ~Setter () throw ()
 Destructor.
Methods inherited from MSMoveReminder
bool isStillActive (MSVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) throw ()
 Tries to reroute the vehicle.
bool notifyEnter (MSVehicle &veh, bool isEmit, bool isLaneChange) throw ()
 Tries to reroute the vehicle.
Interface methods, to be derived by subclasses
virtual void notifyLeave (MSVehicle &veh, bool isArrival, bool isLaneChange) throw ()
 Called if the vehicle leaves the reminder's lane.

Protected Attributes

MSLane *const myLane
 Lane on which the reminder works.

Private Member Functions

Setteroperator= (const Setter &)
 Invalidated assignment operator.
 Setter (const Setter &)
 Invalidated copy constructor.

Private Attributes

MSTriggeredRerouter *const myParent
 The rerouter used for rerouting the vehicle.

Constructor & Destructor Documentation

MSTriggeredRerouter::Setter::Setter ( MSTriggeredRerouter *const   parent,
MSLane *const   lane 
) throw ()

Constructor.

Parameters:
[in] parent The rerouter responsible for this actor
[in] lane The lane this actor is placed at

Definition at line 62 of file MSTriggeredRerouter.cpp.

00064         : MSMoveReminder(lane), myParent(parent) {}

MSTriggeredRerouter::Setter::~Setter (  )  throw ()

Destructor.

Definition at line 67 of file MSTriggeredRerouter.cpp.

00067 {}

MSTriggeredRerouter::Setter::Setter ( const Setter  )  [private]

Invalidated copy constructor.


Member Function Documentation

const MSLane* const MSMoveReminder::getLane (  )  const throw () [inline, inherited]

bool MSTriggeredRerouter::Setter::isStillActive ( MSVehicle veh,
SUMOReal  oldPos,
SUMOReal  newPos,
SUMOReal  newSpeed 
) throw () [virtual]

Tries to reroute the vehicle.

Calls parent's "reroute"-method with the vehicle as one of the parameters. Returns false - the vehicle will not be rerouted again.

Parameters:
[in] veh The regarded vehicle
[in] oldPos Position before the move-micro-timestep.
[in] newPos Position after the move-micro-timestep.
[in] newSpeed The vehicle's current speed
Returns:
always false (the vehicle will not be rerouted again)
See also:
MSMoveReminder

MSMoveReminder::isStillActive

MSTriggeredRerouter::reroute

Reimplemented from MSMoveReminder.

Definition at line 71 of file MSTriggeredRerouter.cpp.

References MSLane::getEdge(), MSMoveReminder::myLane, myParent, and MSTriggeredRerouter::reroute().

00072                                                             {
00073     myParent->reroute(veh, myLane->getEdge());
00074     return false;
00075 }

bool MSTriggeredRerouter::Setter::notifyEnter ( MSVehicle veh,
bool  isEmit,
bool  isLaneChange 
) throw () [virtual]

Tries to reroute the vehicle.

Calls parent's "reroute"-method with the vehicle as one of the parameters. Returns false - the vehicle will not be rerouted again.

Parameters:
[in] veh The entering vehicle.
[in] isEmit true means emit, false: lane change
Returns:
always false (the vehicle will not be rerouted again)
See also:
MSMoveReminder

MSMoveReminder::notifyEnter

MSTriggeredRerouter::reroute

Reimplemented from MSMoveReminder.

Definition at line 79 of file MSTriggeredRerouter.cpp.

References MSLane::getEdge(), MSMoveReminder::myLane, myParent, and MSTriggeredRerouter::reroute().

00079                                                                          {
00080     myParent->reroute(veh, myLane->getEdge());
00081     return false;
00082 }

virtual void MSMoveReminder::notifyLeave ( MSVehicle veh,
bool  isArrival,
bool  isLaneChange 
) throw () [inline, virtual, inherited]

Called if the vehicle leaves the reminder's lane.

Informs if vehicle leaves reminder lane (due to lane change, removal from the network, or leaving to the next lane). The default is to do nothing.

Parameters:
[in] veh The leaving vehicle.
[in] isArrival whether the vehicle arrived at its destination
[in] isLaneChange whether the vehicle changed from the lane

Reimplemented in MSE2Collector, MSInductLoop, MSMeanData::MeanDataValueTracker, and MSMeanData_Net::MSLaneMeanDataValues.

Definition at line 119 of file MSMoveReminder.h.

00119 {};

Setter& MSTriggeredRerouter::Setter::operator= ( const Setter  )  [private]

Invalidated assignment operator.


Field Documentation

MSLane* const MSMoveReminder::myLane [protected, inherited]

Lane on which the reminder works.

Definition at line 141 of file MSMoveReminder.h.

Referenced by MSMoveReminder::getLane(), isStillActive(), notifyEnter(), and MSMeanData::MeanDataValueTracker::reset().

The rerouter used for rerouting the vehicle.

Definition at line 140 of file MSTriggeredRerouter.h.

Referenced by isStillActive(), and notifyEnter().


The documentation for this class was generated from the following files:

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