Library: Util
Package: Windows
Header: Poco/Util/WinRegistryConfiguration.h
An implementation of AbstractConfiguration that stores configuration data in the Windows registry.
Direct Base Classes: AbstractConfiguration
All Base Classes: Poco::RefCountedObject, AbstractConfiguration
Member Functions: ConvertToRegFormat, enumerate, getRaw, setRaw
Inherited Functions: createView, duplicate, enumerate, expand, getBool, getDouble, getInt, getRaw, getRawString, getString, hasOption, hasProperty, keys, parseBool, parseInt, referenceCount, release, setBool, setDouble, setInt, setRaw, setString
WinRegistryConfiguration(
    const std::string & rootPath
);
Creates the WinRegistryConfiguration. The rootPath must start with one of the root key names like HKEY_CLASSES_ROOT, e.g. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. All further keys are relativ to the root path and can be dot seperated, e.g. the path MyService.ServiceName will be converted to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyService\ServiceName.
 
   
 Destroys the WinRegistryConfiguration.
 
 void enumerate(
    const std::string & key,
    Keys & range
) const;
Returns in range the names of all subkeys under the given key. If an empty key is passed, all root level keys are returned.
 
 bool getRaw(
    const std::string & key,
    std::string & value
) const;
If the property with the given key exists, stores the property's value in value and returns true. Otherwise, returns false.
Must be overridden by subclasses.
 
 void setRaw(
    const std::string & key,
    const std::string & value
);
Sets the property with the given key to the given value. An already existing value for the key is overwritten.
Must be overridden by subclasses.
 
 std::string ConvertToRegFormat(
    const std::string & key,
    std::string & keyName
) const;
takes a key in the format of A.B.C and converts it to registry format A\B\C, the last entry is the keyName, the rest is returned as path