I have a class with the method:
I want to expose that to AngelScript, what's the most efficient way to do so?
Jump to content
Posted 16 January 2013 - 09:21 AM
Due to how templates are implemented in C++, there is no real easy/efficient way. You can probably muck around with generics in AngelScript, but you're pretty much going to be rewriting everything when you're done.
Posted 19 January 2013 - 01:41 PM
You'll probably need to write a wrapper for each type you expect the scripts to be able to use.
Alternatively you may be able to use the variable argument type or the generic calling convention to implement a single wrapper that dynamically determines the type the script is expecting and calls the correct children_of_type template function.