33#include <utility/logging/loggable.hpp>
34#include <utility/logging/default_logger.hpp>
36#include <utility/event/quit_event.hpp>
38#include <utility/ressource_provider.hpp>
40#include <utility/system_io/default_system_io.hpp>
42#include <utility/demangle.hpp>
44#include <utility/graphic/view.hpp>
46#include <utility/engine.hpp>
48#include "guillaume/ecs/system_phase.hpp"
49#include "guillaume/ecs/system_registry.hpp"
51#include "guillaume/metadata.hpp"
52#include "guillaume/scene_manager.hpp"
54#include "guillaume/event/event_bus.hpp"
55#include "guillaume/event/event_subscriber.hpp"
57#include "guillaume/systems/core_systems.hpp"
132 requires AllDistinct<DefaultSceneType, SceneTypes...>
134 protected utility::logging::Loggable<
135 Application<DefaultSceneType, SceneTypes...>,
136 utility::logging::DefaultLogger>
154 std::shared_ptr<utility::RessourceProvider> ressourceProvider,
155 std::unique_ptr<utility::Engine> engine);
201 return _ressourceProvider;
212 template<
typename PhaseType>
void runPhase(PhaseType &phaseDefinition);
220 static std::unique_ptr<utility::Engine>
221 requireEngine(std::unique_ptr<utility::Engine> engine);
223 std::unique_ptr<utility::Engine>
225 std::unique_ptr<
SceneManager<DefaultSceneType, SceneTypes...>>
230 _quitEventSubscriber;
237 std::shared_ptr<utility::RessourceProvider>
244#include "guillaume/application.tpp"
Application(std::shared_ptr< utility::RessourceProvider > ressourceProvider, std::unique_ptr< utility::Engine > engine)
Build the application and enter the default scene.
int run(void)
Run frames until a quit event is received.
virtual ~Application(void)
Destroy the application with its scenes, systems and engine.
std::shared_ptr< utility::RessourceProvider > getRessourceProvider(void)
Get the resource provider given to the constructor.
void routine(void)
Run one frame.
bool shouldQuit(void)
Tell whether a quit event was received since the last call.
Owns the scenes of an application, knows which one is active, and performs the switches between them.
Owns the systems of an application, grouped by phase and kept in registration order.
Hands each engine event to the listeners subscribed to its type.
A queue of the events of one type published on an EventBus, waiting to be read.
Constrains a parameter pack to types that are all different.
Constrains a template parameter to a type derived from Scene.
std::tuple< EventPhase, MeasurePhase, LayoutPhase, RenderPhase > SystemPhaseList
Every phase, in the order a frame runs them: Event, Measure, Layout, Render.
A C++20 UI framework for desktop and XR, built as an entity-component-system.