Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berry::IPersistableElement Struct Referenceabstract

#include <berryIPersistableElement.h>

Inheritance diagram for berry::IPersistableElement:
Collaboration diagram for berry::IPersistableElement:

Public Member Functions

virtual QString GetFactoryId () const =0
 
- Public Member Functions inherited from berry::IPersistable
virtual ~IPersistable ()
 
virtual void SaveState (const SmartPointer< IMemento > &memento) const =0
 

Detailed Description

Interface for asking an object to store its state in a memento.

This interface is typically included in interfaces where persistance is required.

When the workbench is shutdown objects which implement this interface will be persisted. At this time the GetFactoryId method is invoked to discover the id of the element factory that will be used to re-create the object from a memento. Then the SaveState method is invoked to store the element data into a newly created memento. The resulting mementos are collected up and written out to a single file.

During workbench startup these mementos are read from the file. The factory Id for each is retrieved and mapped to an IElementFactory which has been registered in the element factory extension point. If a factory exists for the Id it will be engaged to re-create the original object.

See also
IAdaptable
IMemento
IElementFactory

Definition at line 49 of file berryIPersistableElement.h.

Member Function Documentation

virtual QString berry::IPersistableElement::GetFactoryId ( ) const
pure virtual

Returns the id of the element factory which should be used to re-create this object.

Factory ids are declared in extensions to the standard extension point "org.eclipse.ui.elementFactories".

Returns
the element factory id
See also
IElementFactory

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