0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | List of all members
Hypertable::AllocatorBase< T > Struct Template Reference

Base classes for all Allocator classes. More...

#include <Allocator.h>

Inheritance diagram for Hypertable::AllocatorBase< T >:
Inheritance graph
[legend]

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...
 

Detailed Description

template<typename T>
struct Hypertable::AllocatorBase< T >

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.

Member Typedef Documentation

template<typename T >
typedef const T* Hypertable::AllocatorBase< T >::const_pointer

Definition at line 83 of file Allocator.h.

template<typename T >
typedef const T& Hypertable::AllocatorBase< T >::const_reference

Definition at line 85 of file Allocator.h.

template<typename T >
typedef ptrdiff_t Hypertable::AllocatorBase< T >::difference_type

Definition at line 81 of file Allocator.h.

template<typename T >
typedef T* Hypertable::AllocatorBase< T >::pointer

Definition at line 82 of file Allocator.h.

template<typename T >
typedef T& Hypertable::AllocatorBase< T >::reference

Definition at line 84 of file Allocator.h.

template<typename T >
typedef size_t Hypertable::AllocatorBase< T >::size_type

Definition at line 80 of file Allocator.h.

template<typename T >
typedef T Hypertable::AllocatorBase< T >::value_type

Definition at line 86 of file Allocator.h.

Member Function Documentation

template<typename T >
pointer Hypertable::AllocatorBase< T >::address ( reference  x) const
inline

Returns a pointer to an object of type T.

Parameters
xA reference to the object
Returns
The address of x (of type T*)

Definition at line 93 of file Allocator.h.

template<typename T >
const_pointer Hypertable::AllocatorBase< T >::address ( const_reference  x) const
inline

Returns a const pointer to an object of type T.

Parameters
xA reference to the object
Returns
The address of x (of type const T*)

Definition at line 100 of file Allocator.h.

template<typename T >
template<class U , class... Args>
void Hypertable::AllocatorBase< T >::construct ( U *  p,
Args &&...  args 
)
inline

Creates a new object instance using placement new and the copy constructor.

Parameters
pA pointer to the memory area where the new object will be constructed
argsArguments

Definition at line 121 of file Allocator.h.

template<typename T >
void Hypertable::AllocatorBase< T >::construct ( pointer  p)
inline

Creates a new object instance using placement new and the default constructor.

Parameters
pA pointer to the memory area where the new object will be constructed

Definition at line 131 of file Allocator.h.

template<typename T >
void Hypertable::AllocatorBase< T >::destroy ( pointer  p)
inline

Calls the destructor of an object (unless it's a POD)

Definition at line 136 of file Allocator.h.

template<typename T >
size_type Hypertable::AllocatorBase< T >::max_size ( ) const
throw (
)
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.


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