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_POSIX_REGEX_CHECK_HPP
00027 #define LIMAL_VALUE_POSIX_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/PosixRegEx.hpp>
00035
00036 namespace LIMAL_NAMESPACE
00037 {
00038
00039
00040 #ifdef BLOCXX_HAVE_REGEX
00041
00047 class ValuePosixRECheck: public ValueCheckBase
00048 {
00049 public:
00060 ValuePosixRECheck(const blocxx::String ®ex,
00061 bool icase = false);
00062
00071 virtual bool
00072 isValid(const blocxx::String &value) const;
00073
00081 virtual blocxx::String
00082 explain(const blocxx::String &value) const;
00083
00084 private:
00085 blocxx::PosixRegEx m_reg;
00086 };
00087 #else
00088 #warning PosixRegEx is not avaliable in blocxx
00089 #endif
00090
00091
00092 }
00093 #endif // LIMAL_VALUE_POSIX_REGEX_CHECK_HPP
00094