Skip to main content

RuntimeEnvironment Class

Facade around the platform-environment entity used by runtime systems. More...

Declaration

class helios::engine::runtime::world::RuntimeEnvironment { ... }

Private Member Typedefs Index

usingPlatformEntity = Entity< PlatformEntityManager >
usingHandle_type = typename PlatformEntity::Handle_type

Public Constructors Index

RuntimeEnvironment (const PlatformEntity &entity)

Constructs a runtime-environment facade from an existing platform entity. More...

Public Member Functions Index

boolisGPUReady () const noexcept

Checks whether GPU context readiness was marked. More...

boolinitialize () noexcept

Marks the runtime environment as initialized. More...

boolisInitialized () const noexcept

Checks whether initialization marker is present. More...

boolisAudioReady () const noexcept

Checks whether audio backend is ready. More...

voidsetGPUReady () noexcept

Marks GPU context readiness. More...

boolisRuntimeInfrastructureReady () const noexcept

Checks whether all runtime-infrastructure prerequisites are ready. More...

Private Member Attributes Index

PlatformEntityentity_

The underlying Entity storing system components. More...

Description

Facade around the platform-environment entity used by runtime systems.

Definition at line 32 of file RuntimeEnvironment.ixx.

Private Member Typedefs

Handle_type

using helios::engine::runtime::world::RuntimeEnvironment::Handle_type = typename PlatformEntity::Handle_type

Definition at line 38 of file RuntimeEnvironment.ixx.

38 using Handle_type = typename PlatformEntity::Handle_type;

PlatformEntity

using helios::engine::runtime::world::RuntimeEnvironment::PlatformEntity = Entity<PlatformEntityManager>

Definition at line 36 of file RuntimeEnvironment.ixx.

36 using PlatformEntity = Entity<PlatformEntityManager>;

Public Constructors

RuntimeEnvironment()

helios::engine::runtime::world::RuntimeEnvironment::RuntimeEnvironment (const PlatformEntity & entity)
inline explicit

Constructs a runtime-environment facade from an existing platform entity.

Parameters
entity

Platform environment entity.

Definition at line 53 of file RuntimeEnvironment.ixx.

53 explicit RuntimeEnvironment(const PlatformEntity& entity) : entity_(entity) {}

Public Member Functions

initialize()

bool helios::engine::runtime::world::RuntimeEnvironment::initialize ()
inline noexcept

Marks the runtime environment as initialized.

Returns

true if initialization marker was added, otherwise false.

Definition at line 69 of file RuntimeEnvironment.ixx.

70 if (isInitialized()) {
71 assert(false && "RuntimeEnvironment already initialized");
72 return false;
73 }
75 return true;
76 }

References isInitialized and helios::engine::runtime::registerComponents.

isAudioReady()

bool helios::engine::runtime::world::RuntimeEnvironment::isAudioReady ()
inline noexcept

Checks whether audio backend is ready.

Returns

true when audio is considered ready.

Definition at line 92 of file RuntimeEnvironment.ixx.

93 return true;
94 }

Referenced by isRuntimeInfrastructureReady.

isGPUReady()

bool helios::engine::runtime::world::RuntimeEnvironment::isGPUReady ()
inline noexcept

Checks whether GPU context readiness was marked.

Returns

true if GPU context is ready, otherwise false.

Definition at line 60 of file RuntimeEnvironment.ixx.

61 return entity_.has<GPUContextReadyComponent<Handle_type>>();
62 }

Referenced by isRuntimeInfrastructureReady and setGPUReady.

isInitialized()

bool helios::engine::runtime::world::RuntimeEnvironment::isInitialized ()
inline noexcept

Checks whether initialization marker is present.

Returns

true if initialized, otherwise false.

Definition at line 83 of file RuntimeEnvironment.ixx.

Referenced by initialize.

isRuntimeInfrastructureReady()

bool helios::engine::runtime::world::RuntimeEnvironment::isRuntimeInfrastructureReady ()
inline noexcept

Checks whether all runtime-infrastructure prerequisites are ready.

Returns

true if runtime infrastructure is ready, otherwise false.

Definition at line 109 of file RuntimeEnvironment.ixx.

References isAudioReady and isGPUReady.

setGPUReady()

void helios::engine::runtime::world::RuntimeEnvironment::setGPUReady ()
inline noexcept

Marks GPU context readiness.

Definition at line 99 of file RuntimeEnvironment.ixx.

100 assert(!isGPUReady() && "GPUContextReadyComponent already set");
102 }

References isGPUReady and helios::engine::runtime::registerComponents.

Private Member Attributes

entity_

PlatformEntity helios::engine::runtime::world::RuntimeEnvironment::entity_

The underlying Entity storing system components.

Definition at line 43 of file RuntimeEnvironment.ixx.

43 PlatformEntity entity_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.