point.h

00001 #ifndef POINT_H_
00002 #define POINT_H_
00003 
00004 #include <iostream>
00005 
00012 class Point
00013 {
00014         private:
00015                 
00017                 int x;
00019                 int y;
00020                 
00021         public:
00022                 
00028                 Point();
00029                 
00036                 Point(int newx,int newy);
00037                 
00045                 int getX() const;
00046                 
00054                 int getY() const;
00055                 
00063                 void setX(int newx);
00064                 
00072                 void setY(int newy);
00073                 
00089                 friend Point operator+(const Point &a,const Point &b);
00090                 
00107                 friend Point operator+(const Point &a,const int &b);
00108                 
00126                 friend std::ostream& operator<<(std::ostream& out,const Point &pt);
00127                 
00146                 friend std::istream& operator>>(std::istream& in, Point &pt);
00147                 
00162                 friend bool operator==(const Point &a,const Point &b);
00163                 
00178                 friend bool operator!=(const Point &a,const Point &b);
00179                 
00194                 friend Point operator-(const Point &a);
00195                 
00210                 Point& operator=(const Point &other);
00211                 
00226                 void operator+=(const Point &right);
00227 };
00228 
00229 #endif

Generated on Fri Dec 23 11:21:39 2011 by  doxygen 1.5.2