41 #ifdef CHECK_MEMORY_LEAKS 43 #endif // CHECK_MEMORY_LEAKS 55 into.push_back(device);
76 for (std::vector<MSTransportable*>::iterator i =
myPersons.begin(); i !=
myPersons.end(); ++i) {
83 for (std::vector<MSTransportable*>::iterator i =
myPersons.begin(); i !=
myPersons.end();) {
104 for (std::vector<MSTransportable*>::iterator i =
myPersons.begin(); i !=
myPersons.end(); ++i) {
116 for (std::vector<MSTransportable*>::iterator i =
myPersons.begin(); i !=
myPersons.end(); ++i) {
120 "' from vehicle destination edge '" + veh.
getEdge()->
getID() +
~MSDevice_Person()
Destructor.
virtual void erase(MSTransportable *person)
removes a single person
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).
const std::string & getID() const
returns the id of the transportable
virtual bool proceed(MSNet *net, SUMOTime time)=0
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
#define WRITE_WARNING(msg)
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.
The vehicle arrived at its destination (is deleted)
const MSEdge & getDestination() const
Returns the current destination.
Abstract in-vehicle device.
The vehicle has departed (was inserted into the network)
virtual MSPersonControl & getPersonControl()
Returns the person control.
MSDevice_Person(SUMOVehicle &holder, const std::string &id)
Constructor.
bool notifyLeave(SUMOVehicle &veh, SUMOReal lastPos, MSMoveReminder::Notification reason)
Passengers leaving on arrival.
virtual bool isStopped() const =0
Returns whether the vehicle is at a stop.
void addPerson(MSTransportable *person)
Add a passenger.
virtual const std::string & getID() const =0
Get the vehicle's ID.
std::vector< MSTransportable * > myPersons
The passengers of the vehicle.