• Advertisement
Sign in to follow this  

Namespace questions

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