Jump to content
  • Advertisement
Sign in to follow this  
Alexander Orefkov

Enumerate factories behaviours

This topic is 537 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]];
		count += (asUINT)beh.constructors.GetLength();

But I can not find , where the factories is pushed to ctors list.


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!