Nebula
Loading...
Searching...
No Matches
posixsettings.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11#include "core/types.h"
12#include "util/string.h"
13
14//------------------------------------------------------------------------------
15namespace Posix
16{
18{
19public:
20
22 static bool Exists(const Util::String & vendor, const Util::String& key, const Util::String& name);
24 static bool WriteString(const Util::String & vendor, const Util::String& key, const Util::String& name, const Util::String& value);
26 static Util::String ReadString(const Util::String & vendor, const Util::String& key, const Util::String& name);
28 static bool Delete(const Util::String & vendor, const Util::String& key);
29
30private:
31 static Util::String GetUserDir();
32
33};
34
35} // namespace Posix
36//------------------------------------------------------------------------------
A simple wrapper class to store config files in the users home directory Uses Boosts Property_tree li...
Definition posixsettings.h:18
static bool WriteString(const Util::String &vendor, const Util::String &key, const Util::String &name, const Util::String &value)
write a settings entry (uses CurrentUser as RootKey)
Definition posixsettings.cc:68
static bool Delete(const Util::String &vendor, const Util::String &key)
delete a setting (and all its contained values), uses CurrentUser as RootKey
Definition posixsettings.cc:146
static Util::String ReadString(const Util::String &vendor, const Util::String &key, const Util::String &name)
read a string registry entry, the string will be UTF-8 encoded!
Definition posixsettings.cc:114
static bool Exists(const Util::String &vendor, const Util::String &key, const Util::String &name)
return true if a setting exists (uses CurrentUser as RootKey)
Definition posixsettings.cc:44
static Util::String GetUserDir()
Returns path to home directory (redundant with fswrapper but we need to be independent of everything)
Definition posixsettings.cc:157
Posix implemention of a read-many write-few lock.
Definition posixsysfunc.cc:21
Nebula's universal string class.
Definition string.h:50