Public Member Functions | Private Attributes

free_list_t< T > Class Template Reference
[Utility Library]

Simple free list manager. More...

#include <free_list.h>

List of all members.

Public Member Functions

 free_list_t (int maxSize) throw ()
 ~free_list_t (void) throw ()
smart_ptr< T > getElement (void)
void returnElement (smart_ptr< T > &p) throw ()
void clear (void) throw ()
int size (void) const throw ()

Private Attributes

smart_ptr< T > m_head
int m_size
int m_max

Detailed Description

template<class T>
class free_list_t< T >

Simple free list manager.

Your class T must have a public 'next' member. The 'next' member MUST be a smart_ptr<T>.

Definition at line 47 of file free_list.h.


Constructor & Destructor Documentation

template<class T>
free_list_t< T >::free_list_t ( int  maxSize  )  throw () [inline]

Definition at line 50 of file free_list.h.

template<class T>
free_list_t< T >::~free_list_t ( void   )  throw () [inline]

Definition at line 56 of file free_list.h.


Member Function Documentation

template<class T>
smart_ptr<T> free_list_t< T >::getElement ( void   )  [inline]

Definition at line 59 of file free_list.h.

template<class T>
void free_list_t< T >::returnElement ( smart_ptr< T > &  p  )  throw () [inline]

Definition at line 75 of file free_list.h.

template<class T>
void free_list_t< T >::clear ( void   )  throw () [inline]

Definition at line 88 of file free_list.h.

template<class T>
int free_list_t< T >::size ( void   )  const throw () [inline]

Definition at line 93 of file free_list.h.


Member Data Documentation

template<class T>
smart_ptr<T> free_list_t< T >::m_head [private]

Definition at line 97 of file free_list.h.

template<class T>
int free_list_t< T >::m_size [private]

Definition at line 98 of file free_list.h.

template<class T>
int free_list_t< T >::m_max [private]

Definition at line 99 of file free_list.h.


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