Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_FileIterator Class Reference

Class used to iterate and list files in a directory in the underlying OSs file system. More...

List of all members.

Public Member Functions

Constructor / Destructor
 CP_FileIterator ()
 Constructor.
 CP_FileIterator (const CP_FileSystemSpec &inParentDirectory, CP_FileFilter *inFilter=NULL)
 CP_FileIterator (const CP_FileIterator &inFilterIterator)
virtual ~CP_FileIterator () throw ()
 Destructor.
Getters
CP_FileSystemSpec GetDirectory () const
File Specs List
CP_FileSystemSpec_Array GetFileSpecs ()
File Filter
CP_FileFilterGetFileFilter ()
void SetFileFilter (CP_FileFilter *inFilter)

Protected Member Functions

Iteration
virtual void IterateDirectory (const CP_FileSystemSpec &inParentDirectory)
Iteration
virtual void IterateDirectory (const CP_FileSystemSpec &inParentDirectory)
Iteration
virtual void IterateDirectory (const CP_FileSystemSpec &inParentDirectory)

Protected Attributes

CP_FileSystemSpec fParentDirectory
CP_FileSystemSpec_Array fFileSpecs
CP_FileFilterfFileFilter


Detailed Description

The user can supply an optional CP_FileFilter object to control which files are listed.


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_FileIterator::CP_FileIterator  ) 
 

Constructor.

Exceptions:
none 

CP_FileIterator::CP_FileIterator const CP_FileSystemSpec inParentDirectory,
CP_FileFilter inFilter = NULL
 

Constructor.

Parameters:
inParentDirectory CP_FileSystemSpec object that specifies the directory to be used to find files in.
inFilter CP_FileFilter object to control which files are listed.
Exceptions:
none 

CP_FileIterator::CP_FileIterator const CP_FileIterator inIterator  ) 
 

Copy constructor.

Parameters:
inIterator CP_FileIterator to copy fields from.
Exceptions:
none 

CP_FileIterator::~CP_FileIterator  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

CP_FileSystemSpec CP_FileIterator::GetDirectory  )  const
 

Returns a CP_FileSystemSpec that represents the directory that this iterator is being used in currently.

Exceptions:
none 
Returns:
CP_FileSystemSpec const The directory being iterated over.

CP_FileSystemSpec_Array CP_FileIterator::GetFileSpecs  ) 
 

Returns a CP_FileSystemSpec_Array that contains a list of CP_FileSystemSpecs for each item in the directory that matches the filters criteria if one is installed, otherwise all file system objects are returned.

Exceptions:
none 
Returns:
CP_FileSystemSpec_Array The list of files matching the filters criteria.

CP_FileFilter* CP_FileIterator::GetFileFilter  ) 
 

Returns the CP_FileFilter object used with this iterator. NULL is returned if this iterator is not using a file filter.

Exceptions:
none 
Returns:
CP_FileFilter * The file filter object used with this iterator.

void CP_FileIterator::SetFileFilter CP_FileFilter inFilter  ) 
 

Sets the CP_FileFilter object to use with this iterator. When this object has a filter, the filter controls which files will be returned.

Parameters:
inFilter The CP_FileFilter to use with this object. It is safe to pass NULL here, which indicates you want to not use any filter.
Exceptions:
none 
Returns:
void

void CP_FileIterator::IterateDirectory const CP_FileSystemSpec inParentDirectory  )  [protected, virtual]
 

CP_FileFilter object to control which files are listed.

virtual void CP_FileIterator::IterateDirectory const CP_FileSystemSpec inParentDirectory  )  [protected, virtual]
 

virtual void CP_FileIterator::IterateDirectory const CP_FileSystemSpec inParentDirectory  )  [protected, virtual]
 


Member Data Documentation

CP_FileSystemSpec CP_FileIterator::fParentDirectory [protected]
 

CP_FileSystemSpec_Array CP_FileIterator::fFileSpecs [protected]
 

The directory we are searching in.

CP_FileFilter* CP_FileIterator::fFileFilter [protected]
 

List of CP_FileSystemSpecs that match the filter, if any. Otherwise, all files.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:40 2005 for CPLAT by  doxygen 1.4.0