VCF::Registry Class Reference
The registry represents an external data source that applications may store application data in.
More...
#include <vcf/FoundationKit/Registry.h>
Inheritance diagram for VCF::Registry:
List of all members.
Detailed Description
The registry represents an external data source that applications may store application data in.
This may be things like special file names, UI positions, application state data etc. The external data may be anything depending on the OS. In Win32, this represents a connection to the Win32 registry data base.
Constructor & Destructor Documentation
| VCF::Registry::Registry |
( |
|
) |
|
|
| virtual VCF::Registry::~Registry |
( |
|
) |
[virtual] |
|
Member Function Documentation
| bool VCF::Registry::getBoolValue |
( |
const String & |
valuename |
) |
|
|
|
|
Returns a named bool value from the registry and the current open key.
If no such value name exists, or there is some other problem reading the value, the function throws a RegistryException exception. - Parameters:
-
| String | the name of the value under the current open key |
- Returns:
- bool the value returned
|
| String VCF::Registry::getCurrentKey |
( |
|
) |
|
|
| void VCF::Registry::getDataBufValue |
( |
const String & |
valuename, |
|
|
uint32 & |
dataBufferSize, |
|
|
void ** |
dataBuffer |
|
) |
|
|
|
|
Returns a named data buffer from the registry and the current open key.
If no such value name exists, or there is some other problem reading the value, the function throws a RegistryException exception.
Note that the function allocates a data buffer for the caller, however it is the caller's responsibility to delete the data buffer when the caller is finished with it. Example usage Registry reg;
void* buf = NULL;
uint32 dataBufferSize = 0;
try {
reg.getDataBufValue( "MyData", dataBufferSize, &buf );
}
catch ( RegistryException& ) {
System::println( "Oops - an error occured!" );
}
delete buf;
- Parameters:
-
| String | the name of the value under the current open key |
| uint32 | the size of the newly allocated data buffer in bytes |
| void** | a pointer to a data buffer pointer. |
|
| uint32 VCF::Registry::getIntValue |
( |
const String & |
valuename |
) |
|
|
|
|
Returns a named int value from the registry and the current open key.
If no such value name exists, or there is some other problem reading the value, the function throws a RegistryException exception. - Parameters:
-
| String | the name of the value under the current open key |
- Returns:
- uint32 the value returned
|
| String VCF::Registry::getStringValue |
( |
const String & |
valuename |
) |
|
|
|
|
Returns a named string value from the registry and the current open key.
If no such value name exists, or there is some other problem reading the value, the function throws a RegistryException exception. - Parameters:
-
| String | the name of the value under the current open key |
- Returns:
- String the value returned
|
| bool VCF::Registry::openKey |
( |
const String & |
keyname, |
|
|
const bool & |
createIfNonExistant = false |
|
) |
|
|
| bool VCF::Registry::removeKey |
( |
const String & |
keyname |
) |
|
|
| bool VCF::Registry::setValue |
( |
void * |
dataBuffer, |
|
|
const uint32 & |
dataBufferSize, |
|
|
const String & |
valuename |
|
) |
|
|
| bool VCF::Registry::setValue |
( |
const bool & |
value, |
|
|
const String & |
valuename |
|
) |
|
|
| bool VCF::Registry::setValue |
( |
const uint32 & |
value, |
|
|
const String & |
valuename |
|
) |
|
|
| bool VCF::Registry::setValue |
( |
const String & |
value, |
|
|
const String & |
valuename |
|
) |
|
|
The documentation for this class was generated from the following file: