36 #ifdef CHECK_MEMORY_LEAKS
38 #endif // CHECK_MEMORY_LEAKS
50 into.push_back(device);
59 :
MSDevice(holder, id), myContainers(), myStopped(holder.isStopped()) {
116 "' from vehicle destination '" + veh.
getEdge()->
getID() +
std::vector< MSContainer * > myContainers
The containers of the vehicle.
void addContainer(MSContainer *container)
Add a container.
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.
MSDevice_Container(SUMOVehicle &holder, const std::string &id)
Constructor.
#define WRITE_WARNING(msg)
virtual void erase(MSContainer *container)
removes a single container
const std::string & getID() const
Returns the id.
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)
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.
bool proceed(MSNet *net, SUMOTime time)
const std::string & getID() const
returns the container id
virtual bool isStopped() const =0
Returns whether the vehicle is at a stop.
const MSEdge & getDestination() const
Returns the current destination.
virtual const std::string & getID() const =0
Get the vehicle's ID.