Nugget
Public Types | Public Member Functions | Protected Attributes | List of all members
eastl::fixed_multimap< Key, T, nodeCount, bEnableOverflow, Compare, OverflowAllocator > Class Template Reference

#include <fixed_map.h>

Inheritance diagram for eastl::fixed_multimap< Key, T, nodeCount, bEnableOverflow, Compare, OverflowAllocator >:
Inheritance graph
[legend]
Collaboration diagram for eastl::fixed_multimap< Key, T, nodeCount, bEnableOverflow, Compare, OverflowAllocator >:
Collaboration graph
[legend]

Public Types

enum  { kMaxSize = nodeCount }
 
typedef fixed_node_allocator< sizeof(typename multimap< Key, T >::node_type), nodeCount, EASTL_ALIGN_OF(eastl::pair< Key, T >), 0, bEnableOverflow, OverflowAllocator > fixed_allocator_type
 
typedef fixed_allocator_type::overflow_allocator_type overflow_allocator_type
 
typedef multimap< Key, T, Compare, fixed_allocator_typebase_type
 
typedef fixed_multimap< Key, T, nodeCount, bEnableOverflow, Compare, OverflowAllocator > this_type
 
typedef base_type::value_type value_type
 
typedef base_type::node_type node_type
 
typedef base_type::size_type size_type
 
- Public Types inherited from eastl::multimap< Key, T, eastl::less< Key >, fixed_node_allocator< sizeof(multimap< Key, T >::node_type), nodeCount, EASTL_ALIGN_OF(eastl::pair< Key, T >), 0, true, EASTLAllocatorType > >
typedef rbtree< Key, eastl::pair< const Key, T >, eastl::less< Key >, fixed_node_allocator< sizeof(multimap< Key, T >::node_type), nodeCount, EASTL_ALIGN_OF(eastl::pair< Key, T >), 0, true, EASTLAllocatorType >, eastl::use_first< eastl::pair< const Key, T > >, true, false > base_type
 
typedef multimap< Key, T, eastl::less< Key >, fixed_node_allocator< sizeof(multimap< Key, T >::node_type), nodeCount, EASTL_ALIGN_OF(eastl::pair< Key, T >), 0, true, EASTLAllocatorType > > this_type
 
typedef base_type::size_type size_type
 
typedef base_type::key_type key_type
 
typedef T mapped_type
 
typedef base_type::value_type value_type
 
typedef base_type::node_type node_type
 
typedef base_type::iterator iterator
 
typedef base_type::const_iterator const_iterator
 
typedef base_type::allocator_type allocator_type
 
typedef base_type::insert_return_type insert_return_type
 
typedef base_type::extract_key extract_key
 
- Public Types inherited from eastl::rbtree< Key, eastl::pair< const Key, T >, eastl::less< Key >, fixed_node_allocator< sizeof(multimap< Key, T >::node_type), nodeCount, EASTL_ALIGN_OF(eastl::pair< Key, T >), 0, true, EASTLAllocatorType >, eastl::use_first< eastl::pair< const Key, T > >, true, false >
typedef ptrdiff_t difference_type
 
typedef eastl_size_t size_type
 
typedef Key key_type
 
typedef eastl::pair< const Key, T > value_type
 
typedef rbtree_node< value_typenode_type
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef type_select< bMutableIterators, rbtree_iterator< value_type, value_type *, value_type & >, rbtree_iterator< value_type, const value_type *, const value_type & > >::type iterator
 
typedef rbtree_iterator< value_type, const value_type *, const value_type & > const_iterator
 
typedef eastl::reverse_iterator< iteratorreverse_iterator
 
typedef eastl::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef fixed_node_allocator< sizeof(multimap< Key, T >::node_type), nodeCount, EASTL_ALIGN_OF(eastl::pair< Key, T >), 0, true, EASTLAllocatorType > allocator_type
 
typedef eastl::less< Key > key_compare
 
