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

The Serializable class is the default interface of serializable objects. It provides the default virtual addToJsonObject and setFromJsonObject methods. More...

#include "Serializable.h"

+ Inheritance diagram for ot::Serializable:

Public Member Functions

 Serializable ()=default
 
virtual ~Serializable ()=default
 
virtual void addToJsonObject (JsonValue &_jsonObject, JsonAllocator &_allocator) const =0
 Serialize the object data into the provided JSON object by using the provided allocator.
 
virtual void setFromJsonObject (const ConstJsonObject &_jsonObject)=0
 Set the data by deserializing the object. Set the object contents from the provided JSON object.
 
virtual std::string toJson () const
 Create a JSON string from the object data.
 

Detailed Description

The Serializable class is the default interface of serializable objects. It provides the default virtual addToJsonObject and setFromJsonObject methods.

Constructor & Destructor Documentation

◆ Serializable()

ot::Serializable::Serializable ( )
default

◆ ~Serializable()

virtual ot::Serializable::~Serializable ( )
virtualdefault

Member Function Documentation

◆ addToJsonObject()

virtual void ot::Serializable::addToJsonObject ( JsonValue & _jsonObject,
JsonAllocator & _allocator ) const
pure virtual

Serialize the object data into the provided JSON object by using the provided allocator.

Parameters
_jsonObjectJSON object value reference to write the data to.
_allocatorAllocator to use when writing data. Serializable::addToJsonObject

Implemented in ot::ServiceInitData, ot::ServiceRunData, ot::FileInformation, ot::ProjectFilterData, ot::ProjectInformation, ot::GridFSFileInfo, ot::FMCache, ot::SequenceDiaAbstractCallCfg, ot::SequenceDiaCfgParser, ot::SequenceDiaDirectCallCfg, ot::SequenceDiaFunctionCfg, ot::SequenceDiaRefCfg, ot::SequenceDiaSelfCallCfg, ot::GuiEvent, ot::ExtendedProjectInformation, ot::BasicServiceInformation, ot::Color, ot::ColorF, ot::LogMessage, ot::Point2D, ot::Point2DF, ot::Point2DD, ot::ReturnMessage, ot::ServiceBase, ot::ServiceDebugInformation, ot::Size2D, ot::Size2DF, ot::Size2DD, ot::UIDNamePair, ot::Border, ot::BorderF, ot::GraphicsChangeEvent, ot::GraphicsConnectionDropEvent, ot::GraphicsDoubleClickEvent, ot::GraphicsItemDropEvent, ot::Font, ot::GraphicsArcItemCfg, ot::GraphicsBoxLayoutItemCfg, ot::GraphicsConnectionCfg, ot::GraphicsDecoratedLineItemCfg, ot::GraphicsDecorationCfg, ot::GraphicsEllipseItemCfg, ot::GraphicsGridLayoutItemCfg, ot::GraphicsGroupItemCfg, ot::GraphicsImageItemCfg, ot::GraphicsInvisibleItemCfg, ot::GraphicsItemCfg, ot::GraphicsItemFileCfg, ot::GraphicsLayoutItemCfg, ot::GraphicsLineItemCfg, ot::GraphicsPickerCollectionPackage, ot::GraphicsNewEditorPackage, ot::GraphicsScenePackage, ot::GraphicsConnectionPackage, ot::GraphicsPickerCollectionCfg, ot::GraphicsPickerItemInfo, ot::GraphicsPolygonItemCfg, ot::GraphicsRectangularItemCfg, ot::GraphicsShapeItemCfg, ot::GraphicsStackItemCfg, ot::GraphicsTextItemCfg, ot::GraphicsTriangleItemCfg, ot::Margins, ot::MarginsF, ot::MarginsD, ot::CheckerboardPainter2D, ot::FillPainter2D, ot::GradientPainter2D, ot::GradientPainterStop2D, ot::LinearGradientPainter2D, ot::Painter2D, ot::Painter2DContainer, ot::RadialGradientPainter2D, ot::StyleRefPainter2D, ot::PenCfg, ot::PenFCfg, ot::StyleValue, and ot::TableRange.

◆ setFromJsonObject()

virtual void ot::Serializable::setFromJsonObject ( const ConstJsonObject & _jsonObject)
pure virtual

Set the data by deserializing the object. Set the object contents from the provided JSON object.

Parameters
_jsonObjectJSON object containing the information. Serializable::setFromJsonObject

