Compressed Sparse Blocks  1.2
 All Classes Files Functions Variables Typedefs Friends Macros Pages
Classes | Public Types | Public Member Functions | List of all members
aligned_allocator< T, Alignment > Class Template Reference

#include <aligned.h>

Classes

struct  rebind
 

Public Types

typedef T * pointer
 
typedef const T * const_pointer
 
typedef T & reference
 
typedef const T & const_reference
 
typedef T value_type
 
typedef std::size_t size_type
 
typedef ptrdiff_t difference_type
 

Public Member Functions

T * address (T &r) const
 
const T * address (const T &s) const
 
std::size_t max_size () const
 
bool operator!= (const aligned_allocator &other) const
 
void construct (T *const p, const T &t) const
 
void destroy (T *const p) const
 
bool operator== (const aligned_allocator &other) const
 
 aligned_allocator ()
 
 aligned_allocator (const aligned_allocator &)
 
template<typename U >
 aligned_allocator (const aligned_allocator< U, Alignment > &)
 
 ~aligned_allocator ()
 
T * allocate (const std::size_t n) const
 
void deallocate (T *const p, const std::size_t n) const
 
template<typename U >
T * allocate (const std::size_t n, const U *) const
 

Detailed Description

template<typename T, std::size_t Alignment>
class aligned_allocator< T, Alignment >

Allocator for aligned data.

Modified from the Mallocator from Stephan T. Lavavej. http://blogs.msdn.com/b/vcblog/archive/2008/08/28/the-mallocator.aspx

Definition at line 16 of file aligned.h.

Member Typedef Documentation

template<typename T , std::size_t Alignment>
typedef const T* aligned_allocator< T, Alignment >::const_pointer

Definition at line 22 of file aligned.h.

template<typename T , std::size_t Alignment>
typedef const T& aligned_allocator< T, Alignment >::const_reference

Definition at line 24 of file aligned.h.

template<typename T , std::size_t Alignment>
typedef ptrdiff_t aligned_allocator< T, Alignment >::difference_type

Definition at line 27 of file aligned.h.

template<typename T , std::size_t Alignment>
typedef T* aligned_allocator< T, Alignment >::pointer

Definition at line 21 of file aligned.h.

template<typename T , std::size_t Alignment>
typedef T& aligned_allocator< T, Alignment >::reference

Definition at line 23 of file aligned.h.

template<typename T , std::size_t Alignment>
typedef std::size_t aligned_allocator< T, Alignment >::size_type

Definition at line 26 of file aligned.h.

template<typename T , std::size_t Alignment>
typedef T aligned_allocator< T, Alignment >::value_type

Definition at line 25 of file aligned.h.

Constructor & Destructor Documentation

template<typename T , std::size_t Alignment>
aligned_allocator< T, Alignment >::aligned_allocator ( )
inline

Definition at line 82 of file aligned.h.

template<typename T , std::size_t Alignment>
aligned_allocator< T, Alignment >::aligned_allocator ( const aligned_allocator< T, Alignment > &  )
inline

Definition at line 84 of file aligned.h.

template<typename T , std::size_t Alignment>
template<typename U >
aligned_allocator< T, Alignment >::aligned_allocator ( const aligned_allocator< U, Alignment > &  )
inline

Definition at line 86 of file aligned.h.

template<typename T , std::size_t Alignment>
aligned_allocator< T, Alignment >::~aligned_allocator ( )
inline

Definition at line 88 of file aligned.h.

Member Function Documentation

template<typename T , std::size_t Alignment>
T* aligned_allocator< T, Alignment >::address ( T &  r) const
inline

Definition at line 29 of file aligned.h.

template<typename T , std::size_t Alignment>
const T* aligned_allocator< T, Alignment >::address ( const T &  s) const
inline

Definition at line 34 of file aligned.h.

template<typename T , std::size_t Alignment>
T* aligned_allocator< T, Alignment >::allocate ( const std::size_t  n) const
inline

Definition at line 92 of file aligned.h.

template<typename T , std::size_t Alignment>
template<typename U >
T* aligned_allocator< T, Alignment >::allocate ( const std::size_t  n,
const U *   
) const
inline

Definition at line 132 of file aligned.h.

template<typename T , std::size_t Alignment>
void aligned_allocator< T, Alignment >::construct ( T *const  p,
const T &  t 
) const
inline

Definition at line 59 of file aligned.h.

template<typename T , std::size_t Alignment>
void aligned_allocator< T, Alignment >::deallocate ( T *const  p,
const std::size_t  n 
) const
inline

Definition at line 124 of file aligned.h.

template<typename T , std::size_t Alignment>
void aligned_allocator< T, Alignment >::destroy ( T *const  p) const
inline

Definition at line 66 of file aligned.h.

template<typename T , std::size_t Alignment>
std::size_t aligned_allocator< T, Alignment >::max_size ( ) const
inline

Definition at line 39 of file aligned.h.

template<typename T , std::size_t Alignment>
bool aligned_allocator< T, Alignment >::operator!= ( const aligned_allocator< T, Alignment > &  other) const
inline

Definition at line 54 of file aligned.h.

template<typename T , std::size_t Alignment>
bool aligned_allocator< T, Alignment >::operator== ( const aligned_allocator< T, Alignment > &  other) const
inline

Definition at line 74 of file aligned.h.


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