source: CMT/v1r12p20020606/src/cmt_regexp.h @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

File size: 836 bytes
Line 
1#ifndef __cmt_regexp_h__
2#define __cmt_regexp_h__
3
4#include "cmt_string.h"
5
6class cmt_node;
7
8class cmt_regexp
9{
10public:
11  cmt_regexp (const cmt_string& expression);
12  ~cmt_regexp ();
13
14  bool is_valid () const;
15 
16  class iterator
17  {
18public:
19    static const iterator null ();
20   
21public:
22    iterator ();
23    iterator (int pos, int length);
24    iterator (const iterator& other);
25   
26    int operator != (const iterator& other) const;
27    int operator == (const iterator& other) const;
28   
29    int _pos;
30    int _length;
31  };
32 
33  iterator begin (const cmt_string& text, int pos = 0);
34  iterator end ();
35 
36  iterator begin (const cmt_string& text, int pos = 0) const;
37  iterator end () const;
38
39  bool match (const cmt_string& text) const;
40 
41private:
42 
43  cmt_node* _root;
44};
45
46#endif
47
Note: See TracBrowser for help on using the repository browser.