#include <Wildcard.h>
Public Types | |
enum | Match { matchNone, matchValid, matchEnd, matchAbort, matchRange, matchLiteral, matchPattern } |
enum | Pattern { patternEmpty = -4, patternClose, patternRange, patternEsc, patternValid } |
Public Member Functions | |
CWildcard () | |
CWildcard (LPCTSTR lpszPattern, bool bCaseSensitive) | |
bool | IsMatch (LPCTSTR lpszText, int *iRetCode=NULL) |
operator LPCTSTR () | |
void | SetPattern (LPCTSTR lpszPattern, bool bCaseSensitive) |
Static Public Member Functions | |
static bool | IsPattern (LPCTSTR lpszPattern) |
static bool | IsPatternValid (LPCTSTR lpszPattern, int *iErrorType=NULL) |
static int | Match (LPCTSTR lpszPattern, LPCTSTR lpszText) |
A class used in the wildcard pattern matching.
Definition at line 47 of file Wildcard.h.
Definition at line 51 of file Wildcard.h.
Definition at line 62 of file Wildcard.h.
|
inline |
Initializes a new instance of the CWildcard class.
Definition at line 140 of file Wildcard.h.
|
inline |
Initializes a new instance of the CWildcard class.
lpszPattern | The pattern to use in matching. |
bCaseSensitive | The case-sensitivity of matching. |
Definition at line 158 of file Wildcard.h.
bool ZipArchiveLib::CWildcard::IsMatch | ( | LPCTSTR | lpszText, |
int * | iRetCode = NULL |
||
) |
Matches lpszText against the pattern. A match means the entire lpszText is used in matching. Set the pattern with the SetPattern method or in the constructor.
lpszText | The string to match against the pattern. |
iRetCode | If not NULL , receives one of the Match values indicating a return code. |
true
, if lpszText matches the pattern.
|
static |
Returns the value indicating whether lpszPattern has any special wildcard characters.
lpszPattern | The pattern to test. |
true
, if the pattern has wildcard characters; false
otherwise.
|
static |
Tests lpszPattern for validity.
lpszPattern | The pattern to test. |
iErrorType | If not NULL , receives one of the Pattern values indicating a return code. |
true
, if lpszPattern is a well formed regular expression according to the CWildcard class syntax (see SetPattern); false
otherwise.
|
static |
Matches lpszText against lpszPattern.
A match means the entire lpszText is used in matching.
lpszPattern | The pattern to match. |
lpszText | The string to match against the pattern. |
|
inline |
Sets the current pattern
lpszPattern | The pattern used in matching. |
bCaseSensitive | The case-sensitivity of matching. |
Definition at line 177 of file Wildcard.h.