An iterator for the CardSet class.
More...
#include <CardSet.hpp>
An iterator for the CardSet class.
◆ iterator() [1/2]
Constructs an iterator that points to the first card of the set.
- Parameters
-
set_ref | The reference to the set. |
◆ iterator() [2/2]
Cluedo::CardSet::iterator::iterator |
( |
std::bitset< CardUtils::CARD_COUNT > const & | set_ref, |
|
|
std::size_t | index ) |
|
inlineconstexpr |
Constructs an iterator that points to the card of the set with the index given.
- Note
- If the card at index is not in the set then the iterator will point to the next card in the set.
- Parameters
-
set_ref | The reference to the set. |
index | The index of the element of the set. |
◆ advance_to_next_index()
void Cluedo::CardSet::iterator::advance_to_next_index |
( |
| ) |
|
|
inlineconstexpr |
If the current index does not point to a card in the set, then it advances the iterator to the next card in the set.
◆ operator!=()
bool Cluedo::CardSet::iterator::operator!= |
( |
iterator const & | other | ) |
const |
|
inlineconstexpr |
Compares two iterators.
- Parameters
-
- Returns
false
if the set they reference is the same and they point to the same card, true
otherwise.
◆ operator==()
bool Cluedo::CardSet::iterator::operator== |
( |
iterator const & | other | ) |
const |
|
inlineconstexpr |
Compares two iterators.
- Parameters
-
- Returns
true
if the set they reference is the same and they point to the same card, false
otherwise.
The documentation for this class was generated from the following file: