#include <MSMoveReminder.h>

Base class of all move-reminders. During move, the vehicles call isStillActive() for all reminders on their current lane (all lanes they pass during one step). If a vehicle enters the lane the reminder is positioned at during emit or lanechange notifyEnter() is called. If a vehicle leaves the reminder lane it calls notifyLeave().
The reminder knows whom to tell about move, emit and lanechange. The vehicles will remove the reminder that is not isStillActive() from their reminder container.
MSLane::getMoveReminder
Definition at line 60 of file MSMoveReminder.h.
Public Member Functions | |
| const MSLane *const | getLane () const throw () |
| Returns the lane the reminder works on. | |
| MSMoveReminder (MSLane *const lane, const bool doAdd=true) throw () | |
| Constructor. | |
| virtual | ~MSMoveReminder () throw () |
| Destructor. | |
Interface methods, to be derived by subclasses | |
| virtual bool | isStillActive (MSVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) throw () |
| Checks whether the reminder still has to be notified about the vehicle moves. | |
| virtual bool | notifyEnter (MSVehicle &veh, bool isEmit, bool isLaneChange) throw () |
| Checks whether the reminder is activated by the vehicle's emission on lane change. | |
| 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. | |
Constructor.
| [in] | lane | Lane on which the reminder will work. |
| [in] | doAdd | whether to add the reminder to the lane |
Definition at line 38 of file MSMoveReminder.cpp.
00039 : myLane(lane) { 00040 if (myLane!=0 && doAdd) { 00041 // add reminder to lane 00042 myLane->addMoveReminder(this); 00043 } 00044 }
| virtual MSMoveReminder::~MSMoveReminder | ( | ) | throw () [inline, virtual] |
| const MSLane* const MSMoveReminder::getLane | ( | ) | const throw () [inline] |
Returns the lane the reminder works on.
Definition at line 80 of file MSMoveReminder.h.
References myLane.
Referenced by GUIInductLoop::MyWrapper::getParameterWindow(), GUI_E2_ZS_Collector::MyWrapper::getParameterWindow(), GUINet::initDetectors(), MSMeanData_Net::MSLaneMeanDataValues::isStillActive(), MSMeanData_HBEFA::MSLaneMeanDataValues::isStillActive(), MSMeanData_Harmonoise::MSLaneMeanDataValues::isStillActive(), MSE2Collector::update(), and MSMeanData::writeEdge().
00080 { 00081 return myLane; 00082 }
| virtual bool MSMoveReminder::isStillActive | ( | MSVehicle & | veh, | |
| SUMOReal | oldPos, | |||
| SUMOReal | newPos, | |||
| SUMOReal | newSpeed | |||
| ) | throw () [inline, virtual] |
Checks whether the reminder still has to be notified about the vehicle moves.
Indicator if the reminders is still active for the passed vehicle/parameters. If false, the vehicle will erase this reminder from it's reminder-container.
| veh | Vehicle that asks this reminder. | |
| oldPos | Position before move. | |
| newPos | Position after move with newSpeed. | |
| newSpeed | Moving speed. |
Reimplemented in MSE2Collector, MSE3Collector::MSE3EntryReminder, MSE3Collector::MSE3LeaveReminder, MSInductLoop, MSMeanData::MeanDataValueTracker, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_HBEFA::MSLaneMeanDataValues, MSMeanData_Net::MSLaneMeanDataValues, and MSTriggeredRerouter::Setter.
Definition at line 101 of file MSMoveReminder.h.
| virtual bool MSMoveReminder::notifyEnter | ( | MSVehicle & | veh, | |
| bool | isEmit, | |||
| bool | isLaneChange | |||
| ) | throw () [inline, virtual] |
Checks whether the reminder is activated by the vehicle's emission on lane change.
Lane change means in this case that the vehicle changes to the lane the reminder is placed at.
| [in] | veh | The entering vehicle. |
| [in] | isEmit | whether the vehicle was just emitted into the net |
| [in] | isLaneChange | whether the vehicle changed to the lane |
Reimplemented in MSE2Collector, MSE3Collector::MSE3EntryReminder, MSE3Collector::MSE3LeaveReminder, MSInductLoop, MSMeanData::MeanDataValueTracker, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_Net::MSLaneMeanDataValues, MSRouteProbe::EntryReminder, and MSTriggeredRerouter::Setter.
Definition at line 133 of file MSMoveReminder.h.
| virtual void MSMoveReminder::notifyLeave | ( | MSVehicle & | veh, | |
| bool | isArrival, | |||
| bool | isLaneChange | |||
| ) | throw () [inline, virtual] |
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.
| [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.
MSLane* const MSMoveReminder::myLane [protected] |
Lane on which the reminder works.
Definition at line 141 of file MSMoveReminder.h.
Referenced by getLane(), MSTriggeredRerouter::Setter::isStillActive(), MSTriggeredRerouter::Setter::notifyEnter(), and MSMeanData::MeanDataValueTracker::reset().
1.5.6