00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00026 #ifndef LIMAL_VALUE_PERL_REGEX_CHECK_HPP
00027 #define LIMAL_VALUE_PERL_REGEX_CHECK_HPP
00028
00029 #include <limal/config.h>
00030 #include <limal/ValueCheck.hpp>
00031
00032 #include <blocxx/Types.hpp>
00033 #include <blocxx/String.hpp>
00034 #include <blocxx/PerlRegEx.hpp>
00035
00036 namespace LIMAL_NAMESPACE
00037 {
00038
00039
00040 #ifdef BLOCXX_HAVE_PCRE
00041
00047 class ValuePerlRECheck: public ValueCheckBase
00048 {
00049 public:
00062 ValuePerlRECheck(const blocxx::String ®ex,
00063 bool icase = false,
00064 bool utf8 = false);
00065
00074 virtual bool
00075 isValid(const blocxx::String &value) const;
00076
00084 virtual blocxx::String
00085 explain(const blocxx::String &value) const;
00086
00087 private:
00088 blocxx::PerlRegEx m_reg;
00089 };
00090 #else
00091 #warning PerlRegEx is not avaliable in blocxx
00092 #endif
00093
00094
00095 }
00096 #endif // LIMAL_VALUE_PERL_REGEX_CHECK_HPP
00097