yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::Application Class Reference

Main application singleton managing lifecycle and global state. More...

#include <application.h>

Collaboration diagram for yaze::Application:

Public Member Functions

void Initialize (const AppConfig &config)
 
void Initialize ()
 
void Tick ()
 
void Shutdown ()
 
void LoadRom (const std::string &path)
 
ControllerGetController ()
 
bool IsReady () const
 
const AppConfigGetConfig () const
 

Static Public Member Functions

static ApplicationInstance ()
 

Private Member Functions

 Application ()=default
 
 ~Application ()=default
 
 Application (const Application &)=delete
 
Applicationoperator= (const Application &)=delete
 
void UpdateActivityStatus ()
 
void RunStartupActions ()
 

Private Attributes

std::unique_ptr< Controllercontroller_
 
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::ActivityFileactivity_file_
 

Detailed Description

Main application singleton managing lifecycle and global state.

Definition at line 61 of file application.h.

Constructor & Destructor Documentation

◆ Application() [1/2]

yaze::Application::Application ( )
privatedefault

◆ ~Application()

yaze::Application::~Application ( )
privatedefault

◆ Application() [2/2]

yaze::Application::Application ( const Application & )
privatedelete

Member Function Documentation

◆ Instance()

◆ Initialize() [1/2]

◆ Initialize() [2/2]

void yaze::Application::Initialize ( )
inline

Definition at line 69 of file application.h.

References Initialize().

Referenced by Initialize().

Here is the call graph for this function:

◆ Tick()

◆ Shutdown()

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().

◆ LoadRom()

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().

Here is the call graph for this function:

◆ GetController()

Controller * yaze::Application::GetController ( )
inline

Definition at line 81 of file application.h.

References controller_.

Referenced by yaze::app::GetGlobalEditorManager(), yaze::app::GetGlobalEmulator(), and main().

◆ IsReady()

bool yaze::Application::IsReady ( ) const
inline

Definition at line 82 of file application.h.

References controller_.

◆ GetConfig()

const AppConfig & yaze::Application::GetConfig ( ) const
inline

Definition at line 83 of file application.h.

References config_.

Referenced by yaze::Controller::OnEntry().

◆ operator=()

Application & yaze::Application::operator= ( const Application & )
privatedelete

◆ UpdateActivityStatus()

◆ RunStartupActions()

void yaze::Application::RunStartupActions ( )
private

Definition at line 270 of file application.cc.

References config_, and controller_.

Referenced by Initialize(), and LoadRom().

Member Data Documentation

◆ controller_

std::unique_ptr<Controller> yaze::Application::controller_
private

◆ config_

AppConfig yaze::Application::config_
private

Definition at line 98 of file application.h.

Referenced by GetConfig(), Initialize(), RunStartupActions(), and UpdateActivityStatus().

◆ last_frame_time_

std::chrono::steady_clock::time_point yaze::Application::last_frame_time_
private

Definition at line 101 of file application.h.

Referenced by Tick().

◆ delta_time_

float yaze::Application::delta_time_ = 0.0f
private

Definition at line 102 of file application.h.

Referenced by Tick().

◆ first_frame_

bool yaze::Application::first_frame_ = true
private

Definition at line 103 of file application.h.

Referenced by Tick().

◆ pending_rom_

std::string yaze::Application::pending_rom_
private

Definition at line 108 of file application.h.

Referenced by Initialize(), and LoadRom().

◆ activity_file_

std::unique_ptr<app::ActivityFile> yaze::Application::activity_file_
private

Definition at line 111 of file application.h.

Referenced by Initialize(), Shutdown(), and UpdateActivityStatus().


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