Class that represents bounded size set type. More...
#include <SPL/Runtime/Type/BSet.h>

Public Types |
|
| using | value_type = K |
| value type More... |
|
| using | size_type = typename TMP::SizeType< msize >::value |
| size type More... |
|
| using | hasher = std::hash< K > |
| hasher type More... |
|
| using | reference = K & |
| element reference type More... |
|
| using | const_reference = const K & |
| element constant reference type More... |
|
| using | pointer = K * |
| element pointer type More... |
|
| using | const_pointer = const K * |
| element constant pointer type More... |
|
| using | iterator = bset_iterator< K, msize > |
| iterator type More... |
|
| using | const_iterator = const_bset_iterator< K, msize > |
| constant iterator type More... |
|
Public Member Functions |
|
| bset () | |
| template<class InputIterator > | |
| bset (InputIterator first, InputIterator last) | |
| template<class K2 > | |
| bset (const std::unordered_set< K2 > &o) | |
| template<class K2 , int32_t msize2> | |
| bset (const bset< K2, msize2 > &o) | |
| bset (const bset< K, msize > &ot) | |
| template<int32_t osize> | |
| bset (const bset< K, osize > &ot) | |
| bset (const std::unordered_set< K > &ot) | |
| bset (const BSet &o) | |
| bset (const ConstValueHandle &o) | |
| ~bset () | |
| Destructor. More... |
|
| const bset & | operator= (const bset< K, msize > &ot) |
| template<int32_t osize> | |
| const bset & | operator= (const bset< K, osize > &ot) |
| const bset & | operator= (const std::unordered_set< K > &ot) |
| bool | operator== (const bset< K, msize > &ot) const |
| template<int32_t osize> | |
| bool | operator== (const bset< K, osize > &ot) const |
| bool | operator!= (const bset< K, msize > &ot) const |
| template<int32_t osize> | |
| bool | operator!= (const bset< K, 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 () |
| bool | empty () const |
| iterator | find (const value_type &k) |
| const_iterator | find (const value_type &k) const |
| size_type | count (const value_type &k) const |
| value_type & | operator[] (const value_type &k) |
| bset< K, msize > & | add (const K &k) |
| 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 value_type &k) |
| void | erase (iterator first, iterator last) |
| value_type const * | getData () const |
| template<int32_t osize> | |
| void | swap (bset< K, 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 | getElementMetaType () const |
| virtual ValueHandle | createElement () const |
| virtual int32_t | getSize () const |
| virtual SetIterator | findElement (const ConstValueHandle &key) |
| virtual ConstSetIterator | findElement (const ConstValueHandle &key) const |
| virtual void | insertElement (const ConstValueHandle &key) |
| virtual void | removeElement (const ConstValueHandle &key) |
| virtual void | removeAllElements () |
| virtual SetIterator | getBeginIterator () |
| virtual ConstSetIterator | getBeginIterator () const |
| virtual SetIterator | getEndIterator () |
| virtual ConstSetIterator | getEndIterator () const |
| virtual size_t | getSerializedSize () const |
Public Member Functions inherited from SPL::BSet |
|
| const BSet & | operator= (const BSet &ov) |
Public Member Functions inherited from SPL::Set |
|
| virtual | ~Set ()=default |
| const Set & | operator= (const Set &ov) |
Public Member Functions inherited from SPL::Collection |
|
| virtual | ~Collection ()=default |
| Destructor. More... |
|
Protected Member Functions |
|
| const SetIterManager & | getIterManager () const |
Class that represents bounded size set type.
| using SPL::bset< K, msize >::value_type = K |
value type
| using SPL::bset< K, msize >::size_type = typename TMP::SizeType<msize>::value |
size type
element reference type
| using SPL::bset< K, msize >::const_reference = const K & |
element constant reference type
| using SPL::bset< K, msize >::const_pointer = const K * |
element constant pointer type
iterator type
| using SPL::bset< K, msize >::const_iterator = const_bset_iterator<K, msize> |
constant iterator type
|
inline |
Construct from a sequence
| first | begin iterator, inclusive |
| last | end iterator, exclusive |
|
inline |
Construct from an assignable set
| o | set to construct from |
|
inline |
Construct from an assignable bset
| o | set to construct from |
|
inline |
Copy constructor
| ot | bounded size set to construct from |
|
inline |
Copy constructor
| ot | bounded size set to construct from |
|
inline |
Construct from an std::unordered_set
| ot | unordered set to construct from |
Construct from a reflective bounded size set
| o | reflective bounded size set to construct from |
|
inline |
Construct from a value handle
| o | value handle to construct from |
|
inline |
Assignment operator (from another bounded size set)
| ot | bounded size set to assign from |
|
inline |
Assignment operator (from another bounded size set)
| ot | bounded size set to assign from |
|
inline |
Assignment operator (from an std unordered_set)
| ot | std unordered_set to assign from |
|
inline |
Equality comparison
| ot | bounded size set to compare with |
|
inline |
Equality comparison
| ot | bounded size set to compare with |
|
inline |
Non-equality comparison
| ot | bounded size set to compare with |
|
inline |
Non-equality comparison
| ot | bounded size set 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 set
Get the number of used elements
Get the hash function
|
inline |
Remove all elements
|
inline |
Check if empty
|
inline |
Find an element in the set
| k | search key |
|
inline |
Find an element in the set
| 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 |
Insert into set
| k | Key to be added |
|
inline |
Insert a given element. If there is no space left in the bounded set, 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 |
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 set 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::bset< K, 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 set 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 |
Create a new element. The returned value handle is a wrapper for the object allocated on the heap. As a result, the caller is responsible for cleaning up the memory by calling ValueHandle::deleteValue()
Implements SPL::Set.
|
inlinevirtual |
|
inlinevirtual |
Find an element in the set
| key | value handle for the element |
Implements SPL::Set.
|
inlinevirtual |
Find an element in the set
| key | value handle for the element |
Implements SPL::Set.
|
inlinevirtual |
|
inlinevirtual |
remove the element with the given value
| key | value handle for the element |
Implements SPL::Set.
|
inlinevirtual |
Remove all elements
Implements SPL::Set.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Get the size in bytes when serialized
Implements SPL::Collection.
|
inlineprotectedvirtual |
Implements SPL::Set.