XII Release 0.1.0
Loading...
Searching...
No Matches
xiiSet< KeyType, Comparer, AllocatorWrapper > Class Template Reference

#include <Set.h>

Inheritance diagram for xiiSet< KeyType, Comparer, AllocatorWrapper >:
[legend]

Public Member Functions

 xiiSet (xiiAllocatorBase *pAllocator)
 
 xiiSet (const Comparer &comparer, xiiAllocatorBase *pAllocator)
 
 xiiSet (const xiiSet< KeyType, Comparer, AllocatorWrapper > &other)
 
 xiiSet (const xiiSetBase< KeyType, Comparer > &other)
 
void operator= (const xiiSet< KeyType, Comparer, AllocatorWrapper > &rhs)
 
void operator= (const xiiSetBase< KeyType, Comparer > &rhs)
 
- Public Member Functions inherited from xiiSetBase< KeyType, Comparer >
bool IsEmpty () const
 Returns whether there are no elements in the set. O(1) operation.
 
xiiUInt32 GetCount () const
 Returns the number of elements currently stored in the set. O(1) operation.
 
void Clear ()
 Destroys all elements in the set and resets its size to zero.
 
Iterator GetIterator () const
 Returns a constant Iterator to the very first element.
 
ReverseIterator GetReverseIterator () const
 Returns a constant ReverseIterator to the very last element.
 
template<typename CompatibleKeyType>
Iterator Insert (CompatibleKeyType &&key)
 Inserts the key into the tree and returns an Iterator to it. O(log n) operation.
 
template<typename CompatibleKeyType>
bool Remove (const CompatibleKeyType &key)
 Erases the element with the given key, if it exists. O(log n) operation.
 
Iterator Remove (const Iterator &pos)
 Erases the element at the given Iterator. O(log n) operation.
 
template<typename CompatibleKeyType>
Iterator Find (const CompatibleKeyType &key) const
 Searches for key, returns an Iterator to it or an invalid iterator, if no such key is found. O(log n) operation.
 
template<typename CompatibleKeyType>
bool Contains (const CompatibleKeyType &key) const
 Checks whether the given key is in the container.
 
bool ContainsSet (const xiiSetBase< KeyType, Comparer > &operand) const
 Checks whether all keys of the given set are in the container.
 
template<typename CompatibleKeyType>
Iterator LowerBound (const CompatibleKeyType &key) const
 Returns an Iterator to the element with a key equal or larger than the given key. Returns an invalid iterator, if there is no such element.
 
template<typename CompatibleKeyType>
Iterator UpperBound (const CompatibleKeyType &key) const
 Returns an Iterator to the element with a key that is LARGER than the given key. Returns an invalid iterator, if there is no such element.
 
void Union (const xiiSetBase< KeyType, Comparer > &operand)
 Makes this set the union of itself and the operand.
 
void Difference (const xiiSetBase< KeyType, Comparer > &operand)
 Makes this set the difference of itself and the operand, i.e. subtracts operand.
 
void Intersection (const xiiSetBase< KeyType, Comparer > &operand)
 Makes this set the intersection of itself and the operand.
 
xiiAllocatorBaseGetAllocator () const
 Returns the allocator that is used by this instance.
 
bool operator== (const xiiSetBase< KeyType, Comparer > &rhs) const
 Comparison operator.
 
xiiUInt64 GetHeapMemoryUsage () const
 Returns the amount of bytes that are currently allocated on the heap.
 
void Swap (xiiSetBase< KeyType, Comparer > &other)
 Swaps this map with the other one.
 
template<typename CompatibleKeyType>
XII_ALWAYS_INLINE xiiSetBase< KeyType, Comparer >::Iterator Find (const CompatibleKeyType &key) const
 
template<typename CompatibleKeyType>
XII_ALWAYS_INLINE bool Contains (const CompatibleKeyType &key) const
 
template<typename CompatibleKeyType>
XII_ALWAYS_INLINE xiiSetBase< KeyType, Comparer >::Iterator LowerBound (const CompatibleKeyType &key) const
 
template<typename CompatibleKeyType>
XII_ALWAYS_INLINE xiiSetBase< KeyType, Comparer >::Iterator UpperBound (const CompatibleKeyType &key) const
 

Additional Inherited Members

- Public Types inherited from xiiSetBase< KeyType, Comparer >
using Iterator = IteratorBase<false>
 
using ReverseIterator = IteratorBase<true>
 
- Protected Member Functions inherited from xiiSetBase< KeyType, Comparer >
 xiiSetBase (const Comparer &comparer, xiiAllocatorBase *pAllocator)
 Initializes the set to be empty.
 
 xiiSetBase (const xiiSetBase< KeyType, Comparer > &cc, xiiAllocatorBase *pAllocator)
 Copies all keys from the given set into this one.
 
 ~xiiSetBase ()
 Destroys all elements in the set.
 
void operator= (const xiiSetBase< KeyType, Comparer > &rhs)
 Copies all keys from the given set into this one.
 

Detailed Description

template<typename KeyType, typename Comparer = xiiCompareHelper<KeyType>, typename AllocatorWrapper = xiiDefaultAllocatorWrapper>
class xiiSet< KeyType, Comparer, AllocatorWrapper >
See also
xiiSetBase

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