30 GlobExpr(
const char* s = 0,
bool casesens=
true )
31 : expr_(
""),
errmsg_(0), ci_(!casesens) {
set(s); }
33 : expr_(ge.expr_),
errmsg_(0), ci_(ge.ci_) {}
38 {
return expr_ == ge.
expr_ && ci_ == ge.
ci_; }
42 void set(
const char*);
43 inline operator const char*()
const 44 {
return (
const char*)expr_; }
46 inline bool matches(
const char* t )
const 47 {
return matches( expr_, t,
48 const_cast<const char*&>(
errmsg_), ci_ ); }
52 static bool matches(
const char* expression,
const char* txt,
53 const char*& errmsg_if_expression_is_incorrect,
62 static bool starMatches(
const char*,
const char*,
const char*&,
bool);
#define mExpClass(module)
Definition: commondefs.h:160
GlobExpr(const char *s=0, bool casesens=true)
Definition: globexpr.h:30
GlobExpr & operator=(const GlobExpr &ge)
Definition: globexpr.h:34
GlobExpr(const GlobExpr &ge)
Definition: globexpr.h:32
BufferString expr_
Definition: globexpr.h:58
bool matches(const char *t) const
Definition: globexpr.h:46
bool operator==(const GlobExpr &ge) const
Definition: globexpr.h:37
const char * errmsg_
Definition: globexpr.h:59
Glob-expression matching like UNIX shells.
Definition: globexpr.h:26
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
void setCaseInSensitive(bool yn=true)
Definition: globexpr.h:40
BufferString errmsg_
Definition: horizontracker.h:119
const char * expressionFailMessage() const
Normally null, only filled if invalid expression.
Definition: globexpr.h:49
bool ci_
Definition: globexpr.h:60