Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Configuration_Win32Registry Class Reference

The win32 registry implementation of a configuration database. More...

`#include <Configuration.h>`

Inheritance diagram for ACE_Configuration_Win32Registry:

[legend]
Collaboration diagram for ACE_Configuration_Win32Registry:

[legend]
List of all members.

## Public Methods
ACE_EXPLICIT | ACE_Configuration_Win32Registry (HKEY hKey)
| constructor for registry configuration database. More...
virtual | ~ACE_Configuration_Win32Registry (void)
| destructor. More...
virtual int | open_section (const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, int create, ACE_Configuration_Section_Key &result)
| Finds a <sub_section> in <base> and places the resulting key in <result>. More...
virtual int | remove_section (const ACE_Configuration_Section_Key &key, const ACE_TCHAR *sub_section, int recursive)
| Removes the <sub_section> from <key>. If recursive is non zero, any subkeys below <sub_section> are remove as well. More...
virtual int | enumerate_values (const ACE_Configuration_Section_Key &key, int Index, ACE_TString &name, VALUETYPE &type)
| method to enumerate through the <name> and <type> of values in a <key>. More...
virtual int | enumerate_sections (const ACE_Configuration_Section_Key &key, int Index, ACE_TString &name)
| method to enumerate through the <name> subsections in <key>. More...
virtual int | set_string_value (const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, const ACE_TString &value)
| sets the value in <key> with <name> to a string of <value>. More...
virtual int | set_integer_value (const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, u_int value)
| sets the value in <key> with <name> to an integer of <value>. More...
virtual int | set_binary_value (const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, const void *data, u_int length)
| sets the value in <key> with <name> to binary data of <data> with <length>. More...
virtual int | get_string_value (const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, ACE_TString &value)
| gets the string value of <name> from <key> and places it in <value>. Returns non zero on error (if value is not a string). More...
virtual int | get_integer_value (const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, u_int &value)
| gets the integer value of <name> from <key> and places it in <value>. Returns non zero on error (if value is not an integer). More...
virtual int | get_binary_value (const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, void *&data, u_int &length)
| gets the binary value of <name> from <key> and places a copy in <data> and sets <length> to the length of the data. More...
virtual int | find_value (const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, VALUETYPE &type)
| checks to see if an entry of <name> is in <key> and places the data type in <type>. More...
virtual int | remove_value (const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name)
| Removes the the value <name> from <key>. returns non zero on error. More...
virtual int | operator== (const ACE_Configuration_Win32Registry &rhs) const
virtual int | operator!= (const ACE_Configuration_Win32Registry &rhs) const
## Static Public Methods
HKEY | resolve_key (HKEY hKey, const ACE_TCHAR *path, int create=1)
| This method traverses <path> through <hKey>. More...
## Protected Methods
int | load_key (const ACE_Configuration_Section_Key &key, HKEY &hKey)
| Gets the HKEY for a configuration section. More...
| ACE_Configuration_Win32Registry (void)
| ACE_Configuration_Win32Registry (const ACE_Configuration_Win32Registry &rhs)
ACE_Configuration_Win32Registry & | operator= (const ACE_Configuration_Win32Registry &rhs)

## Detailed Description

The win32 registry implementation of a configuration database.

The win32 implementation basically makes calls through to the registry functions. The API is very similar so very little work must be done

## Constructor & Destructor Documentation

ACE_EXPLICIT ACE_Configuration_Win32Registry::ACE_Configuration_Win32Registry | ( | HKEY | hKey | ) |

| constructor for registry configuration database. hKey is the base registry key to attach to. This class takes ownership of hKey, it will invoke <RegCloseKey> on it upon destruction.

virtual ACE_Configuration_Win32Registry::~ACE_Configuration_Win32Registry | ( | void |  | ) | `[virtual]`

| destructor.

ACE_Configuration_Win32Registry::ACE_Configuration_Win32Registry | ( | void |  | ) | `[protected]`

ACE_Configuration_Win32Registry::ACE_Configuration_Win32Registry | ( | const ACE_Configuration_Win32Registry & | rhs | ) | `[protected]`

## Member Function Documentation

virtual int ACE_Configuration_Win32Registry::enumerate_sections | ( | const ACE_Configuration_Section_Key & | key,
|  | int | Index,
|  | ACE_TString & | name
| ) | `[virtual]`

| method to enumerate through the <name> subsections in <key>. To begin iteration, <index> must zero. to continue iteration, invoke enumerate_sections again while incrementing index. Each iteration will return the <name> of the sub section. This method returns 0 on success, <0 on error and 1 when there are no more subsections to iterate through. Note - you may not delete or add values while enumerating. If you need to do this, you start the enumeration over again. Reimplemented from ACE_Configuration.

virtual int ACE_Configuration_Win32Registry::enumerate_values | ( | const ACE_Configuration_Section_Key & | key,
|  | int | Index,
|  | ACE_TString & | name,
|  | VALUETYPE & | type
| ) | `[virtual]`

