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

#include "StyledTextEntry.h"

Inheritance diagram for ot::StyledTextEntry:
ot::Serializable

Public Member Functions

 StyledTextEntry ()=default
 
 StyledTextEntry (const StyledTextStyle &_style)
 
 StyledTextEntry (const ConstJsonObject &_jsonObject)
 
 StyledTextEntry (const StyledTextEntry &)=default
 
virtual ~StyledTextEntry ()=default
 
StyledTextEntryoperator= (const StyledTextEntry &)=default
 
virtual void addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const override
 Add the object contents to the provided JSON object.
 
virtual void setFromJsonObject (const ot::ConstJsonObject &_object) override
 Set the object contents from the provided JSON object.
 
void setStyle (const StyledTextStyle &_style)
 
StyledTextStylegetStyle (void)
 
const StyledTextStylegetStyle (void) const
 
void setText (const std::string &_text)
 
std::string & getText (void)
 
const std::string & getText (void) const
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 

Constructor & Destructor Documentation

◆ StyledTextEntry() [1/4]

ot::StyledTextEntry::StyledTextEntry ( )
default

◆ StyledTextEntry() [2/4]

ot::StyledTextEntry::StyledTextEntry ( const StyledTextStyle & _style)

◆ StyledTextEntry() [3/4]

ot::StyledTextEntry::StyledTextEntry ( const ConstJsonObject & _jsonObject)

◆ StyledTextEntry() [4/4]

ot::StyledTextEntry::StyledTextEntry ( const StyledTextEntry & )
default

◆ ~StyledTextEntry()

virtual ot::StyledTextEntry::~StyledTextEntry ( )
virtualdefault

Member Function Documentation

◆ addToJsonObject()

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

Add the object contents to the provided JSON object.

Parameters
_objectJson object reference to write the data to.
_allocatorAllocator.

Implements ot::Serializable.

◆ getStyle() [1/2]

StyledTextStyle & ot::StyledTextEntry::getStyle ( void )
inline

◆ getStyle() [2/2]

const StyledTextStyle & ot::StyledTextEntry::getStyle ( void ) const
inline

◆ getText() [1/2]

std::string & ot::StyledTextEntry::getText ( void )
inline

◆ getText() [2/2]

const std::string & ot::StyledTextEntry::getText ( void ) const
inline

◆ operator=()

StyledTextEntry & ot::StyledTextEntry::operator= ( const StyledTextEntry & )
default

◆ setFromJsonObject()

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

Set the object contents from the provided JSON object.

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

Implements ot::Serializable.

◆ setStyle()

void ot::StyledTextEntry::setStyle ( const StyledTextStyle & _style)
inline

◆ setText()

void ot::StyledTextEntry::setText ( const std::string & _text)
inline

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