Medical Imaging Interaction Toolkit
2024.06.00
Medical Imaging Interaction Toolkit
|
The ExtensionType class manages named types. More...
#include <berryExtensionType.h>
Public Types | |
typedef void(* | Destructor) (QObject *) |
typedef QObject *(* | Constructor) () |
Static Public Member Functions | |
static int | registerType (const char *typeName, Destructor destructor, Constructor constructor) |
static int | registerTypedef (const char *typeName, int aliasId) |
static void | unregisterType (const char *typeName) |
static int | type (const char *typeName) |
static const char * | typeName (int type) |
static bool | isRegistered (int type) |
static QObject * | construct (int type) |
static void | destroy (int type, QObject *data) |
The ExtensionType class manages named types.
The class associates a type name to a type so that it can be created and destructed dynamically at run-time. Call registerExtensionType() to make the type known.
Any class or struct that inherits from QObject and has a public default constructor, and a public destructor can be registered.
Definition at line 34 of file berryExtensionType.h.
typedef QObject*(* berry::ExtensionType::Constructor) () |
Definition at line 40 of file berryExtensionType.h.
typedef void(* berry::ExtensionType::Destructor) (QObject *) |
Definition at line 39 of file berryExtensionType.h.
|
static |
Creates a default type.
|
static |
Destroys the data, assuming it is of the type given.
|
static |
Returns true if the datatype with ID type is registered; otherwise returns false.
|
static |
Referenced by berry::registerExtensionType().
|
static |
Referenced by berry::registerExtensionType().
|
static |
Returns a handle to the type called typeName, or 0 if there is no such type.
|
static |
Returns the type name associated with the given type, or 0 if no matching type was found. The returned pointer must not be deleted.
|
static |
Unregisters a type with typeName.