Ion
|
This class can be used in place of std::unordered_set to allow an Ion Allocator to be used for memory allocation. More...
#include "allocunorderedset.h"
Public Types | |
typedef StlAllocator< Value > | AllocType |
typedef std::unordered_set < Value, Hash, Pred, AllocType > | SetType |
Public Member Functions | |
AllocUnorderedSet (const AllocatorPtr &alloc) | |
AllocUnorderedSet (const Allocatable &owner) | |
template<typename ContainerT > | |
AllocUnorderedSet (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 > | |
AllocUnorderedSet (const Allocatable &owner, const ContainerT &from) | |
Public Attributes | |
K | keys |
STL member. More... | |
This class can be used in place of std::unordered_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:
AllocUnorderedSet<int> local_set(allocator);
AllocUnorderedSet 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: AllocUnorderedSet<int> member_set_; };
Definition at line 52 of file allocunorderedset.h.
typedef StlAllocator<Value> ion::base::AllocUnorderedSet< Value, Hash, Pred >::AllocType |
Definition at line 55 of file allocunorderedset.h.
typedef std::unordered_set<Value, Hash, Pred, AllocType> ion::base::AllocUnorderedSet< Value, Hash, Pred >::SetType |
Definition at line 56 of file allocunorderedset.h.
|
inlineexplicit |
Definition at line 58 of file allocunorderedset.h.
|
inlineexplicit |
Definition at line 61 of file allocunorderedset.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 68 of file allocunorderedset.h.
|
inline |
Definition at line 72 of file allocunorderedset.h.
|
inherited |
STL member.