Chat-O-Matic/application/preferences/PreferencesContainer.h
urnenfeld 818c28d43d * Add Behavior tab in Preferences with options in ticket #476
* Implement enabled ones
* Add canditate preferences
* Implement singleton-like preferences class CayaPreferences. These are working but they are not stored in file at closing
2010-05-19 18:05:30 +00:00

37 lines
666 B
C++

/*
* Copyright 2010, Oliver Ruiz Dorantes. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _PREFERENCES_CONTAINER_H
#define _PREFERENCES_CONTAINER_H
#include <libsupport/Singleton.h>
// TODO: added to main singleton class?
template<typename T> T* Singleton<T>::fInstance = 0;
template<class SettingsType>
class PreferencesContainer : public Singleton<PreferencesContainer<SettingsType> > {
public:
static const char* fFilename;
static SettingsType*
Item()
{
return &Get()->fSettings;
}
// TODO:
// status_t Save();
// status_t Load();
private:
SettingsType fSettings;
};
#endif // _PREFERENCES_CONTAINER_H