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/settingsdrivertaf.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/unstable/settingsdrivertaf.cpp (limited to 'src/unstable/settingsdrivertaf.cpp') 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 @@ +#include "bu/settingsdrivertaf.h" + +#include "bu/file.h" +#include "bu/taf.h" + +#include + +Bu::SettingsDriverTaf::SettingsDriverTaf() : + pRoot( NULL ) +{ +} + +Bu::SettingsDriverTaf::~SettingsDriverTaf() +{ +} + +void Bu::SettingsDriverTaf::init( const Bu::UtfString &sCompany, + const Bu::UtfString &sProduct ) +{ + Bu::UtfString us( getenv("HOME") ); + us += "/"; + us += sCompany; + us += "/"; + us += sProduct; + Bu::File fIn( us.get(), Bu::File::Read|Bu::File::Create ); + Bu::TafReader tr( fIn ); + pRoot = tr.readGroup(); +} + -- cgit v1.2.3