| method to enumerate through the <name> and <type> of values in a <key>. To begin iteration, <index> must be zero. to continue iteration, invoke enumerate_values again while incrementing index. Each iteration will return the <name> of the value and its <type>. This method returns 0 on success, <0 on error and 1 when there are no more values to iterate through. Note - you may not delete or add values while enumerating. If you need to do this, you start the enumeration over again. Reimplemented from ACE_Configuration.

virtual int ACE_Configuration_Win32Registry::find_value | ( | const ACE_Configuration_Section_Key & | key,
|  | const ACE_TCHAR * | name,
|  | VALUETYPE & | type
| ) | `[virtual]`

| checks to see if an entry of <name> is in <key> and places the data type in <type>. Returns 0 on success (entry is found), -1 on error Reimplemented from ACE_Configuration.

virtual int ACE_Configuration_Win32Registry::get_binary_value | ( | const ACE_Configuration_Section_Key & | key,
|  | const ACE_TCHAR * | name,
|  | void *& | data,
|  | u_int & | length
| ) | `[virtual]`

| gets the binary value of <name> from <key> and places a copy in <data> and sets <length> to the length of the data. caller is responsible for deleting <data>. Returns non zero on error (if value is not binary). Reimplemented from ACE_Configuration.

virtual int ACE_Configuration_Win32Registry::get_integer_value | ( | const ACE_Configuration_Section_Key & | key,
|  | const ACE_TCHAR * | name,
|  | u_int & | value
| ) | `[virtual]`

| gets the integer value of <name> from <key> and places it in <value>. Returns non zero on error (if value is not an integer). Reimplemented from ACE_Configuration.

virtual int ACE_Configuration_Win32Registry::get_string_value | ( | const ACE_Configuration_Section_Key & | key,
|  | const ACE_TCHAR * | name,
|  | ACE_TString & | value
| ) | `[virtual]`

| gets the string value of <name> from <key> and places it in <value>. Returns non zero on error (if value is not a string). Reimplemented from ACE_Configuration.

int ACE_Configuration_Win32Registry::load_key | ( | const ACE_Configuration_Section_Key & | key,
|  | HKEY & | hKey
| ) | `[protected]`

| Gets the HKEY for a configuration section.

virtual int ACE_Configuration_Win32Registry::open_section | ( | const ACE_Configuration_Section_Key & | base,
|  | const ACE_TCHAR * | sub_section,
|  | int | create,
|  | ACE_Configuration_Section_Key & | result
| ) | `[virtual]`

| Finds a <sub_section> in <base> and places the resulting key in <result>. If create is non zero, the sub_section will be created if it doesn't exist Reimplemented from ACE_Configuration.

virtual int ACE_Configuration_Win32Registry::operator!= | ( | const ACE_Configuration_Win32Registry & | rhs | ) | const`[virtual]`

ACE_Configuration_Win32Registry& ACE_Configuration_Win32Registry::operator= | ( | const ACE_Configuration_Win32Registry & | rhs | ) | `[protected]`

virtual int ACE_Configuration_Win32Registry::operator== | ( | const ACE_Configuration_Win32Registry & | rhs | ) | const`[virtual]`

virtual int ACE_Configuration_Win32Registry::remove_section | ( | const ACE_Configuration_Section_Key & | key,
|  | const ACE_TCHAR * | sub_section,
|  | int | recursive
| ) | `[virtual]`

| Removes the <sub_section> from <key>. If recursive is non zero, any subkeys below <sub_section> are remove as well. Reimplemented from ACE_Configuration.

virtual int ACE_Configuration_Win32Registry::remove_value | ( | const ACE_Configuration_Section_Key & | key,
|  | const ACE_TCHAR * | name
| ) | `[virtual]`

| Removes the the value <name> from <key>. returns non zero on error. Reimplemented from ACE_Configuration.

HKEY ACE_Configuration_Win32Registry::resolve_key | ( | HKEY | hKey,
|  | const ACE_TCHAR * | path,
|  | int | create = 1
| ) | `[static]`

| This method traverses <path> through <hKey>. It is useful when you want the HKEY for a specific registry key, especially when initializing this implementation. Caller is responsible for closeing this key when it is no longer used. If create is 1 (default) the keys are create if they don't already exist. Returns 0 on error

virtual int ACE_Configuration_Win32Registry::set_binary_value | ( | const ACE_Configuration_Section_Key & | key,
|  | const ACE_TCHAR * | name,
|  | const void * | data,
|  | u_int | length
| ) | `[virtual]`

| sets the value in <key> with <name> to binary data of <data> with <length>. Reimplemented from ACE_Configuration.

virtual int ACE_Configuration_Win32Registry::set_integer_value | ( | const ACE_Configuration_Section_Key & | key,
|  | const ACE_TCHAR * | name,
|  | u_int | value
| ) | `[virtual]`

| sets the value in <key> with <name> to an integer of <value>. Reimplemented from ACE_Configuration.

virtual int ACE_Configuration_Win32Registry::set_string_value | ( | const ACE_Configuration_Section_Key & | key,
|  | const ACE_TCHAR * | name,
|  | const ACE_TString & | value
| ) | `[virtual]`

| sets the value in <key> with <name> to a string of <value>. Reimplemented from ACE_Configuration.

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

- Configuration.h