Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion::base::ScopedSettingValue< T > Class Template Reference

Sets a Setting<T> to a new value. More...

#include "setting.h"

Public Member Functions

 ScopedSettingValue (Setting< T > *setting, const T &value)
 Save the original setting value, and change to the new value. More...
 
 ~ScopedSettingValue ()
 Restore the original value to the Setting<T>. More...
 

Detailed Description

template<typename T>
class ion::base::ScopedSettingValue< T >

Sets a Setting<T> to a new value.

The original value will be restored when the ScopedSettingValue is deleted. The Setting<T> must outlive the ScopedSettingValue object.

Definition at line 337 of file setting.h.

Constructor & Destructor Documentation

template<typename T >
ion::base::ScopedSettingValue< T >::ScopedSettingValue ( Setting< T > *  setting,
const T value 
)
inline

Save the original setting value, and change to the new value.

Definition at line 340 of file setting.h.

template<typename T >
ion::base::ScopedSettingValue< T >::~ScopedSettingValue ( )
inline

Restore the original value to the Setting<T>.

Definition at line 349 of file setting.h.


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