mn::auto_release< TRELOBJ, TALLOCATOR > Class Template Reference

A simple garbage collector - pool based, a object for this colector must be extends auto_release_object. More...

#include <mn_auto_release.hpp>

+ Collaboration diagram for mn::auto_release< TRELOBJ, TALLOCATOR >:

Public Types

using self_type = auto_release< TRELOBJ, TALLOCATOR >
 
using value_type = TRELOBJ
 
using pointer = TRELOBJ *
 
using reference = TRELOBJ &
 
using list_type = mn::container::list< TRELOBJ, TALLOCATOR >
 

Public Member Functions

 auto_release ()
 
 ~auto_release ()
 Destroy this pool and release all objects. More...
 
void add (pointer pObject)
 Add a Object to the pool. More...
 
void release ()
 Release all objects in the pool. More...
 
pointer front ()
 
pointer back ()
 

Private Attributes

list_type m_listReleaseble
 

Detailed Description

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
class mn::auto_release< TRELOBJ, TALLOCATOR >

A simple garbage collector - pool based, a object for this colector must be extends auto_release_object.

Template Parameters
TRELOBJThe object
TALLOCATORThe using allocator for the list

Member Typedef Documentation

◆ list_type

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
using mn::auto_release< TRELOBJ, TALLOCATOR >::list_type = mn::container::list<TRELOBJ, TALLOCATOR>

◆ pointer

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
using mn::auto_release< TRELOBJ, TALLOCATOR >::pointer = TRELOBJ*

◆ reference

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
using mn::auto_release< TRELOBJ, TALLOCATOR >::reference = TRELOBJ&

◆ self_type

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
using mn::auto_release< TRELOBJ, TALLOCATOR >::self_type = auto_release<TRELOBJ, TALLOCATOR>

◆ value_type

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
using mn::auto_release< TRELOBJ, TALLOCATOR >::value_type = TRELOBJ

Constructor & Destructor Documentation

◆ auto_release()

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
mn::auto_release< TRELOBJ, TALLOCATOR >::auto_release ( )
inline

◆ ~auto_release()

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
mn::auto_release< TRELOBJ, TALLOCATOR >::~auto_release ( )
inline

Destroy this pool and release all objects.

Member Function Documentation

◆ add()

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
void mn::auto_release< TRELOBJ, TALLOCATOR >::add ( pointer  pObject)
inline

Add a Object to the pool.

◆ back()

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
pointer mn::auto_release< TRELOBJ, TALLOCATOR >::back ( )
inline

◆ front()

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
pointer mn::auto_release< TRELOBJ, TALLOCATOR >::front ( )
inline

◆ release()

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
void mn::auto_release< TRELOBJ, TALLOCATOR >::release ( )
inline

Release all objects in the pool.

Member Data Documentation

◆ m_listReleaseble

template<class TRELOBJ = auto_release_object, class TALLOCATOR = memory::default_allocator_t>
list_type mn::auto_release< TRELOBJ, TALLOCATOR >::m_listReleaseble
private

The documentation for this class was generated from the following file: