OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::MenuEntryCfg Class Referenceabstract

#include "MenuEntryCfg.h"

Inheritance diagram for ot::MenuEntryCfg:
ot::Serializable ot::MenuClickableEntryCfg ot::MenuSeparatorCfg ot::MenuButtonCfg ot::MenuCfg

Public Types

enum  EntryType { Menu , Button , Separator }
 

Public Member Functions

 MenuEntryCfg ()
 
 MenuEntryCfg (const MenuEntryCfg &_other)
 
virtual ~MenuEntryCfg ()
 
MenuEntryCfgoperator= (const MenuEntryCfg &_other)
 
virtual MenuEntryCfgcreateCopy (void) const =0
 
virtual EntryType getMenuEntryType (void) const =0
 
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.
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 

Static Public Member Functions

static std::string toString (EntryType _type)
 
static EntryType stringToEntryType (const std::string &_type)
 
static const std::string & entryTypeJsonKey (void)
 

Member Enumeration Documentation

◆ EntryType

Enumerator
Menu 
Button 
Separator 

Constructor & Destructor Documentation

◆ MenuEntryCfg() [1/2]

ot::MenuEntryCfg::MenuEntryCfg ( )

◆ MenuEntryCfg() [2/2]

ot::MenuEntryCfg::MenuEntryCfg ( const MenuEntryCfg & _other)

◆ ~MenuEntryCfg()

ot::MenuEntryCfg::~MenuEntryCfg ( )
virtual

Member Function Documentation

◆ addToJsonObject()

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

Reimplemented in ot::MenuButtonCfg, ot::MenuCfg, and ot::MenuClickableEntryCfg.

◆ createCopy()

virtual MenuEntryCfg * ot::MenuEntryCfg::createCopy ( void ) const
pure virtual

◆ entryTypeJsonKey()

const std::string & ot::MenuEntryCfg::entryTypeJsonKey ( void )
static

◆ getMenuEntryType()

virtual EntryType ot::MenuEntryCfg::getMenuEntryType ( void ) const
pure virtual

◆ operator=()

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

◆ setFromJsonObject()

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

Reimplemented in ot::MenuButtonCfg, ot::MenuCfg, and ot::MenuClickableEntryCfg.

◆ stringToEntryType()

ot::MenuEntryCfg::EntryType ot::MenuEntryCfg::stringToEntryType ( const std::string & _type)
static

◆ toString()

std::string ot::MenuEntryCfg::toString ( EntryType _type)
static

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