basic_reg_key_sequence Class Template Reference
[Windows Registry Library]

#include <winstl/registry/reg_key_sequence.hpp>

Inheritance diagram for basic_reg_key_sequence:

stl_collection_tag collection_tag

List of all members.


Detailed Description

template<typename C, typename T = reg_traits<C>, typename A = processheap_allocator<C>>
class winstl::basic_reg_key_sequence< C, T, A >

Presents an STL-like sequence interface over the sub-keys of a given registry key.

Parameters:
C The character type
T The traits type. On translators that support default template arguments this defaults to reg_traits<C>
A The allocator type. On translators that support default template arguments this defaults to processheap_allocator<C>

Member Types

typedef C char_type
 The character type.
typedef T traits_type
 The traits type.
typedef A allocator_type
 The allocator type.
typedef basic_reg_key_sequence
< C, T, A > 
class_type
 The current parameterisation of the type.
typedef basic_reg_key< C, T, A > key_type
 The key type.
typedef key_type value_type
 The value type.
typedef traits_type::size_type size_type
 The size type.
typedef basic_reg_key< C, T, A > reg_key_type
 The reg key type.
typedef
basic_reg_key_sequence_iterator
< C, T, value_type, A > 
iterator
 The mutating (non-const) iterator type.
typedef iterator const_iterator
 The non-mutating (const) iterator type.
typedef key_typereference
 The reference type.
typedef key_type const & const_reference
 The non-mutable (const) reference type.
typedef traits_type::hkey_type hkey_type
 The hkey type.
typedef ws_ptrdiff_t difference_type
 The difference type.
typedef bool bool_type
 The non-mutating (const) reverse iterator type.
typedef hkey_type resource_type

Public Member Functions

Construction
 basic_reg_key_sequence (hkey_type hkey, char_type const *sub_key_name, REGSAM accessMask=KEY_READ)
 Creates an instance which provides access to the sub-keys of the named sub-key of hkey.
 basic_reg_key_sequence (hkey_type hkey, char_type const *sub_key_name, REGSAM accessMask, bool_type bMonitorExternalInvalidation)
 Creates an instance which provides access to the sub-keys of the named sub-key of hkey.
 basic_reg_key_sequence (reg_key_type const &key)
 Creates an instance which provides access to the sub-keys of of key.
 basic_reg_key_sequence (reg_key_type const &key, REGSAM accessMask)
 Creates an instance which provides access to the sub-keys of of key.
 basic_reg_key_sequence (reg_key_type const &key, REGSAM accessMask, bool_type bMonitorExternalInvalidation)
 Creates an instance which provides access to the sub-keys of of key.
 ~basic_reg_key_sequence () throw ()
 Destructor.
Iteration
iterator begin ()
 Begins the iteration.
iterator end ()
 Ends the iteration.
Attributes
size_type current_size () const
 Returns the number of sub-keys.
size_type size () const
 Returns the number of sub-keys.
bool empty () const
 Evalulates whether there are no sub-keys.
hkey_type get_key_handle () const
 The key handle.
hkey_type get () const
 The key handle.

Member Typedef Documentation

typedef C char_type

The character type.

typedef T traits_type

The traits type.

typedef A allocator_type

The allocator type.

The current parameterisation of the type.

typedef basic_reg_key<C, T, A> key_type

The key type.

The value type.

typedef traits_type::size_type size_type

The size type.

typedef basic_reg_key<C, T, A> reg_key_type

The reg key type.

The mutating (non-const) iterator type.

The non-mutating (const) iterator type.

Note:
This is retained for backwards compatibility

typedef key_type& reference

The reference type.

typedef key_type const& const_reference

The non-mutable (const) reference type.

typedef traits_type::hkey_type hkey_type

The hkey type.

typedef ws_ptrdiff_t difference_type

The difference type.

typedef bool bool_type

The non-mutating (const) reverse iterator type.

The Boolean type


Constructor & Destructor Documentation

basic_reg_key_sequence ( hkey_type  hkey,
char_type const *  sub_key_name,
REGSAM  accessMask = KEY_READ 
)

Creates an instance which provides access to the sub-keys of the named sub-key of hkey.

