🎉 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!

why don't consider the class method?

Started by
1 comment, last by WitchLord 18 years, 8 months ago
"Support for class methods with virtual base classes. This is just too complex and different on various compilers. It is also not very common." ... I think so, but, if AS can provide the class method call, not the object-oriented class design, it will give some expediently, otherwise, we must give the function that take structs for parameters a long name to prevent the repeated name. Such the keywords of public,private,protected or inherit are not need. In other words, the "class method" is another global function, bu more convenient.
Advertisement
Say what? Class member functions are not global functions, the implementations are quite different, especially with virtual base classes.
I'm also not sure I understood what you mean.

The statement that you quoted just means that you can't register virtual methods for classes that have virtual inheritance, i.e:

class Base{  virtual void func();};class Derivated : virtual Base{  void func();};


In this case you will not be able to register the func() method for the class Derivated, but you can register the func() method for the class Base. The reason is that it is very complicated to resolve the call to a virtual method from a virtual inheritance, and it is also highly unportable. If you have a class with virtual inheritance, you can write thin wrappers that call the virtual class methods. All other class methods are directly supported.

The script declared structures, will also eventually have support for class methods, and likely even allow inheritance.

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