|
CeresEngine 0.2.0
A game development framework
|
Public Member Functions | |
| AsyncGenerator | get_return_object () noexcept |
| constexpr suspend_always | initial_suspend () const noexcept |
| constexpr suspend_always | final_suspend () const noexcept |
| template<typename U = T, std::enable_if_t<!std::is_rvalue_reference< U >::value, int > = 0> | |
| Promise & | yield_value (std::remove_reference_t< T > &value) noexcept |
| Yields a new value to the generator. | |
| Promise & | yield_value (std::remove_reference_t< T > &&value) noexcept |
| Yields a new value to the generator. | |
| void | unhandled_exception () noexcept |
| A method called internally by the compiler when an exception is thrown in the coroutine. | |
| void | return_void () noexcept |
| bool | await_ready () const noexcept |
| void | await_suspend (const AsyncCoroutineHandle handle) noexcept |
| void | await_resume () noexcept |
| Reference | value () const noexcept |
| void | rethrow () |
| If an exception was thrown in the coroutine, rethrows it. | |
Public Attributes | |
| std::optional< Pointer > | current = nullptr |
| The value returned by the last continuation of the coroutine. | |
| std::exception_ptr | exception = nullptr |
| The exception throw by the coroutine. | |
| AsyncCoroutineHandle | task = nullptr |
| The task currently being awaited. | |
| Lockable | mutex |
| A lockable object that sychronizes access to the promise when executing asynchronous code. | |
Friends | |
| class | Iterator |
| class | AsyncGenerator |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
suspend_always
|
inlinenoexcept |
|
inlineconstexprnoexcept |
suspend_always
|
inline |
If an exception was thrown in the coroutine, rethrows it.
If no exception was thrown, this method does nothing.
|
inlinenoexcept |
|
inlinenoexcept |
A method called internally by the compiler when an exception is thrown in the coroutine.
This will setup the execption to that it is thrown when calling operator++.
|
inlinenoexcept |
|
inlinenoexcept |
Yields a new value to the generator.
| value | The value to be yielded to the generator |
suspend_always
|
inlinenoexcept |
Yields a new value to the generator.
| U | the value type |
| value | The value to be yielded to the generator |
suspend_always | std::optional<Pointer> CeresEngine::AsyncGenerator< T, Lockable >::Promise::current = nullptr |
The value returned by the last continuation of the coroutine.
| std::exception_ptr CeresEngine::AsyncGenerator< T, Lockable >::Promise::exception = nullptr |
The exception throw by the coroutine.
If no exception was thrown, this is ´nullptr`.
|
mutable |
A lockable object that sychronizes access to the promise when executing asynchronous code.
| AsyncCoroutineHandle CeresEngine::AsyncGenerator< T, Lockable >::Promise::task = nullptr |
The task currently being awaited.