Library: Util
Package: Windows
Header: Poco/Util/WinRegistryConfiguration.h
An implementation of AbstractConfiguration that stores configuration data in the Windows registry.
Removing key is not supported. An attempt to remove a key results in a NotImplementedException being thrown.
Direct Base Classes: AbstractConfiguration
All Base Classes: Poco::RefCountedObject, AbstractConfiguration
Member Functions: ConvertToRegFormat, enumerate, getRaw, removeRaw, setRaw
Inherited Functions: createView, duplicate, enumerate, expand, getBool, getDouble, getInt, getRaw, getRawString, getString, has, hasOption, hasProperty, keys, parseBool, parseInt, referenceCount, release, remove, removeRaw, setBool, setDouble, setInt, setRaw, setRawWithEvent, 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.
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
void enumerate(
const std::string & key,
Keys & range
) const;
bool getRaw(
const std::string & key,
std::string & value
) const;
void removeRaw(
const std::string & key
);
void setRaw(
const std::string & key,
const std::string & value
);