Pyrogenesis  trunk
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
ProxyAllocator< T, Allocator > Class Template Reference

fully STL-compatible allocator that simply draws upon another Allocator. More...

#include <allocator_adapters.h>

Collaboration diagram for ProxyAllocator< T, Allocator >:
Collaboration graph
[legend]

Classes

struct  rebind
 

Public Types

typedef T value_type
 
typedef Tpointer
 
typedef const Tconst_pointer
 
typedef Treference
 
typedef const Tconst_reference
 
typedef std::size_t size_type
 
typedef std::ptrdiff_t difference_type
 

Public Member Functions

NOTHROW_DEFINE ProxyAllocator ()
 
NOTHROW_DEFINE ProxyAllocator (Allocator &allocator)
 
template<typename U , class A >
NOTHROW_DEFINE ProxyAllocator (const ProxyAllocator< U, A > &rhs)
 
bool operator== (const ProxyAllocator &rhs) const
 
bool operator!= (const ProxyAllocator &rhs) const
 
pointer address (reference r)
 
const_pointer address (const_reference s)
 
size_type max_size () const throw ()
 
void construct (const pointer ptr, const value_type &t)
 
void destroy (pointer ptr)
 
pointer allocate (size_type n)
 
pointer allocate (size_type n, const void *const)
 
void deallocate (const pointer ptr, const size_type n)
 

Public Attributes

Allocatorallocator
 

Detailed Description

template<typename T, class Allocator>
class ProxyAllocator< T, Allocator >

fully STL-compatible allocator that simply draws upon another Allocator.

this allows a single allocator to serve multiple STL containers.

Member Typedef Documentation

template<typename T, class Allocator>
typedef const T* ProxyAllocator< T, Allocator >::const_pointer
template<typename T, class Allocator>
typedef const T& ProxyAllocator< T, Allocator >::const_reference
template<typename T, class Allocator>
typedef std::ptrdiff_t ProxyAllocator< T, Allocator >::difference_type
template<typename T, class Allocator>
typedef T* ProxyAllocator< T, Allocator >::pointer
template<typename T, class Allocator>
typedef T& ProxyAllocator< T, Allocator >::reference
template<typename T, class Allocator>
typedef std::size_t ProxyAllocator< T, Allocator >::size_type
template<typename T, class Allocator>
typedef T ProxyAllocator< T, Allocator >::value_type

Constructor & Destructor Documentation

template<typename T, class Allocator>
NOTHROW_DEFINE ProxyAllocator< T, Allocator >::ProxyAllocator ( )
explicit
template<typename T, class Allocator>
NOTHROW_DEFINE ProxyAllocator< T, Allocator >::ProxyAllocator ( Allocator allocator)
inlineexplicit
template<typename T, class Allocator>
template<typename U , class A >
NOTHROW_DEFINE ProxyAllocator< T, Allocator >::ProxyAllocator ( const ProxyAllocator< U, A > &  rhs)
inline

Member Function Documentation

template<typename T, class Allocator>
pointer ProxyAllocator< T, Allocator >::address ( reference  r)
inline
template<typename T, class Allocator>
const_pointer ProxyAllocator< T, Allocator >::address ( const_reference  s)
inline
template<typename T, class Allocator>
pointer ProxyAllocator< T, Allocator >::allocate ( size_type  n)
inline
template<typename T, class Allocator>
pointer ProxyAllocator< T, Allocator >::allocate ( size_type  n,
const void *  const 
)
inline
template<typename T, class Allocator>
void ProxyAllocator< T, Allocator >::construct ( const pointer  ptr,
const value_type t 
)
inline
template<typename T, class Allocator>
void ProxyAllocator< T, Allocator >::deallocate ( const pointer  ptr,
const size_type  n 
)
inline
template<typename T, class Allocator>
void ProxyAllocator< T, Allocator >::destroy ( pointer  ptr)
inline
template<typename T, class Allocator>
size_type ProxyAllocator< T, Allocator >::max_size ( ) const
throw (
)
inline
template<typename T, class Allocator>
bool ProxyAllocator< T, Allocator >::operator!= ( const ProxyAllocator< T, Allocator > &  rhs) const
inline
template<typename T, class Allocator>
bool ProxyAllocator< T, Allocator >::operator== ( const ProxyAllocator< T, Allocator > &  rhs) const
inline

Member Data Documentation

template<typename T, class Allocator>
Allocator* ProxyAllocator< T, Allocator >::allocator

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