1 #pragma once 2 3 #if defined(SWIGJAVA) || defined(JAVACALLBACK) 4 class Callback 5 { 6 public: ~Callback()7 virtual ~Callback() 8 { 9 } run()10 virtual void run() 11 { /* empty, overloaded in Java*/ 12 } 13 }; 14 15 generic_callback(Callback * callback)16static void generic_callback (Callback* callback) 17 { 18 if (callback == NULL) 19 return; 20 callback->run(); 21 } 22 #endif 23