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

The Border class is used to describe a border with four sides. The Border uses integer values. More...

#include "Border.h"

Inheritance diagram for ot::Border:
ot::Serializable

Public Member Functions

 Border ()
 
 Border (const ot::Color &_color, int _width)
 
 Border (const ot::Color &_color, int _leftWidth, int _topWidth, int _rightWidth, int _bottomWidth)
 
 Border (const Outline &_left, const Outline &_top, const Outline &_right, const Outline &_bottom)
 
 Border (const Border &_other)
 
virtual ~Border ()
 
Borderoperator= (const Border &_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.
 
void setColor (const ot::Color &_color)
 Will set the color for all four borders.
 
void setWidth (int _width)
 Will set the width for all four borders.
 
void setTop (const Outline &_s)
 Set the top border.
 
const Outlinetop (void) const
 
void setLeft (const Outline &_s)
 
const Outlineleft (void) const
 
void setRight (const Outline &_s)
 
const Outlineright (void) const
 
void setBottom (const Outline &_s)
 
const Outlinebottom (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.
 

Detailed Description

The Border class is used to describe a border with four sides. The Border uses integer values.

Constructor & Destructor Documentation

◆ Border() [1/5]

ot::Border::Border ( )
inline

◆ Border() [2/5]

ot::Border::Border ( const ot::Color & _color,
int _width )

◆ Border() [3/5]

ot::Border::Border ( const ot::Color & _color,
int _leftWidth,
int _topWidth,
int _rightWidth,
int _bottomWidth )

◆ Border() [4/5]

ot::Border::Border ( const Outline & _left,
const Outline & _top,
const Outline & _right,
const Outline & _bottom )

◆ Border() [5/5]

ot::Border::Border ( const Border & _other)

◆ ~Border()

ot::Border::~Border ( )
virtual

Member Function Documentation

◆ addToJsonObject()

void ot::Border::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

◆ bottom()

const Outline & ot::Border::bottom ( void ) const
inline

◆ left()

const Outline & ot::Border::left ( void ) const
inline

◆ operator=()

ot::Border & ot::Border::operator= ( const Border & _other)

◆ right()

const Outline & ot::Border::right ( void ) const
inline

◆ setBottom()

void ot::Border::setBottom ( const Outline & _s)
inline

◆ setColor()

void ot::Border::setColor ( const ot::Color & _color)

Will set the color for all four borders.

Parameters
_colorColor to set.

◆ setFromJsonObject()

void ot::Border::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.

◆ setLeft()

void ot::Border::setLeft ( const Outline & _s)
inline

◆ setRight()

void ot::Border::setRight ( const Outline & _s)
inline

◆ setTop()

void ot::Border::setTop ( const Outline & _s)
inline

Set the top border.

◆ setWidth()

void ot::Border::setWidth ( int _width)

Will set the width for all four borders.

Parameters
_widthWidth to set.

◆ top()

const Outline & ot::Border::top ( void ) const
inline

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