CREATE_CONVENIENCE_WRAPPERS
enum CREATE_CONVENIENCE_WRAPPERS =
q{
static foreach(member; __traits(derivedMembers, typeof(this)))
{
static if((!(member.length >= 2 && member[0..2] == "__") || member == "__ctor")
&& !(member.length >= 32 && member[0..32] == "dummyFunctionForChangingMangling")
&& member != "rawConstructor")
static foreach(F; __traits(getOverloads, typeof(this), member))
{
static if(__traits(getVisibility, F) == "public" && anyParamConstStructRef!F)
{
mixin((){
string code;
code ~= "public extern(D) pragma(inline, true) ";
if(member == "__ctor")
code ~= "this";
else
{
static if(__traits(isStaticFunction, F))
code ~= "static ";
else static if(is(typeof(this) == class))
code ~= "final ";
code ~= "auto " ~ member;
}
code ~= "(Params...)(auto ref Params params)";
code ~= "if(isWrapperCallable!(F, Params))";
code ~= "{";
if(member == "__ctor")
code ~= "this(params);";
else
code ~= "return " ~ member ~ "(params);";
code ~= "}";
return code;
}());
}
}
}
};
qt helpers
aliasesenumsfunctionsmanifest constantstemplates