Class that represents a map type (extends from std::unordered_map). More...
#include <SPL/Runtime/Type/Map.h>

Public Member Functions |
|
| map () | |
| map (const std::unordered_map< K, V > &x) | |
| map (const map< K, V > &x) | |
| template<class InputIterator > | |
| map (InputIterator first, InputIterator last) | |
| map (const Map &o) | |
| map (const ConstValueHandle &o) | |
| template<class K2 , class V2 > | |
| map (const map< K2, V2 > &o) | |
| template<class K2 , class V2 , int32_t msize> | |
| map (const bmap< K2, V2, msize > &o) | |
| virtual | ~map ()=default |
| map< K, V > & | add (const K &k, const V &v) |
| const map< K, V > & | operator= (const map< K, V > &o) |
| const map< K, V > & | operator= (const std::unordered_map< K, V > &o) |
| bool | operator== (const map< K, V > &o) const |
| bool | operator!= (const map< K, V > &o) const |
| V & | at (const K &k) |
| const V & | at (const K &k) const |
| V & | operator[] (const K &k) |
| 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 |
|
Reflective interfaces
|
|
| virtual bool | equals (const Collection &ot) const |
| virtual Collection * | clone () const |
| virtual void | assignFrom (const Collection &ot) |
| virtual void | swapWith (Collection &ot) |
| 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 |
Public Member Functions inherited from SPL::Map |
|
| virtual | ~Map ()=default |
| const Map & | operator= (const Map &ov) |
Public Member Functions inherited from SPL::Collection |
|
| virtual | ~Collection ()=default |
| Destructor. More... |
|
Protected Member Functions |
|
| const MapIterManager & | getIterManager () const |
Class that represents a map type (extends from std::unordered_map).
Construct from a unordered_map
| x | unordered_map to use |
Copy constructor
| x | map to construct from |
|
inline |
Construct from a sequence
| first | begin iterator, inclusive |
| last | end iterator, exclusive |
Construct from a reflective map
| o | reflective map to construct from |
|
inline |
Construct from a value handle
| o | value handle to construct from |
|
inline |
Construct from an assignable map
| o | map to construct from |
|
inline |
Construct from an assignable bmap
| o | map to construct from |
Append to list
| k | key to be added |
| v | value to be added |
|
inline |
Assignment operator (from another map)
| o | map to assign from |
|
inline |
Assignment operator (from a unordered_map)
| o | unordered_map to assign from |
|
inline |
Equality comparison
| o | map to compare with |
|
inline |
Non-equality comparison
| o | map to compare with |
|
inline |
Get the element with a given key, create it if not present
| k | search key |
| SPLRuntimeInvalidIndexException | if the key is not found in the map |
|
inline |
Get the element with a given key, throw exception if not present
| k | search key |
|
inline |
Get the element with a given key, create it if not present
| k | search key |
|
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::map< K, V >::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 |
|
inlinevirtual |
Compare with another collection
| ot | other collection to compare to |
Implements SPL::Collection.
|
inlinevirtual |
Create a clone of the collection object
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 |
|
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.
|
inlineprotectedvirtual |
Implements SPL::Map.