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

CP_FileFilter Class Reference

Class used with the file iterator to filter out the types of files listed. More...

Inheritance diagram for CP_FileFilter:

CP_M_RefCounted List of all members.

Public Member Functions

virtual bool IsAcceptable (const CP_FileSystemSpec &inSpec)
Constructor / Destructor
 CP_FileFilter ()
 Constructor.
 CP_FileFilter (CP_FileFilterSignal *inFilterSignal)
 CP_FileFilter (UInt32 inNumberTypes, UInt32 inFileTypes[])
virtual ~CP_FileFilter () throw ()
 Destructor.
Filter Signal
CP_FileFilterSignalGetFilterSignal ()
void SetFilterSignal (CP_FileFilterSignal *inSignal)

Protected Attributes

CP_FileFilterSignalfFilterSignal
CP_FileTypes_Array fFileTypes

Detailed Description

This class is used with the CP_FileIterator objects to provide finer control of the objects returned by the file iterator.


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_FileFilter::CP_FileFilter  ) 
 

Constructor.

Exceptions:
none 

CP_FileFilter::CP_FileFilter CP_FileFilterSignal inFilterSignal  ) 
 

Constructor.

This version supplies a signal to be called that allows the user full control over how to determine if a file is filtered by this object.

The signal takes 2 parameters:

Parameters:
inFilterSignal Signal called when the filter needs to determine if a file should be listed.
Exceptions:
none 

CP_FileFilter::CP_FileFilter UInt32  inNumberTypes,
UInt32  inFileTypes[]
 

Constructor.

This version supplies an array of file types to be checked for. If a file with a file type listed in he passed in array is encountered, then it is accepted by this filter. Otherwise any file type not matching one of the passed in types is rejected.

Parameters:
inNumberTypes The number of file types in the passed in array.
inFileTypes An array of file types to be checked.
Exceptions:
none 

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

Destructor.

Exceptions:
none 


Member Function Documentation

CP_FileFilterSignal* CP_FileFilter::GetFilterSignal  ) 
 

void CP_FileFilter::SetFilterSignal CP_FileFilterSignal inSignal  ) 
 

bool CP_FileFilter::IsAcceptable const CP_FileSystemSpec inSpec  )  [virtual]
 

Test routine to check if the passed in CP_FileSystemSpec object is to be filtered out.

If the user has supplied a filter signal that will be called to determine if the file is filtered, otherwise the file types set by the user is used.

Parameters:
inSpec The CP_FileSystemSpec object to test.
Exceptions:
none 
Returns:
bool True if the file will be included.

UInt32 CP_M_RefCounted::AddReference  )  const [inherited]
 

Add a reference to our object, returning the new reference count.

Exceptions:
none 
Returns:
UInt32 const Returns the new reference count.

UInt32 CP_M_RefCounted::RemoveReference  )  const [inherited]
 

Remove a reference to our object, returning the new reference count. If the count is 0, then this object is also deleted, and 0 is returned.

Exceptions:
none 
Returns:
UInt32 const Returns the new reference count.

void CP_M_RefCounted::Autorelease  )  const [inherited]
 

Add the object to the topmost auto-release pool. This will ensure that the object is eventually released.

See also:
CP_AutoReleasePool
Exceptions:
none 
Returns:
void

UInt32 CP_M_RefCounted::GetRefCount  )  const [inherited]
 

Returns the current ref count.

Exceptions:
none 
Returns:
UInt32 The current referencce count.


Member Data Documentation

CP_FileFilterSignal* CP_FileFilter::fFilterSignal [protected]
 

CP_FileTypes_Array CP_FileFilter::fFileTypes [protected]
 


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