Ion
|
This class can be used in place of std::deque to allow an Ion Allocator to be used for memory allocation. More...
#include "allocdeque.h"
Public Types | |
typedef StlAllocator< T > | AllocType |
typedef std::deque< T, AllocType > | DequeType |
Public Member Functions | |
AllocDeque (const AllocatorPtr &alloc) | |
AllocDeque (const Allocatable &owner) | |
template<typename ContainerT > | |
AllocDeque (const AllocatorPtr &alloc, const ContainerT &from) | |
These constructors can be used to copy from "STL iterables": anything that provides a pair of compatible iterators via begin() and end(). More... | |
template<typename ContainerT > | |
AllocDeque (const Allocatable &owner, const ContainerT &from) | |
Public Attributes | |
T | elements |
STL member. More... | |
This class can be used in place of std::deque to allow an Ion Allocator to be used for memory allocation.
There is a constructor that takes the Allocator to be used as an argument. For example:
AllocDeque<int> deq(allocator);
AllocDeque also provides a convenience constructor to declare class members of a derived Allocatable class. It uses the same Allocator that was used for the Allocatable. For example:
class MyClass : public Allocatable { public: ///< The deque will use the same Allocator as the MyClass instance. MyClass() : member_deq_(*this) {} ... private: AllocDeque<int> member_deq_; };
Definition at line 50 of file allocdeque.h.
typedef StlAllocator<T> ion::base::AllocDeque< T >::AllocType |
Definition at line 52 of file allocdeque.h.
typedef std::deque<T, AllocType> ion::base::AllocDeque< T >::DequeType |
Definition at line 53 of file allocdeque.h.
|
inlineexplicit |
Definition at line 54 of file allocdeque.h.
|
inlineexplicit |
Definition at line 56 of file allocdeque.h.
|
inline |
These constructors can be used to copy from "STL iterables": anything that provides a pair of compatible iterators via begin() and end().
Definition at line 62 of file allocdeque.h.
|
inline |
Definition at line 66 of file allocdeque.h.