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

File Contents

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

Properties

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