From da642482dee91921fc16786208aa497d3ee31d94 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 24 Aug 2012 18:15:11 +0000 Subject: Adding new Bu::Settings system, which works more or less like QSettings from Qt, only...without qt. It's the first real system in libbu++ that is going to be all unicode, which is exciting, but I'm having to actually finish the Bu::UtfString class while I work on it. Also exciting. --- src/unstable/settings.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/unstable/settings.h (limited to 'src/unstable/settings.h') diff --git a/src/unstable/settings.h b/src/unstable/settings.h new file mode 100644 index 0000000..0736ee5 --- /dev/null +++ b/src/unstable/settings.h @@ -0,0 +1,34 @@ +#ifndef BU_SETTINGS_H +#define BU_SETTINGS_H + +#include "bu/utfstring.h" + +namespace Bu +{ + /** + * Simple access to configuration data. Provides a consistant, cross + * platform interface to configuration data using native storage. + */ + class Settings + { + public: + enum Driver + { + DriverNative, + DriverTaf, + DriverIni + }; + Settings( const Bu::UtfString &sCompany, const Bu::UtfString &sProduct, + Driver driver=DriverNative ); + virtual ~Settings(); + + void set( const Bu::UtfString &sKey, const Bu::UtfString &sValue ); + + private: + Bu::UtfString sCompany; + Bu::UtfString sProduct; + class SettingsDriver *pDriver; + }; +}; + +#endif -- cgit v1.2.3