Donner
C++20 SVG rendering library
|
Defines and controls the behavior of the coroutine itself, by implementing methods that are called by the C++ runtime during execution of the coroutine. More...
#include "donner/base/element/ElementTraversalGenerators.h"
Public Member Functions | |
Promise ()=default | |
Default constructor. | |
~Promise ()=default | |
Destructor. | |
Promise (const Promise &)=delete | |
Copying or moving promises is not allowed. | |
Promise (Promise &&)=delete | |
Copying or moving promises is not allowed. | |
Promise & | operator= (const Promise &)=delete |
Copying or moving promises is not allowed. | |
Promise & | operator= (Promise &&)=delete |
Copying or moving promises is not allowed. | |
auto | initial_suspend () noexcept |
Called when the coroutine is first created, returns std::suspend_always to indicate this operation is lazily started. | |
auto | final_suspend () noexcept |
Called when the coroutine is finished. | |
auto | get_return_object () noexcept |
On coroutine construction, the runtime first creates the Handle, then this Promise followed by get_return_object() to get the ElementTraversalGenerator which holds the state. | |
auto | return_void () noexcept |
Called when the coroutine returns, does nothing. | |
auto | yield_value (T value) |
Yield a value, and suspend the coroutine. | |
void | unhandled_exception () |
On unhandled exception, crash. | |
Friends | |
class | ElementTraversalGenerator |
Defines and controls the behavior of the coroutine itself, by implementing methods that are called by the C++ runtime during execution of the coroutine.