|
HikoGUI
A low latency retained GUI
|
#include <hikogui/utility/generator.hpp>
Data Structures | |
| class | const_iterator |
| A forward iterator which iterates through values co_yieled by the generator-function. More... | |
| class | promise_type |
| class | value_proxy |
Public Types | |
| using | value_type = T |
| using | handle_type = std::coroutine_handle<promise_type> |
Public Member Functions | |
| generator (handle_type coroutine) | |
| generator (const generator &)=delete | |
| generator & | operator= (const generator &)=delete |
| generator (generator &&other) noexcept | |
| generator & | operator= (generator &&other) noexcept |
| const_iterator | begin () const |
| Start the generator-function and return an iterator. | |
| const_iterator | cbegin () const |
| Start the generator-function and return an iterator. | |
| std::default_sentinel_t | end () const |
| Return a sentinel for the iterator. | |
| std::default_sentinel_t | cend () const |
| Return a sentinel for the iterator. | |
A return value for a generator-function.
A generator-function is a coroutine which co_yields zero or more values.
The generator object returned from the generator-function is used to retrieve the yielded values through an forward-iterator returned by the begin() and end() member functions.
The incrementing the iterator will resume the generator-function until the generator-function co_yields another value.
|
inline |
Start the generator-function and return an iterator.
|
inline |
Start the generator-function and return an iterator.
|
inline |
Return a sentinel for the iterator.
|
inline |
Return a sentinel for the iterator.