Medical Imaging Interaction Toolkit  2018.4.99-36d69b77
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 43 of file berryIElementFactory.h.

Constructor & Destructor Documentation

◆ ~IElementFactory()

berry::IElementFactory::~IElementFactory ( )
virtual

Definition at line 17 of file berryIElementFactory.cpp.

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 files: