RuntimeEnvironment.ixx File
Runtime environment facade for platform readiness state. More...
Included Headers
#include <optional>
#include <vector>
#include <cassert>
#include <helios.engine.platform.environment.PlatformEntityManager>
#include <helios.engine.platform.environment.types>
#include <helios.ecs.types.EntityHandle>
#include <helios.engine.platform.environment.components>
#include <helios.ecs.Entity>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | runtime |
| namespace | world |
Classes Index
| class | RuntimeEnvironment |
|
Facade around the platform-environment entity used by runtime systems. More... | |
Description
Runtime environment facade for platform readiness state.
File Listing
The file content with the documentation metadata removed is:
22using namespace helios::engine::platform::environment;
23using namespace helios::engine::platform::environment::types;
24using namespace helios::engine::platform::environment::components;
26export namespace helios::engine::runtime::world {
32 class RuntimeEnvironment {
36 using PlatformEntity = Entity<PlatformEntityManager>;
53 explicit RuntimeEnvironment(const PlatformEntity& entity) : entity_(entity) {}
60 [[nodiscard]] bool isGPUReady() const noexcept {
61 return entity_.has<GPUContextReadyComponent<Handle_type>>();
69 [[nodiscard]] bool initialize() noexcept {
70 if (isInitialized()) {
71 assert(false && "RuntimeEnvironment already initialized");
74 entity_.add<PlatformInitializedComponent<Handle_type>>();
83 [[nodiscard]] bool isInitialized() const noexcept {
84 return entity_.has<PlatformInitializedComponent<Handle_type>>();
92 [[nodiscard]] bool isAudioReady() const noexcept {
99 void setGPUReady() noexcept {
100 assert(!isGPUReady() && "GPUContextReadyComponent already set");
101 entity_.add<GPUContextReadyComponent<Handle_type>>();
109 [[nodiscard]] bool isRuntimeInfrastructureReady() const noexcept {
110 return isGPUReady() && isAudioReady();;
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.