|
limal
|
00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | _ _ _ _ __ _ | 00004 | | | | | | \_/ | / \ | | | 00005 | | | | | | |_| | / /\ \ | | | 00006 | | |__ | | | | | | / ____ \ | |__ | 00007 | |____||_| |_| |_|/ / \ \|____| | 00008 | | 00009 | core library | 00010 | | 00011 | (C) SUSE Linux Products GmbH | 00012 \----------------------------------------------------------------------/ 00013 00014 File: ValuePerlRECheck.hpp 00015 00016 Author: Marius Tomaschewski 00017 Maintainer: Marius Tomaschewski 00018 00019 Purpose: 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 } // End of LIMAL_NAMESPACE 00096 #endif // LIMAL_VALUE_PERL_REGEX_CHECK_HPP 00097 // vim: set ts=8 sts=8 sw=8 ai noet:
1.7.5.1