typedef type_select< bUniqueKeys, eastl::pair< iterator, bool >, iterator >::type insert_return_type
 
typedef rbtree< Key, eastl::pair< const Key, T >, eastl::less< Key >, fixed_node_allocator< sizeof(multimap< Key, T >::node_type), nodeCount, EASTL_ALIGN_OF(eastl::pair< Key, T >), 0, true, EASTLAllocatorType >, eastl::use_first< eastl::pair< const Key, T > >, bMutableIterators, bUniqueKeys > this_type
 
typedef rb_base< Key, eastl::pair< const Key, T >, eastl::less< Key >, eastl::use_first< eastl::pair< const Key, T > >, bUniqueKeys, this_typebase_type
 
typedef integral_constant< bool, bUniqueKeys > has_unique_keys_type
 
typedef base_type::extract_key extract_key
 
- Public Types inherited from eastl::rb_base< Key, Value, Compare, ExtractKey, bUniqueKeys, RBTree >
typedef ExtractKey extract_key
 

Public Member Functions

 fixed_multimap (const overflow_allocator_type &overflowAllocator)
 
 fixed_multimap (const Compare &compare)
 
 fixed_multimap (const this_type &x)
 
 fixed_multimap (this_type &&x)
 
 fixed_multimap (this_type &&x, const overflow_allocator_type &overflowAllocator)
 
 fixed_multimap (std::initializer_list< value_type > ilist, const overflow_allocator_type &overflowAllocator=EASTL_FIXED_MULTIMAP_DEFAULT_ALLOCATOR)
 
template<typename InputIterator >
 fixed_multimap (InputIterator first, InputIterator last)
 
this_typeoperator= (const this_type &x)
 
this_typeoperator= (std::initializer_list< value_type > ilist)
 
this_typeoperator= (this_type &&x)
 
void swap (this_type &x)
 
void reset_lose_memory ()
 
size_type max_size () const
 
const overflow_allocator_type & get_overflow_allocator () const EA_NOEXCEPT
 
overflow_allocator_type & get_overflow_allocator () EA_NOEXCEPT
 
void set_overflow_allocator (const overflow_allocator_type &allocator)
 
insert_return_type insert (const Key &key)
 
- Public Member Functions inherited from eastl::multimap< Key, T, eastl::less< Key >, fixed_node_allocator< sizeof(multimap< Key, T >::node_type), nodeCount, EASTL_ALIGN_OF(eastl::pair< Key, T >), 0, true, EASTLAllocatorType > >
 multimap (const allocator_type &allocator=EASTL_MULTIMAP_DEFAULT_ALLOCATOR)
 
 multimap (const eastl::less< Key > &compare, const allocator_type &allocator=EASTL_MULTIMAP_DEFAULT_ALLOCATOR)
 
 multimap (const this_type &x)
 
 multimap (this_type &&x)
 
 multimap (this_type &&x, const allocator_type &allocator)
 
 multimap (std::initializer_list< value_type > ilist, const eastl::less< Key > &compare=eastl::less< Key >(), const allocator_type &allocator=EASTL_MULTIMAP_DEFAULT_ALLOCATOR)
 
 multimap (Iterator itBegin, Iterator itEnd)
 
this_typeoperator= (const this_type &x)
 
this_typeoperator= (std::initializer_list< value_type > ilist)
 
this_typeoperator= (this_type &&x)
 
insert_return_type insert (const Key &key)
 
insert_return_type insert (P &&otherValue)
 
iterator insert (const_iterator hint, value_type &&value)
 
insert_return_type insert (const value_type &value)
 
iterator insert (const_iterator position, const value_type &value)
 
void insert (std::initializer_list< value_type > ilist)
 
void insert (InputIterator first, InputIterator last)
 
value_compare value_comp () const
 
size_type erase (const Key &key)
 
iterator erase (const_iterator position)
 
iterator erase (const_iterator first, const_iterator last)
 
