diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2012-08-24 18:15:11 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2012-08-24 18:15:11 +0000 |
| commit | da642482dee91921fc16786208aa497d3ee31d94 (patch) | |
| tree | bae598fca2bb2b55661bc1c854b43a1393aced23 /src/unstable/settingsdrivertaf.cpp | |
| parent | f5ac2c1ba333ce6aa6d385d9a63b658caaa46503 (diff) | |
| download | libbu++-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/settingsdrivertaf.cpp')
| -rw-r--r-- | src/unstable/settingsdrivertaf.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/unstable/settingsdrivertaf.cpp b/src/unstable/settingsdrivertaf.cpp new file mode 100644 index 0000000..164bf0b --- /dev/null +++ b/src/unstable/settingsdrivertaf.cpp | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #include "bu/settingsdrivertaf.h" | ||
| 2 | |||
| 3 | #include "bu/file.h" | ||
| 4 | #include "bu/taf.h" | ||
| 5 | |||
| 6 | #include <stdlib.h> | ||
| 7 | |||
| 8 | Bu::SettingsDriverTaf::SettingsDriverTaf() : | ||
| 9 | pRoot( NULL ) | ||
| 10 | { | ||
| 11 | } | ||
| 12 | |||
| 13 | Bu::SettingsDriverTaf::~SettingsDriverTaf() | ||
| 14 | { | ||
| 15 | } | ||
| 16 | |||
| 17 | void Bu::SettingsDriverTaf::init( const Bu::UtfString &sCompany, | ||
| 18 | const Bu::UtfString &sProduct ) | ||
| 19 | { | ||
| 20 | Bu::UtfString us( getenv("HOME") ); | ||
| 21 | us += "/"; | ||
| 22 | us += sCompany; | ||
| 23 | us += "/"; | ||
| 24 | us += sProduct; | ||
| 25 | Bu::File fIn( us.get(), Bu::File::Read|Bu::File::Create ); | ||
| 26 | Bu::TafReader tr( fIn ); | ||
| 27 | pRoot = tr.readGroup(); | ||
| 28 | } | ||
| 29 | |||
