upm/src/nrf24l01/Callback.hpp
Noel Eck 666452e873 SWIGJAVA: Remove the last JAVA ifdefs from src
Removed all references to #ifdef SWIGJAVA and JAVACALLBACK from the
library source.  All java-specific source code has been moved to the
corresponding library's .i file for java.

    * Update library source
    * Update examples where necessary
    * The function pointer methodology has been remove from libraries
      which provided callbacks as both a class and a function pointer
      implementation.  Examples were updated to use the class version
      of callbacks.
    * Updated documentation for SWIGJAVA

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-01-24 09:31:05 -08:00

21 lines
258 B
C++

#pragma once
class Callback
{
public:
virtual ~Callback()
{
}
virtual void run()
{ /* empty, overloaded in Java*/
}
};
void generic_callback (Callback* callback)
{
if (callback == NULL)
return;
callback->run();
}