2D Size with float values More...
#include "Size2D.h"
Public Member Functions | |
Size2DF () | |
Size2DF (float _w, float _h) | |
Size2DF (const Size2DF &_other) | |
virtual | ~Size2DF () |
Size2DF & | operator= (const Size2DF &_other) |
bool | operator== (const Size2DF &_other) const |
bool | operator!= (const Size2DF &_other) const |
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. | |
bool | isValid (void) const |
Returns true if the width and height are greater or equal 0. | |
void | setWidth (float _w) |
Set width. | |
float | width (void) const |
Return the width. | |
void | setHeight (float _h) |
Set height. | |
float | height (void) const |
Return the height. | |
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 Size with float 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 |
Return the height.
|
inline |
Returns true if the width and height are greater or equal 0.
|
inline |
|
inline |
|
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 height.
_h | Height to set |
|
inline |
Set width.
_w | Width to set |
|
inline |
Return the width.