I create script api dumper and use that code:
for (asUINT m = 0, mc = type->GetBehaviourCount(); m < mc; m++) {
asEBehaviours bh;
asIScriptFunction* pM = type->GetBehaviourByIndex(m, &bh);
if (bh == asBEHAVE_CONSTRUCT || bh == asBEHAVE_DESTRUCT || bh == asBEHAVE_FACTORY)
Log::WriteRaw(String(pM->GetDeclaration(false, false, true)) + ";\n");
}
But for references types their factories not appear in list.
I explore the code in GetBehaviourByIndex - in behaviours list include only ctors:
// For reference types, the factories are also stored in the constructor
// list, so it is sufficient to enumerate only those
if( index - count < beh.constructors.GetLength() )
{
if( outBehaviour ) *outBehaviour = asBEHAVE_CONSTRUCT;
return engine->scriptFunctions[beh.constructors[index - count]];
}
else
count += (asUINT)beh.constructors.GetLength();
But I can not find , where the factories is pushed to ctors list.