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 23 of file stlalgorithm.hxx.

Member Typedef Documentation

◆ const_pointer

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

Definition at line 31 of file stlalgorithm.hxx.

◆ const_reference

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

Definition at line 35 of file stlalgorithm.hxx.

◆ difference_type

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

Definition at line 28 of file stlalgorithm.hxx.

◆ pointer

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

Definition at line 30 of file stlalgorithm.hxx.

◆ reference

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

Definition at line 34 of file stlalgorithm.hxx.

◆ size_type

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

Definition at line 27 of file stlalgorithm.hxx.

◆ value_type

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

Definition at line 26 of file stlalgorithm.hxx.

◆ void_pointer

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

Definition at line 32 of file stlalgorithm.hxx.

Constructor & Destructor Documentation

◆ AlignedAllocator() [1/2]

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

Definition at line 43 of file stlalgorithm.hxx.

◆ AlignedAllocator() [2/2]

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

Definition at line 46 of file stlalgorithm.hxx.

Member Function Documentation

◆ allocate()

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

Definition at line 63 of file stlalgorithm.hxx.

References n.

◆ construct()

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

Definition at line 48 of file stlalgorithm.hxx.

References p.

◆ deallocate()

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

Definition at line 68 of file stlalgorithm.hxx.

References p.

◆ destroy()

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

Definition at line 49 of file stlalgorithm.hxx.

References p.

◆ max_size()

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

Definition at line 55 of file stlalgorithm.hxx.

◆ operator!=()

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.

◆ operator==()

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

Definition at line 60 of file stlalgorithm.hxx.


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