clan::RegistryKey Class Reference

Registry key class. More...

#include <registry_key.h>

Public Member Functions

Attributes
bool is_null () const
 Returns true if this object is invalid. More...
 
void throw_if_null () const
 Throw an exception if this object is invalid. More...
 
HKEY get_key () const
 
std::vector< std::string > get_subkey_names () const
 
std::vector< std::string > get_value_names () const
 
int get_value_int (const std::string &name, int default_value=0) const
 
DataBuffer get_value_binary (const std::string &name, const DataBuffer &default_value=DataBuffer()) const
 
std::string get_value_string (const std::string &name, const std::string &default_value=std::string()) 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
 

Construction

enum  PredefinedKey {
  key_classes_root, key_current_config, key_current_user, key_local_machine,
  key_users
}
 
enum  CreateFlags { create_always = 0, create_new = 1, create_volatile = 2 }
 
 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 ()
 

Operations

RegistryKey open_key (const std::string &subkey, unsigned int access_rights=KEY_ALL_ACCESS)
 
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 set_value_int (const std::string &name, int value)
 
void set_value_binary (const std::string &name, const DataBuffer &value)
 
void set_value_string (const std::string &name, const std::string &value)
 
void delete_value (const std::string &name)
 
static void delete_key (PredefinedKey key, const std::string &subkey, bool recursive)
 

Detailed Description

Registry key class.

This class is only available on Windows.

!group=Core/System! !header=core.h!


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