13 #ifndef BERRY_EXTENSION_TYPES_H
14 #define BERRY_EXTENSION_TYPES_H
39 typedef void (*Destructor)(QObject *);
40 typedef QObject* (*Constructor)();
48 static int registerType(
const char* typeName, Destructor destructor,
49 Constructor constructor);
73 static int type(
const char* typeName);
110 template <
typename T>
116 template <
typename T>
122 template <
typename T>
128 template <
typename T>
137 template <typename T, bool Defined = ExtensionTypeId2<T>::Defined>
144 template <
typename T>
163 template <
typename T>
174 typedef QObject*(*ConstructPtr)(
const T*);
175 ConstructPtr cptr = extensionTypeConstructHelper<T>;
176 typedef void(*DeletePtr)(T*);
177 DeletePtr dptr = extensionTypeDeleteHelper<T>;
The ExtensionType class manages named types.
static void destroy(int type, QObject *data)
static int registerTypedef(const char *typeName, int aliasId)
static const char * typeName(int type)
QObject *(* Constructor)()
static void unregisterType(const char *typeName)
void(* Destructor)(QObject *)
static int type(const char *typeName)
static bool isRegistered(int type)
static int registerType(const char *typeName, Destructor destructor, Constructor constructor)
static QObject * construct(int type)
QObject * extensionTypeConstructHelper(const T *)
void extensionTypeDeleteHelper(T *t)
int registerExtensionType(const char *typeName, T *dummy=nullptr)
#define org_blueberry_core_runtime_EXPORT
static int extensiontype_id()
static int extensiontype_id()
static int extensiontype_id()