Allocator< T > Class Template Reference

#include <defalloc.h>

List of all members.

Public Types

typedef T ValueType
typedef T * Pointer
typedef const T * ConstPointer
typedef T & Reference
typedef const T & ConstReference
typedef INT32 SizeType
typedef ptrdiff_t DifferenceType

Public Member Functions

Pointer Allocate (SizeType n)
void Deallocate (Pointer p)
Pointer Address (Reference x)
ConstPointer ConstAddress (ConstReference x)
SizeType InitPageSize ()
SizeType MaxSize () const


Detailed Description

template<class T>
class Allocator< T >

Definition at line 198 of file defalloc.h.


Member Typedef Documentation

template<class T>
typedef const T* Allocator< T >::ConstPointer
 

Definition at line 204 of file defalloc.h.

template<class T>
typedef const T& Allocator< T >::ConstReference
 

Definition at line 207 of file defalloc.h.

template<class T>
typedef ptrdiff_t Allocator< T >::DifferenceType
 

Definition at line 210 of file defalloc.h.

template<class T>
typedef T* Allocator< T >::Pointer
 

Definition at line 203 of file defalloc.h.

template<class T>
typedef T& Allocator< T >::Reference
 

Definition at line 206 of file defalloc.h.

template<class T>
typedef INT32 Allocator< T >::SizeType
 

Definition at line 209 of file defalloc.h.

template<class T>
typedef T Allocator< T >::ValueType
 

Definition at line 201 of file defalloc.h.


Member Function Documentation

template<class T>
Pointer Allocator< T >::Address Reference  x  )  [inline]
 

Definition at line 222 of file defalloc.h.

00223     {
00224         return (Pointer)&x;
00225     }

template<class T>
Pointer Allocator< T >::Allocate SizeType  n  )  [inline]
 

Definition at line 212 of file defalloc.h.

00213     { 
00214         return ::Allocate((DifferenceType)n, (Pointer)0);
00215     }

template<class T>
ConstPointer Allocator< T >::ConstAddress ConstReference  x  )  [inline]
 

Definition at line 227 of file defalloc.h.

00228     { 
00229         return (ConstPointer)&x; 
00230     }

template<class T>
void Allocator< T >::Deallocate Pointer  p  )  [inline]
 

Definition at line 217 of file defalloc.h.

00218     {
00219 		::Deallocate(p);
00220     }

template<class T>
SizeType Allocator< T >::InitPageSize  )  [inline]
 

Definition at line 232 of file defalloc.h.

00233     { 
00234         return max(SizeType(1), SizeType(4096/sizeof(T))); 
00235     }

template<class T>
SizeType Allocator< T >::MaxSize  )  const [inline]
 

Definition at line 237 of file defalloc.h.

00238     { 
00239         return max(SizeType(1), SizeType(UINT_MAX/sizeof(T))); 
00240     }


The documentation for this class was generated from the following file:
Generated on Sat Nov 10 03:49:55 2007 for Camelot by  doxygen 1.4.4