Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
comet::registry::info< error_policy > Class Template Reference
#include <comet/registry.h>
Public Types | |
|
typedef collection< error_policy, value_iterator< error_policy >, const_value_iterator< error_policy > > | values_type |
| Type returned by values(). | |
|
typedef collection< error_policy, name_iterator< error_policy, impl::next_value > > | value_names_type |
| Type returned by value_names(). | |
|
typedef collection< error_policy, name_iterator< error_policy, impl::next_key > > | subkeys_type |
| Type returned by subkeys(). | |
Public Member Functions | |
| info (const impl::key_base &key) | |
| void | swap (info &rhs) |
| Exception safe swap. | |
| size_t | num_values () const |
| Number of values under this key (excluding the default value). | |
| size_t | num_subkeys () const |
| Number of subkeys under this key. | |
| size_t | max_value_name () const |
| Length of the longest value_name under this key (in TCHARs). | |
| size_t | max_subkey_name () const |
| Length of the longest subkey name under this key (in TCHARs). | |
| values_type | values () const |
| Return the collection of values. | |
| value_names_type | value_names () const |
| Returns the collection of value names. | |
| subkeys_type | subkeys () const |
| Returns the collection of subkey names. | |
Detailed Description
template<typename error_policy>
class comet::registry::info< error_policy >
Structure returned by regkey.enumerate()
Member Function Documentation
|
|||||||||
|
Returns the collection of subkey names. The value_type of the collection is std::basic_string<TCHAR>. Example - copy all subkeys of HKEY_LOCAL_MACHINE into a list regkey::info_type info(regkey(HKEY_LOCAL_MACHINE).enumerate()); vector<string> subkey_names; copy(info.subkeys().begin(), info.subkeys().end(), back_inserter(subkey_names)); |
|
|||||||||
|
Returns the collection of value names. The value_type of the collection is std::basic_string<TCHAR>. Example - copy all value names of HKEY_LOCAL_MACHINE into a list regkey::info_type info(regkey(HKEY_LOCAL_MACHINE).enumerate()); vector<string> value_names; copy(info.value_names().begin(), info.value_names().end(), back_inserter(value_names)); |
|
|||||||||
|
Return the collection of values. The value_type of the collection is std::pair<const std::basic_string<TCHAR>, regkey::mapped_type> regkey::mapped_type has implicit conversions to unsigned int and std::basic_string however. Example - copy all value-name/value pairs into a map typedef std::basic_string<TCHAR> tstring; regkey::info_type info(regkey(HKEY_LOCAL_MACHINE).enumerate()); map<tstring, regkey::mapped_type> values_map; copy(info.values().begin(), info.values().end(), inserter(values_map, values_map.end())); |
The documentation for this class was generated from the following file: