#include <Wildcard.h>
|
| enum | Match {
matchNone
, matchValid
, matchEnd
, matchAbort
,
matchRange
, matchLiteral
, matchPattern
} |
| enum | Pattern {
patternEmpty = -4
, patternClose
, patternRange
, patternEsc
,
patternValid
} |
|
| 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
◆ Match
Match result codes.
| 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.
|
◆ Pattern
Pattern validation codes.
| 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.
|
◆ CWildcard() [1/2]
| ZipArchiveLib::CWildcard::CWildcard |
( |
| ) |
|
|
inline |
Initializes a new instance of the CWildcard class.
◆ CWildcard() [2/2]
| 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
◆ IsMatch()
| 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
◆ IsPattern()
| 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.
◆ IsPatternValid()
| 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.
◆ Match()
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
◆ operator LPCTSTR()
| ZipArchiveLib::CWildcard::operator LPCTSTR |
( |
| ) |
|
|
inline |
Conversion operator to LPCTSTR.
- Returns
- The current pattern as a string.
◆ 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: