28 GlobExpr(
const char* s = 0,
bool casesens=
true )
29 : expr_(
""),
errmsg_(0), ci_(!casesens) {
set(s); }
31 : expr_(ge.expr_),
errmsg_(0), ci_(ge.ci_) {}
36 {
return expr_ == ge.
expr_ && ci_ == ge.
ci_; }
40 void set(
const char*);
41 inline operator const char*()
const 42 {
return (
const char*)expr_; }
44 inline bool matches(
const char* t )
const 45 {
return matches( expr_, t,
46 const_cast<const char*&>(
errmsg_), ci_ ); }
50 static bool matches(
const char* expression,
const char* txt,
51 const char*& errmsg_if_expression_is_incorrect,
60 static bool starMatches(
const char*,
const char*,
const char*&,
bool);
#define mExpClass(module)
Definition: commondefs.h:157
GlobExpr(const char *s=0, bool casesens=true)
Definition: globexpr.h:28
GlobExpr & operator=(const GlobExpr &ge)
Definition: globexpr.h:32
GlobExpr(const GlobExpr &ge)
Definition: globexpr.h:30
BufferString expr_
Definition: globexpr.h:56
bool matches(const char *t) const
Definition: globexpr.h:44
bool operator==(const GlobExpr &ge) const
Definition: globexpr.h:35
const char * errmsg_
Definition: globexpr.h:57
Glob-expression matching like UNIX shells.
Definition: globexpr.h:24
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
void setCaseInSensitive(bool yn=true)
Definition: globexpr.h:38
BufferString errmsg_
Definition: horizontracker.h:117
const char * expressionFailMessage() const
Normally null, only filled if invalid expression.
Definition: globexpr.h:47
bool ci_
Definition: globexpr.h:58