Hello everybody.
I know in AngelScript the "static" class method is not implemented yet.
By the way, I'm looking for a solution to have something similar.
Do you have any ideas on how to achieve this?
AngelScript and static method
In C++ a static class method is just a global function within the namespace of the class. As the access to protected and private members can be given to global functions with the 'friend' keyword, there is really no difference at all besides the syntax.
In AngelScript static methods are not yet available (as you already knew), nor is the friend keyword (probably never will be). While class members can be made private, I sincerely doubt it is done a lot in scripts, so the need for static methods doesn't seem very urgent to me.
Is there a specific reason you want to use static class methods in AngelScript? If you have a specific scenario that cannot be solved without it I'll see if I can prioritize this feature.
Regards,
Andreas
In AngelScript static methods are not yet available (as you already knew), nor is the friend keyword (probably never will be). While class members can be made private, I sincerely doubt it is done a lot in scripts, so the need for static methods doesn't seem very urgent to me.
Is there a specific reason you want to use static class methods in AngelScript? If you have a specific scenario that cannot be solved without it I'll see if I can prioritize this feature.
Regards,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement