CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ExecutionContext::Scope Class Reference

Scope object that sets the current execution context as current. More...

#include <CeresEngine/Foundation/Threading/ExecutionContext.hpp>

Public Member Functions

 Scope (ExecutionContext *executionContext) noexcept
 Creates a new execution context scope.
 
 ~Scope () noexcept
 Destroy the execution context scope and marks it as inactive.
 
 Scope (const Scope &) noexcept=delete
 
Scopeoperator= (const Scope &) noexcept=delete
 

Private Attributes

ExecutionContext *const mExecutionContext
 A pointer the the execution context.
 
const Scope *const mPrevious
 The previously top-most execution context.
 

Static Private Attributes

static thread_local const Scopetop
 The current top-most execution context scope.
 

Friends

class ExecutionContext
 

Detailed Description

Scope object that sets the current execution context as current.

Constructor & Destructor Documentation

◆ Scope() [1/2]

CeresEngine::ExecutionContext::Scope::Scope ( ExecutionContext executionContext)
explicitnoexcept

Creates a new execution context scope.

Parameters
executionContextThe execution context to be marked as active.

◆ ~Scope()

CeresEngine::ExecutionContext::Scope::~Scope ( )
noexcept

Destroy the execution context scope and marks it as inactive.

◆ Scope() [2/2]

CeresEngine::ExecutionContext::Scope::Scope ( const Scope )
deletenoexcept

Member Function Documentation

◆ operator=()

Scope & CeresEngine::ExecutionContext::Scope::operator= ( const Scope )
deletenoexcept

Friends And Related Symbol Documentation

◆ ExecutionContext

Member Data Documentation

◆ mExecutionContext

ExecutionContext* const CeresEngine::ExecutionContext::Scope::mExecutionContext
private

A pointer the the execution context.

◆ mPrevious

const Scope* const CeresEngine::ExecutionContext::Scope::mPrevious
private

The previously top-most execution context.

This will become the active one once the current resigns.

◆ top

thread_local const Scope* CeresEngine::ExecutionContext::Scope::top
staticprivate

The current top-most execution context scope.


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