40 #ifdef CHECK_MEMORY_LEAKS 42 #endif // CHECK_MEMORY_LEAKS 83 bool wasTop = topVeh != 0 && topVeh->
getID() == id;
99 std::map<std::string, ROVehicle*>::const_iterator i;
100 const std::map<std::string, ROVehicle*>& mmap =
getMyMap();
101 for (i = mmap.begin(); i != mmap.end(); ++i) {
const std::string & getID() const
Returns the id of the vehicle.
void clear()
Deletes all vehicles stored; clears the lists.
A map of named object pointers.
virtual bool add(const std::string &id, ROVehicle *item)
Adds a vehicle to the container.
void clear()
Removes all items from the container (deletes them, too)
void rebuildSorted()
Rebuild the internal, sorted list.
A vehicle as used by router.
std::priority_queue< ROVehicle *, std::vector< ROVehicle * >, ROVehicleByDepartureComperator > mySorted
The sorted vehicle list.
const ROVehicle * getTopVehicle() const
Returns the vehicle that departs most early.
unsigned int size() const
Returns the number of items within the container.
bool erase(const std::string &id)
Tries to remove (and delete) the named vehicle.
const IDMap & getMyMap() const
ROVehicleCont()
Constructor.
A function for sorting vehicles by their departure time.
~ROVehicleCont()
Destructor.