__gnu_cxx::array_allocator< _Tp, _Array > Class Template Reference

An allocator that uses previously allocated memory. This memory can be externally, globally, or otherwise allocated. More...

#include <array_allocator.h>

Inheritance diagram for __gnu_cxx::array_allocator< _Tp, _Array >:

__gnu_cxx::array_allocator_base< _Tp > List of all members.

Public Types

typedef size_t size_type
typedef ptrdiff_t difference_type
typedef _Tp * pointer
typedef const _Tp * const_pointer
typedef _Tp & reference
typedef const _Tp & const_reference
typedef _Tp value_type
typedef _Array array_type

Public Member Functions

 array_allocator (array_type *__array=NULL) throw ()
 array_allocator (const array_allocator &__o) throw ()
template<typename _Tp1, typename _Array1>
 array_allocator (const array_allocator< _Tp1, _Array1 > &) throw ()
 ~array_allocator () throw ()
pointer allocate (size_type __n, const void *=0)

Public Attributes

array_type_M_array

Classes

struct  rebind

Detailed Description

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
class __gnu_cxx::array_allocator< _Tp, _Array >

An allocator that uses previously allocated memory. This memory can be externally, globally, or otherwise allocated.

Definition at line 88 of file array_allocator.h.


Member Typedef Documentation

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
typedef _Array __gnu_cxx::array_allocator< _Tp, _Array >::array_type

Definition at line 99 of file array_allocator.h.

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
typedef const _Tp* __gnu_cxx::array_allocator< _Tp, _Array >::const_pointer

Reimplemented from __gnu_cxx::array_allocator_base< _Tp >.

Definition at line 94 of file array_allocator.h.

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
typedef const _Tp& __gnu_cxx::array_allocator< _Tp, _Array >::const_reference

Reimplemented from __gnu_cxx::array_allocator_base< _Tp >.

Definition at line 96 of file array_allocator.h.

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
typedef ptrdiff_t __gnu_cxx::array_allocator< _Tp, _Array >::difference_type

Reimplemented from __gnu_cxx::array_allocator_base< _Tp >.

Definition at line 92 of file array_allocator.h.

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
typedef _Tp* __gnu_cxx::array_allocator< _Tp, _Array >::pointer

Reimplemented from __gnu_cxx::array_allocator_base< _Tp >.

Definition at line 93 of file array_allocator.h.

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
typedef _Tp& __gnu_cxx::array_allocator< _Tp, _Array >::reference

Reimplemented from __gnu_cxx::array_allocator_base< _Tp >.

Definition at line 95 of file array_allocator.h.

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
typedef size_t __gnu_cxx::array_allocator< _Tp, _Array >::size_type

Reimplemented from __gnu_cxx::array_allocator_base< _Tp >.

Definition at line 91 of file array_allocator.h.

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
typedef _Tp __gnu_cxx::array_allocator< _Tp, _Array >::value_type

Reimplemented from __gnu_cxx::array_allocator_base< _Tp >.

Definition at line 97 of file array_allocator.h.


Constructor & Destructor Documentation

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
__gnu_cxx::array_allocator< _Tp, _Array >::array_allocator ( array_type __array = NULL  )  throw () [inline]

Definition at line 107 of file array_allocator.h.

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
__gnu_cxx::array_allocator< _Tp, _Array >::array_allocator ( const array_allocator< _Tp, _Array > &  __o  )  throw () [inline]

Definition at line 111 of file array_allocator.h.

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
template<typename _Tp1, typename _Array1>
__gnu_cxx::array_allocator< _Tp, _Array >::array_allocator ( const array_allocator< _Tp1, _Array1 > &   )  throw () [inline]

Definition at line 115 of file array_allocator.h.

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
__gnu_cxx::array_allocator< _Tp, _Array >::~array_allocator (  )  throw () [inline]

Definition at line 118 of file array_allocator.h.


Member Function Documentation

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
pointer __gnu_cxx::array_allocator< _Tp, _Array >::allocate ( size_type  __n,
const void *  = 0 
) [inline]

Definition at line 121 of file array_allocator.h.

References std::__throw_bad_alloc(), and __gnu_cxx::array_allocator< _Tp, _Array >::_M_array.


Member Data Documentation

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
array_type* __gnu_cxx::array_allocator< _Tp, _Array >::_M_array

Definition at line 101 of file array_allocator.h.

Referenced by __gnu_cxx::array_allocator< _Tp, _Array >::allocate().


The documentation for this class was generated from the following file:
Generated on Tue Feb 2 16:57:51 2010 for GNU C++ STL by  doxygen 1.4.7