From fb5428ce85127413da6cba184dda178352a82b3c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 1 Feb 2009 22:10:32 -0400 Subject: Added support for metadata and tagging, and made regexs a first-class type. --- src/mask.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mask.h') diff --git a/src/mask.h b/src/mask.h index 23c5cedf..670c1807 100644 --- a/src/mask.h +++ b/src/mask.h @@ -72,10 +72,18 @@ public: mask_t& operator=(const string& other); + bool operator==(const mask_t& other) const { + return expr == other.expr; + } + bool match(const string& str) const { return boost::regex_search(str, expr); } + bool empty() const { + return expr.empty(); + } + void read(const char *& data); void write(std::ostream& out) const; }; -- cgit v1.2.3