STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

basic_findfile_sequence Class Template Reference
[File-System Library (WinSTL)]

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

#include <winstl_findfile_sequence.h>

List of all members.

Public 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_input_iterator
 The non-mutating (const) iterator type supporting the Input Iterator concept.

typedef const_input_iterator 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 ws_size_t size_type
 The size type.

enum  {
  includeDots = 0x0008,
  directories = 0x0010,
  files = 0x0020
}

Public Methods

 basic_findfile_sequence (char_type const *searchSpec, ws_int_t flags=directories|files)
 Commence a search according to the given search pattern and flags.

 basic_findfile_sequence (char_type const *directory, char_type const *searchSpec, ws_int_t flags=directories|files)
 Commence a search according to the given search pattern and flags, relative to directory.

 ~basic_findfile_sequence () winstl_throw_0()
 Destructor.

const_iterator begin () const
 Begins the iteration.

const_iterator end () const
 Ends the iteration.

char_type const * get_directory () const
 Returns the directory of the search.

ws_bool_t empty () const
 Indicates whether the sequence is empty.


Static Public Methods

size_type max_size ()
 Returns the maximum number of items in the sequence.


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).


Member Typedef Documentation

typedef C char_type
 

The character type.

typedef basic_findfile_sequence<C, T> class_type
 

The current parameterisation of the type.

typedef basic_findfile_sequence_const_input_iterator<C, T, value_type> const_input_iterator
 

The non-mutating (const) iterator type supporting the Input Iterator concept.

typedef const_input_iterator const_iterator
 

The non-mutating (const) iterator type.

typedef value_type const const_reference
 

The non-mutable (const) reference type.

typedef ws_ptrdiff_t difference_type
 

The difference type.

typedef traits_type::find_data_type find_data_type
 

The find-data type.

typedef value_type const reference
 

The reference type.

typedef ws_size_t size_type
 

The size type.

typedef T traits_type
 

The traits type.

typedef basic_findfile_sequence_value_type<C, T> value_type
 

The value type.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
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.


Constructor & Destructor Documentation

basic_findfile_sequence char_type const *    searchSpec,
ws_int_t    flags = directories|files
[explicit]
 

Commence a search according to the given search pattern and flags.

basic_findfile_sequence char_type const *    directory,
char_type const *    searchSpec,
ws_int_t    flags = directories|files
 

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

~basic_findfile_sequence  
 

Destructor.


Member Function Documentation

const_iterator begin  
 

Begins the iteration.

Returns:
An iterator representing the start of the sequence

ws_bool_t empty  
 

Indicates whether the sequence is empty.

const_iterator end  
 

Ends the iteration.

Returns:
An iterator representing the end of the sequence

char_type const* get_directory  
 

Returns the directory of the search.

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

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:

STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004