Rewrite NTS Framework.
[sim/o1-interface.git] / ntsimulator / regxstring / regxstring.h
1 /*************************************************************************\r
2 *\r
3 * Licensed under the Apache License, Version 2.0 (the "License");\r
4 * you may not use this file except in compliance with the License.\r
5 * You may obtain a copy of the License at\r
6 *\r
7 *     http://www.apache.org/licenses/LICENSE-2.0\r
8 *\r
9 * Unless required by applicable law or agreed to in writing, software\r
10 * distributed under the License is distributed on an "AS IS" BASIS,\r
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
12 * See the License for the specific language governing permissions and\r
13 * limitations under the License.\r
14 ***************************************************************************/\r
15 \r
16 #ifndef DOZERG_REGXSTRING_H_20091012\r
17 #define DOZERG_REGXSTRING_H_20091012\r
18 \r
19 namespace __DZ_Regx_String{\r
20     class __CRegxString;\r
21 }\r
22 \r
23 struct Config\r
24 {\r
25     static const int REPEAT_INFINITE = 3;\r
26     int repeatInfinite;\r
27     //functions:\r
28     Config():repeatInfinite(REPEAT_INFINITE){}\r
29 };\r
30 \r
31 class CRegxString\r
32 {\r
33     __DZ_Regx_String::__CRegxString * impl_;\r
34 public:\r
35     CRegxString():impl_(0){}\r
36     explicit CRegxString(const char * regx);\r
37     ~CRegxString();\r
38     void ParseRegx(const char * regx,const Config * config = 0);\r
39     const char * Regx() const;\r
40     const char * RandString();\r
41     const char * LastString() const;\r
42     void Debug(std::ostream & out) const;\r
43 };\r
44 \r
45 #endif\r