OpenTTD Source
20241121-master-g67a0fccfad
|
Base class for base of all pools. More...
#include <pool_type.hpp>
Public Member Functions | |
PoolBase (PoolType pt) | |
Constructor registers this object in the pool vector. More... | |
virtual | ~PoolBase () |
Destructor removes this object from the pool vector and deletes the vector itself if this was the last item removed. | |
virtual void | CleanPool ()=0 |
Virtual method that deletes all items in the pool. | |
Static Public Member Functions | |
static PoolVector * | GetPools () |
Function used to access the vector of all pools. More... | |
static void | Clean (PoolType) |
Clean all pools of given type. More... | |
Data Fields | |
const PoolType | type |
Type of this pool. | |
Private Member Functions | |
PoolBase (const PoolBase &other) | |
Dummy private copy constructor to prevent compilers from copying the structure, which fails due to GetPools(). | |
Base class for base of all pools.
Definition at line 29 of file pool_type.hpp.
|
inline |
Constructor registers this object in the pool vector.
pt | type of this pool. |
Definition at line 48 of file pool_type.hpp.
References GetPools().
|
static |
Clean all pools of given type.
pt | pool types to clean. |
Definition at line 30 of file pool_func.cpp.
References GetPools().
Referenced by InitializeNetworkPools().
|
inlinestatic |
Function used to access the vector of all pools.
Definition at line 36 of file pool_type.hpp.
Referenced by Clean(), PoolBase(), and ~PoolBase().