reverse_iterator erase (const_reverse_iterator position)
 
reverse_iterator erase (const_reverse_iterator first, const_reverse_iterator last)
 
void erase (const key_type *first, const key_type *last)
 
size_type count (const Key &key) const
 
eastl::pair< iterator, iteratorequal_range (const Key &key)
 
eastl::pair< const_iterator, const_iteratorequal_range (const Key &key) const
 
eastl::pair< iterator, iteratorequal_range_small (const Key &key)
 
eastl::pair< const_iterator, const_iteratorequal_range_small (const Key &key) const
 
iterator begin () EA_NOEXCEPT
 
const_iterator begin () const EA_NOEXCEPT
 
iterator end () EA_NOEXCEPT
 
const_iterator end () const EA_NOEXCEPT
 
iterator find (const key_type &key)
 
const_iterator find (const key_type &key) const
 
iterator lower_bound (const key_type &key)
 
const_iterator lower_bound (const key_type &key) const
 
iterator upper_bound (const key_type &key)
 
const_iterator upper_bound (const key_type &key) const
 
- Public Member Functions inherited from eastl::rbtree< Key, eastl::pair< const Key, T >, eastl::less< Key >, fixed_node_allocator< sizeof(multimap< Key, T >::node_type), nodeCount, EASTL_ALIGN_OF(eastl::pair< Key, T >), 0, true, EASTLAllocatorType >, eastl::use_first< eastl::pair< const Key, T > >, true, false >
 rbtree (const allocator_type &allocator)
 
 rbtree (const eastl::less< Key > &compare, const allocator_type &allocator=EASTL_RBTREE_DEFAULT_ALLOCATOR)
 
 rbtree (const this_type &x)
 
 rbtree (this_type &&x)
 
 rbtree (this_type &&x, const allocator_type &allocator)
 
 rbtree (InputIterator first, InputIterator last, const eastl::less< Key > &compare, const allocator_type &allocator=EASTL_RBTREE_DEFAULT_ALLOCATOR)
 
 rbtree (InputIterator first, InputIterator last, const C &compare, const allocator_type &allocator)
 
const allocator_typeget_allocator () const EA_NOEXCEPT
 
allocator_typeget_allocator () EA_NOEXCEPT
 
void set_allocator (const allocator_type &allocator)
 
const key_comparekey_comp () const
 
key_comparekey_comp ()
 
this_typeoperator= (const this_type &x)
 
this_typeoperator= (std::initializer_list< value_type > ilist)
 
this_typeoperator= (this_type &&x)
 
void swap (this_type &x)
 
iterator begin () EA_NOEXCEPT
 
const_iterator begin () const EA_NOEXCEPT
 
const_iterator cbegin () const EA_NOEXCEPT
 
iterator end () EA_NOEXCEPT
 
const_iterator end () const EA_NOEXCEPT
 
const_iterator cend () const EA_NOEXCEPT
 
reverse_iterator rbegin () EA_NOEXCEPT
 
const_reverse_iterator rbegin () const EA_NOEXCEPT
 
const_reverse_iterator crbegin () const EA_NOEXCEPT
 
reverse_iterator rend () EA_NOEXCEPT
 
const_reverse_iterator rend () const EA_NOEXCEPT
 
const_reverse_iterator crend () const EA_NOEXCEPT
 
bool empty () const EA_NOEXCEPT
 
size_type size () const EA_NOEXCEPT
 
insert_return_type emplace (Args &&... args)
 
iterator emplace_hint (const_iterator position, Args &&... args)
 
eastl::pair< iterator, bool > try_emplace (const key_type &k, Args &&... args)
 
eastl::pair< iterator, bool > try_emplace (key_type &&k, Args &&... args)
 
iterator try_emplace (const_iterator position, const key_type &k, Args &&... args)
 
iterator try_emplace (const_iterator position, key_type &&k, Args &&... args)
 
