OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::Size2DD Class Reference

2D Size with double values More...

#include "Size2D.h"

Inheritance diagram for ot::Size2DD:
ot::Serializable

Public Member Functions

 Size2DD ()
 
 Size2DD (double _w, double _h)
 
 Size2DD (const Size2DD &_other)
 
virtual ~Size2DD ()
 
Size2DDoperator= (const Size2DD &_other)
 
bool operator== (const Size2DD &_other) const
 
bool operator!= (const Size2DD &_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 (double _w)
 Set width.
 
double width (void) const
 Return the width.
 
void setHeight (double _h)
 Set height.
 
double 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.
 

Detailed Description

2D Size with double values

Constructor & Destructor Documentation

◆ Size2DD() [1/3]

ot::Size2DD::Size2DD ( )
inline

◆ Size2DD() [2/3]

ot::Size2DD::Size2DD ( double _w,
double _h )
inline

◆ Size2DD() [3/3]

ot::Size2DD::Size2DD ( const Size2DD & _other)
inline

◆ ~Size2DD()

virtual ot::Size2DD::~Size2DD ( )
inlinevirtual

Member Function Documentation

◆ addToJsonObject()

void ot::Size2DD::addToJsonObject ( JsonValue & _object,
JsonAllocator & _allocator ) const
overridevirtual

Add the object contents to the provided JSON object.

Parameters
_documentThe JSON document (used to get the allocator)
_objectThe JSON object to add the contents to

◆ height()

double ot::Size2DD::height ( void ) const
inline

Return the height.

◆ isValid()

bool ot::Size2DD::isValid ( void ) const
inline

Returns true if the width and height are greater or equal 0.

◆ operator!=()

bool ot::Size2DD::operator!= ( const Size2DD & _other) const
inline

◆ operator=()

Size2DD & ot::Size2DD::operator= ( const Size2DD & _other)
inline

◆ operator==()

bool ot::Size2DD::operator== ( const Size2DD & _other) const
inline

◆ setFromJsonObject()

void ot::Size2DD::setFromJsonObject ( const ConstJsonObject & _object)
overridevirtual

Will set the object contents from the provided JSON object.

Parameters
_objectThe JSON object containing the information
Exceptions
Willthrow an exception if the provided object is not valid (members missing or invalid types)

Implements ot::Serializable.

◆ setHeight()

void ot::Size2DD::setHeight ( double _h)
inline

Set height.

Parameters
_hHeight to set

◆ setWidth()

void ot::Size2DD::setWidth ( double _w)
inline

Set width.

Parameters
_wWidth to set

◆ width()

double ot::Size2DD::width ( void ) const
inline

Return the width.


The documentation for this class was generated from the following files: