cortex 0.0.1
Loading...
Searching...
No Matches
cortex::CoroutineSuspendContext Class Referenceabstract

Provides a mechanism for a coroutine to suspend itself. More...

#include <coroutine_suspend_context.hpp>

Public Member Functions

 CoroutineSuspendContext (const CoroutineSuspendContext &)=delete
 
 CoroutineSuspendContext (CoroutineSuspendContext &&)=delete
 
CoroutineSuspendContextoperator= (const CoroutineSuspendContext &)=delete
 
CoroutineSuspendContextoperator= (CoroutineSuspendContext &&)=delete
 
virtual void Suspend ()=0
 Suspends the current coroutine's execution.
 

Static Public Member Functions

static void * operator new (std::size_t)=delete
 
static void * operator new[] (std::size_t)=delete
 

Protected Member Functions

virtual ~CoroutineSuspendContext ()=default
 
 CoroutineSuspendContext ()=default
 

Detailed Description

Provides a mechanism for a coroutine to suspend itself.

This class is passed to the coroutine body and contains the Suspend() method to yield control back to the caller.

Constructor & Destructor Documentation

◆ CoroutineSuspendContext() [1/3]

cortex::CoroutineSuspendContext::CoroutineSuspendContext ( const CoroutineSuspendContext )
delete

◆ CoroutineSuspendContext() [2/3]

cortex::CoroutineSuspendContext::CoroutineSuspendContext ( CoroutineSuspendContext &&  )
delete

◆ ~CoroutineSuspendContext()

virtual cortex::CoroutineSuspendContext::~CoroutineSuspendContext ( )
protectedvirtualdefault

◆ CoroutineSuspendContext() [3/3]

cortex::CoroutineSuspendContext::CoroutineSuspendContext ( )
protecteddefault

Member Function Documentation

◆ operator new()

static void * cortex::CoroutineSuspendContext::operator new ( std::size_t  )
staticdelete

◆ operator new[]()

static void * cortex::CoroutineSuspendContext::operator new[] ( std::size_t  )
staticdelete

◆ operator=() [1/2]

CoroutineSuspendContext & cortex::CoroutineSuspendContext::operator= ( const CoroutineSuspendContext )
delete

◆ operator=() [2/2]

CoroutineSuspendContext & cortex::CoroutineSuspendContext::operator= ( CoroutineSuspendContext &&  )
delete

◆ Suspend()

virtual void cortex::CoroutineSuspendContext::Suspend ( )
pure virtual

Suspends the current coroutine's execution.

Control returns to the point where Coroutine::Resume() was called. Execution will resume from this point when Resume() is called again.


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