eastl::pair< typename rbtree< K, V, C, A, E, bM, bU >::iterator, bool > try_emplace (const key_type &key, Args &&... args)
 
eastl::pair< typename rbtree< K, V, C, A, E, bM, bU >::iterator, bool > try_emplace (key_type &&key, Args &&... args)
 
insert_return_type insert (P &&otherValue)
 
iterator insert (const_iterator hint, value_type &&value)
 
insert_return_type insert (const value_type &value)
 
iterator insert (const_iterator position, const value_type &value)
 
void insert (std::initializer_list< value_type > ilist)
 
void insert (InputIterator first, InputIterator last)
 
pair< iterator, bool > insert_or_assign (const key_type &k, M &&obj)
 
pair< iterator, bool > insert_or_assign (key_type &&k, M &&obj)
 
iterator insert_or_assign (const_iterator hint, const key_type &k, M &&obj)
 
iterator insert_or_assign (const_iterator hint, key_type &&k, M &&obj)
 
eastl::pair< typename rbtree< K, V, C, A, E, bM, bU >::iterator, bool > insert_or_assign (const key_type &k, M &&obj)
 
eastl::pair< typename rbtree< K, V, C, A, E, bM, bU >::iterator, bool > insert_or_assign (key_type &&k, M &&obj)
 
iterator erase (const_iterator position)
 
iterator erase (const_iterator first, const_iterator last)
 
reverse_iterator erase (const_reverse_iterator position)
 
reverse_iterator erase (const_reverse_iterator first, const_reverse_iterator last)
 
void erase (const key_type *first, const key_type *last)
 
void clear ()
 
void reset_lose_memory ()
 
iterator find (const key_type &key)
 
const_iterator find (const key_type &key) const
 
iterator find_as (const U &u, Compare2 compare2)
 
const_iterator find_as (const U &u, Compare2 compare2) const
 
iterator lower_bound (const key_type &key)
 
const_iterator lower_bound (const key_type &key) const
 
iterator upper_bound (const key_type &key)
 
const_iterator upper_bound (const key_type &key) const
 
bool validate () const
 
int validate_iterator (const_iterator i) const
 
eastl::pair< typename rbtree< K, V, C, A, E, bM, bU >::iterator, bool > DoInsertValue (true_type, Args &&... args)
 
- Public Member Functions inherited from eastl::rb_base< Key, Value, Compare, ExtractKey, bUniqueKeys, RBTree >
 rb_base (const Compare &compare)
 

Protected Attributes

char mBuffer [fixed_allocator_type::kBufferSize]
 

Additional Inherited Members

- Public Attributes inherited from eastl::rbtree< Key, eastl::pair< const Key, T >, eastl::less< Key >, fixed_node_allocator< sizeof(multimap< Key, T >::node_type), nodeCount, EASTL_ALIGN_OF(eastl::pair< Key, T >), 0, true, EASTLAllocatorType >, eastl::use_first< eastl::pair< const Key, T > >, true, false >
rbtree_node_base mAnchor
 
size_type mnSize
 This node acts as end() and its mpLeft points to begin(), and mpRight points to rbegin() (the last node on the right).
 
allocator_type mAllocator
 Stores the count of nodes in the tree (not counting the anchor node).
 
- Protected Member Functions inherited from eastl::rbtree< Key, eastl::pair< const Key, T >, eastl::less< Key >, fixed_node_allocator< sizeof(multimap< Key, T >::node_type), nodeCount, EASTL_ALIGN_OF(eastl::pair< Key, T >), 0, true, EASTLAllocatorType >, eastl::use_first< eastl::pair< const Key, T > >, true, false >
node_typeDoAllocateNode ()
 
void DoFreeNode (node_type *pNode)
 
node_typeDoCreateNodeFromKey (const key_type &key)
 
node_typeDoCreateNode (Args &&... args)
 
node_typeDoCreateNode (const value_type &value)
 
