36 #ifdef CHECK_MEMORY_LEAKS 38 #endif // CHECK_MEMORY_LEAKS 50 into.push_back(device);
116 "' from vehicle destination edge '" + veh.
getEdge()->
getID() +
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.
MSDevice_Container(SUMOVehicle &holder, const std::string &id)
Constructor.
#define WRITE_WARNING(msg)
const std::string & getID() const
Returns the id.
void addContainer(MSTransportable *container)
Add a container.
static MSDevice_Container * buildVehicleDevices(SUMOVehicle &v, std::vector< MSDevice * > &into)
Build devices for the given vehicle, if needed.
bool notifyMove(SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed)
Checks whether the vehicle is at a stop and container action is needed.
Representation of a vehicle.
bool notifyLeave(SUMOVehicle &veh, SUMOReal lastPos, MSMoveReminder::Notification reason)
Containers leaving on arrival.
~MSDevice_Container()
Destructor.
virtual MSContainerControl & getContainerControl()
Returns the container control.
The vehicle arrived at its destination (is deleted)
const MSEdge & getDestination() const
Returns the current destination.
std::vector< MSTransportable * > myContainers
The containers of the vehicle.
Abstract in-vehicle device.
The vehicle has departed (was inserted into the network)
bool myStopped
Whether the vehicle is at a stop.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason)
Adds containers on vehicle insertion.
virtual bool isStopped() const =0
Returns whether the vehicle is at a stop.
virtual void erase(MSTransportable *container)
removes a single container
virtual const std::string & getID() const =0
Get the vehicle's ID.