OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Encapsulates a value-data entry within one registration key. More...
#include <owl/registry.h>
Public Member Functions | |
TRegValue (const TRegKey &key, LPCTSTR name) | |
Creates a registry value object from the specified registry key and name. | |
TRegValue (const TRegKey &key, const tstring &name) | |
String-aware overload If the name is empty, the object will represent the key's default value. | |
TRegValue (const TRegValueIterator &iter) | |
Creates a registry object from the current location of the specified iterator. | |
Accessors | |
LPCTSTR | GetName () const |
Returns a string identifying this value. | |
uint32 | GetDataType () const |
Returns the type code for the data associated with this value. | |
uint32 | GetDataSize () const |
Returns the size in bytes of the data associated with this value. | |
const uint8 * | GetData () const |
Returns the data associated with this value. | |
operator uint32 () const | |
Returns the data associated with this value as a 32-bit unsigned integer. | |
operator uint64 () const | |
Returns the data associated with this value as a 64-bit unsigned integer. | |
operator LPCTSTR () const | |
Returns the data associated with this value as a null-terminated string. | |
Mutators | |
long | Set (uint32 type, const uint8 *data, uint32 dataSize) |
Sets the data associated with this value. | |
long | Set (uint32 value) |
Sets the data associated with this value. | |
long | Set (uint64 value) |
Sets the data associated with this value. | |
long | Set (LPCTSTR value) |
Sets the data associated with this value. | |
long | Set (const tstring &value) |
Sets the data associated with this value. | |
TRegValue & | operator= (uint32 value) |
Forwards to Set (uint32). | |
TRegValue & | operator= (uint64 value) |
Forwards to Set (uint64). | |
TRegValue & | operator= (LPCTSTR value) |
Forwards to Set (LPCTSTR). | |
TRegValue & | operator= (const tstring &value) |
Forwards to Set (const tstring&). | |
long | Delete () |
Removes the value from its associated key, and clears the state of this object. | |
Encapsulates a value-data entry within one registration key.
Definition at line 50 of file registry.h.
Creates a registry value object from the specified registry key and name.
If the name is null or empty, the object will represent the key's default value.
Definition at line 879 of file registry.cpp.
String-aware overload If the name is empty, the object will represent the key's default value.
Definition at line 890 of file registry.cpp.
|
explicit |
Creates a registry object from the current location of the specified iterator.
Definition at line 921 of file registry.cpp.
References _T, and owl::TRegKey::EnumValue().
long owl::TRegValue::Delete | ( | ) |
Removes the value from its associated key, and clears the state of this object.
Definition at line 1133 of file registry.cpp.
References owl::TRegKey::DeleteValue().
const uint8 * owl::TRegValue::GetData | ( | ) | const |
Returns the data associated with this value.
Definition at line 998 of file registry.cpp.
|
inline |
Returns the size in bytes of the data associated with this value.
Definition at line 1119 of file registry.h.
|
inline |
Returns the type code for the data associated with this value.
Definition at line 1111 of file registry.h.
|
inline |
Returns a string identifying this value.
Definition at line 1103 of file registry.h.
owl::TRegValue::operator LPCTSTR | ( | ) | const |
Returns the data associated with this value as a null-terminated string.
Throws an exception if the value is of incompatible type or is otherwise invalid.
Definition at line 965 of file registry.cpp.
owl::TRegValue::operator uint32 | ( | ) | const |
Returns the data associated with this value as a 32-bit unsigned integer.
Throws an exception if the value is of incompatible type.
Definition at line 937 of file registry.cpp.
owl::TRegValue::operator uint64 | ( | ) | const |
Returns the data associated with this value as a 64-bit unsigned integer.
Throws an exception if the value is of incompatible type.
Definition at line 951 of file registry.cpp.
Forwards to Set (const tstring&).
Throws TXRegistry if data assignment fails.
Definition at line 1122 of file registry.cpp.
Forwards to Set (LPCTSTR).
Throws TXRegistry if data assignment fails.
Definition at line 1110 of file registry.cpp.
Forwards to Set (uint32).
Throws TXRegistry if data assignment fails.
Definition at line 1086 of file registry.cpp.
Forwards to Set (uint64).
Throws TXRegistry if data assignment fails.
Definition at line 1098 of file registry.cpp.
Sets the data associated with this value.
If the string contains a terminating null, then it is stored in the registry as a multi-string, i.e. as a REG_MULTI_SZ value type, e.g. "multi\0string\0\0". Else, it is stored as a REG_SZ.
Definition at line 1072 of file registry.cpp.
Sets the data associated with this value.
The type of the value is set to REG_SZ.
Definition at line 1059 of file registry.cpp.
Sets the data associated with this value.
'type' describes the type of the value. 'data' is the address of the data. 'size' specifies the length in characters.
Definition at line 1010 of file registry.cpp.
References owl::TRegKey::SetValue().
Sets the data associated with this value.
The type of the value is set to REG_DWORD.
Definition at line 1035 of file registry.cpp.
References Set().
Sets the data associated with this value.
The type of the value is set to REG_QWORD.
Definition at line 1047 of file registry.cpp.
References Set().