Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
Register subclasses of Question to create instances of them based on their type string. More...
#include <mitkIQuestionFactory.h>
Public Member Functions | |
virtual | ~IQuestionFactory () |
virtual void | Register (Question *question)=0 |
Register a Question subclass for the instance creation based on its type string. More... | |
virtual Question * | Create (const std::string &type) const =0 |
Create an instance of a Question subclass based on its type string. More... | |
Static Public Member Functions | |
static IQuestionFactory * | GetInstance () |
Obtain a pointer to the single instance of this service. More... | |
Register subclasses of Question to create instances of them based on their type string.
This is a service interface. Obtain a pointer to its single instance via GetInstance().
Each Question subclass must be registered by calling Register(), which is typically done in the module activator class. After Question subclasses are registered, instances of them can be created with Create() based on their type string. This mechanism is primarily used for the deserialization of questions.
Definition at line 34 of file mitkIQuestionFactory.h.
|
virtual |
|
pure virtual |
Create an instance of a Question subclass based on its type string.
Implemented in mitk::Forms::QuestionFactory.
|
static |
Obtain a pointer to the single instance of this service.
|
pure virtual |
Register a Question subclass for the instance creation based on its type string.
The service takes over ownership of the passed Question pointer.
Implemented in mitk::Forms::QuestionFactory.