32 #ifndef DRAIN_KEY_MATCHER
33 #define DRAIN_KEY_MATCHER
40 #include <drain/Type.h>
41 #include <drain/RegExp.h>
63 const std::string regExpSpecialChars;
82 void set(
const std::string & s);
85 bool operator==(
const std::string &s)
const {
90 bool operator==(
const char *s)
const {
95 bool operator==(
const StringMatcher &m)
const {
96 return (this->value == m.value) && (this->
isRegExp == m.isRegExp);
103 bool test(
const std::string & s)
const;
105 const std::string & getType()
const;
124 std::ostream & operator<<(std::ostream & ostr,
const StringMatcher & m){
129 DRAIN_TYPENAME(StringMatcher);
General-purpose key matcher: tests string equality, or regExp, if defined as such.
Definition: StringMatcher.h:58
void set(const std::string &s)
Assign string which may be literal or a regular expression.
Definition: StringMatcher.cpp:46
bool isRegExp
Checks if the key conforms to ODIM convention: DBZH, VRAD, etc. (capital letters, underscores)
Definition: StringMatcher.h:117
const std::string & value
Visible reference to the RegExp.
Definition: StringMatcher.h:66
bool test(const std::string &s) const
Test with direct string matching or regExp, if defined.
Definition: StringMatcher.cpp:70
Definition: DataSelector.cpp:1277