bootstrap.ixx File
Engine bootstrap: component registration and GameWorld/GameLoop factory. More...
Included Headers
#include <cassert>
#include <cstddef>
#include <helios-engine-config.h>
#include <memory>
#include <utility>
#include <helios.engine.runtime.enginestate>
#include <helios.engine.runtime.timing>
#include <helios.engine.runtime.gameloop>
#include <helios.engine.runtime.world>
#include <helios.engine.state.types.StateTransitionContext>
#include <helios.engine.scene.registry>
#include <helios.engine.runtime.messaging.command>
#include <helios.engine.runtime.world.types.GameObjectHandle>
#include <helios.engine.runtime.lifecycle>
#include <helios.engine.spatial.registry>
#include <helios.engine.rendering.registry>
#include <helios.engine.rendering.RenderManager>
#include <helios.engine.platform>
#include <helios.engine.runtime.registry>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | bootstrap |
Classes Index
| struct | ComponentRegistrar<std::tuple< TEntityManagers... >> |
Description
Engine bootstrap: component registration and GameWorld/GameLoop factory.
File Listing
The file content with the documentation metadata removed is:
9#include <helios-engine-config.h>
37using namespace helios::engine::state::types;
38using namespace helios::engine::runtime::enginestate::types;
39using namespace helios::engine::platform::environment;
40using namespace helios::engine::platform::window;
41using namespace helios::engine::runtime::world;
42using namespace helios::engine::runtime::world::types;
43using namespace helios::engine::runtime::gameloop;
44using namespace helios::engine::runtime::messaging::command;
46export namespace helios::engine::bootstrap {
48 template<typename... Tuple>
49 struct ComponentRegistrar;
51 template<typename... TEntityManagers>
52 struct ComponentRegistrar<std::tuple<TEntityManagers...>> {
53 static void registerComponents() {
83 inline void registerAllComponents() {
85 static bool done = false;
86 if (done) {
89 done = true;
146 inline std::pair<std::unique_ptr<GameWorld>, std::unique_ptr<GameLoop>> bootstrapGameWorld(
147 const size_t capacity = ENTITY_MANAGER_DEFAULT_CAPACITY
149 auto gameWorld = std::make_unique<helios::engine::runtime::world::GameWorld>(capacity);
154 registerAllComponents();
157 gameWorld->registerManager<helios::engine::runtime::lifecycle::WorldLifecycleManager>();
159 gameWorld->registerManager<helios::engine::runtime::enginestate::EngineStateManager>(
162 gameWorld->registerManager<helios::engine::runtime::timing::TimerManager>();
164 gameWorld->session().trackState<helios::engine::runtime::enginestate::types::EngineState>();
166 gameWorld->registerCommandBuffer<RenderCommandBuffer>();
167 gameWorld->registerCommandBuffer<PlatformCommandBuffer>();
168 gameWorld->registerCommandBuffer<EngineCommandBuffer>();
170 gameWorld->session().setStateFrom<EngineState>(
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.