Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::Application Class Referencefinal

Class that provides an interface between our framework and the OS (start/stop, display support, main loop, start/stop/restart, etc) More...

#include <Application.h>

+ Inheritance diagram for Divide::Application:

Public Member Functions

 Application () noexcept
 
 ~Application () override
 
ErrorCode start (const string &entryPoint, I32 argc, char **argv)
 
void stop (const AppStepResult stepResult)
 
AppStepResult step ()
 
void RequestShutdown (bool clearCache) noexcept
 
void CancelShutdown () noexcept
 
void RequestRestart (bool clearCache) noexcept
 
void CancelRestart () noexcept
 
bool ShutdownRequested () const noexcept
 
bool RestartRequested () const noexcept
 
WindowManagerwindowManager () noexcept
 
const WindowManagerwindowManager () const noexcept
 
bool onWindowSizeChange (const SizeChangeParams &params) const
 
bool onResolutionChange (const SizeChangeParams &params) const
 
ErrorCode errorCode () const noexcept
 
 PROPERTY_RW (U8, maxMSAASampleCount, 0u)
 
 PROPERTY_R (Time::ApplicationTimer, timer)
 
bool mainLoopPaused () const
 
bool mainLoopActive () const
 
bool freezeRendering () const
 
Time::ApplicationTimertimer () noexcept
 
void mainLoopPaused (const bool state) noexcept
 
void mainLoopActive (const bool state) noexcept
 
void freezeRendering (const bool state) noexcept
 
- Public Member Functions inherited from Divide::SDLEventListener
 SDLEventListener () noexcept
 
virtual ~SDLEventListener ()
 
virtual bool onSDLEvent (SDL_Event event)=0
 
U64 listenerID () const noexcept
 

Protected Member Functions

bool onProfilerStateChanged (Profiler::State state)
 

Private Member Functions

ErrorCode setRenderingAPI (const RenderAPI api)
 
bool onSDLEvent (SDL_Event event) noexcept override
 

Private Attributes

WindowManager _windowManager
 
std::unique_ptr< Kernel_kernel
 
std::atomic_bool _requestShutdown { false }
 
std::atomic_bool _requestRestart { false }
 
std::atomic_bool _stepLoop { false }
 
std::atomic_bool _mainLoopPaused {false}
 
std::atomic_bool _mainLoopActive {false}
 
std::atomic_bool _freezeRendering {false}
 
ErrorCode _errorCode { ErrorCode::NO_ERR }
 
bool _clearCacheOnExit { false }
 

Friends

class Attorney::ApplicationKernel
 
class Attorney::ApplicationProfiler
 

Detailed Description

Class that provides an interface between our framework and the OS (start/stop, display support, main loop, start/stop/restart, etc)

Definition at line 96 of file Application.h.

Constructor & Destructor Documentation

◆ Application()

Divide::Application::Application ( )
noexcept

Definition at line 18 of file Application.cpp.

◆ ~Application()

Divide::Application::~Application ( )
override

Definition at line 25 of file Application.cpp.

Member Function Documentation

◆ CancelRestart()

void Divide::Application::CancelRestart ( )
inlinenoexcept

Definition at line 67 of file Application.inl.

◆ CancelShutdown()

void Divide::Application::CancelShutdown ( )
inlinenoexcept

Definition at line 51 of file Application.inl.

◆ errorCode()

ErrorCode Divide::Application::errorCode ( ) const
inlinenoexcept

Definition at line 87 of file Application.inl.

◆ freezeRendering() [1/2]

bool Divide::Application::freezeRendering ( ) const
inline

Definition at line 131 of file Application.h.

◆ freezeRendering() [2/2]

void Divide::Application::freezeRendering ( const bool  state)
inlinenoexcept

Definition at line 107 of file Application.inl.

◆ mainLoopActive() [1/2]

bool Divide::Application::mainLoopActive ( ) const
inline

Definition at line 130 of file Application.h.

◆ mainLoopActive() [2/2]

void Divide::Application::mainLoopActive ( const bool  state)
inlinenoexcept

Definition at line 102 of file Application.inl.

◆ mainLoopPaused() [1/2]

bool Divide::Application::mainLoopPaused ( ) const
inline

Definition at line 129 of file Application.h.

◆ mainLoopPaused() [2/2]

void Divide::Application::mainLoopPaused ( const bool  state)
inlinenoexcept

