21 static auto create(
const std::string& application_name)
24 auto context() ->
const std::shared_ptr<Context>& {
return ctx_; }
40 explicit Application(
const std::shared_ptr<Context>& ctx,
41 const std::shared_ptr<Renderer>& renderer);
43 std::shared_ptr<Context>
ctx_;
Errors
Definition application.hpp:19
Application(const std::shared_ptr< Context > &ctx, const std::shared_ptr< Renderer > &renderer)
Definition application.cpp:48
bool running_
Definition application.hpp:50
std::vector< phase_cb_t > startup_phase_
Definition application.hpp:46
std::shared_ptr< Renderer > renderer_
Definition application.hpp:44
void add_callback_to_shutdown_phase(const shutdown_phase_cb_t &cb)
Definition application.hpp:35
std::shared_ptr< Context > ctx_
Definition application.hpp:43
void add_callback_to_startup_phase(const startup_phase_cb_t &cb)
Definition application.hpp:27
static auto create(const std::string &application_name) -> expected< std::shared_ptr< Application > >
Definition application.cpp:17
void run()
Definition application.cpp:54
std::vector< phase_cb_t > shutdown_phase_
Definition application.hpp:48
std::vector< update_phase_cb_t > update_phase_
Definition application.hpp:47
auto context() -> const std::shared_ptr< Context > &
Definition application.hpp:24
void add_callback_to_update_phase(const update_phase_cb_t &cb)
Definition application.hpp:31
Definition editor_scene.hpp:5
phase_cb_t shutdown_phase_cb_t
Definition application.hpp:15
std::function< void()> phase_cb_t
Definition application.hpp:12
std::function< void(std::chrono::duration< double >)> update_phase_cb_t
Definition application.hpp:14
std::expected< T, Err > expected
Definition result.hpp:43
phase_cb_t startup_phase_cb_t
Definition application.hpp:13
CallbackPhase
Definition application.hpp:10
@ Update
Definition application.hpp:10
@ Startup
Definition application.hpp:10
@ Shutdown
Definition application.hpp:10