Ion
|
This class can be used in place of std::set to allow an Ion Allocator to be used for memory allocation. More...
#include "allocset.h"
Public Types | |
typedef StlAllocator< T > | AllocType |
typedef std::set< T, Compare, AllocType > | SetType |
Public Member Functions | |
AllocSet (const AllocatorPtr &alloc) | |
AllocSet (const Allocatable &owner) | |
template<typename ContainerT > | |
AllocSet (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 > | |
AllocSet (const Allocatable &owner, const ContainerT &from) | |
AllocSet (const AllocatorPtr &alloc, std::initializer_list< T > init) | |
These constructors allow AllocSet to be initialized using c++11's list initialization: AllocSet<int> set(allocator, {1, 2, 3, 4});. More... | |
AllocSet (const Allocatable &owner, std::initializer_list< T > init) | |
Public Attributes | |
K | keys |
STL member. More... | |
This class can be used in place of std::set 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:
AllocSet<int> local_set(allocator);
AllocSet 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 set will use the same Allocator as the MyClass instance. MyClass() : member_set_(*this) {} ... private: AllocSet<int> member_set_; };
Definition at line 50 of file allocset.h.
typedef StlAllocator<T> ion::base::AllocSet< T, Compare >::AllocType |
Definition at line 52 of file allocset.h.
typedef std::set<T, Compare, AllocType> ion::base::AllocSet< T, Compare >::SetType |
Definition at line 53 of file allocset.h.
|
inlineexplicit |
Definition at line 54 of file allocset.h.
|
inlineexplicit |
Definition at line 57 of file allocset.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 63 of file allocset.h.
|
inline |
Definition at line 67 of file allocset.h.
|
inline |
These constructors allow AllocSet to be initialized using c++11's list initialization: AllocSet<int> set(allocator, {1, 2, 3, 4});.
Definition at line 74 of file allocset.h.
|
inline |
Definition at line 77 of file allocset.h.
|
inherited |
STL member.