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

#include "StyledTextBuilder.h"

Inheritance diagram for ot::StyledTextBuilder:
ot::Serializable

Public Member Functions

 StyledTextBuilder ()
 
 StyledTextBuilder (const ConstJsonObject &_jsonObject)
 
 StyledTextBuilder (const StyledTextBuilder &_other)=default
 
virtual ~StyledTextBuilder ()=default
 
StyledTextBuilderoperator= (const StyledTextBuilder &_other)=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.
 
bool isEmpty (void) const
 Returns true if the builder has no entries that should be displayed (no text provided).
 
const std::list< StyledTextEntrygetEntries (void) const
 
StyledTextBuilderoperator<< (const char *_text)
 
StyledTextBuilderoperator<< (const std::string &_text)
 
StyledTextBuilderoperator<< (StyledText::ColorReference _colorReference)
 
StyledTextBuilderoperator<< (StyledText::TextControl _control)
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 

Constructor & Destructor Documentation

◆ StyledTextBuilder() [1/3]

ot::StyledTextBuilder::StyledTextBuilder ( )

◆ StyledTextBuilder() [2/3]

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

◆ StyledTextBuilder() [3/3]

ot::StyledTextBuilder::StyledTextBuilder ( const StyledTextBuilder & _other)
default

◆ ~StyledTextBuilder()

virtual ot::StyledTextBuilder::~StyledTextBuilder ( )
virtualdefault

Member Function Documentation

◆ addToJsonObject()

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

◆ getEntries()

const std::list< StyledTextEntry > ot::StyledTextBuilder::getEntries ( void ) const
inline

◆ isEmpty()

bool ot::StyledTextBuilder::isEmpty ( void ) const

Returns true if the builder has no entries that should be displayed (no text provided).

◆ operator<<() [1/4]

ot::StyledTextBuilder & ot::StyledTextBuilder::operator<< ( const char * _text)

◆ operator<<() [2/4]

ot::StyledTextBuilder & ot::StyledTextBuilder::operator<< ( const std::string & _text)

◆ operator<<() [3/4]

ot::StyledTextBuilder & ot::StyledTextBuilder::operator<< ( StyledText::ColorReference _colorReference)

◆ operator<<() [4/4]

ot::StyledTextBuilder & ot::StyledTextBuilder::operator<< ( StyledText::TextControl _control)

◆ operator=()

StyledTextBuilder & ot::StyledTextBuilder::operator= ( const StyledTextBuilder & _other)
default

◆ setFromJsonObject()

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


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