#include <wvglob.h>
Inheritance diagram for WvGlob:
Definition at line 15 of file wvglob.h.
Public Types | |
enum | CFlags { BASIC = 0, EXTENDED = REG_EXTENDED, ICASE = REG_ICASE, NOSUB = REG_NOSUB, NEWLINE = REG_NEWLINE } |
Flags that affect interpretation of the regex; used in Regex() and set(). | |
enum | EFlags { NOTBOL = REG_NOTBOL, NOTEOL = REG_NOTEOL } |
Flags that affect matching of regex. More... | |
Public Member Functions | |
WvGlob () | |
Construct an empty glob object. | |
WvGlob (WvStringParm glob) | |
Construct an glob object for the given pattern. | |
bool | set (WvStringParm glob) |
Replace the current regex to match with a new one. | |
bool | match (WvStringParm string, WVREGEX_REGS_DECL) const |
Match a given string against the compiled regular expression. | |
bool | match (WvStringParm string, int eflags, WVREGEX_REGS_DECL) const |
Match a given string against the compiled regular expression. | |
void | seterr (WvStringParm specialerr) |
void | seterr (WVSTRING_FORMAT_DECL) |
void | seterr (const WvErrorBase &err) |
bool | set (WvStringParm regex, int cflags=default_cflags) |
Replace the current regex to match with a new one. | |
bool | continuable_match (WvStringParm string, int &match_start, int &match_end, WVREGEX_REGS_DECL) const |
Match a given string against the compiled regular expression, capturing the start and end positions of the matching string. | |
bool | continuable_match (WvStringParm string, int eflags, int &match_start, int &match_end, WVREGEX_REGS_DECL) const |
Match a given string against the compiled regular expression, capturing the start and end positions of the matching string. | |
virtual bool | isok () const |
By default, returns true if geterr() == 0. | |
virtual int | geterr () const |
If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. | |
virtual WvString | errstr () const |
void | seterr_both (int _errnum, WvStringParm specialerr) |
void | noerr () |
Reset our error state - there's no error condition anymore. | |
Static Public Member Functions | |
static WvString | glob_to_regex (WvStringParm glob, WvString *errstr) |
Convert a glob string to its regex equvilent. | |
static WvString | strerror (int errnum) |
A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32). | |
Static Public Attributes | |
static const int | default_cflags = WvRegex::EXTENDED |
static const int | default_eflags = 0 |
static WvString | __wvre_null_reg |
Internal use only. | |
Protected Attributes | |
int | errnum |
WvString | errstring |
|
Flags that affect matching of regex. Used in match() and continuable_match() |
|
Construct an empty glob object. Matches will always fail until set() is called with a valid glob pattern. |
|
Replace the current regex to match with a new one.
Definition at line 18 of file wvglob.cc. References WvErrorBase::errstr(), WvErrorBase::isok(), WvRegex::set(), and WvErrorBase::seterr(). Referenced by WvGlob(). |
|
Convert a glob string to its regex equvilent. All wildcards (*, ?, {x,y,z}) are wrapped in parens for capturing into registers Definition at line 287 of file wvglob.cc. References WvErrorBase::errstr(), WvFastString::isnull(), and WvFastString::null. |
|
Match a given string against the compiled regular expression.
//!
Definition at line 183 of file wvregex.h. References WvRegex::default_eflags. Referenced by WvGlobDirIter::next(). |
|
Match a given string against the compiled regular expression.
|
|
Replace the current regex to match with a new one.
Definition at line 27 of file wvregex.cc. Referenced by set(), and WvRegex::WvRegex(). |
|
Match a given string against the compiled regular expression, capturing the start and end positions of the matching string.
//!
Definition at line 230 of file wvregex.h. References WvRegex::default_eflags. Referenced by strcoll_split(). |
|
Match a given string against the compiled regular expression, capturing the start and end positions of the matching string.
|
|
By default, returns true if geterr() == 0. Might be overridden so that isok() == false even though no error code has been specified. Reimplemented in IWvStream, WvBufStream, WvDSAKey, WvDsp, WvEncoderStream, WvFdStream, WvHTTPStream, WvIStreamList, WvLog, WvRSAKey, WvSSLStream, WvStream, WvStreamClone, WvTCPConn, WvTimeoutStream, WvTimeStream, WvFileWatcher, WvX509Mgr, and _WvConStream. Definition at line 39 of file wverror.h. References WvErrorBase::errnum. Referenced by WvX509Mgr::isok(), WvStream::isok(), WvCRLMgr::isok(), set(), and WvGlobDirIter::WvGlobDirIter(). |
|
If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. If isok() is true, returns an undefined number. Reimplemented in WvHTTPStream, WvStreamClone, and WvX509Mgr. Definition at line 48 of file wverror.h. References WvErrorBase::errnum. Referenced by UniIniGen::commit(), WvX509Mgr::errstr(), WvStreamClone::errstr(), WvErrorBase::errstr(), WvError::get(), UniFileSystemGen::get(), WvX509Mgr::geterr(), WvStreamClone::geterr(), WvEncoderStream::isok(), WvConf::load_file(), WvConf::save(), WvStream::seterr(), WvErrorBase::seterr(), WvMagicCircle::WvMagicCircle(), and WvHttpPool::~WvHttpPool(). |