ValueIntCheck.hpp

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                     _     _   _   _     __     _                     |
00004 |                    | |   | | | \_/ |   /  \   | |                    |
00005 |                    | |   | | | |_| |  / /\ \  | |                    |
00006 |                    | |__ | | | | | | / ____ \ | |__                  |
00007 |                    |____||_| |_| |_|/ /    \ \|____|                 |
00008 |                                                                      |
00009 |                             core library                             |
00010 |                                                                      |
00011 |                                         (C) SUSE Linux Products GmbH |
00012 \----------------------------------------------------------------------/
00013 
00014   File:       ValueIntCheck.hpp
00015 
00016   Author:     Marius Tomaschewski
00017   Maintainer: Marius Tomaschewski
00018 
00019   Purpose:
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 }       // End of LIMAL_NAMESPACE
00140 
00141 #endif  // LIMAL_VALUE_INT_CHECK_HPP
00142 // vim: set ts=8 sts=8 sw=8 ai noet:

Generated on Mon Nov 27 22:20:57 2006 for limal by  doxygen 1.5.0