Class that represents a set type (extends from std::unordered_set).
More...
#include <SPL/Runtime/Type/Set.h>
template<class K>
class SPL::set< K >
Class that represents a set type (extends from std::unordered_set).
◆ set() [1/9]
◆ set() [2/9]
template<class K >
SPL::set< K >::set |
( |
const std::unordered_set< K > & |
x |
) |
|
|
inline |
Construct from a unordered_set
- Parameters
-
◆ set() [3/9]
Copy constructor
- Parameters
-
◆ set() [4/9]
template<class K >
template<int32_t msize>
Construct from a bounded set
- Parameters
-
x |
bounded set to construct from |
◆ set() [5/9]
template<class K >
template<class InputIterator >
SPL::set< K >::set |
( |
InputIterator |
first, |
|
|
InputIterator |
last |
|
) |
|
|
|
inline |
Construct from a sequence
- Parameters
-
first |
begin iterator, inclusive |
last |
end iterator, exclusive |
◆ set() [6/9]
Construct from a reflective set
- Parameters
-
o |
reflective set to construct from |
◆ set() [7/9]
Construct from a value handle
- Parameters
-
o |
value handle to construct from |
◆ set() [8/9]
template<class K >
template<class K2 >
Construct from an assignable set
- Parameters
-
◆ set() [9/9]
template<class K >
template<class K2 , int32_t msize>
Construct from an assignable bset
- Parameters
-
◆ ~set()
◆ add()
Insert into set
- Parameters
-
- Returns
- *this
◆ operator=() [1/2]
Assignment operator (from another set)
- Parameters
-
- Returns
- self
◆ operator=() [2/2]
template<class K >
const set<K>& SPL::set< K >::operator= |
( |
const std::unordered_set< K > & |
o |
) |
|
|
inline |
Assignment operator (from a unordered_set)
- Parameters
-
o |
unordered_set to assign from |
- Returns
- self
◆ operator==()
template<class K >
bool SPL::set< K >::operator== |
( |
const set< K > & |
o |
) |
const |
|
inline |
Equality comparison
- Parameters
-
- Returns
- true if the contained elements are the same, false otherwise
◆ operator!=()
template<class K >
bool SPL::set< K >::operator!= |
( |
const set< K > & |
o |
) |
const |
|
inline |
Non-equality comparison
- Parameters
-
- Returns
- true if the contained elements are not the same, false otherwise
◆ serialize() [1/2]
template<class K >
template<class BufferType >
Serialize (binary)
- Parameters
-
◆ deserialize() [1/2]
template<class K >
template<class BufferType >
Deserialize (binary)
- Parameters
-
◆ serialize() [2/2]
template<class K >
void SPL::set< K >::serialize |
( |
std::ostream & |
ostr |
) |
const |
|
virtual |
◆ serializeWithPrecision()
template<class K >
void SPL::set< K >::serializeWithPrecision |
( |
std::ostream & |
ostr |
) |
const |
|
virtual |
Serialize (character), with maximum precision for floats
- Parameters
-
Implements SPL::Collection.
◆ deserialize() [2/2]
template<class K >
void SPL::set< K >::deserialize |
( |
std::istream & |
istr, |
|
|
bool |
withSuffix = false |
|
) |
|
|
|
virtual |
Deserialize (character)
- Parameters
-
istr |
input stream |
withSuffix |
if true then consume suffix, otherwise (false) assume no suffix is present |
Implements SPL::Collection.
◆ deserializeWithNanAndInfs()
template<class K >
void SPL::set< K >::deserializeWithNanAndInfs |
( |
std::istream & |
istr, |
|
|
bool |
withSuffix = false |
|
) |
|
|
Deserialize with Inf and Nan (character)
- Parameters
-
istr |
input stream |
withSuffix |
if true then consume suffix, otherwise (false) assume no suffix is present |
◆ hashCode()
template<class K >
size_t SPL::set< K >::hashCode |
( |
|
) |
const |
|
inlinevirtual |
◆ equals()
Compare with another collection
- Parameters
-
ot |
other collection to compare to |
- Returns
- true if equal, false otherwise
Implements SPL::Collection.
◆ clone()
Create a clone of the collection object
- Returns
- clone of the collection object
Implements SPL::Collection.
◆ assignFrom()
Assign this collection using another collection
- Parameters
-
ot |
other collection to assign from |
- Exceptions
-
Implements SPL::Collection.
◆ swapWith()
Swap this collection with another collection
- Parameters
-
ot |
other collection to swap with |
- Exceptions
-
Implements SPL::Collection.
◆ getElementMetaType()
Get element type
- Returns
- element type of this set
Implements SPL::Set.
◆ createElement()
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()
- Returns
- value handle for the new element
Implements SPL::Set.
◆ getSize()
template<class K >
virtual int32_t SPL::set< K >::getSize |
( |
|
) |
const |
|
inlinevirtual |
Get the size of the set
- Returns
- size of the set
Implements SPL::Set.
◆ findElement() [1/2]
Find an element in the set
- Parameters
-
key |
value handle for the element |
- Returns
- an iterator for the element if found, the end iterator otherwise
Implements SPL::Set.
◆ findElement() [2/2]
Find an element in the set
- Parameters
-
key |
value handle for the element |
- Returns
- an iterator for the element if found, the end iterator otherwise
Implements SPL::Set.
◆ insertElement()
Insert an element
- Parameters
-
key |
value handle for the element |
Implements SPL::Set.
◆ removeElement()
remove the element with the given value
- Parameters
-
key |
value handle for the element |
Implements SPL::Set.
◆ removeAllElements()
template<class K >
virtual void SPL::set< K >::removeAllElements |
( |
|
) |
|
|
inlinevirtual |
Remove all elements
Implements SPL::Set.
◆ getBeginIterator() [1/2]
Get a begin iterator
- Returns
- begin iterator
Implements SPL::Set.
◆ getBeginIterator() [2/2]
Get a begin const iterator
- Returns
- begin const iterator
Implements SPL::Set.
◆ getEndIterator() [1/2]
Get an end iterator
- Returns
- end iterator
Implements SPL::Set.
◆ getEndIterator() [2/2]
Get an end cost iterator
- Returns
- end const iterator
Implements SPL::Set.
◆ getSerializedSize()
template<class K >
virtual size_t SPL::set< K >::getSerializedSize |
( |
|
) |
const |
|
inlinevirtual |
Get the size in bytes when serialized
- Returns
- size in bytes when serialized
Implements SPL::Collection.
◆ getIterManager()
template<class K >
const SetIterManager& SPL::set< K >::getIterManager |
( |
|
) |
const |
|
inlineprotectedvirtual |
The documentation for this class was generated from the following files: