Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

atlas::allocator::Allocator< T, P > Class Template Reference

#include <allocator.h>

Collaboration diagram for atlas::allocator::Allocator< T, P >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T value_type
typedef T * pointer
typedef const T * const_pointer
typedef T & reference
typedef const T & const_reference
typedef ptrdiff_t difference_type
typedef size_t size_type

Public Member Functions

 Allocator () throw ()
 Allocator (const Allocator &) throw ()
template<typename U>
 Allocator (const Allocator< U, P > &) throw ()
 ~Allocator ()
size_type max_size () const throw ()
pointer allocate (size_type, const void *hint=0)
 Allocates raw memory for n instances of T.
void deallocate (pointer, size_type)
void construct (pointer, const_reference)
void destroy (pointer)

Static Private Attributes

size_t d_instances = 0
size_t d_constructions = 0
P * d_pool = 0

template<typename T, typename P>
class atlas::allocator::Allocator< T, P >


Member Typedef Documentation

template<typename T, typename P>
typedef const T* atlas::allocator::Allocator< T, P >::const_pointer
 

Definition at line 76 of file allocator.h.

template<typename T, typename P>
typedef const T& atlas::allocator::Allocator< T, P >::const_reference
 

Definition at line 79 of file allocator.h.

template<typename T, typename P>
typedef ptrdiff_t atlas::allocator::Allocator< T, P >::difference_type
 

Definition at line 81 of file allocator.h.

template<typename T, typename P>
typedef T* atlas::allocator::Allocator< T, P >::pointer
 

Definition at line 75 of file allocator.h.

template<typename T, typename P>
typedef T& atlas::allocator::Allocator< T, P >::reference
 

Definition at line 78 of file allocator.h.

template<typename T, typename P>
typedef size_t atlas::allocator::Allocator< T, P >::size_type
 

Definition at line 82 of file allocator.h.

template<typename T, typename P>
typedef T atlas::allocator::Allocator< T, P >::value_type
 

Definition at line 73 of file allocator.h.


Constructor & Destructor Documentation

template<typename T, typename P>
atlas::allocator::Allocator< T, P >::Allocator  )  throw () [inline]
 

Definition at line 89 of file allocator.h.

References atlas::allocator::AllocDigits.

template<typename T, typename P>
atlas::allocator::Allocator< T, P >::Allocator const Allocator< T, P > &   )  throw () [inline]
 

Definition at line 95 of file allocator.h.

template<typename T, typename P>
template<typename U>
atlas::allocator::Allocator< T, P >::Allocator const Allocator< U, P > &   )  throw () [inline]
 

Definition at line 99 of file allocator.h.

References atlas::allocator::AllocDigits.

template<typename T, typename P>
atlas::allocator::Allocator< T, P >::~Allocator  )  [inline]
 

Definition at line 105 of file allocator.h.


Member Function Documentation

template<typename T, typename P>
Allocator< T, P >::pointer atlas::allocator::Allocator< T, P >::allocate typename Allocator< T, P >::size_type  n,
const void *  hint = 0
 

Allocates raw memory for n instances of T.

NOTE: very preliminary.

Definition at line 25 of file allocator_def.h.

References atlas::allocator::Allocator< T, P >::d_pool.

template<typename T, typename P>
void atlas::allocator::Allocator< T, P >::construct pointer  ,
const_reference 
 

Definition at line 76 of file allocator_def.h.

template<typename T, typename P>
void atlas::allocator::Allocator< T, P >::deallocate pointer  ,
size_type 
 

Definition at line 54 of file allocator_def.h.

References atlas::allocator::Allocator< T, P >::d_pool.

template<typename T, typename P>
void atlas::allocator::Allocator< T, P >::destroy pointer   ) 
 

Definition at line 88 of file allocator_def.h.

template<typename T, typename P>
size_type atlas::allocator::Allocator< T, P >::max_size  )  const throw () [inline]
 

Definition at line 113 of file allocator.h.


Member Data Documentation

template<typename T, typename P>
size_t atlas::allocator::Allocator< T, P >::d_constructions = 0 [static, private]
 

Definition at line 135 of file allocator.h.

template<typename T, typename P>
size_t atlas::allocator::Allocator< T, P >::d_instances = 0 [static, private]
 

Definition at line 132 of file allocator.h.

template<typename T, typename P>
P * atlas::allocator::Allocator< T, P >::d_pool = 0 [static, private]
 

Definition at line 129 of file allocator.h.

Referenced by atlas::allocator::Allocator< T, P >::allocate(), and atlas::allocator::Allocator< T, P >::deallocate().


The documentation for this class was generated from the following files:
Generated on Wed Mar 26 16:52:18 2008 for atlas by  doxygen 1.3.9.1