PoolBase Struct Reference

Base class for base of all pools. More...

#include <pool_type.hpp>

Inheritance diagram for PoolBase:
Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >

Public Member Functions

 PoolBase (PoolType pt)
 Contructor registers this object in the pool vector.
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 PoolVectorGetPools ()
 Function used to access the vector of all pools.
static void Clean (PoolType)
 Clean all pools of given type.

Data Fields

const PoolType type
 Type of this pool.

Detailed Description

Base class for base of all pools.

Definition at line 32 of file pool_type.hpp.


Constructor & Destructor Documentation

PoolBase::PoolBase ( PoolType  pt  )  [inline]

Contructor registers this object in the pool vector.

Parameters:
pt type of this pool.

Definition at line 51 of file pool_type.hpp.

References SmallVector< T, S >::Append(), and GetPools().


Member Function Documentation

void PoolBase::Clean ( PoolType  pt  )  [static]

Clean all pools of given type.

Parameters:
pt pool types to clean.

Definition at line 30 of file pool_func.cpp.

References SmallVector< T, S >::Begin(), CleanPool(), SmallVector< T, S >::End(), GetPools(), and type.

Referenced by InitializeNetworkPools(), and ShutdownGame().

static PoolVector* PoolBase::GetPools (  )  [inline, static]

Function used to access the vector of all pools.

Returns:
pointer to vector of all pools

Definition at line 39 of file pool_type.hpp.

Referenced by Clean(), PoolBase(), and ~PoolBase().


The documentation for this struct was generated from the following files:

Generated on Fri May 27 04:21:06 2011 for OpenTTD by  doxygen 1.6.1