41 #ifdef CHECK_MEMORY_LEAKS
43 #endif // CHECK_MEMORY_LEAKS
55 into.push_back(device);
64 :
MSDevice(holder, id), myPersons(), myStopped(holder.isStopped()) {
76 for (std::vector<MSPerson*>::iterator i =
myPersons.begin(); i !=
myPersons.end(); ++i) {
104 for (std::vector<MSPerson*>::iterator i =
myPersons.begin(); i !=
myPersons.end(); ++i) {
116 for (std::vector<MSPerson*>::iterator i =
myPersons.begin(); i !=
myPersons.end(); ++i) {
120 "' from vehicle destination '" + veh.
getEdge()->
getID() +
~MSDevice_Person()
Destructor.
const std::string & getID() const
returns the person id
bool myStopped
Whether the vehicle is at a stop.
static MSDevice_Person * buildVehicleDevices(SUMOVehicle &v, std::vector< MSDevice * > &into)
Build devices for the given vehicle, if needed.
virtual const MSEdge * getEdge() const =0
Returns the edge the vehicle is currently at.
Notification
Definition of a vehicle state.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
#define WRITE_WARNING(msg)
const MSEdge & getDestination() const
Returns the current destination.
bool notifyMove(SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed)
Checks whether the vehicle is at a stop and person action is needed.
const std::string & getID() const
Returns the id.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason)
Adds passengers on vehicle insertion.
Representation of a vehicle.
void addPerson(MSPerson *person)
Add a passenger.
The vehicle arrived at its destination (is deleted)
Abstract in-vehicle device.
The vehicle has departed (was inserted into the network)
virtual MSPersonControl & getPersonControl()
Returns the person control.
bool proceed(MSNet *net, SUMOTime time)
MSDevice_Person(SUMOVehicle &holder, const std::string &id)
Constructor.
bool notifyLeave(SUMOVehicle &veh, SUMOReal lastPos, MSMoveReminder::Notification reason)
Passengers leaving on arrival.
std::vector< MSPerson * > myPersons
The passengers of the vehicle.
virtual bool isStopped() const =0
Returns whether the vehicle is at a stop.
virtual void erase(MSPerson *person)
removes a single person
virtual const std::string & getID() const =0
Get the vehicle's ID.