3#include <spdlog/spdlog.h>
6#include <tl/expected.hpp>
21 static auto Create(std::string
const &application_name)
24 auto context() -> std::shared_ptr<Context>
const & {
return ctx; }
31 explicit Application(std::shared_ptr<Context>
const &ctx,
32 std::shared_ptr<Renderer>
const &renderer);
34 std::shared_ptr<Context> ctx;
35 std::shared_ptr<Renderer> renderer;
37 std::vector<phase_cb_t> startup_phase;
38 std::vector<phase_cb_t> update_phase;
39 std::vector<phase_cb_t> shutdown_phase;
Definition application.hpp:17
errors
Definition application.hpp:19
auto context() -> std::shared_ptr< Context > const &
Definition application.hpp:24
void add_callback_to_phase(CallbackPhase phase, phase_cb_t const &cb)
Definition application.cpp:49
static auto Create(std::string const &application_name) -> expected< std::shared_ptr< Application > >
Definition application.cpp:18
void run()
Definition application.cpp:68
tl::expected< T, Err > expected
Definition errors.hpp:49
std::function< void()> phase_cb_t
Definition application.hpp:15
CallbackPhase
Definition application.hpp:13