| 1 | #ifndef DOZERG_REGXSTRING_H_20091012 | ||
| 2 | #define DOZERG_REGXSTRING_H_20091012 | ||
| 3 | |||
| 4 | namespace __DZ_Regx_String{ | ||
| 5 | class __CRegxString; | ||
| 6 | } | ||
| 7 | |||
| 8 | struct Config | ||
| 9 | { | ||
| 10 | static const int REPEAT_INFINITE = 3; | ||
| 11 | int repeatInfinite; | ||
| 12 | //functions: | ||
| 13 | 181 | Config():repeatInfinite(REPEAT_INFINITE){} | |
| 14 | }; | ||
| 15 | |||
| 16 | class CRegxString | ||
| 17 | { | ||
| 18 | __DZ_Regx_String::__CRegxString * impl_; | ||
| 19 | public: | ||
| 20 | CRegxString():impl_(0){} | ||
| 21 | explicit CRegxString(const char * regx); | ||
| 22 | ~CRegxString(); | ||
| 23 | void ParseRegx(const char * regx,const Config * config = 0); | ||
| 24 | const char * Regx() const; | ||
| 25 | const char * RandString(); | ||
| 26 | const char * LastString() const; | ||
| 27 | void Debug(std::ostream & out) const; | ||
| 28 | }; | ||
| 29 | |||
| 30 | #endif |