I am trying to wrap the following abstract class using the director feature:
Listener.h:
class Listener {
protected:
void onEvent() = 0;
}
my interface file looks like this:
module(directors="1") Listener_Java
feature("director") Listener;
%{
#include "Listener.h"
%}
%include "Listener.h"
the resulting method in the generated Java proxy class looks like:
...
protected void onEvent() {
Listener_JavaJNI.Listener_onEvent();
}
what I would like to do is to generate the method as abstract with no body, like this:
protected void onEvent();
Is there any easy way to do this? the reason I want to make the method abstract is to force any derived class to override this method, because if it isn't overrided, when calling this event in other place in my c++ code, an exception arises (because it attempts to invoke pure virtual function that is not implemented)