Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
comet::registry::value< error_policy > Class Template Reference
#include <comet/registry.h>
Public Member Functions | |
| bool | exists () const |
| This can be used to query if a value exists. | |
| value (const impl::key_base &key, const tstring &value_name) | |
| void | swap (value &rhs) |
| Non throwing swap. | |
| void | get (DWORD *type, BYTE *buffer, DWORD *number_bytes) const |
| Get a value of any type. The arguments are passed directly to RegQueryValueEx. | |
| LONG | get_nothrow (DWORD *type, BYTE *buffer, DWORD *number_bytes) const |
| Get a value - return errcode. | |
| void | set (DWORD type, const BYTE *buffer, DWORD number_bytes) |
| Set a value arbitrarily. The arguments are passed directly to RegSetValueEx. | |
| LONG | set_nothrow (DWORD type, const BYTE *buffer, DWORD number_bytes) |
| Set a value - return errcode. | |
| tstring | str () const |
| Interpret value as a string. | |
| tstring | str (const tstring &default_val) const |
| operator tstring () const | |
| Implicit conversion to string. | |
| operator DWORD () const | |
| Implicit conversion to unsigned int. | |
| DWORD | dword () const |
| Interpret value as a DWORD. | |
| DWORD | dword (DWORD default_val) const |
| operator std::pair () const | |
| operator std::pair () const | |
| value & | operator= (const tstring &rhs) |
| Assign a string value and set the type to REG_SZ. | |
| value & | operator= (const DWORD &rhs) |
| Assign a DWORD value and set the type to REG_DWORD. | |
| value & | operator= (int rhs) |
| Assign an integer value - sets type to REG_DWORD. | |
| value & | operator= (const value &rhs) |
| Assign value from another registry value. | |
Detailed Description
template<class error_policy>
class comet::registry::value< error_policy >
A pseudo-reference to a value in the registry. Assign to instances of this object to make changes to the corresponding registry value Read from this object to read values from the registry.
Member Function Documentation
|
|||||||||
|
Interpret value as a DWORD.
|
|
|||||||||
|
This can be used to query if a value exists. For example: string get_thread_model(const regkey &clsid_key) { regkey::value_type t = clsid_key.open("InprocServer32", KEY_READ)["ThreadingModel"]; if(t.exists()) return t.str(); else return "Single"; } |
|
||||||||||||||||||||
|
Get a value of any type. The arguments are passed directly to RegQueryValueEx.
|
|
||||||||||||||||||||
|
Get a value - return errcode.
|
|
||||||||||
|
Assign value from another registry value. Because value objects always refer to a part of the registry, this effectively copies a registry value from somewhere else in the registry. |
|
||||||||||||||||||||
|
Set a value arbitrarily. The arguments are passed directly to RegSetValueEx.
|
|
||||||||||||||||||||
|
Set a value - return errcode.
|
|
|||||||||
|
Interpret value as a string.
|
|
||||||||||
|
Non throwing swap. This is for efficiency only. operator= is overloaded to have a different meaning (copying one part of the registry to another part of the registry). |
The documentation for this class was generated from the following file: