diff options
Diffstat (limited to 'src/mask.h')
-rw-r--r-- | src/mask.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -77,12 +77,23 @@ public: } bool match(const string& str) const { + DEBUG("mask.match", + "Matching: \"" << str << "\" =~ /" << expr.str() << "/ = " + << (boost::regex_search(str, expr) ? "true" : "false")); return boost::regex_search(str, expr); } bool empty() const { return expr.empty(); } + + bool valid() const { + if (expr.status() != 0) { + DEBUG("ledger.validate", "mask_t: expr.status() != 0"); + return false; + } + return true; + } }; inline std::ostream& operator<<(std::ostream& out, const mask_t& mask) { |