18 #ifndef ION_BASE_STLALLOC_ALLOCMAP_H_
19 #define ION_BASE_STLALLOC_ALLOCMAP_H_
49 template <
typename K,
typename V,
typename Compare = std::less<K> >
50 class AllocMap :
public std::map<K, V, Compare,
51 StlAllocator<std::pair<const K, V> > > {
55 typedef std::map<K, V, Compare, AllocType>
MapType;
64 template <
typename ContainerT>
66 :
MapType(from.begin(), from.end(), Compare(),
68 template <
typename ContainerT>
70 :
MapType(from.begin(), from.end(), Compare(),
71 AllocType(owner.GetNonNullAllocator())) {}
81 AllocType(owner.GetNonNullAllocator())) {}
87 #endif // ION_BASE_STLALLOC_ALLOCMAP_H_
StlAllocator is derived std::allocator class that allows an Ion Allocator to be used for STL containe...
This class can be used in place of std::map to allow an Ion Allocator to be used for memory allocatio...
std::pair< const K, V > PairType
AllocationManager is a singleton class that is used to manage Allocators used to allocate Ion objects...
StlAllocator< PairType > AllocType
AllocMap(const Allocatable &owner, std::initializer_list< PairType > init)
AllocMap(const Allocatable &owner, const ContainerT &from)
AllocMap(const AllocatorPtr &alloc, const ContainerT &from)
These constructors can be used to copy from "STL iterables": anything that provides a pair of compati...
Allocatable is an abstract base class for classes whose memory is managed by an Allocator.
AllocMap(const Allocatable &owner)
AllocMap(const AllocatorPtr &alloc)
std::map< K, V, Compare, AllocType > MapType
AllocMap(const AllocatorPtr &alloc, std::initializer_list< PairType > init)
These constructors allow AllocMap to be initialized using c++11's list initialization: AllocMap<int...