00001
00011 #ifndef DEFINE_H_YPOINT
00012 #define DEFINE_H_YPOINT
00013
00014 #include <basic.h>
00015 #include <bstdlib.h>
00016 #include <tcode.h>
00017 #include <errcode.h>
00018 #include <btron/btron.h>
00019 #include <btron/dp.h>
00020 #include "ypoint.h"
00021
00030 class YPoint : public point {
00031 public:
00033 YPoint() {}
00034
00041 YPoint(W nex, W ney) {
00042 x = nex;
00043 y = ney;
00044 }
00045
00051 YPoint(const PNT& src){
00052 operator=(src);
00053 }
00054
00056 ~YPoint() {}
00057
00063 const YPoint& operator=(const PNT& src) {
00064 x = src.x;
00065 y = src.y;
00066 return *this;
00067 }
00068
00074 const YPoint& operator+=(const PNT& src) {
00075 x += src.x;
00076 y += src.y;
00077 return *this;
00078 }
00079
00085 const YPoint& operator-=(const PNT& src) {
00086 x -= src.x;
00087 y -= src.y;
00088 return *this;
00089 }
00090
00096 bool operator==(const PNT& src) const {
00097 return (x == src.x && y == src.y);
00098 }
00099
00105 bool operator!=(const PNT& src) const {
00106 return !(operator==(src));
00107 }
00108
00109 protected:
00110
00111 private:
00112
00113 };
00114
00115 #endif // DEFINE_H_YPOINT