2D Point with integer values More...
#include "Point2D.h"
Public Member Functions | |
| Point2D () | |
| Point2D (int _x, int _y) | |
| Point2D (const Point2D &_other) | |
| virtual | ~Point2D () |
| Point2D & | operator= (const Point2D &_other) |
| bool | operator== (const Point2D &_other) const |
| bool | operator!= (const Point2D &_other) const |
| Point2D | operator+ (const Point2D &_other) const |
| Point2D & | operator+= (const Point2D &_other) |
| Point2D | operator- (const Point2D &_other) const |
| Point2D & | operator-= (const Point2D &_other) |
| virtual void | addToJsonObject (JsonValue &_object, JsonAllocator &_allocator) const override |
| Add the object contents to the provided JSON object. | |
| virtual void | setFromJsonObject (const ConstJsonObject &_object) override |
| Will set the object contents from the provided JSON object. | |
| int | x (void) const |
| Returns the current X value. | |
| int | y (void) const |
| Returns the current Y value. | |
| void | setX (int _x) |
| Set the X value. | |
| void | setY (int _y) |
| Set the Y value. | |
| void | set (int _x, int _y) |
| Set the X and Y value. | |
| Point2DF | toPoint2DF (void) const |
| Point2DD | toPoint2DD (void) const |
Public Member Functions inherited from ot::Serializable | |
| Serializable () | |
| virtual | ~Serializable () |
| virtual void | addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const =0 |
| Add the object contents to the provided JSON object. | |
2D Point with integer values
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
overridevirtual |
Add the object contents to the provided JSON object.
| _document | The JSON document (used to get the allocator) |
| _object | The JSON object to add the contents to |
|
inline |
|
inline |
|
inline |
Set the X and Y value.
| _x | The X value to set |
| _y | The y value to set |
|
overridevirtual |
Will set the object contents from the provided JSON object.
| _object | The JSON object containing the information |
| Will | throw an exception if the provided object is not valid (members missing or invalid types) |
Implements ot::Serializable.
|
inline |
Set the X value.
| _x | The X value to set |
|
inline |
Set the Y value.
| _y | The Y value to set |
| ot::Point2DD ot::Point2D::toPoint2DD | ( | void | ) | const |
| ot::Point2DF ot::Point2D::toPoint2DF | ( | void | ) | const |
|
inline |
Returns the current X value.
|
inline |
Returns the current Y value.