Parameters:
hkey A registry key handle representing the parent of sub_key_name
sub_key_name The name of the sub-key whose sub-keys will be enumerated. If sub_key_name is NULL or the empty string, then the sub-keys of hkey will be enumerated
accessMask The security access mask with which the key (hkey + sub_key_name) will be opened. Defaults to KEY_READ.
Note:
If accessMask contains KEY_NOTIFY, this method will construct a sequence whose iterators monitor for external iterator invalidation. Use the alternative (four-parameter) constructor form to explicitly suppress monitoring.

basic_reg_key_sequence ( hkey_type  hkey,
char_type const *  sub_key_name,
REGSAM  accessMask,
bool_type  bMonitorExternalInvalidation 
)

Creates an instance which provides access to the sub-keys of the named sub-key of hkey.

Parameters:
hkey A registry key handle representing the parent of sub_key_name
sub_key_name The name of the sub-key whose sub-keys will be enumerated. If sub_key_name is NULL or the empty string, then the sub-keys of hkey will be enumerated
accessMask The security access mask with which the key (hkey + sub_key_name) will be opened. Defaults to KEY_READ
bMonitorExternalInvalidation If non-zero, the iterators will monitor for external iterator invalidation, throwing an instance of registry_exception (or a derived class) when any sub-keys are added or removed
Note:
The bMonitorExternalInvalidation parameter overrides the accessMask parameter. i.e. if bMonitorExternalInvalidation is non-zero then accessMask is combined with KEY_NOTIFY. If not, then KEY_NOTIFY is stripped from accessMask.

basic_reg_key_sequence ( reg_key_type const &  key  )  [explicit]

Creates an instance which provides access to the sub-keys of of key.

Parameters:
key A registry key handle representing the parent of sub_key_name
Note:
If the key's access mask contains KEY_NOTIFY, this method will construct a sequence whose iterators monitor for external iterator invalidation. Use the alternative (three-parameter) constructor form to explicitly suppress monitoring.

basic_reg_key_sequence ( reg_key_type const &  key,
REGSAM  accessMask 
)

Creates an instance which provides access to the sub-keys of of key.

Parameters:
key A registry key handle representing the parent of sub_key_name
accessMask The security access mask with which the key will be used. Defaults to KEY_READ
Note:
If accessMask contains KEY_NOTIFY, this method will construct a sequence whose iterators monitor for external iterator invalidation. Use the alternative (three-parameter) constructor form to explicitly suppress monitoring.

basic_reg_key_sequence ( reg_key_type const &  key,
REGSAM  accessMask,
bool_type  bMonitorExternalInvalidation 
)

Creates an instance which provides access to the sub-keys of of key.

Parameters:
key A registry key handle representing the parent of sub_key_name
accessMask The security access mask with which the key will be used. Defaults to KEY_READ
bMonitorExternalInvalidation If non-zero, the iterators will monitor for external iterator invalidation, throwing an instance of registry_exception (or a derived class) when any sub-keys are added or removed
Note:
The bMonitorExternalInvalidation parameter overrides the accessMask parameter. i.e. if bMonitorExternalInvalidation is non-zero then accessMask is combined with KEY_NOTIFY. If not, then KEY_NOTIFY is stripped from accessMask.

~basic_reg_key_sequence (  )  throw ()

Destructor.


Member Function Documentation

iterator begin (  ) 

Begins the iteration.

Returns:
An iterator representing the start of the sequence

iterator end (  ) 

Ends the iteration.

Returns:
An iterator representing the end of the sequence

size_type current_size (  )  const

Returns the number of sub-keys.

Note:
This gives a result valid only at the epoch of the call. A subsequent call may return a different result.

size_type size (  )  const

Returns the number of sub-keys.

Deprecated:
This is equivalent to current_size()

bool empty (  )  const

Evalulates whether there are no sub-keys.

hkey_type get_key_handle (  )  const

The key handle.

hkey_type get (  )  const

The key handle.


The documentation for this class was generated from the following file:

Generated on Thu Jun 10 08:59:34 2010 for STLSoft by  doxygen 1.5.6