Ion
|
StlInlinedAllocator is a derived StlAllocator class that uses inlined storage for its first N elements, then uses an Ion Allocator if that size is exceeded. More...
#include "stlallocator.h"
Classes | |
struct | rebind |
struct | RebindHelper |
Windows uses transient proxy allocators. More... | |
struct | RebindHelper< U, U > |
Specialize for when the types are the same, that is, for the primary T allocator. More... | |
Public Types | |
typedef StlAllocator< T >::Pointer | Pointer |
typedef StlAllocator< T > ::ConstPointer | ConstPointer |
typedef StlAllocator< T >::SizeType | SizeType |
typedef std::true_type | propagate_on_container_move_assignment |
These allocator traits affect the behavior of containers such as AllocVector. More... | |
typedef std::true_type | propagate_on_container_swap |
Public Member Functions | |
StlInlinedAllocator (const AllocatorPtr &allocator) | |
StlInlinedAllocator (const StlInlinedAllocator< T, N > &a) | |
Copy constructor. More... | |
template<typename U > | |
StlInlinedAllocator (const StlInlinedAllocator< U, N > &a) | |
This copy constructor cannot be explicit because older versions of STL seem to implicitly cast between allocators of different types. More... | |
Pointer | allocate (SizeType n, ConstPointer hint=0) |
void | deallocate (Pointer p, SizeType n) |
const AllocatorPtr & | GetAllocator () const |
Returns the Allocator used by this. More... | |
void | construct (Pointer p, const T &val) |
Replace the construct() functions so that we can pass an Allocator to Allocatable types. More... | |
template<typename... Args> | |
void | construct (Pointer p, Args &&...args) |
template<class U , class... Args> | |
void | construct (U *p, Args &&...args) |
Public Attributes | |
T | elements |
STL member. More... | |
Friends | |
template<typename U , int M> | |
class | StlInlinedAllocator |
StlInlinedAllocator is a derived StlAllocator class that uses inlined storage for its first N elements, then uses an Ion Allocator if that size is exceeded.
Definition at line 157 of file stlallocator.h.
typedef StlAllocator<T>::ConstPointer ion::base::StlInlinedAllocator< T, N >::ConstPointer |
Definition at line 160 of file stlallocator.h.
typedef StlAllocator<T>::Pointer ion::base::StlInlinedAllocator< T, N >::Pointer |
Definition at line 159 of file stlallocator.h.
|
inherited |
These allocator traits affect the behavior of containers such as AllocVector.
During an assignment or swap, the StlAllocators will be swapped along with the container's memory.
Definition at line 44 of file stlallocator.h.
|
inherited |
Definition at line 45 of file stlallocator.h.
typedef StlAllocator<T>::SizeType ion::base::StlInlinedAllocator< T, N >::SizeType |
Definition at line 161 of file stlallocator.h.
|
inlineexplicit |
Definition at line 162 of file stlallocator.h.
|
inlineexplicit |
Copy constructor.
This needs to be explicitly listed so that inlined storage is not copied.
Definition at line 166 of file stlallocator.h.
|
inline |
This copy constructor cannot be explicit because older versions of STL seem to implicitly cast between allocators of different types.
Definition at line 173 of file stlallocator.h.
|
inline |
Definition at line 177 of file stlallocator.h.
References ion::base::StlAllocator< T >::allocate().
|
inlineinherited |
Replace the construct() functions so that we can pass an Allocator to Allocatable types.
The construct() functions inform the allocation system that there is a placement new allocation that might be an Allocatable. If the constructed type is trivially destructible, then construct() is forwarded to std::allocator, which just calls placement new(). Any non-trivially-destructible type that is default, copy, or move constructed, and thus might contain an Allocatable, will receive this container's Allocator.
Definition at line 73 of file stlallocator.h.
|
inlineinherited |
Definition at line 84 of file stlallocator.h.
|
inlineinherited |
Definition at line 95 of file stlallocator.h.
|
inline |
Definition at line 191 of file stlallocator.h.
References ion::base::StlAllocator< T >::deallocate().
|
inlineinherited |
Returns the Allocator used by this.
Definition at line 54 of file stlallocator.h.
Referenced by ion::base::operator!=(), and ion::base::operator==().
Definition at line 230 of file stlallocator.h.