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.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/unstable/settings.cpp (limited to 'src/unstable/settings.cpp') diff --git a/src/unstable/settings.cpp b/src/unstable/settings.cpp new file mode 100644 index 0000000..e993250 --- /dev/null +++ b/src/unstable/settings.cpp @@ -0,0 +1,40 @@ +#include "bu/settings.h" + +#include "bu/settingsdrivertaf.h" + +Bu::Settings::Settings( const Bu::UtfString &sCompany, + const Bu::UtfString &sProduct, Bu::Settings::Driver eDriver ) : + sCompany( sCompany ), + sProduct( sProduct ), + pDriver( NULL ) +{ + switch( eDriver ) + { + case DriverNative: +#if defined( WIN32 ) +#else + pDriver = new Bu::SettingsDriverTaf(); +#endif + break; + + case DriverTaf: + pDriver = new Bu::SettingsDriverTaf(); + break; + + case DriverIni: + throw Bu::ExceptionBase("Not supported"); + break; + } + + pDriver->init( sCompany, sProduct ); +} + +Bu::Settings::~Settings() +{ + delete pDriver; +} + +void Bu::Settings::set( const Bu::UtfString &sKey, const Bu::UtfString &sValue ) +{ +} + -- cgit v1.2.3