#include <Point.h>
Public Member Functions | |
Point (int x=0, int y=0) | |
Construct a new point. | |
int | getX () const |
Return the x coordinate. | |
void | setX (int value) |
Set a new x coordinate. | |
int | getY () const |
Return the y coordinate. | |
void | setY (int value) |
Set a new y coordinate. | |
void | setCoord (int x, int y) |
Set new point coordinates. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Point &obj) |
Overload std::ostream::operator<< for use in the model. | |
std::istream & | operator>> (std::istream &os, const Point &obj) |
Overload std::istream::operator>> for use in the model. |
GUI::Point::Point | ( | int | x = 0 , |
|
int | y = 0 | |||
) |
Construct a new point.
x | the x coordinate of the point (default 0) | |
y | the y coordinate of the point (default 0) |
int GUI::Point::getX | ( | ) | const |
Return the x coordinate.
int GUI::Point::getY | ( | ) | const |
Return the y coordinate.
void GUI::Point::setCoord | ( | int | x, | |
int | y | |||
) |
Set new point coordinates.
x | new x coordinate | |
y | new y coordinate |
void GUI::Point::setX | ( | int | value | ) |
Set a new x coordinate.
value | new x coordinate |
void GUI::Point::setY | ( | int | value | ) |
Set a new y coordinate.
value | new y coordinate |