![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cPool.h>
Public Member Functions | |
| cPool (ITERATE_t nBucketAllocQty=128) noexcept | |
| ~cPool () | |
| bool | isPoolUsed () const |
| bool | put_BucketAllocQty (ITERATE_t nBucketAllocQty) |
| void | FreePool () |
| TYPE * | AllocPoolObjectNC () |
| void | FreePoolObjectND (TYPE *pUsed) |
| TYPE * | AllocPoolObject () |
| void | FreePoolObject (TYPE *pUsed) |
| bool | CheckValidPool (UINT_PTR uCheckVal=0) const |
| bool | IsInFreeState (const TYPE *pUsedNode) const |
| bool | IsInFreeList (const TYPE *pUsedNode) const |
| UNITTEST_FRIEND (cPool) | |
Public Member Functions inherited from GrayLib::cPoolBase< cPoolNodeFreeT< TYPE > > | |
| ITERATE_t | get_BucketAllocQty () const noexcept |
| ITERATE_t | get_AllocQty () const noexcept |
| bool | isInPool (const void *pObj) const |
| cPoolBucket * | AddBucketNew () |
| void | FreeBuckets () |
Additional Inherited Members | |
Protected Types inherited from GrayLib::cPoolBase< cPoolNodeFreeT< TYPE > > | |
| typedef cArrayStruct< cPoolNodeFreeT< TYPE > > | cPoolBucket |
Protected Member Functions inherited from GrayLib::cPoolBase< cPoolNodeFreeT< TYPE > > | |
| cPoolBase (ITERATE_t nBucketAllocQty=128) noexcept | |
Protected Attributes inherited from GrayLib::cPoolBase< cPoolNodeFreeT< TYPE > > | |
| cArrayStruct< cPoolBucket > | m_aBuckets |
| all allocated space. free and used objects. More... | |
| ITERATE_t | m_nBucketAllocQty |
| how many new objects per bucket. More... | |
a clean pool of TYPE object. each allocation gets a new constructor called on the object. ASSUME TYPE is based on IPoolNode
|
inlinenoexcept |
|
inline |
Can't delete the buckets with outstanding used objects?
|
inline |
Allocate 1 object from the pool. call constructor. overload TYPE new operator use cPoolClass instead. overload this to make specially constructed TYPE types.
|
inline |
Alloc TYPE object with no constructor.
|
inline |
Validate all the objects in the pool and the free list.
|
inline |
Free all objects in the pool
|
inline |
Free 1 object from the pool. call destructor. overload TYPE delete use cPoolClass instead. destruct TYPE in place
|
inline |
overload TYPE delete operator to call this instead. ASSUME TYPE destruct already called. does NOT call it again.
|
inline |
marginally legal thing to do.
|
inline |
|
inline |
|
inline |
set how many objects per 'bucket' allocation?
| GrayLib::cPool< TYPE >::UNITTEST_FRIEND | ( | cPool< TYPE > | ) |