|
CeresEngine 0.2.0
A game development framework
|
An iterator type that allows the caller to iterate over the results of a generator. More...
Public Types | |
| using | iterator_category = std::input_iterator_tag |
| using | difference_type = std::ptrdiff_t |
| using | value_type = T |
| using | reference = T const & |
| using | pointer = T const * |
Public Member Functions | |
| Iterator () noexcept | |
Iterator needs to be default-constructible to satisfy the Range concept. | |
| Iterator (std::nullptr_t) noexcept | |
| Initialize an past-the-end iterator. | |
| Iterator (const AsyncCoroutineHandle handle) noexcept | |
Creates a new Iterator object with an attached coroutine handle. | |
| bool | operator== (const Iterator &rhs) const noexcept |
| Check if two iterator are equal. | |
| bool | operator!= (const Iterator &rhs) const noexcept |
| Check if two iterator are not equal. | |
| Iterator | operator++ (int)=delete |
| Post increment is not supported. | |
| Iterator & | operator++ () |
| Resumes the generator coroutine and runs until the next value is yielded by it. | |
| reference | operator* () noexcept |
| Dereferences the iterator and returns a reference to the last yielded value. | |
| reference | operator* () const noexcept |
| Dereferences the iterator and returns a reference to the last yielded value. | |
| pointer | operator-> () noexcept |
| Dereferences the iterator and returns a pointer to the last yielded value. | |
| pointer | operator-> () const noexcept |
| Dereferences the iterator and returns a pointer to the last yielded value. | |
| bool | await_ready () const noexcept |
| void | await_suspend (AsyncCoroutineHandle rh) noexcept |
| Iterator & | await_resume () |
Private Attributes | |
| Promise * | mPromise = nullptr |
An iterator type that allows the caller to iterate over the results of a generator.
| using CeresEngine::AsyncGenerator< T, Lockable >::Iterator::difference_type = std::ptrdiff_t |
| using CeresEngine::AsyncGenerator< T, Lockable >::Iterator::iterator_category = std::input_iterator_tag |
| using CeresEngine::AsyncGenerator< T, Lockable >::Iterator::value_type = T |
|
inlinenoexcept |
Iterator needs to be default-constructible to satisfy the Range concept.
|
inlineexplicitnoexcept |
Initialize an past-the-end iterator.
|
inlineexplicitnoexcept |
Creates a new Iterator object with an attached coroutine handle.
| handle | The coroutine handle |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
Check if two iterator are not equal.
See operator== for more details.
| rhs | The iterator to check against |
true if the generator has reached the end.
|
inlinenoexcept |
Dereferences the iterator and returns a reference to the last yielded value.
|
inlinenoexcept |
Dereferences the iterator and returns a reference to the last yielded value.
|
inline |
Resumes the generator coroutine and runs until the next value is yielded by it.
*this.
|
delete |
Post increment is not supported.
|
inlinenoexcept |
Dereferences the iterator and returns a pointer to the last yielded value.
|
inlinenoexcept |
Dereferences the iterator and returns a pointer to the last yielded value.
|
inlinenoexcept |
Check if two iterator are equal.
Since a generator sequence is potentially infinite, this only checks if there is any value remaining in the sequence.
| rhs | The iterator to check against |
true if there is at least one more value in the generator sequence.
|
private |