Advertisement

why don't consider the class method?

Started by October 04, 2005 08:53 AM
1 comment, last by WitchLord 19 years, 1 month 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.
Say what? Class member functions are not global functions, the implementations are quite different, especially with virtual base classes.
Advertisement
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