Public Member Functions | Private Types | Private Attributes
utilmm::pools::object_pool< T > Class Template Reference

#include <objectpool.hh>

List of all members.

Public Member Functions

T * get ()
void put (T *object)
 ~object_pool ()

Private Types

typedef boost::mutex mutex

Private Attributes

std::list< T * > m_available
boost::mutex m_mutex

Detailed Description

template<typename T>
class utilmm::pools::object_pool< T >

A pool of already-constructed objects

This class manages a list of heap-allocated constructed objects.

The pool is thread-safe

Definition at line 22 of file objectpool.hh.


Member Typedef Documentation

template<typename T>
typedef boost::mutex utilmm::pools::object_pool< T >::mutex [private]

Definition at line 27 of file objectpool.hh.


Constructor & Destructor Documentation

template<typename T>
utilmm::pools::object_pool< T >::~object_pool ( ) [inline]

Definition at line 30 of file objectpool.hh.


Member Function Documentation

template<typename T>
T* utilmm::pools::object_pool< T >::get ( ) [inline]

Definition at line 33 of file objectpool.hh.

template<typename T>
void utilmm::pools::object_pool< T >::put ( T *  object) [inline]

Definition at line 43 of file objectpool.hh.


Member Data Documentation

template<typename T>
std::list<T*> utilmm::pools::object_pool< T >::m_available [private]

Definition at line 25 of file objectpool.hh.

template<typename T>
boost::mutex utilmm::pools::object_pool< T >::m_mutex [private]

Definition at line 24 of file objectpool.hh.


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


utilmm
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Thu Jan 2 2014 11:38:31