Class to handle a Regex or StringDistance. More...
#include <ExprNodeRep.h>
Public Member Functions | |
TaqlRegex (const Regex ®ex) | |
Construct from a regex. | |
TaqlRegex (const StringDistance &dist) | |
Construct from a StringDistance. | |
Bool | match (const String &str) const |
Does the regex or maximum string distance match? | |
const Regex & | regex () const |
Return the regular expression. | |
Private Attributes | |
Regex | itsRegex |
StringDistance | itsDist |
Class to handle a Regex or StringDistance.
Internal
A StringDistance (Levensthein distance) in TaQL is given in the same way as a Regex. This class is needed to have a single object in the parse tree objects containing them (in class TableExprNodeConstRegex).
Definition at line 75 of file ExprNodeRep.h.
casacore::TaqlRegex::TaqlRegex | ( | const Regex & | regex | ) | [inline, explicit] |
Construct from a regex.
Definition at line 79 of file ExprNodeRep.h.
casacore::TaqlRegex::TaqlRegex | ( | const StringDistance & | dist | ) | [inline, explicit] |
Construct from a StringDistance.
Definition at line 84 of file ExprNodeRep.h.
Does the regex or maximum string distance match?
Definition at line 89 of file ExprNodeRep.h.
References casacore::String::empty(), itsDist, itsRegex, casacore::StringDistance::match(), casacore::String::matches(), and casacore::Regex::regexp().
const Regex& casacore::TaqlRegex::regex | ( | ) | const [inline] |
StringDistance casacore::TaqlRegex::itsDist [private] |
Definition at line 100 of file ExprNodeRep.h.
Referenced by match().
Regex casacore::TaqlRegex::itsRegex [private] |
Definition at line 99 of file ExprNodeRep.h.