CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Attributes | List of all members
CYB::Engine::Context Class Reference

Implements the engine level functions for API::Interop::Contexts. More...

#include <CYBInterop.hpp>

Inheritance diagram for CYB::Engine::Context:
Inheritance graph
[legend]
Collaboration diagram for CYB::Engine::Context:
Collaboration graph
[legend]

Public Member Functions

 Context (API::Heap &AHeap, API::Logger &ALogger, const bool AMakeCurrent) noexcept
 Setup the Context, optionally making it the current one. More...
 
void MakeCurrent (void) noexcept
 Set the current thread's Context singleton to this Context. More...
 
- Public Member Functions inherited from CYB::API::Interop::Context
 Context (const Context &)=delete
 See Default Constructors and Destructor.
 

Private Attributes

Allocator FAllocatorObject
 The Allocator for this Context.
 

Additional Inherited Members

- Static Public Member Functions inherited from CYB::API::Interop::Context
static ContextGetContext (void) noexcept
 Get the API's Context. More...
 
- Public Attributes inherited from CYB::API::Interop::Context
AllocatorFAllocator
 The Allocator.
 
LoggerFLogger
 The Logger.
 
- Protected Member Functions inherited from CYB::API::Interop::Context
 Context (Allocator &AAllocator, Logger &ALogger) noexcept
 Setup the context. More...
 

Detailed Description

Implements the engine level functions for API::Interop::Contexts.

Definition at line 41 of file CYBInterop.hpp.

Constructor & Destructor Documentation

CYB::Engine::Context::Context ( API::Heap AHeap,
API::Logger ALogger,
const bool  AMakeCurrent 
)
noexcept

Setup the Context, optionally making it the current one.

Parameters
AHeapThe Heap for the Allocator to use
ALoggerThe Logger to use
AMakeCurrentIf true, MakeCurrent will be called during the constructor
Thread Safety
This function requires no thread safety

Definition at line 39 of file CYBInterop.cpp.

39  :
41  FAllocatorObject(AHeap)
42 {
43  if (AMakeCurrent)
44  MakeCurrent();
45 }
API::Interop::Context & Context(void) noexcept
Get the API's Context.
Allocator FAllocatorObject
The Allocator for this Context.
Definition: CYBInterop.hpp:43
void MakeCurrent(void) noexcept
Set the current thread's Context singleton to this Context.
Definition: CYBInterop.cpp:47

Member Function Documentation

void CYB::Engine::Context::MakeCurrent ( void  )
noexcept

Set the current thread's Context singleton to this Context.

Thread Safety
This function requires no thread safety

Definition at line 47 of file CYBInterop.cpp.

47  {
49 }
void SetCurrentContext(Context &ANewContext) noexcept
Set the current Context.
Definition: CYBCore.cpp:61
static Core & GetCore(void) noexcept
Retrieve the Core singleton.
Definition: CYBCore.cpp:45

Here is the call graph for this function:


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