summaryrefslogtreecommitdiff
path: root/mask.h
diff options
context:
space:
mode:
Diffstat (limited to 'mask.h')
-rw-r--r--mask.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/mask.h b/mask.h
index e7febeb0..13ab57b5 100644
--- a/mask.h
+++ b/mask.h
@@ -8,24 +8,28 @@
#include <boost/regex.hpp>
+namespace ledger {
+
class mask_t
{
public:
bool exclude;
boost::regex expr;
- explicit mask_t(const std::string& pattern);
+ explicit mask_t(const string& pattern);
mask_t(const mask_t& m) : exclude(m.exclude), expr(m.expr) {}
- bool match(const std::string& str) const {
+ bool match(const string& str) const {
return boost::regex_match(str, expr) && ! exclude;
}
};
class mask_error : public error {
public:
- mask_error(const std::string& _reason) throw() : error(_reason) {}
+ mask_error(const string& _reason) throw() : error(_reason) {}
virtual ~mask_error() throw() {}
};
+} // namespace ledger
+
#endif // _MASK_H