casa
$Rev:20696$
|
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 73 of file ExprNodeRep.h.
casa::TaqlRegex::TaqlRegex | ( | const Regex & | regex | ) | [inline, explicit] |
Construct from a regex.
Definition at line 77 of file ExprNodeRep.h.
casa::TaqlRegex::TaqlRegex | ( | const StringDistance & | dist | ) | [inline, explicit] |
Construct from a StringDistance.
Definition at line 82 of file ExprNodeRep.h.
Bool casa::TaqlRegex::match | ( | const String & | str | ) | const [inline] |
Does the regex or maximum string distance match?
Definition at line 87 of file ExprNodeRep.h.
References casa::String::empty(), itsDist, itsRegex, casa::StringDistance::match(), casa::String::matches(), and casa::Regex::regexp().
const Regex& casa::TaqlRegex::regex | ( | ) | const [inline] |
StringDistance casa::TaqlRegex::itsDist [private] |
Definition at line 98 of file ExprNodeRep.h.
Referenced by match().
Regex casa::TaqlRegex::itsRegex [private] |
Definition at line 97 of file ExprNodeRep.h.