2002-11-10 10:46:28 +00:00
|
|
|
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
|
|
|
#ifndef __point_hh
|
|
|
|
#define __point_hh
|
|
|
|
|
|
|
|
namespace otk {
|
|
|
|
|
|
|
|
class Point {
|
2003-02-08 07:33:48 +00:00
|
|
|
int _x, _y;
|
2002-11-10 10:46:28 +00:00
|
|
|
public:
|
|
|
|
Point() : _x(0), _y(0) {}
|
|
|
|
Point(int x, int y) : _x(x), _y(y) {}
|
2003-02-08 07:33:48 +00:00
|
|
|
Point(const Point &p) : _x(p._x), _y(p._y) {}
|
2002-11-10 10:46:28 +00:00
|
|
|
|
2003-02-08 07:33:48 +00:00
|
|
|
inline int x() const { return _x; }
|
|
|
|
inline int y() const { return _y; }
|
2002-11-11 11:33:32 +00:00
|
|
|
|
2003-02-08 07:33:48 +00:00
|
|
|
bool operator==(const Point &o) const { return _x == o._x && _y == o._y; }
|
|
|
|
bool operator!=(const Point &o) const { return _x != o._x || _y != o._y; }
|
2002-11-10 10:46:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-02-08 07:33:48 +00:00
|
|
|
#endif // __point_hh
|