🎉 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

Started by
3 comments, last by DaesDemon 18 years, 10 months ago
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 '_' ;)
Advertisement
Namespaces have not yet been implemented in AngelScript. I might implement them in a future version, but I can't promise that.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

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 ;)
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.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Thank you boss ;)

This topic is closed to new replies.

Advertisement