Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Protected Member Functions | List of all members
InitOnceCorePool< T > Class Template Reference
Inheritance diagram for InitOnceCorePool< T >:
CorePoolBase< T, LinkedChunkItem< T > >

Public Types

typedef CorePoolBase< T,
LinkedChunkItem< T > > 
BaseType
 

Public Member Functions

 InitOnceCorePool (const unsigned int &chunk_size=128)
 Constructor.
 
T * get_object ()
 Gets the pointer of an available object. Do not call the object constructor.
 
void release_object (T *obj)
 Frees the object with specified pointer. Do not call the object destructor.
 
virtual size_t get_memory_size () const
 
- Public Member Functions inherited from CorePoolBase< T, LinkedChunkItem< T > >
 CorePoolBase (const unsigned int &chunk_size=128)
 
unsigned int get_allocated_object_count () const
 
unsigned int get_used_object_count () const
 

Protected Member Functions

T * get_unused_object (bool &is_recycled)
 
- Protected Member Functions inherited from CorePoolBase< T, LinkedChunkItem< T > >
void set_unused_object (T *object)
 

Additional Inherited Members

- Protected Attributes inherited from CorePoolBase< T, LinkedChunkItem< T > >
LinkedChunkItem< T > ** m_chunk_array
 
LinkedChunkItem< T > * m_first_free
 
unsigned int m_chunk_size
 
unsigned int m_chunk_array_size
 
unsigned int m_chunk_count
 
unsigned int m_object_count
 

Constructor & Destructor Documentation

template<class T >
InitOnceCorePool< T >::InitOnceCorePool ( const unsigned int &  chunk_size = 128)
inline

Constructor.

Parameters
[in]chunk_sizenumber of objects allocated at once