Skip to main content

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

namespacehelios
namespaceengine
namespaceruntime
namespaceworld

Classes Index

classRuntimeEnvironment

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:

1
5module;
6
7#include <optional>
8#include <vector>
9#include <cassert>
10
11export module helios.engine.runtime.world.RuntimeEnvironment;
12
13import helios.ecs.Entity;
14import helios.ecs.types.EntityHandle;
15
16import helios.engine.platform.environment.types;
17import helios.engine.platform.environment.components;
18
19import helios.engine.platform.environment.PlatformEntityManager;
20
21using namespace helios::ecs;
25
26export namespace helios::engine::runtime::world {
27
28
33
34 private:
35
36 using PlatformEntity = Entity<PlatformEntityManager>;
37
38 using Handle_type = typename PlatformEntity::Handle_type;
39
43 PlatformEntity entity_;
44
45
46 public:
47
53 explicit RuntimeEnvironment(const PlatformEntity& entity) : entity_(entity) {}
54
61 return entity_.has<GPUContextReadyComponent<Handle_type>>();
62 }
63
70 if (isInitialized()) {
71 assert(false && "RuntimeEnvironment already initialized");
72 return false;
73 }
75 return true;
76 }
77
85 }
86
93 return true;
94 }
95
100 assert(!isGPUReady() && "GPUContextReadyComponent already set");
102 }
103
110 return isGPUReady() && isAudioReady();;
111 }
112
113 };
114
115
116}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.