Main application singleton managing lifecycle and global state. More...
#include <application.h>

Public Member Functions | |
| void | Initialize (const AppConfig &config) |
| void | Initialize () |
| void | Tick () |
| void | Shutdown () |
| void | LoadRom (const std::string &path) |
| Controller * | GetController () |
| bool | IsReady () const |
| const AppConfig & | GetConfig () const |
Static Public Member Functions | |
| static Application & | Instance () |
Private Member Functions | |
| Application ()=default | |
| ~Application ()=default | |
| Application (const Application &)=delete | |
| Application & | operator= (const Application &)=delete |
| void | UpdateActivityStatus () |
| void | RunStartupActions () |
Private Attributes | |
| std::unique_ptr< Controller > | controller_ |
| AppConfig | config_ |
| std::chrono::steady_clock::time_point | last_frame_time_ |
| float | delta_time_ = 0.0f |
| bool | first_frame_ = true |
| std::string | pending_rom_ |
| std::unique_ptr< app::ActivityFile > | activity_file_ |
Main application singleton managing lifecycle and global state.
Definition at line 61 of file application.h.
|
privatedefault |
|
privatedefault |
|
privatedelete |
|
static |
Definition at line 31 of file application.cc.
Referenced by yaze::Controller::DoRender(), yaze::app::GetGlobalEditorManager(), yaze::app::GetGlobalEmulator(), Initialize(), yaze::ios::IOSHost::Initialize(), yaze::editor::UICoordinator::InitializeCommandPalette(), main(), yaze::Controller::OnEntry(), yaze::ios::IOSHost::Shutdown(), yaze::ios::IOSHost::Tick(), and TickFrame().
| void yaze::Application::Initialize | ( | const AppConfig & | config | ) |
Definition at line 36 of file application.cc.
References activity_file_, yaze::AppConfig::backend, config_, controller_, yaze::AppConfig::enable_test_harness, yaze::test::TestManager::Get(), Instance(), LoadRom(), LOG_ERROR, LOG_INFO, LOG_WARN, pending_rom_, yaze::AppConfig::rom_file, RunStartupActions(), yaze::AppConfig::test_harness_port, and UpdateActivityStatus().
Referenced by yaze::ios::IOSHost::Initialize(), and main().
|
inline |
Definition at line 69 of file application.h.
References Initialize().
Referenced by Initialize().

| void yaze::Application::Tick | ( | ) |
Definition at line 167 of file application.cc.
References controller_, yaze::editor::FrameBeginEvent::Create(), yaze::editor::FrameEndEvent::Create(), delta_time_, yaze::editor::ContentRegistry::Context::event_bus(), first_frame_, last_frame_time_, and LOG_ERROR.
Referenced by main(), yaze::ios::IOSHost::Tick(), and TickFrame().

| void yaze::Application::Shutdown | ( | ) |
Definition at line 305 of file application.cc.
References activity_file_, controller_, and LOG_INFO.
Referenced by main(), and yaze::ios::IOSHost::Shutdown().
| void yaze::Application::LoadRom | ( | const std::string & | path | ) |
Definition at line 214 of file application.cc.
References controller_, LOG_ERROR, LOG_INFO, pending_rom_, RunStartupActions(), and UpdateActivityStatus().
Referenced by Initialize().

|
inline |
Definition at line 81 of file application.h.
References controller_.
Referenced by yaze::app::GetGlobalEditorManager(), yaze::app::GetGlobalEmulator(), and main().
|
inline |
Definition at line 82 of file application.h.
References controller_.
|
inline |
Definition at line 83 of file application.h.
References config_.
Referenced by yaze::Controller::OnEntry().
|
privatedelete |
|
private |
Definition at line 278 of file application.cc.
References yaze::app::ActivityStatus::active_rom, activity_file_, config_, controller_, yaze::AppConfig::enable_test_harness, yaze::Rom::filename(), yaze::app::ActivityStatus::pid, yaze::app::ActivityStatus::socket_path, yaze::app::ActivityStatus::start_timestamp, yaze::AppConfig::test_harness_port, yaze::app::ActivityStatus::version, and YAZE_VERSION_STRING.
Referenced by Initialize(), and LoadRom().

|
private |
Definition at line 270 of file application.cc.
References config_, and controller_.
Referenced by Initialize(), and LoadRom().
|
private |
Definition at line 97 of file application.h.
Referenced by GetController(), Initialize(), IsReady(), LoadRom(), RunStartupActions(), Shutdown(), Tick(), and UpdateActivityStatus().
|
private |
Definition at line 98 of file application.h.
Referenced by GetConfig(), Initialize(), RunStartupActions(), and UpdateActivityStatus().
|
private |
Definition at line 101 of file application.h.
Referenced by Tick().
|
private |
Definition at line 102 of file application.h.
Referenced by Tick().
|
private |
Definition at line 103 of file application.h.
Referenced by Tick().
|
private |
Definition at line 108 of file application.h.
Referenced by Initialize(), and LoadRom().
|
private |
Definition at line 111 of file application.h.
Referenced by Initialize(), Shutdown(), and UpdateActivityStatus().