node_typeDoCreateNode (value_type &&value)
 
node_typeDoCreateNode (const node_type *pNodeSource, node_type *pNodeParent)
 
node_typeDoCopySubtree (const node_type *pNodeSource, node_type *pNodeDest)
 
void DoNukeSubtree (node_type *pNode)
 
eastl::pair< iterator, bool > DoInsertValue (true_type, Args &&... args)
 
iterator DoInsertValue (false_type, Args &&... args)
 
eastl::pair< iterator, bool > DoInsertValue (true_type, value_type &&value)
 
iterator DoInsertValue (false_type, value_type &&value)
 
iterator DoInsertValueImpl (node_type *pNodeParent, bool bForceToLeft, const key_type &key, Args &&... args)
 
iterator DoInsertValueImpl (node_type *pNodeParent, bool bForceToLeft, const key_type &key, node_type *pNodeNew)
 
eastl::pair< iterator, bool > DoInsertKey (true_type, const key_type &key)
 
iterator DoInsertKey (false_type, const key_type &key)
 
iterator DoInsertKey (true_type, const_iterator position, const key_type &key)
 
iterator DoInsertKey (false_type, const_iterator position, const key_type &key)
 
iterator DoInsertValueHint (true_type, const_iterator position, Args &&... args)
 
iterator DoInsertValueHint (false_type, const_iterator position, Args &&... args)
 
iterator DoInsertValueHint (true_type, const_iterator position, value_type &&value)
 
iterator DoInsertValueHint (false_type, const_iterator position, value_type &&value)
 
iterator DoInsertKeyImpl (node_type *pNodeParent, bool bForceToLeft, const key_type &key)
 
node_typeDoGetKeyInsertionPositionUniqueKeys (bool &canInsert, const key_type &key)
 
node_typeDoGetKeyInsertionPositionNonuniqueKeys (const key_type &key)
 
node_typeDoGetKeyInsertionPositionUniqueKeysHint (const_iterator position, bool &bForceToLeft, const key_type &key)
 
node_typeDoGetKeyInsertionPositionNonuniqueKeysHint (const_iterator position, bool &bForceToLeft, const key_type &key)
 
- Protected Member Functions inherited from eastl::rb_base_compare_ebo< Compare, bool >
 rb_base_compare_ebo (const Compare &compare)
 
Compare & get_compare ()
 
const Compare & get_compare () const
 
template<typename T >
bool compare (const T &lhs, const T &rhs)
 
template<typename T >
bool compare (const T &lhs, const T &rhs) const
 

Detailed Description

template<typename Key, typename T, size_t nodeCount, bool bEnableOverflow = true, typename Compare = eastl::less<Key>, typename OverflowAllocator = EASTLAllocatorType>
class eastl::fixed_multimap< Key, T, nodeCount, bEnableOverflow, Compare, OverflowAllocator >

fixed_multimap

Implements a multimap with a fixed block of memory identified by the nodeCount template parameter.

Key                    The key object (key in the key/value pair).
T                      The mapped object (value in the key/value pair).
nodeCount              The max number of objects to contain.
bEnableOverflow        Whether or not we should use the global heap if our object pool is exhausted.
Compare                Compare function/object for set ordering.
OverflowAllocator              Overflow allocator, which is only used if bEnableOverflow == true. Defaults to the global heap.

Member Function Documentation

◆ insert()

template<typename Key , typename T , size_t nodeCount, bool bEnableOverflow = true, typename Compare = eastl::less<Key>, typename OverflowAllocator = EASTLAllocatorType>
multimap< Key, T, Compare, Allocator >::insert_return_type eastl::multimap< Key, T, Compare, Allocator >::insert
inline

This is an extension to the C++ standard. We insert a default-constructed element with the given key. The reason for this is that we can avoid the potentially expensive operation of creating and/or copying a mapped_type object on the stack. Note that C++11 move insertions and variadic emplace support make this extension mostly no longer necessary.


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