Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Application.inl
Go to the documentation of this file.
1/*
2 Copyright (c) 2018 DIVIDE-Studio
3 Copyright (c) 2009 Ionut Cava
4
5 This file is part of DIVIDE Framework.
6
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software
9 and associated documentation files (the "Software"), to deal in the Software
10 without restriction,
11 including without limitation the rights to use, copy, modify, merge, publish,
12 distribute, sublicense,
13 and/or sell copies of the Software, and to permit persons to whom the
14 Software is furnished to do so,
15 subject to the following conditions:
16
17 The above copyright notice and this permission notice shall be included in
18 all copies or substantial portions of the Software.
19
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 IMPLIED,
22 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23 PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25 DAMAGES OR OTHER LIABILITY,
26 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27 IN CONNECTION WITH THE SOFTWARE
28 OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30 */
31
32#ifndef DVD_CORE_APPLICATION_INL_
33#define DVD_CORE_APPLICATION_INL_
34
35namespace Divide {
36
38{
39 return lhs._resolution == rhs._resolution &&
40 lhs._bitsPerPixel == rhs._bitsPerPixel &&
41 lhs._maxRefreshRate == rhs._maxRefreshRate &&
42 lhs._formatName == rhs._formatName;
43}
44
45inline void Application::RequestShutdown(bool clearCache) noexcept
46{
47 _requestShutdown = true;
48 _clearCacheOnExit = clearCache;
49}
50
51inline void Application::CancelShutdown() noexcept
52{
53 _requestShutdown = false;
54}
55
56inline bool Application::ShutdownRequested() const noexcept
57{
58 return _requestShutdown;
59}
60
61inline void Application::RequestRestart( bool clearCache ) noexcept
62{
63 _requestRestart = true;
64 _clearCacheOnExit = clearCache;
65}
66
67inline void Application::CancelRestart() noexcept
68{
69 _requestRestart = false;
70}
71
72inline bool Application::RestartRequested() const noexcept
73{
74 return _requestRestart;
75}
76
78{
79 return _windowManager;
80}
81
82inline const WindowManager& Application::windowManager() const noexcept
83{
84 return _windowManager;
85}
86
87inline ErrorCode Application::errorCode() const noexcept
88{
89 return _errorCode;
90}
91
93{
94 return _timer;
95}
96
97inline void Application::mainLoopPaused( const bool state ) noexcept
98{
99 _mainLoopPaused = state;
100}
101
102inline void Application::mainLoopActive( const bool state ) noexcept
103{
104 _mainLoopActive = state;
105}
106
107inline void Application::freezeRendering( const bool state ) noexcept
108{
109 _freezeRendering = state;
110}
111}; // namespace Divide
112
113#endif //DVD_CORE_APPLICATION_INL_
bool mainLoopActive() const
Definition: Application.h:130
bool mainLoopPaused() const
Definition: Application.h:129
bool RestartRequested() const noexcept
Definition: Application.inl:72
void CancelShutdown() noexcept
Definition: Application.inl:51
WindowManager & windowManager() noexcept
Definition: Application.inl:77
bool freezeRendering() const
Definition: Application.h:131
void RequestRestart(bool clearCache) noexcept
Definition: Application.inl:61
ErrorCode _errorCode
Definition: Application.h:156
bool ShutdownRequested() const noexcept
Definition: Application.inl:56
WindowManager _windowManager
Definition: Application.h:146
void RequestShutdown(bool clearCache) noexcept
Definition: Application.inl:45
std::atomic_bool _requestShutdown
Definition: Application.h:150
std::atomic_bool _requestRestart
Definition: Application.h:151
void CancelRestart() noexcept
Definition: Application.inl:67
ErrorCode errorCode() const noexcept
Definition: Application.inl:87
Time::ApplicationTimer & timer() noexcept
Definition: Application.inl:92
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
bool operator==(const DisplayManager::OutputDisplayProperties &lhs, const DisplayManager::OutputDisplayProperties &rhs) noexcept
Definition: Application.inl:37