#include <Wildcard.h>
|
enum | Match {
matchNone,
matchValid,
matchEnd,
matchAbort,
matchRange,
matchLiteral,
matchPattern
} |
|
enum | Pattern {
patternEmpty = -4,
patternClose,
patternRange,
patternEsc,
patternValid
} |
|
|
| CWildcard () |
|
| CWildcard (LPCTSTR lpszPattern, bool bCaseSensitive) |
|
bool | IsMatch (LPCTSTR lpszText, int *iRetCode=NULL) |
|
| operator LPCTSTR () |
|
void | SetPattern (LPCTSTR lpszPattern, bool bCaseSensitive) |
|
|
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.
- See Also
- Searching in Archive
- Enumerator:
matchNone |
For internal use.
|
matchValid |
A valid match.
|
matchEnd |
Premature end of the pattern string.
|
matchAbort |
Premature end of the text string.
|
matchRange |
Match failure on the [..] construct.
|
matchLiteral |
Match failure on a literal match.
|
matchPattern |
A bad pattern.
|
- Enumerator:
patternEmpty |
The [..] construct is empty.
|
patternClose |
There is no end bracket in the [..] construct.
|
patternRange |
Malformed range in the [..] construct.
|
patternEsc |
There is a literal escape at the end of the pattern.
|
patternValid |
A valid pattern.
|
ZipArchiveLib::CWildcard::CWildcard |
( |
| ) |
|
|
inline |
Initializes a new instance of the CWildcard class.
ZipArchiveLib::CWildcard::CWildcard |
( |
LPCTSTR |
lpszPattern, |
|
|
bool |
bCaseSensitive |
|
) |
| |
|
inline |
Initializes a new instance of the CWildcard class.
- Parameters
-
lpszPattern | The pattern to use in matching. |
bCaseSensitive | The case-sensitivity of matching. |
- See Also
- Searching in Archive
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.
- Parameters
-
lpszText | The string to match against the pattern. |
iRetCode | If not NULL , receives one of the Match values indicating a return code. |
- Returns
true
, if lpszText matches the pattern.
- See Also
- SetPattern
static bool ZipArchiveLib::CWildcard::IsPattern |
( |
LPCTSTR |
lpszPattern | ) |
|
|
static |
Returns the value indicating whether lpszPattern has any special wildcard characters.
- Parameters
-
lpszPattern | The pattern to test. |
- Returns
true
, if the pattern has wildcard characters; false
otherwise.
static bool ZipArchiveLib::CWildcard::IsPatternValid |
( |
LPCTSTR |
lpszPattern, |
|
|
int * |
iErrorType = NULL |
|
) |
| |
|
static |
Tests lpszPattern for validity.
- Parameters
-
lpszPattern | The pattern to test. |
iErrorType | If not NULL , receives one of the Pattern values indicating a return code. |
- Returns
true
, if lpszPattern is a well formed regular expression according to the CWildcard class syntax (see SetPattern); false
otherwise.
Matches lpszText against lpszPattern.
A match means the entire lpszText is used in matching.
- Parameters
-
lpszPattern | The pattern to match. |
lpszText | The string to match against the pattern. |
- Returns
- One of the Match values.
- See Also
- SetPattern
void ZipArchiveLib::CWildcard::SetPattern |
( |
LPCTSTR |
lpszPattern, |
|
|
bool |
bCaseSensitive |
|
) |
| |
|
inline |
Sets the current pattern
- Parameters
-
lpszPattern | The pattern used in matching. |
bCaseSensitive | The case-sensitivity of matching. |
- See Also
- Searching in Archive
The documentation for this class was generated from the following file: