1 #ifndef _MATCHER_H_INCLUDED_
2 #define _MATCHER_H_INCLUDED_
3 ///////////////////////////////////////////////////////////////////////////////
4 //
5 // Matcher.h
6 // --------
7 // Matcher class definition
8 //
9 // Design and Implementation by Bjoern Lemke
10 //
11 // (C)opyright 2000-2016 Bjoern Lemke
12 //
13 // INTERFACE MODULE
14 //
15 // Class: Matcher
16 //
17 // Description: Regular expression utility class
18 //
19 // Status: CLEAN
20 //
21 ///////////////////////////////////////////////////////////////////////////////
22 
23 
24 // INCLUDES
25 #include <iostream>
26 #include <sys/types.h>
27 
28 class Matcher {
29 
30 public:
31 
32     Matcher(const Chain& exp);
33     ~Matcher();
34 
35     Chain getExpr() const;
36     void prepare();
37 
38     bool match(const Chain& str);
39 
40 private:
41 
42     Chain _expr;
43     void *_pRE;
44     bool _isPrepared;
45 };
46 #endif
47