Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion::base::AllocDeque< T > Class Template Reference

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"

Inheritance diagram for ion::base::AllocDeque< T >:
Collaboration diagram for ion::base::AllocDeque< T >:

Public Types

typedef StlAllocator< TAllocType
 
typedef std::deque< T, AllocTypeDequeType
 

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

Detailed Description

template<typename T>
class ion::base::AllocDeque< T >

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.

Member Typedef Documentation

template<typename T>
typedef StlAllocator<T> ion::base::AllocDeque< T >::AllocType

Definition at line 52 of file allocdeque.h.

template<typename T>
typedef std::deque<T, AllocType> ion::base::AllocDeque< T >::DequeType

Definition at line 53 of file allocdeque.h.

Constructor & Destructor Documentation

template<typename T>
ion::base::AllocDeque< T >::AllocDeque ( const AllocatorPtr alloc)
inlineexplicit

Definition at line 54 of file allocdeque.h.

template<typename T>
ion::base::AllocDeque< T >::AllocDeque ( const Allocatable owner)
inlineexplicit

Definition at line 56 of file allocdeque.h.

template<typename T>
template<typename ContainerT >
ion::base::AllocDeque< T >::AllocDeque ( const AllocatorPtr alloc,
const ContainerT &  from 
)
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.

template<typename T>
template<typename ContainerT >
ion::base::AllocDeque< T >::AllocDeque ( const Allocatable owner,
const ContainerT &  from 
)
inline

Definition at line 66 of file allocdeque.h.

Member Data Documentation

T std::deque< T >::elements
inherited

STL member.


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