regxstring.cpp

filter: Statementstmt 62.5% 15 / 24 Branchbran 30.0% 9 / 30 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 44.4% 24 / 54 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/String/Random/Regexp/regxstring.pm ↑ Summary regxstring_impl.cpp »
1 #include "regxstring_impl.h"
2 #include "regxstring.h"
3  
4 0 CRegxString::CRegxString(const char * regx)
5 0 : impl_(0)
6 {
7 0 ParseRegx(regx);
8 0 }
9  
10 181 CRegxString::~CRegxString()
11 {
12 181 ▶ if(impl_)
Branch: 1 branch
BranchTrueFalseTotal
if(impl_) 181 0 181
13 181 ▶ delete impl_;
Branch: 1 branch
BranchTrueFalseTotal
delete impl_; 181 0 181
14 181 }
15  
16 181 void CRegxString::ParseRegx(const char * regx,const Config * config)
17 {
18 181 ▶ if(!regx)
Branch: 1 branch
BranchTrueFalseTotal
if(!regx) 0 181 181
19 0 return;
20 181 ▶ if(!impl_)
Branch: 1 branch
BranchTrueFalseTotal
if(!impl_) 181 0 181
21 181 ▶ impl_ = new REGXSTRING_NS::__CRegxString;
Branch: 2 branches
BranchTrueFalseTotal
impl_ = new REGXSTRING_NS::__CRegxString; 181 0 181
impl_ = new REGXSTRING_NS::__CRegxString; 0 0 0
22 543 ▶ impl_->ParseRegx(regx,config);
Branch: 2 branches
BranchTrueFalseTotal
impl_->ParseRegx(regx,config); 181 0 181
impl_->ParseRegx(regx,config); 181 0 181
23 }
24  
25 0 const char * CRegxString::Regx() const
26 {
27 0 ▶ return (impl_ ? impl_->Regx().c_str() : 0);
Branch: 4 branches
BranchTrueFalseTotal
return (impl_ ? impl_->Regx().c_str() : 0); 0 0 0
return (impl_ ? impl_->Regx().c_str() : 0); 0 0 0
return (impl_ ? impl_->Regx().c_str() : 0); 0 0 0
return (impl_ ? impl_->Regx().c_str() : 0); 0 0 0
28 }
29  
30 17607 const char * CRegxString::RandString()
31 {
32 17607 ▶ return (impl_ ? impl_->RandString().c_str() : 0);
Branch: 1 branch
BranchTrueFalseTotal
return (impl_ ? impl_->RandString().c_str() : 0); 17607 0 17607
33 }
34 0 const char * CRegxString::LastString() const
35 {
36 0 ▶ return (impl_ ? impl_->LastString().c_str() : 0);
Branch: 1 branch
BranchTrueFalseTotal
return (impl_ ? impl_->LastString().c_str() : 0); 0 0 0
37 }
38  
39 177 void CRegxString::Debug(std::ostream & out) const
40 {
41 177 ▶ if(impl_)
Branch: 1 branch
BranchTrueFalseTotal
if(impl_) 177 0 177
42 177 impl_->Debug(out);
43 177 }
« blib/lib/String/Random/Regexp/regxstring.pm ↑ Summary regxstring_impl.cpp »