An adaptor class template that implements a standard STL allocator. More...
#include <std_allocator.h>
Classes | |
| struct | rebind |
Rebind helper struct to define a new class instance of this allocator template instantiated for the new value type T1. More... | |
Public Types | |
| typedef T | value_type |
| Value type allocated by this allocator. More... | |
| typedef T * | pointer |
| Pointer type. More... | |
| typedef const T * | const_pointer |
| Const pointer type. More... | |
| typedef T & | reference |
| Reference type. More... | |
| typedef const T & | const_reference |
| Const reference type. More... | |
| typedef std::size_t | size_type |
| Size type. More... | |
| typedef std::ptrdiff_t | difference_type |
| Difference type. More... | |
Public Member Functions | |
| Std_allocator () throw () | |
| Default constructor. More... | |
| Std_allocator (base::IAllocator *allocator) throw () | |
| Constructor. More... | |
| template<class T1> | |
| Std_allocator (const Std_allocator<T1> &other) throw () | |
| Copying constructor template for alike allocators of different value type. More... | |
| pointer | address (reference x) const |
Returns address of object x allocated through this allocator. More... | |
| const_pointer | address (const_reference x) const |
Returns const address of object x allocated through this allocator. More... | |
| T * | allocate (size_type n, const void *=0) throw () |
Allocate uninitialized dynamic memory for n elements of type T. More... | |
| void | deallocate (pointer p, size_type) |
Frees uninitialized dynamic memory at location p that has previously been allocated with allocate(). More... | |
| size_type | max_size () const throw () |
Returns the maximum number of elements of type T that can be allocated using this allocator. More... | |
| void | construct (pointer p, const_reference value) |
Calls the copy constructor of T on the location p with the argument value. More... | |
| void | destroy (pointer p) |
Calls the destructor of T on the location p. More... | |
| IAllocator * | get_allocator () const |
| Returns the interface of the underlying allocator. More... | |
| template<class T2> | |
| bool | operator== (Std_allocator<T2> other) const throw () |
| Equality comparison. More... | |
| template<class T2> | |
| bool | operator!= (Std_allocator<T2> other) const throw () |
| Inequality comparison. More... | |
An adaptor class template that implements a standard STL allocator.
The implementation of the STL allocator is based on the mi::base::IAllocator interface.
| T | The value type of the allocator. |
#include <mi/base/std_allocator.h>