00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00033 #ifndef LIMAL_VALUE_INT_CHECK_HPP
00034 #define LIMAL_VALUE_INT_CHECK_HPP
00035
00036 #include <limal/config.h>
00037 #include <limal/ValueCheck.hpp>
00038
00039 #include <blocxx/Types.hpp>
00040 #include <blocxx/String.hpp>
00041
00042 namespace LIMAL_NAMESPACE
00043 {
00044
00045
00052 class ValueIntCheck: public ValueCheckBase
00053 {
00054 public:
00063 ValueIntCheck(blocxx::UInt64 minValue,
00064 blocxx::UInt64 maxValue,
00065 bool inclusiveRange = true);
00066
00075 ValueIntCheck(blocxx::Int64 minValue,
00076 blocxx::Int64 maxValue,
00077 bool inclusiveRange = true);
00078
00100 ValueIntCheck(int minValue,
00101 int maxValue,
00102 bool inclusiveRange = true);
00103
00113 virtual bool
00114 isValid(const blocxx::String &value) const;
00115
00122 virtual blocxx::String
00123 explain(const blocxx::String &value) const;
00124
00125 private:
00126 bool m_sign;
00127 bool m_incl;
00128 union {
00129 blocxx::Int64 s;
00130 blocxx::UInt64 u;
00131 } m_min;
00132 union {
00133 blocxx::Int64 s;
00134 blocxx::UInt64 u;
00135 } m_max;
00136 };
00137
00138
00139 }
00140
00141 #endif // LIMAL_VALUE_INT_CHECK_HPP
00142