OpenTTD Source  20241108-master-g80f628063a
pool_type.hpp File Reference

Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle, Town, and other indexed items. More...

#include "enum_type.hpp"

Go to the source code of this file.

Data Structures

struct  PoolBase
 Base class for base of all pools. More...
 
struct  Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >
 Base class for all pools. More...
 
struct  Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolIterator< T >
 Iterator to iterate all valid T of a pool. More...
 
struct  Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::IterateWrapper< T >
 
struct  Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolIteratorFiltered< T, F >
 Iterator to iterate all valid T of a pool. More...
 
struct  Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::IterateWrapperFiltered< T, F >
 
struct  Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >
 Base class for all PoolItems. More...
 
struct  Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::AllocCache
 Helper struct to cache 'freed' PoolItems so we do not need to allocate them again. More...
 

Typedefs

typedef std::vector< struct PoolBase * > PoolVector
 Vector of pointers to PoolBase.
 

Enumerations

enum  PoolType {
  PT_NONE = 0x00 , PT_NORMAL = 0x01 , PT_NCLIENT = 0x02 , PT_NADMIN = 0x04 ,
  PT_DATA = 0x08 , PT_ALL = 0x0F
}
 Various types of a pool. More...
 

Detailed Description

Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle, Town, and other indexed items.

Definition in file pool_type.hpp.

Enumeration Type Documentation

◆ PoolType

enum PoolType

Various types of a pool.

Enumerator
PT_NONE 

No pool is selected.

PT_NORMAL 

Normal pool containing game objects.

PT_NCLIENT 

Network client pools.

PT_NADMIN 

Network admin pool.

PT_DATA 

NewGRF or other data, that is not reset together with normal pools.

PT_ALL 

All pool types.

Definition at line 16 of file pool_type.hpp.