Nebula
Loading...
Searching...
No Matches
win32registry.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
13#include "core/types.h"
14#include "util/string.h"
15
16//------------------------------------------------------------------------------
17namespace Win32
18{
20{
21public:
30
32 static bool Exists(const Util::String& vendor, const Util::String& key, const Util::String& name);
34 static bool WriteString(const Util::String& vendor, const Util::String& key, const Util::String& name, const Util::String& value);
36 static Util::String ReadString(const Util::String& vendor, const Util::String& key, const Util::String& name);
38 static bool Delete(const Util::String& vendor, const Util::String& key);
39
41
43 static bool Exists(RootKey rootKey, const Util::String& key, const Util::String& name);
45 static bool WriteString(RootKey rootKey, const Util::String& key, const Util::String& name, const Util::String& value);
47 static Util::String ReadString(RootKey rootKey, const Util::String& key, const Util::String& name);
49 static int ReadInt(RootKey rootKey, const Util::String& key, const Util::String& name);
51 static bool Delete(RootKey rootKey, const Util::String& key);
53 static RootKey AsRootKey(const Util::String& str);
54private:
56 static HKEY RootKeyToWinKeyHandle(RootKey rootKey);
57};
58
59} // namespace Win32
60//------------------------------------------------------------------------------
A simple wrapper class to access the Win32 registry.
Definition win32registry.h:20
RootKey
key enumeration
Definition win32registry.h:24
@ CurrentUser
Definition win32registry.h:26
@ Users
Definition win32registry.h:28
@ ClassesRoot
Definition win32registry.h:25
@ LocalMachine
Definition win32registry.h:27
static int ReadInt(RootKey rootKey, const Util::String &key, const Util::String &name)
read an int registry entry
Definition win32registry.cc:211
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 win32registry.cc:197
static bool Delete(const Util::String &vendor, const Util::String &key)
delete a setting (and all its contained values), uses CurrentUser as RootKey
Definition win32registry.cc:258
static RootKey AsRootKey(const Util::String &str)
convert rootkey from string
Definition win32registry.cc:272
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 win32registry.cc:134
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 win32registry.cc:80
static HKEY RootKeyToWinKeyHandle(RootKey rootKey)
convert RootKey enum into Win32 key handle
Definition win32registry.cc:19
[TODO: Describe Win32 subsystem]
Nebula's universal string class.
Definition string.h:50