Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
berry::IElementFactory Struct Referenceabstract

#include <berryIElementFactory.h>

Public Member Functions

virtual ~IElementFactory ()
 
virtual IAdaptableCreateElement (const SmartPointer< IMemento > &memento)=0
 

Detailed Description

A factory for re-creating objects from a previously saved memento.

Clients should implement this interface and include the name of their class in an extension to the platform extension point named "org.blueberry.ui.elementFactories". For example, the plug-in's XML markup might contain:

<extension point="org.blueberry.ui.elementFactories">
<factory id="com.example.myplugin.MyFactory" class="MyFactory" />
</extension>
See also
IPersistableElement
IMemento
IWorkbench::GetElementFactory

Definition at line 44 of file berryIElementFactory.h.

Constructor & Destructor Documentation

◆ ~IElementFactory()

virtual berry::IElementFactory::~IElementFactory ( )
virtual

Member Function Documentation

◆ CreateElement()

virtual IAdaptable* berry::IElementFactory::CreateElement ( const SmartPointer< IMemento > &  memento)
pure virtual

Re-creates and returns an object from the state captured within the given memento.

If the result is not null, it should be persistable; that is,

result.getAdapter(org.eclipse.ui.IPersistableElement.class)

should not return null. The caller takes ownership of the result and must delete it when it is not needed any more.

Parameters
mementoa memento containing the state for the object
Returns
an object, or nullptr if the element could not be created

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