OpendTect  7.0
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
GlobExpr Class Reference

Glob-expression matching like UNIX shells. More...

Public Member Functions

 GlobExpr (const char *s=nullptr, bool casesens=true)
 
 GlobExpr (const GlobExpr &ge)
 
const char * expressionFailMessage () const
 Normally null, only filled if invalid expression. More...
 
bool matches (const char *t) const
 
 operator const char * () const
 
GlobExproperator= (const GlobExpr &ge)
 
bool operator== (const GlobExpr &ge) const
 
void set (const char *)
 
void setCaseInSensitive (bool yn=true)
 

Static Public Member Functions

static bool matches (const char *expression, const char *txt, const char *&errmsg_if_expression_is_incorrect, bool caseinsens)
 
static void validateFilterString (BufferString &)
 

Static Protected Member Functions

static bool starMatches (const char *, const char *, const char *&, bool)
 

Protected Attributes

bool ci_
 
const char * errmsg_
 
BufferString expr_
 

Detailed Description

Glob-expression matching like UNIX shells.

Expressions may have '*', '?' and [] (e.g. [a-eA-E]) constructions. Also the inverted selection with '^' or '!' supported (e.g. [^x-z] or [!akPZ]). Escape the special chars with '\';

<>

Constructor & Destructor Documentation

◆ GlobExpr() [1/2]

GlobExpr::GlobExpr ( const char *  s = nullptr,
bool  casesens = true 
)
inline

◆ GlobExpr() [2/2]

GlobExpr::GlobExpr ( const GlobExpr ge)
inline

Member Function Documentation

◆ expressionFailMessage()

const char* GlobExpr::expressionFailMessage ( ) const
inline

Normally null, only filled if invalid expression.

◆ matches() [1/2]

static bool GlobExpr::matches ( const char *  expression,
const char *  txt,
const char *&  errmsg_if_expression_is_incorrect,
bool  caseinsens 
)
static

◆ matches() [2/2]

bool GlobExpr::matches ( const char *  t) const
inline

◆ operator const char *()

GlobExpr::operator const char * ( ) const
inline

◆ operator=()

GlobExpr& GlobExpr::operator= ( const GlobExpr ge)
inline

◆ operator==()

bool GlobExpr::operator== ( const GlobExpr ge) const
inline

◆ set()

void GlobExpr::set ( const char *  )

◆ setCaseInSensitive()

void GlobExpr::setCaseInSensitive ( bool  yn = true)
inline

◆ starMatches()

static bool GlobExpr::starMatches ( const char *  ,
const char *  ,
const char *&  ,
bool   
)
staticprotected

◆ validateFilterString()

static void GlobExpr::validateFilterString ( BufferString )
static

Member Data Documentation

◆ ci_

bool GlobExpr::ci_
protected

◆ errmsg_

const char* GlobExpr::errmsg_
protected

◆ expr_

BufferString GlobExpr::expr_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024