--- /dev/null
+/*************************************************************************\r
+*\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+***************************************************************************/\r
+\r
+#include "regxstring_impl.h"\r
+#include "regxstring.h"\r
+\r
+CRegxString::CRegxString(const char * regx)\r
+ : impl_(0)\r
+{\r
+ ParseRegx(regx);\r
+}\r
+\r
+CRegxString::~CRegxString()\r
+{\r
+ if(impl_)\r
+ delete impl_;\r
+}\r
+\r
+void CRegxString::ParseRegx(const char * regx,const Config * config)\r
+{\r
+ if(!regx)\r
+ return;\r
+ if(!impl_)\r
+ impl_ = new REGXSTRING_NS::__CRegxString;\r
+ impl_->ParseRegx(regx,config);\r
+}\r
+\r
+const char * CRegxString::Regx() const\r
+{\r
+ return (impl_ ? impl_->Regx().c_str() : 0);\r
+}\r
+\r
+const char * CRegxString::RandString()\r
+{\r
+ return (impl_ ? impl_->RandString().c_str() : 0);\r
+}\r
+const char * CRegxString::LastString() const\r
+{\r
+ return (impl_ ? impl_->LastString().c_str() : 0);\r
+}\r
+\r
+void CRegxString::Debug(std::ostream & out) const\r
+{\r
+ if(impl_)\r
+ impl_->Debug(out);\r
+}\r