Class that represents bounded size map type. More...
#include <SPL/Runtime/Type/BMap.h>
Public Types |
|
using | key_type = K |
key type More... |
|
using | data_type = V |
data type More... |
|
using | value_type = std::pair< K, V > |
value type More... |
|
using | size_type = typename TMP::SizeType< msize >::value |
size type More... |
|
using | hasher = std::hash< K > |
hasher type More... |
|
using | reference = std::pair< K, V > & |
element reference type More... |
|
using | const_reference = const std::pair< K, V > & |
element constant reference type More... |
|
using | pointer = std::pair< K, V > * |
element pointer type More... |
|
using | const_pointer = const std::pair< K, V > * |
element constant pointer type More... |
|
using | iterator = bmap_iterator< K, V, msize > |
iterator type More... |
|
using | const_iterator = const_bmap_iterator< K, V, msize > |
constant iterator type More... |
|
Public Member Functions |
|
bmap () | |
template<class InputIterator > | |
bmap (InputIterator first, InputIterator last) | |
template<class K2 , class V2 > | |
bmap (const std::unordered_map< K2, V2 > &o) | |
template<class K2 , class V2 , uint32_t msize2> | |
bmap (const bmap< K2, V2, msize2 > &o) | |
bmap (const bmap< K, V, msize > &ot) | |
template<int32_t osize> | |
bmap (const bmap< K, V, osize > &ot) | |
bmap (const std::unordered_map< K, V > &ot) | |
bmap (const BMap &o) | |
bmap (const ConstValueHandle &o) | |
~bmap () | |
const bmap & | operator= (const bmap< K, V, msize > &ot) |
template<int32_t osize> | |
const bmap & | operator= (const bmap< K, V, osize > &ot) |
const bmap & | operator= (const std::unordered_map< K, V > &ot) |
bool | operator== (const bmap< K, V, msize > &ot) const |
template<int32_t osize> | |
bool | operator== (const bmap< K, V, osize > &ot) const |
bool | operator!= (const bmap< K, V, msize > &ot) const |
template<int32_t osize> | |
bool | operator!= (const bmap< K, V, osize > &ot) const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
int32_t | max_size () const |
size_type | size () const |
hasher | hash_funct () const |
void | clear () |
Remove all elements. More... |
|
bool | empty () const |
iterator | find (const key_type &k) |
const_iterator | find (const key_type &k) const |
size_type | count (const key_type &k) const |
data_type & | operator[] (const key_type &k) |
data_type & | at (const key_type &k) |
const data_type & | at (const key_type &k) const |
bmap< K, V, msize > & | add (const K &k, const V &v) |
std::pair< iterator, bool > | insert (const value_type &x) |
template<class InputIterator > | |
void | insert (InputIterator first, InputIterator last) |
void | erase (iterator pos) |
size_type | erase (const key_type &k) |
void | erase (iterator first, iterator last) |
value_type const * | getData () const |
template<int32_t osize> | |
void | swap (bmap< K, V, osize > &ot) |
template<class BufferType > | |
void | serialize (ByteBuffer< BufferType > &buf) const |
template<class BufferType > | |
void | deserialize (ByteBuffer< BufferType > &buf) |
void | serialize (std::ostream &ostr) const |
void | serializeWithPrecision (std::ostream &ostr) const |
void | deserialize (std::istream &istr, bool withSuffix=false) |
void | deserializeWithNanAndInfs (std::istream &istr, bool withSuffix=false) |
size_t | hashCode () const |
void | normalize () |
Reflective interfaces
|
|
virtual uint32_t | getBoundedSize () const |
virtual uint32_t | getUsedSize () const |
virtual bool | equals (const Collection &ot) const |
virtual void | assignFrom (const Collection &ot) |
virtual void | swapWith (Collection &ot) |
virtual Collection * | clone () const |
virtual Meta::Type | getKeyMetaType () const |
virtual Meta::Type | getValueMetaType () const |
virtual std::pair< Meta::Type, Meta::Type > | getElementMetaType () const |
virtual ValueHandle | createKey () const |
virtual ValueHandle | createValue () const |
virtual std::pair< ValueHandle, ValueHandle > | createElement () const |
virtual int32_t | getSize () const |
virtual MapIterator | findElement (const ConstValueHandle &key) |
virtual ConstMapIterator | findElement (const ConstValueHandle &key) const |
virtual void | insertElement (const ConstValueHandle &key, const ConstValueHandle &value) |
virtual void | removeElement (const ConstValueHandle &key) |
virtual void | removeAllElements () |
virtual MapIterator | getBeginIterator () |
virtual ConstMapIterator | getBeginIterator () const |
virtual MapIterator | getEndIterator () |
virtual ConstMapIterator | getEndIterator () const |
virtual size_t | getSerializedSize () const |
![]() |
|
const BMap & | operator= (const BMap &ov) |
![]() |
|
virtual | ~Map ()=default |
const Map & | operator= (const Map &ov) |
![]() |
|
virtual | ~Collection ()=default |
Destructor. More... |
|
Additional Inherited Members |
|
![]() |
|
virtual const MapIterManager & | getIterManager () const =0 |
Class that represents bounded size map type.
using SPL::bmap< K, V, msize >::value_type = std::pair<K, V> |
value type
using SPL::bmap< K, V, msize >::size_type = typename TMP::SizeType<msize>::value |
size type
hasher type
using SPL::bmap< K, V, msize >::reference = std::pair<K, V> & |
element reference type
using SPL::bmap< K, V, msize >::const_reference = const std::pair<K, V> & |
element constant reference type
using SPL::bmap< K, V, msize >::pointer = std::pair<K, V> * |
element pointer type
using SPL::bmap< K, V, msize >::const_pointer = const std::pair<K, V> * |
element constant pointer type
using SPL::bmap< K, V, msize >::iterator = bmap_iterator<K, V, msize> |
iterator type
using SPL::bmap< K, V, msize >::const_iterator = const_bmap_iterator<K, V, msize> |
constant iterator type
Empty constructor
|
inline |
Construct from a sequence
first | begin iterator, inclusive |
last | end iterator, exclusive |
|
inline |
Construct bmap from an assignable map
o | map to construct from |
|
inline |
Construct from an assignable bmap
o | map to construct from |
|
inline |
Copy constructor
ot | bounded size map to construct from |
|
inline |
Copy constructor
ot | bounded size map to construct from |
|
inline |
Construct from an std::unordered_map
ot | unordered map to construct from |
|
inline |
Construct from a reflective bounded size map
o | reflective bounded size map to construct from |
|
inline |
Construct from a value handle
o | value handle to construct from |
|
inline |
Assignment operator (from another bounded size map)
ot | bounded size map to assign from |
|
inline |
Assignment operator (from another bounded size map)
ot | bounded size map to assign from |
|
inline |
Assignment operator (from an std unordered_map)
ot | std unordered_map to assign from |
|
inline |
Equality comparison
ot | bounded size map to compare with |
|
inline |
Equality comparison
ot | bounded size map to compare with |
|
inline |
Non-equality comparison
ot | bounded size map to compare with |
|
inline |
Non-equality comparison
ot | bounded size map to compare with |
Get a begin iterator
|
inline |
Get a begin const iterator
Get an end iterator
|
inline |
Get an end const iterator
|
inline |
Get the bounded size of the map
|
inline |
Get the number of used elements
|
inline |
Get the hash function
|
inline |
Remove all elements.
|
inline |
Check if empty
|
inline |
Find an element in the map
k | search key |
|
inline |
Find an element in the map
k | search key |
|
inline |
Count the number of elements with a given key
k | search key |
|
inline |
Get the element with a given key, create it if it does not exist
k | search key |
|
inline |
Get the element with a given key, throw exception if not present
k | search key |
|
inline |
Get the element with a given key, throw exception if not present
k | search key |
|
inline |
Append to list
k | key to be added |
v | value to be added |
|
inline |
Insert a given element. If there is no space left in the bounded map, one of the existing items is replaced.
x | element to insert |
|
inline |
Insert a given sequence of elements
first | begin iterator for the insert sequence, inclusive |
last | end iterator for the insert sequence, exclusive |
|
inline |
Remove an element at a given position
pos | iterator pointing to the element |
|
inline |
Remove elements with a given key
k | search key |
|
inline |
Remove a sequence of elements
first | begin iterator for the remove sequence, inclusive |
last | end iterator for the remove sequence, exclusive |
|
inline |
Get the C array representation
|
inline |
Swap
ot | bounded size map to swap with |
|
inline |
Serialize (binary)
buf | byte buffer to use |
|
inline |
Deserialize (binary)
buf | byte buffer to use |
|
virtual |
|
virtual |
Serialize (character), with maximum precision for floats
ostr | output stream |
Implements SPL::Collection.
|
virtual |
Deserialize (character)
istr | input stream |
withSuffix | if true then consume suffix, otherwise (false) assume no suffix is present |
Implements SPL::Collection.
void SPL::bmap< K, V, msize >::deserializeWithNanAndInfs | ( | std::istream & | istr, |
bool | withSuffix = false |
||
) |
Deserialize with Inf and Nan (character)
istr | input stream |
withSuffix | if true then consume suffix, otherwise (false) assume no suffix is present |
|
inlinevirtual |
|
inline |
Normalize the contents of the map via rehashing
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Compare with another collection
ot | other collection to compare to |
Implements SPL::Collection.
|
inlinevirtual |
Assign this collection using another collection
ot | other collection to assign from |
SPLRuntimeTypeMismatchException | if the types do not match |
Implements SPL::Collection.
|
inlinevirtual |
Swap this collection with another collection
ot | other collection to swap with |
SPLRuntimeTypeMismatchException | if the types do not match |
Implements SPL::Collection.
|
inlinevirtual |
Create a clone of the collection object
Implements SPL::Collection.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Create a new key. The returned value handle is a wrapper for an object allocated on the heap. As a result, the caller is responsible for cleaning up the memory by calling ValueHandle::deleteValue()
Implements SPL::Map.
|
inlinevirtual |
Create a new key. The returned value handle is a wrapper for an object allocated on the heap. As a result, the caller is responsible for cleaning up the memory by calling ValueHandle::deleteValue()
Implements SPL::Map.
|
inlinevirtual |
Create a new element. The returned value handles are wrappers for objects allocated on the heap. As a result, the caller is responsible for cleaning up the memory by calling ValueHandle::deleteValue()
Implements SPL::Map.
|
inlinevirtual |
|
inlinevirtual |
Find an element in the map
key | value handle for the key |
Implements SPL::Map.
|
inlinevirtual |
Find an element in the map
key | value handle for the key |
Implements SPL::Map.
|
inlinevirtual |
Insert a given key value pair
key | value handle for the key |
value | value handle for the value |
Implements SPL::Map.
|
inlinevirtual |
|
inlinevirtual |
Remove all elements
Implements SPL::Map.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Get the size in bytes when serialized
Implements SPL::Collection.