Nebula
Loading...
Searching...
No Matches
Posix::PosixSettings Class Reference

#include <posixsettings.h>

Detailed Description

A simple wrapper class to store config files in the users home directory Uses Boosts Property_tree library for the time being.

(C) 2013-2018 Individual contributors, see AUTHORS file

Static Public Member Functions

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)
 
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)
 
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!
 
static bool Delete (const Util::String &vendor, const Util::String &key)
 delete a setting (and all its contained values), uses CurrentUser as RootKey
 

Static Private Member Functions

static Util::String GetUserDir ()
 Returns path to home directory (redundant with fswrapper but we need to be independent of everything)
 

Member Function Documentation

◆ Delete()

bool Posix::PosixSettings::Delete ( const Util::String & vendor,
const Util::String & key )
static

delete a setting (and all its contained values), uses CurrentUser as RootKey

This deletes a complete registry key with all its values.

◆ Exists()

bool Posix::PosixSettings::Exists ( const Util::String & vendor,
const Util::String & key,
const Util::String & name )
static

return true if a setting exists (uses CurrentUser as RootKey)

Return true if a specific entry exists in the config files.

◆ GetUserDir()

Util::String Posix::PosixSettings::GetUserDir ( )
staticprivate

Returns path to home directory (redundant with fswrapper but we need to be independent of everything)

◆ ReadString()

String Posix::PosixSettings::ReadString ( const Util::String & vendor,
const Util::String & key,
const Util::String & name )
static

read a string registry entry, the string will be UTF-8 encoded!

Get a string value from the registry.

Fails hard if the key doesn't exists (use the Exists() method to make sure that the key exists!).

◆ WriteString()

bool Posix::PosixSettings::WriteString ( const Util::String & vendor,
const Util::String & key,
const Util::String & name,
const Util::String & value )
static

write a settings entry (uses CurrentUser as RootKey)

Set a key value in the registry.

This will create the key if it doesn't exist.


The documentation for this class was generated from the following files: