Back to index

supertuxkart  0.5+dfsg1
Classes | Public Types | Public Member Functions | Private Types | Friends
btAlignedAllocator< T, Alignment > Class Template Reference

#include <btAlignedAllocator.h>

Inheritance diagram for btAlignedAllocator< T, Alignment >:
Inheritance graph
[legend]

List of all members.

Classes

struct  rebind

Public Types

typedef const T * const_pointer
typedef const T & const_reference
typedef T * pointer
typedef T & reference
typedef T value_type

Public Member Functions

 btAlignedAllocator ()
template<typename Other >
 btAlignedAllocator (const btAlignedAllocator< Other, Alignment > &)
pointer address (reference ref) const
const_pointer address (const_reference ref) const
pointer allocate (size_type n, const_pointer *hint=0)
void construct (pointer ptr, const value_type &value)
void deallocate (pointer ptr)
void destroy (pointer ptr)
template<typename O >
self_typeoperator= (const btAlignedAllocator< O, Alignment > &)

Private Types

typedef btAlignedAllocator< T,
Alignment > 
self_type

Friends

bool operator== (const self_type &, const self_type &)

Detailed Description

template<typename T, unsigned Alignment>
class btAlignedAllocator< T, Alignment >

Definition at line 48 of file btAlignedAllocator.h.


Member Typedef Documentation

template<typename T, unsigned Alignment>
typedef const T* btAlignedAllocator< T, Alignment >::const_pointer

Definition at line 63 of file btAlignedAllocator.h.

template<typename T, unsigned Alignment>
typedef const T& btAlignedAllocator< T, Alignment >::const_reference

Definition at line 64 of file btAlignedAllocator.h.

template<typename T, unsigned Alignment>
typedef T* btAlignedAllocator< T, Alignment >::pointer

Definition at line 65 of file btAlignedAllocator.h.

template<typename T, unsigned Alignment>
typedef T& btAlignedAllocator< T, Alignment >::reference

Definition at line 66 of file btAlignedAllocator.h.

template<typename T, unsigned Alignment>
typedef btAlignedAllocator< T , Alignment > btAlignedAllocator< T, Alignment >::self_type [private]

Definition at line 50 of file btAlignedAllocator.h.

template<typename T, unsigned Alignment>
typedef T btAlignedAllocator< T, Alignment >::value_type

Definition at line 67 of file btAlignedAllocator.h.


Constructor & Destructor Documentation

template<typename T, unsigned Alignment>
btAlignedAllocator< T, Alignment >::btAlignedAllocator ( ) [inline]

Definition at line 55 of file btAlignedAllocator.h.

{}
template<typename T, unsigned Alignment>
template<typename Other >
btAlignedAllocator< T, Alignment >::btAlignedAllocator ( const btAlignedAllocator< Other, Alignment > &  ) [inline]

Definition at line 61 of file btAlignedAllocator.h.

{}

Member Function Documentation

template<typename T, unsigned Alignment>
pointer btAlignedAllocator< T, Alignment >::address ( reference  ref) const [inline]

Definition at line 69 of file btAlignedAllocator.h.

{ return &ref; }
template<typename T, unsigned Alignment>
const_pointer btAlignedAllocator< T, Alignment >::address ( const_reference  ref) const [inline]

Definition at line 70 of file btAlignedAllocator.h.

{ return &ref; }
template<typename T, unsigned Alignment>
pointer btAlignedAllocator< T, Alignment >::allocate ( size_type  n,
const_pointer hint = 0 
) [inline]

Definition at line 71 of file btAlignedAllocator.h.

                                                                                        {
              (void)hint;
              return reinterpret_cast< pointer >(btAlignedAlloc( sizeof(value_type) * n , Alignment ));
       }

Here is the caller graph for this function:

template<typename T, unsigned Alignment>
void btAlignedAllocator< T, Alignment >::construct ( pointer  ptr,
const value_type value 
) [inline]

Definition at line 75 of file btAlignedAllocator.h.

{ new (ptr) value_type( value ); }
template<typename T, unsigned Alignment>
void btAlignedAllocator< T, Alignment >::deallocate ( pointer  ptr) [inline]

Definition at line 76 of file btAlignedAllocator.h.

                                                        {
              btAlignedFree( reinterpret_cast< void * >( ptr ) );
       }

Here is the caller graph for this function:

template<typename T, unsigned Alignment>
void btAlignedAllocator< T, Alignment >::destroy ( pointer  ptr) [inline]

Definition at line 79 of file btAlignedAllocator.h.

{ ptr->~value_type(); }
template<typename T, unsigned Alignment>
template<typename O >
self_type& btAlignedAllocator< T, Alignment >::operator= ( const btAlignedAllocator< O, Alignment > &  ) [inline]

Definition at line 86 of file btAlignedAllocator.h.

{ return *this; }

Friends And Related Function Documentation

template<typename T, unsigned Alignment>
bool operator== ( const self_type ,
const self_type  
) [friend]

Definition at line 88 of file btAlignedAllocator.h.

{ return true; }

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