|
| | Set ()=default |
| | Empty constructor.
|
| | Set (std::initializer_list< Key > aInit) |
| | Constructor with initializer list.
|
| template<typename InputIt> |
| | Set (InputIt aFirst, InputIt aLast) |
| | Constructor from iterators.
|
| | Set (const Set< Key > &aSet)=default |
| | Copy constructor.
|
| | Set (Set< Key > &&aSet) noexcept=default |
| | Move constructor.
|
| Set< Key > & | operator= (const Set< Key > &aSet)=default |
| | Copy assignment operator.
|
| Set< Key > & | operator= (Set< Key > &&aSet) noexcept=default |
| | Move assignment operator.
|
| | ~Set ()=default |
| | Destructor.
|
| void | clear () |
| | Clear the set.
|
| size_t | size () const |
| | Returns the size of the set.
|
| bool | empty () const |
| | Check if set is empty.
|
| std::pair< iterator, bool > | insert (const Key &aKey) |
| | Insert a key into the set.
|
| std::pair< iterator, bool > | insert (Key &&aKey) |
| | Insert a key using move semantics.
|
| template<typename InputIt> |
| void | insert (InputIt aFirst, InputIt aLast) |
| | Insert a range of elements.
|
| template<typename... Args> |
| std::pair< iterator, bool > | emplace (Args &&... args) |
| | Emplace a key (construct in-place).
|
| bool | key_exists (const Key &aKey) const |
| | Check if a key exists in the set.
|
| bool | contains (const Key &aKey) const |
| | Alternative name for key_exists (more set-like).
|
| size_t | count (const Key &aKey) const |
| | Count occurrences of key (0 or 1 for set).
|
| iterator | find (const Key &aKey) |
| | Find an element.
|
| const_iterator | find (const Key &aKey) const |
| | Find an element (const version).
|
| size_t | erase (const Key &aKey) |
| | Erase a key from the set.
|
| iterator | erase (const_iterator aPos) |
| | Erase an element by iterator.
|
| iterator | erase (const_iterator aFirst, const_iterator aLast) |
| | Erase a range of elements.
|
| void | reserve (size_t n) |
| | Reserve space for at least n elements.
|
| iterator | begin () |
| | Get begin iterator.
|
| const_iterator | begin () const |
| | Get begin iterator (const).
|
| iterator | end () |
| | Get end iterator.
|
| const_iterator | end () const |
| | Get end iterator (const).
|
| std::unordered_set< Key > & | set_data () |
| | Expose the underlying container.
|
| const std::unordered_set< Key > & | set_data () const |
| | Expose the underlying container (const).
|
| void | swap (Set< Key > &aOther) |
| | Swap contents with another set.
|
| Set< Key > | operator| (const Set< Key > &aOther) const |
| | Set union operation.
|
| Set< Key > | operator& (const Set< Key > &aOther) const |
| | Set intersection operation.
|
| Set< Key > | operator- (const Set< Key > &aOther) const |
| | Set difference operation.
|
| Set< Key > | operator^ (const Set< Key > &aOther) const |
| | Set symmetric difference operation.
|
| bool | is_subset_of (const Set< Key > &aOther) const |
| | Check if this is a subset of another set.
|
| bool | is_superset_of (const Set< Key > &aOther) const |
| | Check if this is a superset of another set.
|
| bool | operator== (const Set< Key > &aOther) const |
| | Equality operator.
|
| bool | operator!= (const Set< Key > &aOther) const |
| | Inequality operator.
|
template<typename Key>
class belfem::Set< Key >
Hash set with set operations.
- See also
- BELFEM Container Classes - Usage Guide