Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
camitk::InterfacePersistence Class Referenceabstract

Interface for all objects that should be serialized by the PersistenceManager. More...

#include <InterfacePersistence.h>

+ Inheritance diagram for camitk::InterfacePersistence:
+ Collaboration diagram for camitk::InterfacePersistence:

Public Member Functions

virtual void fromVariant (const QVariant &)=0
 Load data from a QVariant to initialize the current object.
 
virtual QUuid getUuid () const =0
 Get the universally unique ID of the object to be saved.
 
virtual bool setUuid (QUuid id=QUuid())=0
 Set the universally unique ID of the object to be saved.
 
virtual QVariant toVariant () const =0
 Convert all data from the object to a QVariant (usually a QVariantMap)
 
virtual ~InterfacePersistence ()=default
 

Detailed Description

Interface for all objects that should be serialized by the PersistenceManager.

Constructor & Destructor Documentation

◆ ~InterfacePersistence()

virtual camitk::InterfacePersistence::~InterfacePersistence ( )
virtualdefault

Member Function Documentation

◆ fromVariant()

virtual void camitk::InterfacePersistence::fromVariant ( const QVariant &  )
pure virtual

◆ getUuid()

virtual QUuid camitk::InterfacePersistence::getUuid ( ) const
pure virtual

Get the universally unique ID of the object to be saved.

Implemented in camitk::Action, camitk::Component, camitk::AnatomicalOrientation, camitk::FrameOfReference, camitk::PropertyObject, and camitk::Transformation.

◆ setUuid()

virtual bool camitk::InterfacePersistence::setUuid ( QUuid  id = QUuid())
pure virtual

Set the universally unique ID of the object to be saved.

Parameters
idThe value of the UUID to set. If you don't set this parameter, it will set a random UUID.
Warning
DO NOT change the UUID of an object, set it only if it is null
Returns
If the current Uuid is not null, this returns false and does not modify the object

Implemented in camitk::Transformation, camitk::AnatomicalOrientation, camitk::FrameOfReference, camitk::Action, camitk::Component, and camitk::PropertyObject.

◆ toVariant()

virtual QVariant camitk::InterfacePersistence::toVariant ( ) const
pure virtual

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