00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 #ifndef COH_INTEGER32_HPP
00017 #define COH_INTEGER32_HPP
00018 
00019 #include "coherence/lang/compatibility.hpp"
00020 
00021 #include "coherence/lang/Number.hpp"
00022 #include "coherence/lang/Primitive.hpp"
00023 #include "coherence/lang/TypedHandle.hpp"
00024 
00025 COH_OPEN_NAMESPACE2(coherence,lang)
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 class COH_EXPORT Integer32
00034     : public cloneable_spec<Integer32,
00035         extends<Primitive<int32_t> >,
00036         implements<Number, Comparable> >
00037     {
00038     friend class factory<Integer32>;
00039 
00040     
00041 
00042     private:
00043 
00044 
00045 
00046 
00047 
00048         Integer32(int32_t n);
00049 
00050 
00051 
00052 
00053         Integer32(const Integer32& that);
00054 
00055 
00056     
00057 
00058     public:
00059 
00060 
00061 
00062         virtual int16_t getInt16Value() const;
00063 
00064 
00065 
00066 
00067         virtual int32_t getInt32Value() const;
00068 
00069 
00070 
00071 
00072         virtual int64_t getInt64Value() const;
00073 
00074 
00075 
00076 
00077         virtual float32_t getFloat32Value() const;
00078 
00079 
00080 
00081 
00082         virtual float64_t getFloat64Value() const;
00083 
00084 
00085     
00086 
00087     public:
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096         static Handle valueOf(int32_t n);
00097 
00098 
00099     
00100 
00101     public:
00102 
00103 
00104 
00105         static const int32_t MIN_VALUE = 0x80000000;
00106 
00107 
00108 
00109 
00110         static const int32_t MAX_VALUE = 0x7FFFFFFF;
00111     };
00112 
00113 COH_CLOSE_NAMESPACE2
00114 
00115 #endif // COH_INTEGER32_HPP