summaryrefslogtreecommitdiff
path: root/src/mask.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-01 22:10:32 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-01 22:10:32 -0400
commitfb5428ce85127413da6cba184dda178352a82b3c (patch)
treee72d931ec737a7442a61bdfc3a61379a3fa8de48 /src/mask.h
parent7128fdb6373c901c9c68e2d8ddac911891466c40 (diff)
downloadfork-ledger-fb5428ce85127413da6cba184dda178352a82b3c.tar.gz
fork-ledger-fb5428ce85127413da6cba184dda178352a82b3c.tar.bz2
fork-ledger-fb5428ce85127413da6cba184dda178352a82b3c.zip
Added support for metadata and tagging, and made regexs a first-class type.
Diffstat (limited to 'src/mask.h')
-rw-r--r--src/mask.h8
1 files changed, 8 insertions, 0 deletions
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;
};