Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::EngineContext Class Reference

Legacy singleton wrapper around EstellaContext. More...

#include <EngineContext.hpp>

Public Member Functions

 EngineContext (const EngineContext &)=delete
EngineContext & operator= (const EngineContext &)=delete
EstellaContext & context ()
ServiceRegistry & services ()
template<typename T>
T & require ()
template<typename T>
T * tryGet ()
EngineState & state ()
const EngineState & state () const
void shutdown ()

Static Public Member Functions

static EngineContext & instance ()

Detailed Description

Legacy singleton wrapper around EstellaContext.

Provides backward compatibility for binding files that use ctx(). Internally delegates to an owned EstellaContext instance. Will be removed once all bindings switch to direct context access.

Definition at line 18 of file EngineContext.hpp.

Constructor & Destructor Documentation

◆ EngineContext()

esengine::EngineContext::EngineContext ( const EngineContext & )
delete

References EngineContext().

Referenced by EngineContext(), instance(), and operator=().

Member Function Documentation

◆ context()

◆ instance()

EngineContext & esengine::EngineContext::instance ( )
static

Definition at line 8 of file EngineContext.cpp.

References EngineContext(), and esengine::ctx().

Referenced by esengine::activeCtx(), and esengine::legacyCtx().

◆ operator=()

EngineContext & esengine::EngineContext::operator= ( const EngineContext & )
delete

References EngineContext().

◆ require()

template<typename T>
T & esengine::EngineContext::require ( )
inline

Definition at line 30 of file EngineContext.hpp.

◆ services()

ServiceRegistry & esengine::EngineContext::services ( )
inline

Definition at line 27 of file EngineContext.hpp.

◆ shutdown()

void esengine::EngineContext::shutdown ( )
inline

Definition at line 38 of file EngineContext.hpp.

◆ state() [1/2]

EngineState & esengine::EngineContext::state ( )
inline

Definition at line 35 of file EngineContext.hpp.

◆ state() [2/2]

const EngineState & esengine::EngineContext::state ( ) const
inline

Definition at line 36 of file EngineContext.hpp.

◆ tryGet()

template<typename T>
T * esengine::EngineContext::tryGet ( )
inline

Definition at line 33 of file EngineContext.hpp.


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