basic_findfile_sequence Class Template Reference
[File System Library]

#include <winstl/filesystem/findfile_sequence.hpp>

Inheritance diagram for basic_findfile_sequence:

stl_collection_tag collection_tag

List of all members.


Detailed Description

template<typename C, typename T = filesystem_traits<C>>
class winstl::basic_findfile_sequence< C, T >

Presents an STL-like sequence interface over the items on the file-system.

Parameters:
C The character type
T The traits type. On translators that support default template arguments this defaults to filesystem_traits<C>
Note:
This class was described in detail in the article "Adapting Windows Enumeration Models to STL Iterator Concepts" (http://www.windevnet.com/documents/win0303a/), in the March 2003 issue of Windows Developer Network (http://windevnet.com).
Examples:

by_library/windows_control_panel/windows_control_panel/windows_control_panel.cpp.


State

bool empty () const
 Indicates whether the sequence is empty.
static size_type max_size ()
 Returns the maximum number of items in the sequence.

Public Types

Member Constants
enum  search_flags {
  includeDots = 0x0008,
  directories = 0x0010,
  files = 0x0020,
  skipReparseDirs = 0x0100,
  skipHiddenFiles = 0x0200,
  skipHiddenDirs = 0x0400,
  relativePath = 0x0800,
  throwOnAccessFailure = 0x2000
}
Member Types
typedef C char_type
 The character type.
typedef T traits_type
 The traits type.
typedef
basic_findfile_sequence< C, T > 
class_type
 The current parameterisation of the type.
typedef
basic_findfile_sequence_value_type
< C, T > 
value_type
 The value type.
typedef
basic_findfile_sequence_const_input_iterator
< C, T, value_type
const_iterator
 The non-mutating (const) iterator type.
typedef value_type const reference
 The reference type.
typedef value_type const const_reference
 The non-mutable (const) reference type.
typedef traits_type::find_data_type find_data_type
 The find-data type.
typedef ws_ptrdiff_t difference_type
 The difference type.
typedef size_t size_type
 The size type.
typedef bool bool_type
 The Boolean type.
typedef int flags_type
 The flags type.

Public Member Functions

Construction
 basic_findfile_sequence (char_type const *pattern, flags_type flags=directories|files)
 Commence a search according to the given search pattern and flags, relative to the current directory.
 basic_findfile_sequence (char_type const *patterns, char_type delim, flags_type flags=directories|files)
 Commence a search according to the given search composite pattern and delimiter, flags, relative to the current directory.
 basic_findfile_sequence (char_type const *directory, char_type const *pattern, flags_type flags=directories|files)
 Commence a search according to the given search pattern and flags, relative to directory.
 basic_findfile_sequence (char_type const *directory, char_type const *patterns, char_type delim, flags_type flags=directories|files)
 Commence a search according to the given search composite pattern and delimiter, flags, relative to directory.
 ~basic_findfile_sequence () throw ()
 Destructor.
Iteration
const_iterator begin () const
 Begins the iteration.
const_iterator end () const
 Ends the iteration.
Attributes
char_type const * get_directory (size_type *plen=NULL) const
 Returns the directory of the search.

Member Typedef Documentation

typedef C char_type

The character type.

typedef T traits_type

The traits type.

The current parameterisation of the type.

The value type.

The non-mutating (const) iterator type.

typedef value_type const reference

The reference type.

typedef value_type const const_reference

The non-mutable (const) reference type.

typedef traits_type::find_data_type find_data_type

The find-data type.

typedef ws_ptrdiff_t difference_type

The difference type.

typedef size_t size_type

The size type.

typedef bool bool_type

The Boolean type.

typedef int flags_type

The flags type.


Member Enumeration Documentation

Enumerator:
includeDots  Causes the search to include the "." and ".." directories, which are elided by default.
directories  Causes the search to include directories.
files  Causes the search to include files.
skipReparseDirs  Causes the search to skip directories that are reparse points.
skipHiddenFiles  Causes the search to skip files marked hidden.
skipHiddenDirs  Causes the search to skip directories marked hidden.
relativePath  Each file entry is presented as relative to the search directory.
throwOnAccessFailure  Causes an exception to be thrown if a directory cannot be access.


Constructor & Destructor Documentation

basic_findfile_sequence ( char_type const *  pattern,
flags_type  flags = directories|files 
) [explicit]

Commence a search according to the given search pattern and flags, relative to the current directory.

basic_findfile_sequence ( char_type const *  patterns,
char_type  delim,
flags_type  flags = directories|files 
)

Commence a search according to the given search composite pattern and delimiter, flags, relative to the current directory.

basic_findfile_sequence ( char_type const *  directory,
char_type const *  pattern,
flags_type  flags = directories|files 
)

Commence a search according to the given search pattern and flags, relative to directory.

basic_findfile_sequence ( char_type const *  directory,
char_type const *  patterns,
char_type  delim,
flags_type  flags = directories|files 
)

Commence a search according to the given search composite pattern and delimiter, flags, relative to directory.

~basic_findfile_sequence (  )  throw ()

Destructor.


Member Function Documentation

const_iterator begin (  )  const

Begins the iteration.

Returns:
An iterator representing the start of the sequence
Examples:
by_library/windows_control_panel/windows_control_panel/windows_control_panel.cpp.

const_iterator end (  )  const

Ends the iteration.

Returns:
An iterator representing the end of the sequence
Examples:
by_library/windows_control_panel/windows_control_panel/windows_control_panel.cpp.

char_type const* get_directory ( size_type plen = NULL  )  const

Returns the directory of the search.

Note:
Will be the empty string for instances created with the first constructor

bool empty (  )  const

Indicates whether the sequence is empty.

static size_type max_size (  )  [static]

Returns the maximum number of items in the sequence.


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

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