Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::ElementTraversalGenerator< T >::Promise Class Reference

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.
 
Promiseoperator= (const Promise &)=delete
 Copying or moving promises is not allowed.
 
Promiseoperator= (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
 

Detailed Description

template<typename T>
class donner::ElementTraversalGenerator< T >::Promise

Defines and controls the behavior of the coroutine itself, by implementing methods that are called by the C++ runtime during execution of the coroutine.


The documentation for this class was generated from the following file: