WvStreams
|
WvGlob – Unified support for filename globbing. ! More...
#include <wvglob.h>
Public Types | |
enum | CFlags { BASIC = 0 , EXTENDED = REG_EXTENDED , ICASE = REG_ICASE , NOSUB = REG_NOSUB , NEWLINE = REG_NEWLINE , 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() More... | |
enum | CFlags { BASIC = 0 , EXTENDED = REG_EXTENDED , ICASE = REG_ICASE , NOSUB = REG_NOSUB , NEWLINE = REG_NEWLINE , 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() More... | |
enum | EFlags { NOTBOL = REG_NOTBOL , NOTEOL = REG_NOTEOL , NOTBOL = REG_NOTBOL , NOTEOL = REG_NOTEOL } |
Flags that affect matching of regex. More... | |
enum | EFlags { NOTBOL = REG_NOTBOL , NOTEOL = REG_NOTEOL , 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. | |
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. | |
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. | |
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 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 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 |
virtual WvString | errstr () const |
void | seterr_both (int _errnum, WvStringParm specialerr) |
void | seterr_both (int _errnum, WVSTRING_FORMAT_DECL) |
void | seterr_both (int _errnum, WvStringParm specialerr) |
void | seterr_both (int _errnum, WVSTRING_FORMAT_DECL) |
void | noerr () |
Reset our error state - there's no error condition anymore. | |
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 | 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 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 |
WvGlob – Unified support for filename globbing. !
Definition at line 15 of file debian/libwvstreams-dev/usr/include/wvstreams/wvglob.h.
|
inherited |
Flags that affect interpretation of the regex; used in Regex() and set()
Definition at line 112 of file debian/libwvstreams-dev/usr/include/wvstreams/wvregex.h.
|
inherited |
Flags that affect interpretation of the regex; used in Regex() and set()
Definition at line 112 of file include/wvregex.h.
|
inherited |
Flags that affect matching of regex.
Used in match() and continuable_match()
Definition at line 130 of file debian/libwvstreams-dev/usr/include/wvstreams/wvregex.h.
|
inherited |
Flags that affect matching of regex.
Used in match() and continuable_match()
Definition at line 130 of file include/wvregex.h.
WvGlob::WvGlob | ( | ) |
WvGlob::WvGlob | ( | WvStringParm | glob | ) |
WvGlob::WvGlob | ( | ) |
Construct an empty glob object.
Matches will always fail until set() is called with a valid glob pattern.
bool WvGlob::set | ( | WvStringParm | glob | ) |
Replace the current regex to match with a new one.
regex | The new regular expression to match |
cflags | CFlags used to compile the regular expression; the defaults are case sensitive, extended RE. |
Definition at line 18 of file wvglob.cc.
References WvErrorBase::isok(), WvRegex::set(), and WvErrorBase::seterr().
Referenced by WvGlob().
|
static |
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 WvString::edit(), and WvFastString::isnull().
bool WvGlob::set | ( | WvStringParm | glob | ) |
Replace the current regex to match with a new one.
regex | The new regular expression to match |
cflags | CFlags used to compile the regular expression; the defaults are case sensitive, extended RE. |
|
static |
Convert a glob string to its regex equvilent.
All wildcards (*, ?, {x,y,z}) are wrapped in parens for capturing into registers
|
inlineinherited |
Match a given string against the compiled regular expression.
string | The string to match |
(remaining) | WvString registers to capture substring matches as specified in the RE |
Definition at line 183 of file debian/libwvstreams-dev/usr/include/wvstreams/wvregex.h.
|
inlineinherited |
Match a given string against the compiled regular expression.
string | The string to match |
eflags | EFlags that affect matching |
(remaining) | WvString registers to capture substring matches as specified in the RE |
Definition at line 197 of file debian/libwvstreams-dev/usr/include/wvstreams/wvregex.h.
|
inlineinherited |
Match a given string against the compiled regular expression.
string | The string to match |
(remaining) | WvString registers to capture substring matches as specified in the RE |
Definition at line 183 of file include/wvregex.h.
|
inlineinherited |
Match a given string against the compiled regular expression.
string | The string to match |
eflags | EFlags that affect matching |
(remaining) | WvString registers to capture substring matches as specified in the RE |
Definition at line 197 of file include/wvregex.h.
|
inherited |
Definition at line 159 of file wverror.cc.
|
inlineinherited |
Definition at line 70 of file debian/libwvstreams-dev/usr/include/wvstreams/wverror.h.
|
inherited |
Definition at line 170 of file wverror.cc.
|
inherited |
Replace the current regex to match with a new one.
regex | The new regular expression to match |
cflags | CFlags used to compile the regular expression; the defaults are case sensitive, extended RE. |
Definition at line 27 of file wvregex.cc.
Referenced by set(), and WvRegex::WvRegex().
|
inlineinherited |
Match a given string against the compiled regular expression, capturing the start and end positions of the matching string.
string | The string to match |
match_start | If the match succeeds, the starting index of the match in string |
match_end | If the match succeeds, the index of the character in string following the last character of the match |
(remaining) | WvString registers to capture substring matches as specified in the RE |
Definition at line 230 of file debian/libwvstreams-dev/usr/include/wvstreams/wvregex.h.
Referenced by strcoll_split().
|
inlineinherited |
Match a given string against the compiled regular expression, capturing the start and end positions of the matching string.
string | The string to match |
eflags | EFlags that affect matching |
match_start | If the match succeeds, the starting index of the match in string |
match_end | If the match succeeds, the index of the character in string following the last character of the match |
(remaining) | WvString registers to capture substring matches as specified in the RE |
Definition at line 250 of file debian/libwvstreams-dev/usr/include/wvstreams/wvregex.h.
|
inlineinherited |
Match a given string against the compiled regular expression, capturing the start and end positions of the matching string.
string | The string to match |
match_start | If the match succeeds, the starting index of the match in string |
match_end | If the match succeeds, the index of the character in string following the last character of the match |
(remaining) | WvString registers to capture substring matches as specified in the RE |
Definition at line 230 of file include/wvregex.h.
|
inlineinherited |
Match a given string against the compiled regular expression, capturing the start and end positions of the matching string.
string | The string to match |
eflags | EFlags that affect matching |
match_start | If the match succeeds, the starting index of the match in string |
match_end | If the match succeeds, the index of the character in string following the last character of the match |
(remaining) | WvString registers to capture substring matches as specified in the RE |
Definition at line 250 of file include/wvregex.h.
|
inlinevirtualinherited |
By default, returns true if geterr() == 0.
Might be overridden so that isok() == false even though no error code has been specified.
Reimplemented in WvBufStream, WvDBusServer, WvDSAKey, WvEncoderStream, WvFdStream, WvIStreamList, WvListener, WvNullListener, WvLog, WvSSLStream, WvStream, WvStreamClone, WvTCPConn, WvTimeoutStream, WvTimeStream, WvBufStream, WvDBusServer, WvDSAKey, WvEncoderStream, WvFdStream, WvIStreamList, WvListener, WvNullListener, WvLog, WvSSLStream, WvStream, WvStreamClone, WvTCPConn, WvTimeoutStream, WvTimeStream, WvReadLineStream, _WvConStream, IWvStream, and IWvStream.
Definition at line 39 of file debian/libwvstreams-dev/usr/include/wvstreams/wverror.h.
Referenced by WvListener::isok(), WvStream::isok(), and set().
|
inlinevirtualinherited |
By default, returns true if geterr() == 0.
Might be overridden so that isok() == false even though no error code has been specified.
Reimplemented in WvBufStream, WvDBusServer, WvDSAKey, WvEncoderStream, WvFdStream, WvIStreamList, WvListener, WvNullListener, WvLog, WvSSLStream, WvStream, WvStreamClone, WvTCPConn, WvTimeoutStream, WvTimeStream, WvBufStream, WvDBusServer, WvDSAKey, WvEncoderStream, WvFdStream, WvIStreamList, WvListener, WvNullListener, WvLog, WvSSLStream, WvStream, WvStreamClone, WvTCPConn, WvTimeoutStream, WvTimeStream, WvReadLineStream, _WvConStream, IWvStream, and IWvStream.
Definition at line 39 of file include/wverror.h.
|
inlinevirtualinherited |
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 WvDBusServer, WvStreamClone, WvDBusServer, and WvStreamClone.
Definition at line 48 of file debian/libwvstreams-dev/usr/include/wvstreams/wverror.h.
Referenced by UniIniGen::commit(), UniFileSystemGen::get(), WvDBusServer::geterr(), WvStreamClone::geterr(), WvEncoderStream::isok(), UniConfDaemon::listen(), UniIniGen::refresh(), WvStream::seterr(), and WvMagicCircle::WvMagicCircle().
|
inlinevirtualinherited |
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 WvDBusServer, WvStreamClone, WvDBusServer, and WvStreamClone.
Definition at line 48 of file include/wverror.h.
|
virtualinherited |
Definition at line 127 of file wverror.cc.
|
staticinherited |
A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32).
Definition at line 91 of file wverror.cc.
References WvErrorBase::strerror().
Referenced by WvLog::perror(), WvErrorBase::strerror(), WvSSLStream::uread(), and WvSSLStream::uwrite().
|
inherited |
Definition at line 179 of file wverror.cc.
|
inlineinherited |
Definition at line 73 of file debian/libwvstreams-dev/usr/include/wvstreams/wverror.h.
|
inlineinherited |
Definition at line 73 of file include/wverror.h.
|
inlineinherited |
Reset our error state - there's no error condition anymore.
Definition at line 78 of file debian/libwvstreams-dev/usr/include/wvstreams/wverror.h.
|
inlineinherited |
Reset our error state - there's no error condition anymore.
Definition at line 78 of file include/wverror.h.
|
staticinherited |
Definition at line 124 of file debian/libwvstreams-dev/usr/include/wvstreams/wvregex.h.
|
staticinherited |
Definition at line 137 of file debian/libwvstreams-dev/usr/include/wvstreams/wvregex.h.
|
staticinherited |
Internal use only.
Definition at line 142 of file debian/libwvstreams-dev/usr/include/wvstreams/wvregex.h.
|
protectedinherited |
Definition at line 26 of file debian/libwvstreams-dev/usr/include/wvstreams/wverror.h.
|
protectedinherited |
Definition at line 27 of file debian/libwvstreams-dev/usr/include/wvstreams/wverror.h.