I have a c++
header file which contains some functions that the c++
code calls. These function should be mapped to corresponding Java
functions.
So it is a bit like callbacks, but I cannot figure out how to map them in JavaCpp
.
So for instance we have a header file:
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*F_ADDDCALLBACK)(uint32_t arg1, uint32_t arg2, int8_t *arg3);
extern F_ADDDCALLBACK m_CB;
void F_RegisterCallbacks(F_ADDDCALLBACK cb);
void F_Init();
void F_SomeOtherFunction(uint32_t arg1, uint8_t *arg2);
#ifdef __cplusplus
}
#endif
When these functions are called from some c++
code, it should in turn call some java
code.
How do I map this in JavaCpp
?