1 #ifndef SETTING_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM 2 #define SETTING_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM 4 #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 15 class SettingChangeBase;
24 std::auto_ptr <SettingChangeBase>
set(
const T& value);
37 virtual void pop() = 0;
46 m_oldSetting = *pSetting;
50 m_pCurSetting->restore(m_oldSetting);
74 for(setting_changes::const_iterator it=m_settingChanges.begin();it!=m_settingChanges.end();++it)
76 m_settingChanges.clear();
80 for(setting_changes::const_iterator it=m_settingChanges.begin();it!=m_settingChanges.end();++it)
84 void push(std::auto_ptr <SettingChangeBase> pSettingChange) {
85 m_settingChanges.push_back(pSettingChange.release());
105 #endif // SETTING_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
void push(std::auto_ptr< SettingChangeBase > pSettingChange)
std::auto_ptr< SettingChangeBase > set(const T &value)
std::vector< SettingChangeBase * > setting_changes
SettingChange(Setting< T > *pSetting)
virtual ~SettingChangeBase()
Setting< T > * m_pCurSetting
void restore(const Setting< T > &oldSetting)
setting_changes m_settingChanges
Setting< T > m_oldSetting