aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/settings.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-08-24 18:15:11 +0000
committerMike Buland <eichlan@xagasoft.com>2012-08-24 18:15:11 +0000
commitda642482dee91921fc16786208aa497d3ee31d94 (patch)
treebae598fca2bb2b55661bc1c854b43a1393aced23 /src/unstable/settings.cpp
parentf5ac2c1ba333ce6aa6d385d9a63b658caaa46503 (diff)
downloadlibbu++-da642482dee91921fc16786208aa497d3ee31d94.tar.gz
libbu++-da642482dee91921fc16786208aa497d3ee31d94.tar.bz2
libbu++-da642482dee91921fc16786208aa497d3ee31d94.tar.xz
libbu++-da642482dee91921fc16786208aa497d3ee31d94.zip
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.
Diffstat (limited to 'src/unstable/settings.cpp')
-rw-r--r--src/unstable/settings.cpp40
1 files changed, 40 insertions, 0 deletions
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 @@
1#include "bu/settings.h"
2
3#include "bu/settingsdrivertaf.h"
4
5Bu::Settings::Settings( const Bu::UtfString &sCompany,
6 const Bu::UtfString &sProduct, Bu::Settings::Driver eDriver ) :
7 sCompany( sCompany ),
8 sProduct( sProduct ),
9 pDriver( NULL )
10{
11 switch( eDriver )
12 {
13 case DriverNative:
14#if defined( WIN32 )
15#else
16 pDriver = new Bu::SettingsDriverTaf();
17#endif
18 break;
19
20 case DriverTaf:
21 pDriver = new Bu::SettingsDriverTaf();
22 break;
23
24 case DriverIni:
25 throw Bu::ExceptionBase("Not supported");
26 break;
27 }
28
29 pDriver->init( sCompany, sProduct );
30}
31
32Bu::Settings::~Settings()
33{
34 delete pDriver;
35}
36
37void Bu::Settings::set( const Bu::UtfString &sKey, const Bu::UtfString &sValue )
38{
39}
40