00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _COMPPOINT_H
00027 #define _COMPPOINT_H
00028
00029 #include <vector>
00030 #include <list>
00031
00036 class CompPoint {
00037
00038 public:
00039 CompPoint ();
00040 CompPoint (int, int);
00041
00045 int x () const;
00046
00050 int y () const;
00051
00055 void set (int, int);
00056
00060 void setX (int);
00061
00065 void setY (int);
00066
00067 bool operator== (const CompPoint &) const;
00068 bool operator!= (const CompPoint &) const;
00069
00073 CompPoint & operator-= (const CompPoint &);
00077 CompPoint & operator+= (const CompPoint &);
00078
00082 CompPoint operator+ (const CompPoint &) const;
00086 CompPoint operator- (const CompPoint &) const;
00087
00088 typedef std::vector<CompPoint> vector;
00089 typedef std::vector<CompPoint *> ptrVector;
00090 typedef std::list<CompPoint> list;
00091 typedef std::list<CompPoint *> ptrList;
00092
00093 private:
00094 int mX, mY;
00095 };
00096
00097 inline int
00098 CompPoint::x () const
00099 {
00100 return mX;
00101 }
00102
00103 inline int
00104 CompPoint::y () const
00105 {
00106 return mY;
00107 }
00108
00109
00110 #endif