summaryrefslogtreecommitdiff
path: root/project2/regexCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/regexCheck.cpp')
-rw-r--r--project2/regexCheck.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/project2/regexCheck.cpp b/project2/regexCheck.cpp
index 1af5fa1..edd2c38 100644
--- a/project2/regexCheck.cpp
+++ b/project2/regexCheck.cpp
@@ -1,6 +1,7 @@
#include "regexCheck.h"
#include "xmlObjectLoader.h"
#include "commonObjects.h"
+#include "genericVisitor.h"
#include <boost/regex.hpp>
ElementLoaderImpl<RegexCheck> regexCheckLoader("regexcheck");
@@ -25,7 +26,12 @@ RegexCheck::loadComplete(const CommonObjects *)
bool
RegexCheck::performCheck() const
{
- const Glib::ustring & param(applyTo);
- return boost::regex_match(param.begin(), param.end(), regex);
+ return LexicalCall<Glib::ustring, bool>(boost::bind(&RegexCheck::checkString, this, _1), applyTo());
+}
+
+bool
+RegexCheck::checkString(const Glib::ustring & str) const
+{
+ return boost::regex_match(str.begin(), str.end(), regex);
}