add the otk::Point type
This commit is contained in:
parent
73f6bb1a7b
commit
5dc5cc32b0
1 changed files with 27 additions and 0 deletions
27
otk/point.hh
Normal file
27
otk/point.hh
Normal file
|
@ -0,0 +1,27 @@
|
|||
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
||||
#ifndef __point_hh
|
||||
#define __point_hh
|
||||
|
||||
/*! @file point.hh
|
||||
*/
|
||||
|
||||
namespace otk {
|
||||
|
||||
class Point {
|
||||
private:
|
||||
int _x, _y;
|
||||
|
||||
public:
|
||||
Point() : _x(0), _y(0) {}
|
||||
Point(int x, int y) : _x(x), _y(y) {}
|
||||
|
||||
void setX(int x) { _x = x; }
|
||||
void x() const { return _x; }
|
||||
|
||||
void setY(int x) { _x = x; }
|
||||
void y() const { return _x; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* __point_hh */
|
Loading…
Reference in a new issue