Base classes for all Allocator classes. More...
#include <Allocator.h>
Public Types | |
typedef size_t | size_type |
typedef ptrdiff_t | difference_type |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef T & | reference |
typedef const T & | const_reference |
typedef T | value_type |
Public Member Functions | |
pointer | address (reference x) const |
Returns a pointer to an object of type T. More... | |
const_pointer | address (const_reference x) const |
Returns a const pointer to an object of type T. More... | |
size_type | max_size () const throw () |
Returns the maximum number of objects that this Allocator can allocate; used to check for bad allocations. More... | |
template<class U , class... Args> | |
void | construct (U *p, Args &&...args) |
Creates a new object instance using placement new and the copy constructor. More... | |
void | construct (pointer p) |
Creates a new object instance using placement new and the default constructor. More... | |
void | destroy (pointer p) |
Calls the destructor of an object (unless it's a POD) More... | |
Base classes for all Allocator classes.
The template parameter T is the type of object that is allocated
Definition at line 79 of file Allocator.h.
typedef const T* Hypertable::AllocatorBase< T >::const_pointer |
Definition at line 83 of file Allocator.h.
typedef const T& Hypertable::AllocatorBase< T >::const_reference |
Definition at line 85 of file Allocator.h.
typedef ptrdiff_t Hypertable::AllocatorBase< T >::difference_type |
Definition at line 81 of file Allocator.h.
typedef T* Hypertable::AllocatorBase< T >::pointer |
Definition at line 82 of file Allocator.h.
typedef T& Hypertable::AllocatorBase< T >::reference |
Definition at line 84 of file Allocator.h.
typedef size_t Hypertable::AllocatorBase< T >::size_type |
Definition at line 80 of file Allocator.h.
typedef T Hypertable::AllocatorBase< T >::value_type |
Definition at line 86 of file Allocator.h.
|
inline |
Returns a pointer to an object of type T.
x | A reference to the object |
Definition at line 93 of file Allocator.h.
|
inline |
Returns a const pointer to an object of type T.
x | A reference to the object |
Definition at line 100 of file Allocator.h.
|
inline |
Creates a new object instance using placement new and the copy constructor.
p | A pointer to the memory area where the new object will be constructed |
args | Arguments |
Definition at line 121 of file Allocator.h.
|
inline |
Creates a new object instance using placement new and the default constructor.
p | A pointer to the memory area where the new object will be constructed |
Definition at line 131 of file Allocator.h.
|
inline |
Calls the destructor of an object (unless it's a POD)
Definition at line 136 of file Allocator.h.
|
inline |
Returns the maximum number of objects that this Allocator can allocate; used to check for bad allocations.
Definition at line 109 of file Allocator.h.