Zth (libzth)
Loading...
Searching...
No Matches
zth::coro::promise_base Class Referenceabstract

#include <coro.h>

Inheritance diagram for zth::coro::promise_base:
zth::RefCounted zth::UniqueID< promise_base > zth::NamedUniqueID< Named > zth::UniqueIDBase zth::coro::promise< generator_promise< T... > > zth::coro::promise< task_promise< void > > zth::coro::promise< task_promise< T > > zth::coro::promise< Promise > zth::coro::generator_promise< T > zth::coro::task_promise_base< T > zth::coro::task_promise_base< void > zth::coro::task_promise< T > zth::coro::task_promise< void >

Public Member Functions

 ZTH_MALLOC_ATTR ((malloc, alloc_size(1))) static void *operator new(std
 
virtual ~promise_base () noexcept override=default
 
virtual bool running () const noexcept=0
 
virtual std::coroutine_handle handle () noexcept=0
 
std::coroutine_handle continuation () noexcept
 
bool has_continuation () const noexcept
 
void set_continuation (std::coroutine_handle<> cont={}) noexcept
 
- Public Member Functions inherited from zth::RefCounted
 RefCounted () noexcept
 
virtual ~RefCounted () noexcept
 
void used () noexcept
 
bool unused () noexcept
 
size_t refs () const noexcept
 
- Public Member Functions inherited from zth::UniqueID< promise_base >
 UniqueID (UniqueID const &)=delete
 
 UniqueID (UniqueID &&u) noexcept
 
 UniqueID (string const &name)
 
 UniqueID (string &&name)
 
 UniqueID (char const *name=nullptr)
 
UniqueIDoperator= (UniqueID const &)=delete
 
UniqueIDoperator= (UniqueID &&u) noexcept
 
virtual ~UniqueID () noexcept override=default
 
void const * normptr () const noexcept
 
uint64_t id () const noexcept
 
- Public Member Functions inherited from zth::NamedUniqueID< Named >
virtual ~NamedUniqueID () noexcept override=default
 
string const & name () const noexcept
 
void setName (string const &name)
 
void setName (char const *name)
 
void setName (string &&name)
 
virtual char const * id_str () const noexcept override
 

Static Public Member Functions

static ZTH_MALLOC_INLINE void operator delete (void *ptr, std::size_t n) noexcept
 
- Static Public Member Functions inherited from zth::UniqueID< promise_base >
static uint64_t getID () noexcept
 

Protected Member Functions

 promise_base (cow_string const &name)
 
- Protected Member Functions inherited from zth::RefCounted
virtual void cleanup () noexcept
 
- Protected Member Functions inherited from zth::UniqueID< promise_base >
virtual uint64_t id_ () const noexcept final
 
- Protected Member Functions inherited from zth::NamedUniqueID< Named >
 NamedUniqueID (char const *name=nullptr)
 
 NamedUniqueID (string const &name)
 
 NamedUniqueID (string &&name)
 
- Protected Member Functions inherited from zth::UniqueIDBase
virtual ~UniqueIDBase () noexcept=default
 

Additional Inherited Members

- Public Types inherited from zth::UniqueID< promise_base >
typedef NamedUniqueID base
 

Detailed Description

Definition at line 266 of file coro.h.

Constructor & Destructor Documentation

◆ ~promise_base()

virtual zth::coro::promise_base::~promise_base ( )
overridevirtualdefaultnoexcept

◆ promise_base()

zth::coro::promise_base::promise_base ( cow_string const &  name)
inlineexplicitprotected

Definition at line 304 of file coro.h.

Member Function Documentation

◆ continuation()

std::coroutine_handle zth::coro::promise_base::continuation ( )
inlinenoexcept

Definition at line 285 of file coro.h.

◆ handle()

virtual std::coroutine_handle zth::coro::promise_base::handle ( )
pure virtualnoexcept

◆ has_continuation()

bool zth::coro::promise_base::has_continuation ( ) const
inlinenoexcept

Definition at line 292 of file coro.h.

◆ operator delete()

static ZTH_MALLOC_INLINE void zth::coro::promise_base::operator delete ( void *  ptr,
std::size_t  n 
)
inlinestaticnoexcept

Definition at line 268 of file coro.h.

◆ running()

virtual bool zth::coro::promise_base::running ( ) const
pure virtualnoexcept

◆ set_continuation()

void zth::coro::promise_base::set_continuation ( std::coroutine_handle<>  cont = {})
inlinenoexcept

Definition at line 297 of file coro.h.

◆ ZTH_MALLOC_ATTR()

zth::coro::promise_base::ZTH_MALLOC_ATTR ( (malloc, alloc_size(1))  )
inlinenew

Definition at line 273 of file coro.h.


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