![]() |
PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
|
Contains Pure shared settings. More...
Contains Pure shared settings.
These settings are used by a few classes, but we store these in one place (here), to avoid redundancy and inconsistency. Other classes reach these settings through pointers. One class may be responsible for properly initializing a setting, while other class may be responsible for providing get/set access to the user. For a user, this class is not known. Users can manipulate shared settings through public classes. This class is singleton, of course. IMPORTANT: the main Pure object should initialize this class before any other class attempts to use it.
Definition at line 40 of file PureSharedSettings.h.
#include <PureSharedSettings.h>
Public Member Functions | |
CConsole & | getConsole () const |
Returns access to console preset with logger module name as this class. | |
TPureBool | get (TPURE_SHARED_SETTINGS s) const |
Gets the specified shared setting. | |
void | Set (TPURE_SHARED_SETTINGS s, TPureBool value) |
Sets the specified shared setting. | |
Static Public Member Functions | |
static PureSharedSettings & | createAndGet () |
Creates and gets the singleton instance. | |
static const char * | getLoggerModuleName () |
Returns the logger module name of this class. | |
Private Member Functions | |
PureSharedSettings () | |
PureSharedSettings (const PureSharedSettings &) | |
PureSharedSettings & | operator= (const PureSharedSettings &) |
virtual | ~PureSharedSettings () |
Private Attributes | |
TPureBool | bMonitorPowerSave |
Is monitor powersaving enabled? Used by Window, accessed through Screen from outside. | |
TPureBool | bScreenSaver |
Is screensaver enabled? Used by Window, accessed through Screen from outside. | |
TPureBool | bStandby |
Is computer standby allowed? Used by Window, accessed through Screen from outside. | |
TPureBool | bVSyncSupported |
Is VSync supported? Set by HWInfo, accessed through Screen from outside. | |
|
private |
Definition at line 107 of file PureSharedSettings.cpp.
|
private |
Definition at line 116 of file PureSharedSettings.cpp.
|
privatevirtual |
Definition at line 127 of file PureSharedSettings.cpp.
|
static |
Creates and gets the singleton instance.
Definition at line 28 of file PureSharedSettings.cpp.
TPureBool PureSharedSettings::get | ( | TPURE_SHARED_SETTINGS | s | ) | const |
Gets the specified shared setting.
s | Any enum element defined in TPURE_SHARED_SETTINGS. |
Definition at line 67 of file PureSharedSettings.cpp.
CConsole & PureSharedSettings::getConsole | ( | ) | const |
Returns access to console preset with logger module name as this class.
Intentionally not virtual, so the getConsole() in derived class should hide this instead of overriding.
Definition at line 41 of file PureSharedSettings.cpp.
|
static |
Returns the logger module name of this class.
Intentionally not virtual, so derived class should hide this instead of overriding. Not even private, so user can also access this from outside, for any reason like controlling log filtering per logger module name.
Definition at line 54 of file PureSharedSettings.cpp.
|
private |
Definition at line 121 of file PureSharedSettings.cpp.
void PureSharedSettings::Set | ( | TPURE_SHARED_SETTINGS | s, |
TPureBool | value ) |
Sets the specified shared setting.
s | Any enum element defined in TPURE_SHARED_SETTINGS. |
value | The given shared setting will be set to this value. |
Definition at line 87 of file PureSharedSettings.cpp.
|
private |
Is monitor powersaving enabled? Used by Window, accessed through Screen from outside.
Definition at line 78 of file PureSharedSettings.h.
|
private |
Is screensaver enabled? Used by Window, accessed through Screen from outside.
Definition at line 79 of file PureSharedSettings.h.
|
private |
Is computer standby allowed? Used by Window, accessed through Screen from outside.
Definition at line 80 of file PureSharedSettings.h.
|
private |
Is VSync supported? Set by HWInfo, accessed through Screen from outside.
Definition at line 81 of file PureSharedSettings.h.