LibreOffice Module sc (master)  1
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
sc::AlignedAllocator< T, Alignment > Class Template Reference

Custom allocator for STL container to ensure that the base address of allocated storage is aligned to a specified boundary. More...

#include <stlalgorithm.hxx>

Classes

struct  rebind
 

Public Types

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

Public Member Functions

 AlignedAllocator ()
 
template<typename Type2 >
 AlignedAllocator (const AlignedAllocator< Type2, Alignment > &)
 
bool operator== (const AlignedAllocator &) const
 
bool operator!= (const AlignedAllocator &) const
 

Static Public Member Functions

static void construct (T *p, const value_type &val)
 
static void destroy (T *p)
 
static size_type max_size ()
 
static pointer allocate (size_type n)
 
static void deallocate (pointer p, size_type)
 

Detailed Description

template<typename T, size_t Alignment>
class sc::AlignedAllocator< T, Alignment >

Custom allocator for STL container to ensure that the base address of allocated storage is aligned to a specified boundary.

Definition at line 24 of file stlalgorithm.hxx.

Member Typedef Documentation

template<typename T , size_t Alignment>
typedef const T* sc::AlignedAllocator< T, Alignment >::const_pointer

Definition at line 32 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
typedef const T& sc::AlignedAllocator< T, Alignment >::const_reference

Definition at line 36 of file stlalgorithm.hxx.

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

Definition at line 29 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
typedef T* sc::AlignedAllocator< T, Alignment >::pointer

Definition at line 31 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
typedef T& sc::AlignedAllocator< T, Alignment >::reference

Definition at line 35 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
typedef size_t sc::AlignedAllocator< T, Alignment >::size_type

Definition at line 28 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
typedef T sc::AlignedAllocator< T, Alignment >::value_type

Definition at line 27 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
typedef T* sc::AlignedAllocator< T, Alignment >::void_pointer

Definition at line 33 of file stlalgorithm.hxx.

Constructor & Destructor Documentation

template<typename T , size_t Alignment>
sc::AlignedAllocator< T, Alignment >::AlignedAllocator ( )
inline

Definition at line 44 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
template<typename Type2 >
sc::AlignedAllocator< T, Alignment >::AlignedAllocator ( const AlignedAllocator< Type2, Alignment > &  )
inline

Definition at line 47 of file stlalgorithm.hxx.

Member Function Documentation

template<typename T , size_t Alignment>
static pointer sc::AlignedAllocator< T, Alignment >::allocate ( size_type  n)
inlinestatic

Definition at line 64 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
static void sc::AlignedAllocator< T, Alignment >::construct ( T *  p,
const value_type val 
)
inlinestatic

Definition at line 49 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
static void sc::AlignedAllocator< T, Alignment >::deallocate ( pointer  p,
size_type   
)
inlinestatic

Definition at line 69 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
static void sc::AlignedAllocator< T, Alignment >::destroy ( T *  p)
inlinestatic

Definition at line 50 of file stlalgorithm.hxx.

References void().

template<typename T , size_t Alignment>
static size_type sc::AlignedAllocator< T, Alignment >::max_size ( )
inlinestatic

Definition at line 56 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
bool sc::AlignedAllocator< T, Alignment >::operator!= ( const AlignedAllocator< T, Alignment > &  ) const
inline

Definition at line 62 of file stlalgorithm.hxx.

template<typename T , size_t Alignment>
bool sc::AlignedAllocator< T, Alignment >::operator== ( const AlignedAllocator< T, Alignment > &  ) const
inline

Definition at line 61 of file stlalgorithm.hxx.


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