ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Bender/Matcher.hpp
Revision: 114
Committed: 2004-03-16T14:33:08-08:00 (21 years, 3 months ago) by Douglas Thrift
File size: 646 byte(s)
Log Message:
Stuff!

File Contents

# Content
1 // Bender
2 //
3 // Douglas Thrift
4 //
5 // $Id$
6
7 #ifndef _Matcher_hpp_
8 #define _Matcher_hpp_
9
10 #include <pcre.h>
11
12 #include "Bender.hpp"
13
14 class Matcher
15 {
16 private:
17 pcre* expression;
18 public:
19 Matcher() {}
20 ~Matcher();
21 bool match(const string& stuff);
22 Matcher& operator()(const string& expression);
23 bool operator==(const string& stuff) { return match(stuff); }
24 bool operator!=(const string& stuff) { return !match(stuff); }
25 // friends:
26 friend bool operator==(const string& stuff, Matcher& matcher) { return
27 matcher == stuff; }
28 friend bool operator!=(const string& stuff, Matcher& matcher) { return
29 matcher != stuff; }
30 };
31
32 #endif // _Matcher_hpp_

Properties

Name Value
svn:eol-style native
svn:keywords Id