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