00001 #ifndef __CDimension__ 00002 #define __CDimension__ 00003 00004 #include "../Basics/CCountedObject.hpp" 00005 using Exponent::Basics::CCountedObject; 00006 00007 // =========================================================================== 00008 00009 namespace Exponent 00010 { 00011 namespace MathTools 00012 { 00030 class CDimension : public CCountedObject 00031 { 00033 EXPONENT_CLASS_DECLARATION; 00036 // =========================================================================== 00037 00038 public: 00039 00040 // =========================================================================== 00041 00047 CDimension(const long width = 0, const long height = 0); 00048 00053 CDimension(const CDimension &dimension); 00054 00058 virtual ~CDimension(); 00059 00060 // =========================================================================== 00061 00067 CDimension &operator = (const CDimension &dimension); 00068 00074 bool operator == (const CDimension &dimension); 00075 00076 // =========================================================================== 00077 00083 void setDimension(const long width, const long height); 00084 00089 void setDimension(const CDimension &dimension); 00090 00095 void setWidth(const long width); 00096 00101 void setHeight(const long height); 00102 00103 // =========================================================================== 00104 00109 long getWidth() const; 00110 00115 long getHeight() const; 00116 00117 // =========================================================================== 00118 00119 protected: 00120 00121 // =========================================================================== 00122 00123 long m_width; 00124 long m_height; 00125 }; 00126 } 00127 } 00128 #endif // End of CDimension.hpp