ZipArchiveLib::CNameFileFilter Class Reference

#include <FileFilter.h>

Inheritance diagram for ZipArchiveLib::CNameFileFilter:

Inheritance graph
[legend]

List of all members.

Public Types

enum  AppliesToTypes { toFile = 0x1, toDirectory = 0x2, toAll = toFile | toDirectory }

Public Member Functions

bool AppliesToType (int iType)
 CNameFileFilter (LPCTSTR lpszPattern=_T("*"), bool bInverted=false, int iAppliesToTypes=toFile, bool bCaseSensitive=ZipPlatform::GetSystemCaseSensitivity())
int GetAppliesToTypes ()
bool HandlesFile (const CFileInfo &info)
void SetAppliesToTypes (int iType)

Protected Member Functions

virtual bool Accept (LPCTSTR, LPCTSTR lpszName, const CFileInfo &info)


Detailed Description

A filter that allows filtering files by a filename mask while an enumeration process.

See also:
Compressing Data

Searching in Archive

CDirEnumerator::Start

Definition at line 255 of file FileFilter.h.


Member Enumeration Documentation

The file type to which the CNameFileFilter filter can be applied. You can use the logical OR to combine them.

See also:
SetAppliesToTypes

GetAppliesToTypes

Enumerator:
toFile  Regular files only.
toDirectory  Directories only.
toAll  Both regular files and directories.

Definition at line 270 of file FileFilter.h.


Constructor & Destructor Documentation

ZipArchiveLib::CNameFileFilter::CNameFileFilter ( LPCTSTR  lpszPattern = _T("*"),
bool  bInverted = false,
int  iAppliesToTypes = toFile,
bool  bCaseSensitive = ZipPlatform::GetSystemCaseSensitivity() 
) [inline]

Initializes a new instance of the CNameFileFilter class.

Parameters:
lpszPattern A mask to match against a filename. This filter uses the CWildcard functionality for this purpose.
iAppliesToTypes The file type to which this filter applies. It an be one or more of the AppliesToTypes values.
bInverted Set to true to invert the behavior of the filter or to false for the normal behavior.
bCaseSensitive true, if the matching process is case-sensitive; false otherwise. By default, a system case-sensitivity setting is used.
See also:
Compressing Data

Searching in Archive

SetInverted

SetAppliesToTypes

CWildcard

ZipPlatform::GetSystemCaseSensitivity

Definition at line 306 of file FileFilter.h.


Member Function Documentation

virtual bool ZipArchiveLib::CNameFileFilter::Accept ( LPCTSTR  lpszParentDir,
LPCTSTR  lpszName,
const CFileInfo info 
) [inline, protected, virtual]

This method is directly called by the Evaluate method during an enumeration process.

If this method returns true, the file will later be processed by the CDirEnumerator::Process method. If this method returns false for a directory, the directory is not enumerated at all.

The meaning of the return value can be reversed by the SetInverted method. If this filter handles the inversion internally, the return value from this method is not reversed by the Evaluate method.

Parameters:
lpszParentDir The parent directory containing the file to accept.
lpszName The name of the file to accept (without a path).
info The structure containing the information about the current file.
Returns:
true, if the file is accepted; false otherwise.
See also:
Evaluate

HandlesInversion

CDirEnumerator::Start

CDirEnumerator::Process

Reimplemented from ZipArchiveLib::CFileFilter.

Definition at line 375 of file FileFilter.h.

bool ZipArchiveLib::CNameFileFilter::AppliesToType ( int  iType  )  [inline]

Returns the value indicating whether the filter can be applied to the given iType type.

Parameters:
iType It can be one or more of the AppliesToTypes values.
Returns:
true, if the filter can be applied to iType type; false otherwise.
See also:
SetAppliesToTypes

GetAppliesToTypes

Definition at line 326 of file FileFilter.h.

int ZipArchiveLib::CNameFileFilter::GetAppliesToTypes (  )  [inline]

Returns the file type to which this filter applies.

Returns:
The file type to which this filter applies. It can be one or more of the AppliesToTypes values.
See also:
SetAppliesToTypes

Definition at line 352 of file FileFilter.h.

bool ZipArchiveLib::CNameFileFilter::HandlesFile ( const CFileInfo info  )  [inline, virtual]

Returns the value indicating whether the filter can decide about processing of the info file. The CNameFileFilter returns the value depending on the GetAppliesToTypes value.

Parameters:
info The structure containing the information about the file.
Returns:
true, if the info file will be evaluated by the Evaluate method; false otherwise.
See also:
GetAppliesToTypes

SetAppliesToTypes

Reimplemented from ZipArchiveLib::CFileFilter.

Definition at line 370 of file FileFilter.h.

void ZipArchiveLib::CNameFileFilter::SetAppliesToTypes ( int  iType  )  [inline]

Sets the file type to which this filter applies.

Parameters:
iType The file type to which this filter applies. It can be one or more of the AppliesToTypes values.
See also:
GetAppliesToTypes

Definition at line 341 of file FileFilter.h.


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

The ZipArchive Library Copyright © 2000 - 2009 Artpol Software - Tadeusz Dracz. Generated at Fri Apr 24 16:46:41 2009.