Workspace 6.21.5
|
A TypeAdaptor class for converting from Json to an ObjectGroup.
#include <Workspace/DataExecution/DataObjects/json.h>
Public Member Functions | |
bool | adapt (DataObject &src, DataObject &dest, bool copy) override |
Public Member Functions inherited from JsonObjectGroupAdaptorBase< QJsonDocument, To > | |
bool | adapt (DataObject &src, DataObject &dest, bool copy) override |
const TypeAdaptorFactory & | getFactory () const override |
Public Member Functions inherited from TypeAdaptor | |
~TypeAdaptor () override=default | |
virtual bool | adapt (DataObject &src, DataObject &dest, bool copy)=0 |
bool | canSerialize () const override |
virtual bool | connectConversionAction (QAction &action) |
virtual const TypeAdaptorFactory & | getFactory () const =0 |
bool | load (const SerializedItem &item) override |
bool | save (SerializedItem &item) const override |
Public Member Functions inherited from Serialize | |
virtual | ~Serialize ()=default |
virtual bool | canSerialize () const =0 |
virtual bool | load (const SerializedItem &item)=0 |
virtual bool | save (SerializedItem &item) const =0 |
Additional Inherited Members | |
Protected Member Functions inherited from JsonObjectGroupAdaptorBase< QJsonDocument, To > | |
JsonObjectGroupAdaptorBase ()=default | |
|
inlineoverridevirtual |
Performs the conversion between DataObjects.
src | The DataObject that will be converted and stored in dest. |
dest | The destination of the converted DataObject |
copy | Whether a copy should occur regardless of whether or not a copy can be avoided. |
Some adapt() calls will always effectively make a copy, since they create a different data type from the source. Some, however, are able to make the destination data object re-use the source, such as when the destination is a base class of the source' data type.
All TypeAdaptor subclasses are required to override this function and must respect the copy flag.
Implements TypeAdaptor.