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.timing>
#include <helios.engine.runtime.lifecycle>
#include <helios.engine.runtime.gameloop>
#include <helios.engine.runtime.world>
#include <helios.engine.scene.registry>
#include <helios.engine.state.types.StateTransitionContext>
#include <helios.engine.spatial.registry>
#include <helios.engine.runtime.messaging.command>
#include <helios.engine.runtime.world.types.GameObjectHandle>
#include <helios.engine.core.registry>
#include <helios.engine.rendering.registry>
#include <helios.engine.runtime.enginestate>
#include <helios.engine.runtime.registry>
#include <helios.engine.platform>
#include <helios.engine.rendering.RenderManager>
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>
38using namespace helios::engine::state::types;
39using namespace helios::engine::runtime::enginestate::types;
40using namespace helios::engine::platform::environment;
41using namespace helios::engine::platform::window;
42using namespace helios::engine::runtime::world;
43using namespace helios::engine::runtime::world::types;
44using namespace helios::engine::runtime::gameloop;
45using namespace helios::engine::runtime::messaging::command;
47export namespace helios::engine::bootstrap {
49 template<typename... Tuple>
50 struct ComponentRegistrar;
52 template<typename... TEntityManagers>
53 struct ComponentRegistrar<std::tuple<TEntityManagers...>> {
54 static void registerComponents() {
85 inline void registerAllComponents() {
87 static bool done = false;
88 if (done) {
91 done = true;
148 inline std::pair<std::unique_ptr<GameWorld>, std::unique_ptr<GameLoop>> bootstrapGameWorld(
149 const size_t capacity = ENTITY_MANAGER_DEFAULT_CAPACITY
151 auto gameWorld = std::make_unique<helios::engine::runtime::world::GameWorld>(capacity);
156 registerAllComponents();
159 gameWorld->registerManager<helios::engine::runtime::lifecycle::WorldLifecycleManager>();
161 gameWorld->registerManager<helios::engine::runtime::enginestate::EngineStateManager>(
164 gameWorld->registerManager<helios::engine::runtime::timing::TimerManager>();
166 gameWorld->session().trackState<helios::engine::runtime::enginestate::types::EngineState>();
168 gameWorld->registerCommandBuffer<RenderCommandBuffer>();
169 gameWorld->registerCommandBuffer<PlatformCommandBuffer>();
170 gameWorld->registerCommandBuffer<EngineCommandBuffer>();
172 gameWorld->session().setStateFrom<EngineState>(
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.