Registry key class. More...
#include <registry_key.h>
Public Types | |
enum | CreateFlags { create_always = 0, create_new = 1, create_volatile = 2 } |
enum | PredefinedKey { key_classes_root, key_current_config, key_current_user, key_local_machine, key_users } |
Public Member Functions | |
RegistryKey () | |
RegistryKey (PredefinedKey key, const std::string &subkey, unsigned int access_rights=KEY_ALL_ACCESS, unsigned int create_flags=create_always) | |
RegistryKey (HKEY key) | |
~RegistryKey () | |
RegistryKey | create_key (const std::string &subkey, unsigned int access_rights=KEY_ALL_ACCESS, CreateFlags create_flags=create_always) |
void | delete_key (const std::string &subkey, bool recursive) |
void | delete_value (const std::string &name) |
HKEY | get_key () const |
std::vector< std::string > | get_subkey_names () const |
DataBuffer | get_value_binary (const std::string &name, const DataBuffer &default_value=DataBuffer()) const |
int | get_value_int (const std::string &name, int default_value=0) const |
std::vector< std::string > | get_value_multi_string (const std::string &name, const std::vector< std::string > &default_value=std::vector< std::string >()) const |
std::vector< std::string > | get_value_names () const |
std::string | get_value_string (const std::string &name, const std::string &default_value=std::string()) const |
bool | is_null () const |
Returns true if this object is invalid. More... | |
RegistryKey | open_key (const std::string &subkey, unsigned int access_rights=KEY_ALL_ACCESS) |
void | set_value_binary (const std::string &name, const DataBuffer &value) |
void | set_value_int (const std::string &name, int value) |
void | set_value_string (const std::string &name, const std::string &value) |
void | throw_if_null () const |
Throw an exception if this object is invalid. More... | |
Static Public Member Functions | |
static void | delete_key (PredefinedKey key, const std::string &subkey, bool recursive) |
clan::RegistryKey::RegistryKey | ( | ) |
clan::RegistryKey::RegistryKey | ( | PredefinedKey | key, |
const std::string & | subkey, | ||
unsigned int | access_rights = KEY_ALL_ACCESS , |
||
unsigned int | create_flags = create_always |
||
) |
clan::RegistryKey::RegistryKey | ( | HKEY | key | ) |
clan::RegistryKey::~RegistryKey | ( | ) |
RegistryKey clan::RegistryKey::create_key | ( | const std::string & | subkey, |
unsigned int | access_rights = KEY_ALL_ACCESS , |
||
CreateFlags | create_flags = create_always |
||
) |
void clan::RegistryKey::delete_key | ( | const std::string & | subkey, |
bool | recursive | ||
) |
|
static |
void clan::RegistryKey::delete_value | ( | const std::string & | name | ) |
HKEY clan::RegistryKey::get_key | ( | ) | const |
std::vector<std::string> clan::RegistryKey::get_subkey_names | ( | ) | const |
DataBuffer clan::RegistryKey::get_value_binary | ( | const std::string & | name, |
const DataBuffer & | default_value = DataBuffer() |
||
) | const |
int clan::RegistryKey::get_value_int | ( | const std::string & | name, |
int | default_value = 0 |
||
) | const |
std::vector<std::string> clan::RegistryKey::get_value_multi_string | ( | const std::string & | name, |
const std::vector< std::string > & | default_value = std::vector< std::string >() |
||
) | const |
std::vector<std::string> clan::RegistryKey::get_value_names | ( | ) | const |
std::string clan::RegistryKey::get_value_string | ( | const std::string & | name, |
const std::string & | default_value = std::string() |
||
) | const |
|
inline |
Returns true if this object is invalid.
RegistryKey clan::RegistryKey::open_key | ( | const std::string & | subkey, |
unsigned int | access_rights = KEY_ALL_ACCESS |
||
) |
void clan::RegistryKey::set_value_binary | ( | const std::string & | name, |
const DataBuffer & | value | ||
) |
void clan::RegistryKey::set_value_int | ( | const std::string & | name, |
int | value | ||
) |
void clan::RegistryKey::set_value_string | ( | const std::string & | name, |
const std::string & | value | ||
) |
void clan::RegistryKey::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.