ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Iffy/Matcher.hpp
(Generate patch)

Comparing Iffy/Matcher.hpp (file contents):
Revision 308 by Douglas Thrift, 2004-11-13T00:45:59-08:00 vs.
Revision 309 by douglas, 2004-12-12T23:44:14-08:00

# Line 7 | Line 7
7   #ifndef _Matcher_hpp_
8   #define _Matcher_hpp_
9  
10 + #ifdef MENES_PRAGMA_ONCE
11 + #pragma once
12 + #endif
13 +
14   #include "Iffy.hpp"
15  
16   #include <pcre.h>
# Line 21 | Line 25 | public:
25          Matcher(const ext::String& expression) : expression(NULL) { (*this)(expression); }
26          ~Matcher() { if (expression != NULL) pcre_free(expression); }
27          bool match(const ext::String& stuff);
28 <        unsigned size(void) const { return substrings.GetSize(); }
28 >        size_t size(void) const { return substrings.GetSize(); }
29          Matcher& operator()(const ext::String& expression);
30 <        const ext::String& operator[](unsigned index) const { return substrings[index]; }
30 >        const ext::String& operator[](size_t index) const { return substrings[index]; }
31          operator ext::String() const { return substrings[0]; }
32          bool operator==(const ext::String& stuff) { return match(stuff); }
33          bool operator!=(const ext::String& stuff) { return !match(stuff); }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines