PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
Loading...
Searching...
No Matches
PureSharedSettings Class Reference

Contains Pure shared settings. More...

Detailed Description

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 PureSharedSettingscreateAndGet ()
 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 &)
 
PureSharedSettingsoperator= (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.
 

Constructor & Destructor Documentation

◆ PureSharedSettings() [1/2]

PureSharedSettings::PureSharedSettings ( )
private

Definition at line 107 of file PureSharedSettings.cpp.

◆ PureSharedSettings() [2/2]

PureSharedSettings::PureSharedSettings ( const PureSharedSettings & )
private

Definition at line 116 of file PureSharedSettings.cpp.

◆ ~PureSharedSettings()

PureSharedSettings::~PureSharedSettings ( )
privatevirtual

Definition at line 127 of file PureSharedSettings.cpp.

Member Function Documentation

◆ createAndGet()

PureSharedSettings & PureSharedSettings::createAndGet ( )
static

Creates and gets the singleton instance.

Definition at line 28 of file PureSharedSettings.cpp.

◆ get()

TPureBool PureSharedSettings::get ( TPURE_SHARED_SETTINGS s) const

Gets the specified shared setting.

Parameters
sAny enum element defined in TPURE_SHARED_SETTINGS.
Returns
Current setting of the given shared setting.

Definition at line 67 of file PureSharedSettings.cpp.

◆ getConsole()

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.

Returns
Console instance used by this class.

Definition at line 41 of file PureSharedSettings.cpp.

◆ getLoggerModuleName()

const char * PureSharedSettings::getLoggerModuleName ( )
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.

Returns
The logger module name of this class.

Definition at line 54 of file PureSharedSettings.cpp.

◆ operator=()

PureSharedSettings & PureSharedSettings::operator= ( const PureSharedSettings & )
private

Definition at line 121 of file PureSharedSettings.cpp.

◆ Set()

void PureSharedSettings::Set ( TPURE_SHARED_SETTINGS s,
TPureBool value )

Sets the specified shared setting.

Parameters
sAny enum element defined in TPURE_SHARED_SETTINGS.
valueThe given shared setting will be set to this value.

Definition at line 87 of file PureSharedSettings.cpp.

Member Data Documentation

◆ bMonitorPowerSave

TPureBool PureSharedSettings::bMonitorPowerSave
private

Is monitor powersaving enabled? Used by Window, accessed through Screen from outside.

Definition at line 78 of file PureSharedSettings.h.

◆ bScreenSaver

TPureBool PureSharedSettings::bScreenSaver
private

Is screensaver enabled? Used by Window, accessed through Screen from outside.

Definition at line 79 of file PureSharedSettings.h.

◆ bStandby

TPureBool PureSharedSettings::bStandby
private

Is computer standby allowed? Used by Window, accessed through Screen from outside.

Definition at line 80 of file PureSharedSettings.h.

◆ bVSyncSupported

TPureBool PureSharedSettings::bVSyncSupported
private

Is VSync supported? Set by HWInfo, accessed through Screen from outside.

Definition at line 81 of file PureSharedSettings.h.


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