Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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>

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.

Definition at line 101 of file allocator_adapters.h.

Member Typedef Documentation

template<typename T, class Allocator>
typedef const T* ProxyAllocator< T, Allocator >::const_pointer

Definition at line 106 of file allocator_adapters.h.

template<typename T, class Allocator>
typedef const T& ProxyAllocator< T, Allocator >::const_reference

Definition at line 108 of file allocator_adapters.h.

template<typename T, class Allocator>
typedef std::ptrdiff_t ProxyAllocator< T, Allocator >::difference_type

Definition at line 110 of file allocator_adapters.h.

template<typename T, class Allocator>
typedef T* ProxyAllocator< T, Allocator >::pointer

Definition at line 105 of file allocator_adapters.h.

template<typename T, class Allocator>
typedef T& ProxyAllocator< T, Allocator >::reference

Definition at line 107 of file allocator_adapters.h.

template<typename T, class Allocator>
typedef std::size_t ProxyAllocator< T, Allocator >::size_type

Definition at line 109 of file allocator_adapters.h.

template<typename T, class Allocator>
typedef T ProxyAllocator< T, Allocator >::value_type

Definition at line 104 of file allocator_adapters.h.

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

Definition at line 121 of file allocator_adapters.h.

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

Definition at line 127 of file allocator_adapters.h.

Member Function Documentation

template<typename T, class Allocator>
pointer ProxyAllocator< T, Allocator >::address ( reference  r)
inline

Definition at line 142 of file allocator_adapters.h.

template<typename T, class Allocator>
const_pointer ProxyAllocator< T, Allocator >::address ( const_reference  s)
inline

Definition at line 147 of file allocator_adapters.h.

template<typename T, class Allocator>
pointer ProxyAllocator< T, Allocator >::allocate ( size_type  n)
inline

Definition at line 168 of file allocator_adapters.h.

template<typename T, class Allocator>
pointer ProxyAllocator< T, Allocator >::allocate ( size_type  n,
const void *  const 
)
inline

Definition at line 176 of file allocator_adapters.h.

template<typename T, class Allocator>
void ProxyAllocator< T, Allocator >::construct ( const pointer  ptr,
const value_type t 
)
inline

Definition at line 157 of file allocator_adapters.h.

template<typename T, class Allocator>
void ProxyAllocator< T, Allocator >::deallocate ( const pointer  ptr,
const size_type  n 
)
inline

Definition at line 181 of file allocator_adapters.h.

template<typename T, class Allocator>
void ProxyAllocator< T, Allocator >::destroy ( pointer  ptr)
inline

Definition at line 162 of file allocator_adapters.h.

template<typename T, class Allocator>
size_type ProxyAllocator< T, Allocator >::max_size ( ) const
throw (
)
inline

Definition at line 152 of file allocator_adapters.h.

template<typename T, class Allocator>
bool ProxyAllocator< T, Allocator >::operator!= ( const ProxyAllocator< T, Allocator > &  rhs) const
inline

Definition at line 137 of file allocator_adapters.h.

template<typename T, class Allocator>
bool ProxyAllocator< T, Allocator >::operator== ( const ProxyAllocator< T, Allocator > &  rhs) const
inline

Definition at line 133 of file allocator_adapters.h.

Member Data Documentation

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

Definition at line 187 of file allocator_adapters.h.


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