Medical Imaging Interaction Toolkit
2016.11.0
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 39 of file berryExtensionType.h.
typedef QObject*(* berry::ExtensionType::Constructor) () |
Definition at line 45 of file berryExtensionType.h.
typedef void(* berry::ExtensionType::Destructor) (QObject *) |
Definition at line 44 of file berryExtensionType.h.
|
static |
Creates a default type.
Definition at line 170 of file berryExtensionType.cpp.
|
static |
Destroys the data, assuming it is of the type given.
Definition at line 185 of file berryExtensionType.cpp.
|
static |
Returns true if the datatype with ID type is registered; otherwise returns false.
Definition at line 145 of file berryExtensionType.cpp.
|
static |
Definition at line 76 of file berryExtensionType.cpp.
References berry::extensionTypeCustomType_unlocked().
Referenced by berry::registerExtensionType().
|
static |
Definition at line 102 of file berryExtensionType.cpp.
References berry::extensionTypeCustomType_unlocked().
Referenced by berry::registerExtensionType().
|
static |
Returns a handle to the type called typeName, or 0 if there is no such type.
Definition at line 153 of file berryExtensionType.cpp.
References berry::extensionTypeCustomType_unlocked().
|
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.
Definition at line 43 of file berryExtensionType.cpp.
Referenced by unregisterType().
|
static |
Unregisters a type with typeName.
Definition at line 124 of file berryExtensionType.cpp.
References typeName().