PixelLightAPI
.
|
#include <Registry.h>
Public Types | |
enum | ERegistry { None = 0, Windows } |
Registry types. More... | |
enum | EKey { KeyNone = 0, KeyClassesRoot, KeyCurrentUser, KeyLocalMachine, KeyUsers } |
Registry keys. More... | |
enum | EAccess { RegRead = 1, RegWrite = 2, RegNotify = 4 } |
Registry access. More... | |
enum | EType { TypeNone = 0, TypeBinary, TypeDWord, TypeString, TypeExpandString, TypeMultiString } |
Registry value types. More... | |
Public Member Functions | |
PLCORE_API | Registry () |
Constructor. | |
PLCORE_API | Registry (EKey nKey, const String &sSubKey, uint32 nAccess) |
Constructor. | |
PLCORE_API | Registry (const Registry &cRegistry) |
Copy constructor. | |
PLCORE_API | ~Registry () |
Destructor. | |
ERegistry | GetRegistryType () const |
Get type of registry. | |
bool | Open (EKey nKey, const String &sSubKey, uint32 nAccess) |
Open registry key. | |
bool | Create (EKey nKey, const String &sSubKey, uint32 nAccess) |
Create a new registry key. | |
bool | Delete () |
Delete the registry key. | |
void | Close () |
Close registry key. | |
EKey | GetOpenKey () const |
Get ID of opened registry key. | |
String | GetOpenSubKey () const |
Get name of opened sub-key. | |
uint32 | GetOpenAccessMode () const |
Get access modes. | |
uint32 | GetNumOfSubKeys () const |
Returns the number of sub-keys. | |
String | GetSubKey (uint32 nIndex) const |
Get a sub-key of the opened registry key. | |
uint32 | GetNumOfValues () const |
Returns the number of values. | |
String | GetValue (uint32 nIndex) const |
Get a value of the opened registry key. | |
EType | GetValueType (const String &sName) const |
Get the type of a given value. | |
String | GetValueString (const String &sName) const |
Get a value of type string. | |
uint32 | GetValueDWord (const String &sName) const |
Get a value of type 'dword'. | |
uint32 | GetValueBinary (const String &sName, uint8 *pBuffer, uint32 nSize) const |
Get a value of type binary. | |
bool | SetValueString (const String &sName, const String &sValue) |
Set a value of type string. | |
bool | SetValueDWord (const String &sName, uint32 nValue) |
Set a value of type 'dword'. | |
bool | SetValueBinary (const String &sName, const uint8 *pBuffer, uint32 nSize) |
Set a value of type binary. | |
void | Flush () |
Write all values to the registry. | |
Registry & | operator= (const Registry &cRegistry) |
Copy operator. |
Registry key handle.
Registry types.
Registry keys.
Registry access.
PLCORE_API PLCore::Registry::Registry | ( | ) |
PLCORE_API PLCore::Registry::Registry | ( | EKey | nKey, |
const String & | sSubKey, | ||
uint32 | nAccess | ||
) |
[in] | nKey | Registry key |
[in] | sSubKey | Name of subkey |
[in] | nAccess | Access modes (combination of 'EAccess' values) |
PLCORE_API PLCore::Registry::Registry | ( | const Registry & | cRegistry | ) |
Copy constructor.
[in] | cRegistry | Registry handle to copy |
PLCORE_API PLCore::Registry::~Registry | ( | ) |
Destructor.
Registry::ERegistry PLCore::Registry::GetRegistryType | ( | ) | const [inline] |
Get type of registry.
bool PLCore::Registry::Open | ( | EKey | nKey, |
const String & | sSubKey, | ||
uint32 | nAccess | ||
) | [inline] |
Open registry key.
[in] | nKey | Registry key |
[in] | sSubKey | Name of subkey |
[in] | nAccess | Access modes (combination of 'EAccess' values) |
bool PLCore::Registry::Create | ( | EKey | nKey, |
const String & | sSubKey, | ||
uint32 | nAccess | ||
) | [inline] |
Create a new registry key.
[in] | nKey | Registry key |
[in] | sSubKey | Name of subkey |
[in] | nAccess | Access modes (combination of 'EAccess' values) |
bool PLCore::Registry::Delete | ( | ) | [inline] |
Delete the registry key.
void PLCore::Registry::Close | ( | ) | [inline] |
Close registry key.
Registry::EKey PLCore::Registry::GetOpenKey | ( | ) | const [inline] |
Get ID of opened registry key.
String PLCore::Registry::GetOpenSubKey | ( | ) | const [inline] |
Get name of opened sub-key.
uint32 PLCore::Registry::GetOpenAccessMode | ( | ) | const [inline] |
Get access modes.
uint32 PLCore::Registry::GetNumOfSubKeys | ( | ) | const [inline] |
Returns the number of sub-keys.
String PLCore::Registry::GetSubKey | ( | uint32 | nIndex | ) | const [inline] |
Get a sub-key of the opened registry key.
[in] | nIndex | Index of the sub-key |
uint32 PLCore::Registry::GetNumOfValues | ( | ) | const [inline] |
Returns the number of values.
String PLCore::Registry::GetValue | ( | uint32 | nIndex | ) | const [inline] |
Get a value of the opened registry key.
[in] | nIndex | Index of the value |
Registry::EType PLCore::Registry::GetValueType | ( | const String & | sName | ) | const [inline] |
String PLCore::Registry::GetValueString | ( | const String & | sName | ) | const [inline] |
uint32 PLCore::Registry::GetValueDWord | ( | const String & | sName | ) | const [inline] |
Get a value of type 'dword'.
Get a value of type dword.
[in] | sName | Name of the value |
uint32 PLCore::Registry::GetValueBinary | ( | const String & | sName, |
uint8 * | pBuffer, | ||
uint32 | nSize | ||
) | const [inline] |
Get a value of type binary.
[in] | sName | Name of the value |
[out] | pBuffer | Buffer to receive the value, if a null pointer, returns the number of bytes required |
[in] | nSize | Size of the given buffer in bytes, ignored if 'pBuffer' is a null pointer |
bool PLCore::Registry::SetValueString | ( | const String & | sName, |
const String & | sValue | ||
) | [inline] |
Set a value of type string.
[in] | sName | Name of the value |
[in] | sValue | String value to set |
bool PLCore::Registry::SetValueDWord | ( | const String & | sName, |
uint32 | nValue | ||
) | [inline] |
Set a value of type 'dword'.
Set a value of type dword.
[in] | sName | Name of the value |
[in] | nValue | Value to set |
bool PLCore::Registry::SetValueBinary | ( | const String & | sName, |
const uint8 * | pBuffer, | ||
uint32 | nSize | ||
) | [inline] |
Set a value of type binary.
[in] | sName | Name of the value |
[in] | pBuffer | Buffer containing the value to set (if a null pointer, the function fails) |
[in] | nSize | Size of the given buffer in bytes |
void PLCore::Registry::Flush | ( | ) | [inline] |
Write all values to the registry.
Copy operator.
[in] | cRegistry | Source registry to copy from |
|