Q_OBJECT_D
extern (C++)
enum Q_OBJECT_D =
q{
public:
extern(C++) extern static __gshared const(imported!q{qt.core.objectdefs}.QMetaObject) staticMetaObject;
extern(C++) override const(imported!q{qt.core.objectdefs}.QMetaObject)* metaObject() const
{
import qt.core.object;
return qt.core.object.QObject.d_ptr.metaObject ? qt.core.object.QObject.d_ptr.dynamicMetaObject() : &staticMetaObject;
}
extern(C++) override void * qt_metacast(const(char)* _clname)
{
import qt.core.objectdefs;
if (!_clname) return null;
import core.stdc.string;
if (!core.stdc..string.strcmp(_clname, qt.core.objectdefs.MetaObjectImpl!(typeof(this)).stringdata.stringdata0.ptr))
return static_cast!(void*)(this);
return super.qt_metacast(_clname);
}
extern(C++) override int qt_metacall(imported!q{qt.core.objectdefs}.QMetaObject.Call _c, int _id, void **_a)
{
import qt.core.objectdefs;
_id = super.qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
alias allMethods = qt.core.objectdefs.MetaObjectImpl!(typeof(this)).allMethods;
if (_c == qt.core.objectdefs.QMetaObject.Call.InvokeMetaMethod) {
if (_id < allMethods.length)
qt_static_metacall(this, _c, _id, _a);
_id -= allMethods.length;
} else if (_c == qt.core.objectdefs.QMetaObject.Call.RegisterMethodArgumentMetaType) {
if (_id < allMethods.length)
*reinterpret_cast!(int*)(_a[0]) = -1;
_id -= allMethods.length;
}
return _id;
}
extern(C++) static void qt_static_metacall(imported!"qt.core.object".QObject _o, imported!q{qt.core.objectdefs}.QMetaObject.Call _c, int _id, void **_a)
{
import qt.core.objectdefs;
if (_c == qt.core.objectdefs.QMetaObject.Call.InvokeMetaMethod) {
alias allMethods = qt.core.objectdefs.MetaObjectImpl!(typeof(this)).allMethods;
import std.conv, std.traits;
auto _t = static_cast!(typeof(this))(_o);
//Q_UNUSED(_t)
switch (_id) {
mixin((){
string methodCallCases;
static foreach(i; 0..allMethods.length)
{{
methodCallCases ~= text("\n case ", i, ": _t.", __traits(identifier, allMethods[i]), "(");
static foreach(j, P; Parameters!(allMethods[i]))
{
methodCallCases ~= text("*cast(Parameters!(allMethods[", i, "])[", j, "]*)(_a[", j + 1, "]), ");
}
methodCallCases ~= "); break;";
}}
return methodCallCases;
}());
default: {}
}
} else if (_c == qt.core.objectdefs.QMetaObject.Call.RegisterMethodArgumentMetaType) {
// TODO
} else if (_c == qt.core.objectdefs.QMetaObject.Call.IndexOfMethod) {
alias allSignals = qt.core.objectdefs.MetaObjectImpl!(typeof(this)).allSignals;
int *result = reinterpret_cast!(int *)(_a[0]);
static foreach(i; 0..allSignals.length)
{{
alias _t = qt.core.objectdefs.CPPMemberFunctionPointer!(typeof(this));
auto fp = &memberFunctionExternDeclaration!(allSignals[i]);
qt.core.objectdefs.CPPMemberFunctionPointer!(typeof(this)) memberFunction = qt.core.objectdefs.CPPMemberFunctionPointer!(typeof(this))(fp);
if (*reinterpret_cast!(_t *)(_a[1]) == memberFunction) {
*result = i;
return;
}
}}
}
//Q_UNUSED(_a);
}
} ~ QT_TR_FUNCTIONS ~ q{
private:
struct QPrivateSignal {}
};
qt core objectdefs
classesenumsfunctionsmanifest constantsstatic functionsstructstemplates