-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathregxstring.cpp
More file actions
43 lines (37 loc) · 843 Bytes
/
regxstring.cpp
File metadata and controls
43 lines (37 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "regxstring_impl.h"
#include "regxstring.h"
CRegxString::CRegxString(const char * regx)
: impl_(0)
{
ParseRegx(regx);
}
CRegxString::~CRegxString()
{
if(impl_)
delete impl_;
}
void CRegxString::ParseRegx(const char * regx,const Config * config)
{
if(!regx)
return;
if(!impl_)
impl_ = new REGXSTRING_NS::__CRegxString;
impl_->ParseRegx(regx,config);
}
const char * CRegxString::Regx() const
{
return (impl_ ? impl_->Regx().c_str() : 0);
}
const char * CRegxString::RandString()
{
return (impl_ ? impl_->RandString().c_str() : 0);
}
const char * CRegxString::LastString() const
{
return (impl_ ? impl_->LastString().c_str() : 0);
}
void CRegxString::Debug(std::ostream & out) const
{
if(impl_)
impl_->Debug(out);
}