12 #include "../stdafx.h" 15 #include "../safeguards.h" 25 if (pools->
Length() == 0)
delete pools;
36 for (
PoolBase **ppool = pools->
Begin(); ppool != end; ppool++) {
static PoolVector * GetPools()
Function used to access the vector of all pools.
virtual void CleanPool()=0
Virtual method that deletes all items in the pool.
Base class for base of all pools.
const T * Begin() const
Get the pointer to the first item (const)
static void Clean(PoolType)
Clean all pools of given type.
Simple vector template class.
Defintion of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle...
const T * End() const
Get the pointer behind the last valid item (const)
uint Length() const
Get the number of items in the list.
virtual ~PoolBase()
Destructor removes this object from the pool vector and deletes the vector itself if this was the las...
const T * Find(const T &item) const
Search for the first occurrence of an item.
PoolType
Various types of a pool.
void Erase(T *item)
Removes given item from this vector.
const PoolType type
Type of this pool.