el h / SimpleGUI

Fork of SimpleGUI by Duncan McIntyre

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Point.h Source File

Point.h

00001 #ifndef SIMPLEGUI_POINT_H
00002 #define SIMPLEGUI_POINT_H
00003 
00004 class Point {
00005     
00006     public:
00007     
00008     Point(int x, int y) : _x(x), _y(y) {}
00009     
00010     int x() { return _x; }
00011     int y() { return _y; }
00012     void x(int x) { _x = x; }
00013     void y(int y) { _y = y; }
00014     
00015     bool equals(Point *p) {
00016         return (p->x() == x()) && (p->y() == y());
00017     }
00018     
00019     private:
00020     
00021     int _x, _y;
00022     
00023 };
00024 
00025 
00026 #endif