Definition at line 97 of file Application.inl.

◆ onProfilerStateChanged()

bool Divide::Application::onProfilerStateChanged ( Profiler::State  state)
protected

Definition at line 74 of file Application.cpp.

◆ onResolutionChange()

bool Divide::Application::onResolutionChange ( const SizeChangeParams params) const

Definition at line 232 of file Application.cpp.

◆ onSDLEvent()

bool Divide::Application::onSDLEvent ( SDL_Event  event)
overrideprivatevirtualnoexcept

Implements Divide::SDLEventListener.

Definition at line 176 of file Application.cpp.

◆ onWindowSizeChange()

bool Divide::Application::onWindowSizeChange ( const SizeChangeParams params) const

Definition at line 226 of file Application.cpp.

◆ PROPERTY_R()

Divide::Application::PROPERTY_R ( Time::ApplicationTimer  ,
timer   
)

◆ PROPERTY_RW()

Divide::Application::PROPERTY_RW ( U8  ,
maxMSAASampleCount  ,
0u   
)

◆ RequestRestart()

void Divide::Application::RequestRestart ( bool  clearCache)
inlinenoexcept

Definition at line 61 of file Application.inl.

◆ RequestShutdown()

void Divide::Application::RequestShutdown ( bool  clearCache)
inlinenoexcept

Definition at line 45 of file Application.inl.

◆ RestartRequested()

bool Divide::Application::RestartRequested ( ) const
inlinenoexcept

Definition at line 72 of file Application.inl.

◆ setRenderingAPI()

ErrorCode Divide::Application::setRenderingAPI ( const RenderAPI  api)
private

Definition at line 105 of file Application.cpp.

◆ ShutdownRequested()

bool Divide::Application::ShutdownRequested ( ) const
inlinenoexcept

Definition at line 56 of file Application.inl.

◆ start()

ErrorCode Divide::Application::start ( const string entryPoint,
I32  argc,
char **  argv 
)

Definition at line 30 of file Application.cpp.

◆ step()

AppStepResult Divide::Application::step ( )

Definition at line 142 of file Application.cpp.

◆ stop()

void Divide::Application::stop ( const AppStepResult  stepResult)

Definition at line 118 of file Application.cpp.

◆ timer()

Time::ApplicationTimer & Divide::Application::timer ( )
inlinenoexcept

Definition at line 92 of file Application.inl.

◆ windowManager() [1/2]

const WindowManager & Divide::Application::windowManager ( ) const
inlinenoexcept

Definition at line 82 of file Application.inl.

◆ windowManager() [2/2]

WindowManager & Divide::Application::windowManager ( )
inlinenoexcept

Definition at line 77 of file Application.inl.

Friends And Related Function Documentation

◆ Attorney::ApplicationKernel

friend class Attorney::ApplicationKernel
friend

Definition at line 98 of file Application.h.

◆ Attorney::ApplicationProfiler

friend class Attorney::ApplicationProfiler
friend

Definition at line 99 of file Application.h.

Member Data Documentation

◆ _clearCacheOnExit

bool Divide::Application::_clearCacheOnExit { false }
private

Definition at line 157 of file Application.h.

◆ _errorCode

ErrorCode Divide::Application::_errorCode { ErrorCode::NO_ERR }
private

Definition at line 156 of file Application.h.

◆ _freezeRendering

std::atomic_bool Divide::Application::_freezeRendering {false}
private

Definition at line 155 of file Application.h.

◆ _kernel

std::unique_ptr<Kernel> Divide::Application::_kernel
private

Definition at line 148 of file Application.h.

◆ _mainLoopActive

std::atomic_bool Divide::Application::_mainLoopActive {false}
private

Definition at line 154 of file Application.h.

◆ _mainLoopPaused

std::atomic_bool Divide::Application::_mainLoopPaused {false}
private

Definition at line 153 of file Application.h.

◆ _requestRestart

std::atomic_bool Divide::Application::_requestRestart { false }
private

Definition at line 151 of file Application.h.

◆ _requestShutdown

std::atomic_bool Divide::Application::_requestShutdown { false }
private

Definition at line 150 of file Application.h.

◆ _stepLoop

std::atomic_bool Divide::Application::_stepLoop { false }
private

Definition at line 152 of file Application.h.

◆ _windowManager

WindowManager Divide::Application::_windowManager
private

Definition at line 146 of file Application.h.


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