diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-11-10 10:52:56 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-11-10 10:52:56 +0000 |
| commit | 8693dd95a2cdd45a5b0668ea2df1e4d20e238ee8 (patch) | |
| tree | 7bdb6a5a054d54c737cef0f63b40e70b3744dfd6 /otk | |
| parent | 5dc5cc32b0c00c3bfba8ea5727599f49b56ae817 (diff) | |
document the Point class
Diffstat (limited to 'otk')
| -rw-r--r-- | otk/point.hh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/otk/point.hh b/otk/point.hh index 093ad4cf..425cb218 100644 --- a/otk/point.hh +++ b/otk/point.hh @@ -3,22 +3,33 @@ #define __point_hh /*! @file point.hh + @brief The Point class contains an x/y pair */ namespace otk { +//! The Point class is an x/y coordinate or size pair class Point { private: - int _x, _y; + //! The x value + int _x; + //! The y value + int _y; public: + //! Constructs a new Point with 0,0 values Point() : _x(0), _y(0) {} + //! Constructs a new Point with given values Point(int x, int y) : _x(x), _y(y) {} + //! Changes the x value to the new value specified void setX(int x) { _x = x; } + //! Returns the x value void x() const { return _x; } + //! Changes the y value to the new value specified void setY(int x) { _x = x; } + //! Returns the y value void y() const { return _x; } }; |
