mirror of
https://github.com/eclipse/upm.git
synced 2025-07-03 02:11:15 +03:00
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>
This commit is contained in:
@ -42,17 +42,24 @@ sig_handler(int signo)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
handler(clbk_data data)
|
||||
|
||||
//! [Interesting]
|
||||
class mycb : public virtual Callback
|
||||
{
|
||||
printf("callback data (%d)\n", data.is_heart_beat);
|
||||
}
|
||||
public:
|
||||
virtual void run(clbk_data arg)
|
||||
{
|
||||
printf("callback data (%d)\n", arg.is_heart_beat);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
mycb cb;
|
||||
//! [Interesting]
|
||||
Pulsensor sensor(handler);
|
||||
Pulsensor sensor(&cb);
|
||||
|
||||
sensor.start_sampler();
|
||||
while (!doWork) {
|
||||
|
Reference in New Issue
Block a user