Jump to content
  • Advertisement
Sign in to follow this  
Wavesonics

asObjectType from a primitive array?

This topic is 3354 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

Should calling:
asIObjectType* elementType = scriptEngine->GetObjectTypeById( elementTypeId );


Return NULL for a script array that is for a primitive data type? For instance:
// Script
uint32[] someArray;


Makes sense, just making sure this is the expected behavior. [Edited by - Wavesonics on July 20, 2009 10:30:16 PM]

Share this post


Link to post
Share on other sites
Advertisement
Yes.

Generally speaking GetObjectTypeId() will only return an asIObjectType for non-primitive types, which you can identify by checking if any bits in the asTYPEID_MASK_OBJECT mask is set.

Share this post


Link to post
Share on other sites
Ah very good.

Have you thought about creating asObjectType instances in the engine or global space for the primitive types and returning those?

Seems like it might make it nice and uniform and remove potential special cases for users.

Share this post


Link to post
Share on other sites
Yes, indeed I have. I'll probably unify all types into an asITypeInfo interface. But it is very low priority at the moment.

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!