Iterator for elements in the sequence.
More...
template<typename T>
class coveo::enumerable< T >::iterator
Iterator for elements in a coveo::enumerable's sequence. Uses the enumerable's next delegate to fetch references to the elements during iteration.
Elements are always late-initialized, e.g. they are not fetched from the next delegate until they are accessed.
- See also
- coveo::enumerable::begin()
-
coveo::enumerable::end()
◆ iterator_category
Standard iterator typedef for iterator category. Because enumerable is a forward-only sequence, this corresponds to std::forward_iterator_tag to identify a ForwardIterator.
◆ value_type
◆ raw_value_type
◆ difference_type
Standard iterator typedef for difference between iterators. Corresponds to std::ptfdiff_t.
◆ pointer
◆ reference
◆ iterator() [1/4]
Default constructor. Creates an invalid iterator that cannot be dereferenced.
◆ iterator() [2/4]
Constructor that is used by coveo::enumerable to create its iterators.
- Parameters
-
| parent | Parent enumerable to iterate. |
| is_end | Whether this iterator should point to the beginning of the sequence (false) or to the end of the sequence (true). |
◆ iterator() [3/4]
Copy constructor. Creates a copy of another iterator that will point to the same point in the enumeration.
- Parameters
-
◆ iterator() [4/4]
Move constructor. Creates an iterator by moving the internals from another iterator. After this method returns, obj is invalid and cannot be used.
- Parameters
-
◆ operator=() [1/2]
Assignment operator. Copies another iterator, now pointing to the same point in the enumeration.
- Parameters
-
- Returns
- Reference to
this iterator.
◆ operator=() [2/2]
Move assignment operator. Moves the internals of another iterator to this one. After this method returns, obj is invalid and cannot be used.
- Parameters
-
- Returns
- Reference to
this iterator.
◆ operator *()
Returns a reference to the current element in the enumeration, fetching it from the next delegate on the first call.
- Returns
- Reference to current element.
◆ operator->()
Returns a pointer to the current element in the enumeration, fetching it from the next delegate on the first call. Can be used to call methods or access members of the element.
- Returns
- Pointer to current element.
◆ operator++() [1/2]
Moves forward to the next element in the enumeration. Cannot be used if this iterator points to the end of the enumeration.
- Returns
- Reference to
this iterator AFTER the move.
◆ operator++() [2/2]
Moves forward to the next element in the enumeration. Cannot be used if this iterator points to the end of the enumeration.
- Returns
- Iterator BEFORE the move.
◆ operator==
Determines if two iterators point to the same point in the same sequence.
- Parameters
-
| left | First iterator to compare. |
| right | Second iterator to compare. |
- Returns
true if left and right point to the same point in the same sequence.
◆ operator!=
Determines if two iterators point to a different point in perhaps different sequences.
- Parameters
-
| left | First iterator to compare. |
| right | Second iterator to compare. |
- Returns
true if left does not point to the same point in the sequence as right.
- See also
- operator==()
The documentation for this class was generated from the following file: