Nebula
|
#include <win32registry.h>
A simple wrapper class to access the Win32 registry.
NOTE: using this class restricts your code to the Win32 platform.
Public Types | |
enum | RootKey { ClassesRoot , CurrentUser , LocalMachine , Users } |
key enumeration More... | |
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 bool | Exists (RootKey rootKey, const Util::String &key, const Util::String &name) |
these are Win32 Specific! | |
static bool | WriteString (RootKey rootKey, const Util::String &key, const Util::String &name, const Util::String &value) |
write a registry entry | |
static Util::String | ReadString (RootKey rootKey, const Util::String &key, const Util::String &name) |
read a string registry entry, the string will be UTF-8 encoded! | |
static int | ReadInt (RootKey rootKey, const Util::String &key, const Util::String &name) |
read an int registry entry | |
static bool | Delete (RootKey rootKey, const Util::String &key) |
delete a registry key (and all its contained values) | |
static RootKey | AsRootKey (const Util::String &str) |
convert rootkey from string | |
Static Private Member Functions | |
static HKEY | RootKeyToWinKeyHandle (RootKey rootKey) |
convert RootKey enum into Win32 key handle | |
|
static |
convert rootkey from string
Converts a string (all capitals, e.g.
HKEY_CURRENT_USER) into a RootKey value.
|
static |
delete a setting (and all its contained values), uses CurrentUser as RootKey
This deletes a complete registry key with all its values.
|
static |
delete a registry key (and all its contained values)
This deletes a complete registry key with all its values.
|
static |
return true if a setting exists (uses CurrentUser as RootKey)
Return true if a specific entry exists in the registry.
|
static |
these are Win32 Specific!
Return true if a specific entry exists in the registry.
return true if a registry entry exists
To check only for the existence of a key without the contained value, pass an empty 'name' string.
|
static |
read an int registry entry
Get an int value from the registry.
Fails hard if the key doesn't exists (use the Exists() method to make sure that the key exists!).
|
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!). NOTE that this method returns an UTF-8 encoded string!
|
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!). NOTE that this method returns an UTF-8 encoded string!
|
staticprivate |
|
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.
|
static |
write a registry entry
Set a key value in the registry.
This will create the key if it doesn't exist.