Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Beta/Math/Double/Double.hh

Go to the documentation of this file.
00001 #ifndef __J2K__DOUBLE_HH__
00002 #define __J2K__DOUBLE_HH__
00003 
00004 #include <j2k/Fred/Basic.hh>
00005 class Integer;
00006 
00007 class Double {
00008 public:
00009   inline Double( double d = 0 ) : value( d ) { }
00010   inline Double( const char *s ) { value = atoi(s); }
00011   inline virtual ~Double() { }
00012   inline Double( const Integer &i ) { value = (double)i.value; }
00013 
00014   // operator overloads
00015 
00016   #include <j2k/Fred/Number/Double/DComp1.hh>
00017   #include <j2k/Fred/Number/Double/DComp2.hh>
00018   #include <j2k/Fred/Number/Double/DComp3.hh>
00019 
00020   #include <j2k/Fred/Number/Double/DArithm1.hh>
00021   #include <j2k/Fred/Number/Double/DArithm2.hh>
00022   #include <j2k/Fred/Number/Double/DArithm3.hh>
00023 
00024   inline operator double() const { return value; }
00025 
00026   inline const Double &operator=(double d) {
00027     value = d;
00028     return *this;
00029   }
00030 
00031   inline const Double &operator=(const Double& d) {
00032     value = d.value;
00033     return *this;
00034   }
00035 
00036   inline Double operator!() {
00037     return Double(!value);
00038   }
00039 
00040   inline Double operator-() {
00041     return Double(-value);
00042   }
00043 
00044   inline Double operator--() {
00045    return Double(--value);
00046   }
00047 
00048   inline Double operator--(int) {
00049     return Double(value--);
00050   }
00051 
00052   inline Double operator++() {
00053     return Double(++value);
00054   }
00055 
00056   inline Double operator++(int) {
00057    return Double(value++);
00058   }
00059 
00060   private:
00061     double value;
00062 };
00063 
00064 #endif

Generated on Sun Oct 14 18:46:12 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001