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