Implemented in ot::ServiceInitData, ot::ServiceRunData, ot::FileInformation, ot::ProjectFilterData, ot::ProjectInformation, ot::GridFSFileInfo, ot::FMCache, ot::SequenceDiaAbstractCallCfg, ot::SequenceDiaCfgParser, ot::SequenceDiaDirectCallCfg, ot::SequenceDiaFunctionCfg, ot::SequenceDiaRefCfg, ot::SequenceDiaSelfCallCfg, ot::GuiEvent, ot::ExtendedProjectInformation, ot::BasicServiceInformation, ot::Color, ot::ColorF, ot::LogMessage, ot::Point2D, ot::Point2DF, ot::Point2DD, ot::ReturnMessage, ot::ServiceBase, ot::ServiceDebugInformation, ot::Size2D, ot::Size2DF, ot::Size2DD, ot::UIDNamePair, ot::Border, ot::BorderF, ot::GraphicsChangeEvent, ot::GraphicsConnectionDropEvent, ot::GraphicsDoubleClickEvent, ot::GraphicsItemDropEvent, ot::Font, ot::GraphicsArcItemCfg, ot::GraphicsBoxLayoutItemCfg, ot::GraphicsConnectionCfg, ot::GraphicsDecoratedLineItemCfg, ot::GraphicsDecorationCfg, ot::GraphicsEllipseItemCfg, ot::GraphicsGridLayoutItemCfg, ot::GraphicsGroupItemCfg, ot::GraphicsImageItemCfg, ot::GraphicsInvisibleItemCfg, ot::GraphicsItemCfg, ot::GraphicsItemFileCfg, ot::GraphicsLayoutItemCfg, ot::GraphicsLineItemCfg, ot::GraphicsPickerCollectionPackage, ot::GraphicsNewEditorPackage, ot::GraphicsScenePackage, ot::GraphicsConnectionPackage, ot::GraphicsPickerCollectionCfg, ot::GraphicsPickerItemInfo, ot::GraphicsPolygonItemCfg, ot::GraphicsRectangularItemCfg, ot::GraphicsShapeItemCfg, ot::GraphicsStackItemCfg, ot::GraphicsTextItemCfg, ot::GraphicsTriangleItemCfg, ot::Margins, ot::MarginsF, ot::MarginsD, ot::CheckerboardPainter2D, ot::FillPainter2D, ot::GradientPainter2D, ot::GradientPainterStop2D, ot::LinearGradientPainter2D, ot::Painter2D, ot::Painter2DContainer, ot::RadialGradientPainter2D, ot::StyleRefPainter2D, ot::PenCfg, ot::PenFCfg, ot::StyleValue, ot::TableRange, ot::GDSDebugInfo, ot::GSSDebugInfo, ot::LDSDebugInfo, ot::LSSDebugInfo, TupleInstance, MetadataCampaign, MetadataSeries, ot::BasicEntityInformation, ot::Rect, ot::RectF, ot::RectD, ot::ReturnValues, ot::SystemServiceConfigInfo, ot::CheckBoxCfg, ot::CopyEntityInformation, ot::CopyInformation, ot::DefaultPropertyValues, ot::DialogCfg, ot::MessageDialogCfg, ot::ModelLibraryDialogCfg, ot::OnePropertyDialogCfg, ot::Painter2DDialogFilter, ot::PropertyDialogCfg, ot::SelectEntitiesDialogCfg, ot::EntityTreeItem, ot::Grid, ot::LibraryModel, ot::LineEditCfg, ot::MenuButtonCfg, ot::MenuCfg, ot::MenuClickableEntryCfg, ot::MenuEntryCfg, ot::NavigationTreeItem, ot::NavigationTreeItemIcon, ot::NavigationTreePackage, ot::Path2D, ot::Path2DF, ot::PDFWidgetCfg, ot::Plot1DAxisCfg, ot::Plot1DCfg, ot::Plot1DCurveCfg, ot::Plot1DDataBaseCfg, ot::ProjectTemplateInformation, ot::Property, ot::PropertyBase, ot::PropertyGridCfg, ot::PropertyGroup, ot::PropertyManager, ot::StyledTextBuilder, ot::StyledTextEntry, ot::StyledTextStyle, ot::SyntaxHighlighterRule, ot::TableCfg, ot::TableHeaderItemCfg, ot::TextEditorCfg, ot::ToolBarButtonCfg, ot::ToolButtonCfg, ot::Transform, ot::VersionGraphCfg, ot::VersionGraphVersionCfg, ot::VisualisationCfg, ot::VisualisationTypes, ot::WidgetBaseCfg, ot::WidgetViewBase, MetadataParameter, MetadataQuantity, ot::ColorStyle, ot::ColorStyleValue, ot::SelectionInformation, DebugServiceConfig, LocalSessionService, Session, and Configuration.

◆ toJson()

std::string ot::Serializable::toJson ( ) const
virtual

Create a JSON string from the object data.

Reimplemented in ot::ReturnMessage.

References addToJsonObject(), and ot::JsonDocument::toJson().


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