wren
Vulkan-based game engine
Loading...
Searching...
No Matches
wren::Application Class Reference

#include <application.hpp>

Public Types

enum class  Errors

Public Member Functions

auto context () -> const std::shared_ptr< Context > &
void run ()
void add_callback_to_startup_phase (const startup_phase_cb_t &cb)
void add_callback_to_update_phase (const update_phase_cb_t &cb)
void add_callback_to_shutdown_phase (const shutdown_phase_cb_t &cb)

Static Public Member Functions

static auto create (const std::string &application_name) -> expected< std::shared_ptr< Application > >

Private Member Functions

 Application (const std::shared_ptr< Context > &ctx, const std::shared_ptr< Renderer > &renderer)

Private Attributes

std::shared_ptr< Contextctx_
std::shared_ptr< Rendererrenderer_
std::vector< phase_cb_tstartup_phase_
std::vector< update_phase_cb_tupdate_phase_
std::vector< phase_cb_tshutdown_phase_
bool running_

Member Enumeration Documentation

◆ Errors

enum class wren::Application::Errors
strong

Constructor & Destructor Documentation

◆ Application()

wren::Application::Application ( const std::shared_ptr< Context > & ctx,
const std::shared_ptr< Renderer > & renderer )
explicitprivate
Here is the caller graph for this function:

Member Function Documentation

◆ add_callback_to_shutdown_phase()

void wren::Application::add_callback_to_shutdown_phase ( const shutdown_phase_cb_t & cb)
inline

◆ add_callback_to_startup_phase()

void wren::Application::add_callback_to_startup_phase ( const startup_phase_cb_t & cb)
inline

◆ add_callback_to_update_phase()

void wren::Application::add_callback_to_update_phase ( const update_phase_cb_t & cb)
inline

◆ context()

auto wren::Application::context ( ) -> const std::shared_ptr<Context>&
inline

◆ create()

auto wren::Application::create ( const std::string & application_name) -> expected<std::shared_ptr<Application>>
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void wren::Application::run ( )
Here is the call graph for this function:

Member Data Documentation

◆ ctx_

std::shared_ptr<Context> wren::Application::ctx_
private

◆ renderer_

std::shared_ptr<Renderer> wren::Application::renderer_
private

◆ running_

bool wren::Application::running_
private

◆ shutdown_phase_

std::vector<phase_cb_t> wren::Application::shutdown_phase_
private

◆ startup_phase_

std::vector<phase_cb_t> wren::Application::startup_phase_
private

◆ update_phase_

std::vector<update_phase_cb_t> wren::Application::update_phase_
private

The documentation for this class was generated from the following files: