Jopnal Engine  alpha 0.4
Simple Component Based 2D/3D Game Engine
Public Member Functions | Public Attributes | List of all members
jop::DynamicSetting< T > Struct Template Reference

Dynamically updated setting value. More...

#include <SettingManager.hpp>

Inheritance diagram for jop::DynamicSetting< T >:
jop::SettingCallback< T >

Public Member Functions

 DynamicSetting (const std::string &path, const T &defaultValue)
 Constructor. More...
 
 operator const T & () const
 Conversion operator. More...
 

Public Attributes

value
 The current value, automatically updated. More...
 

Additional Inherited Members

Detailed Description

template<typename T>
struct jop::DynamicSetting< T >

Dynamically updated setting value.

This is a helper struct for using the setting callback system. It contains a value which will be automatically updated if the associated setting's value ever changes. Using this struct you won't necessarily have to define your own callback or do continuous checks to see if an individual setting has changed.

See also
SettingManager

Definition at line 225 of file SettingManager.hpp.

Constructor & Destructor Documentation

template<typename T>
jop::DynamicSetting< T >::DynamicSetting ( const std::string &  path,
const T &  defaultValue 
)

Constructor.

Parameters
pathThe setting path
defaultValueThe default value
See also
SettingManager::get()

Member Function Documentation

template<typename T>
jop::DynamicSetting< T >::operator const T & ( ) const

Conversion operator.

Used to convert a DynamicSetting into its actual value.

Returns
The current value

Member Data Documentation

template<typename T>
T jop::DynamicSetting< T >::value

The current value, automatically updated.

Definition at line 250 of file SettingManager.hpp.


The documentation for this struct was generated from the following file: