Jump to content
  • Advertisement
Sign in to follow this  
DaesDemon

Namespace questions

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

Hello again, Can i use the comma inside a type name to register it? I would like to make a pseudo namespace to register my C++ type like that for example:
[source language="cpp"]
r= mEngine->RegisterObjectType("XXX::ClassX",sizeof(XXX::ClassX),asOBJ_CLASS);
assert( r >= 0 ); 

and use it like this in AngelScript: XXX::ClassX object; Else i will use '_' ;)

Share this post


Link to post
Share on other sites
Advertisement
Namespaces have not yet been implemented in AngelScript. I might implement them in a future version, but I can't promise that.

Share this post


Link to post
Share on other sites
Yes thanks WitchLord , i had catch that, but is it a problem to use :: in the type name string, you know, like pseudo namespace.

But perhaps, is it better not to use theses commas as , next version, if it had namespace implementation, would have problem to manage this type of notation.

However , i will use '_' instead as it does'nt cause any problems for me. I just don't want my namespace catapult each others ;)

Share this post


Link to post
Share on other sites
AngelScript follows the same rules as C/C++ for valid identifiers, which means that :: cannot be part of the identifier.

'_' on the other hand would work just fine.

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!