Interfacing with C++ Classes

BlitzMax Forums/BlitzMax Programming/Interfacing with C++ Classes

The reason it failed is the interface methods all have to be virtual pure
on the interface class.

  static void hello() {cout << "Hello!!\n";}


Is a class function and cannot reference this, no way to get those methods through to MAX.

you would have to wrap class methods conventionally. As for the the simpler way that works too but you have to stub out the virtual desctructor and it makes it more difficult to implement polymorphic behavior without having seperate Free methods for each class.

With the interface based approach you can have 6 classes implement the same interface and even support multiple interfaces on one class and still expose that functionality to MAX.

Doug