diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-03-25 20:00:08 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-03-25 20:00:08 +0000 |
commit | 469bbcf0701e1eb8a6670c23145b0da87357e178 (patch) | |
tree | b5b062a16e46a6c5d3410b4e574cd0cc09057211 /src/experimental/regex.h | |
parent | ee1b79396076edc4e30aefb285fada03bb45e80d (diff) | |
download | libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.gz libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.bz2 libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.xz libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.zip |
Code is all reorganized. We're about ready to release. I should write up a
little explenation of the arrangement.
Diffstat (limited to 'src/experimental/regex.h')
-rw-r--r-- | src/experimental/regex.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/experimental/regex.h b/src/experimental/regex.h new file mode 100644 index 0000000..f0aa5d5 --- /dev/null +++ b/src/experimental/regex.h | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2011 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libbu++ library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | |||
8 | #ifndef BU_REG_EX_H | ||
9 | #define BU_REG_EX_H | ||
10 | |||
11 | #include "bu/string.h" | ||
12 | |||
13 | #include <stdint.h> | ||
14 | |||
15 | namespace Bu | ||
16 | { | ||
17 | class RegEx | ||
18 | { | ||
19 | public: | ||
20 | RegEx(); | ||
21 | RegEx( const Bu::String &sSrc ); | ||
22 | virtual ~RegEx(); | ||
23 | |||
24 | void compile( const Bu::String &sSrc ); | ||
25 | int getNumSubStrings(); | ||
26 | bool execute( const Bu::String &sSrc ); | ||
27 | void getSubStringRange( int nIndex, int &iStart, int &iEnd ); | ||
28 | Bu::String getSubString( int nIndex ); | ||
29 | const Bu::String &getSource() | ||
30 | { | ||
31 | return sSrc; | ||
32 | } | ||
33 | |||
34 | private: | ||
35 | Bu::String sSrc; | ||
36 | Bu::String sTest; | ||
37 | void *pRegEx; | ||
38 | bool bCompiled; | ||
39 | int nSubStr; | ||
40 | void *paSubStr; | ||
41 | }; | ||
42 | }; | ||
43 | |||
44 | #endif | ||