[source language="cpp"]
r= mEngine->RegisterObjectType("XXX::ClassX",sizeof(XXX::ClassX),asOBJ_CLASS);
assert( r >= 0 );
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Namespace questions
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:
and use it like this in AngelScript:
XXX::ClassX object;
Else i will use '_' ;)
Namespaces have not yet been implemented in AngelScript. I might implement them in a future version, but I can't promise that.
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 ;)
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 ;)
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.
'_' on the other hand would work just fine.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement