Added bindings for iAcceleration sensors

Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Serban Waltter
2018-08-07 17:12:08 +03:00
committed by Mihai Tudor Panu
parent f992876461
commit b6e53f7da8
47 changed files with 448 additions and 84 deletions

View File

@ -6,6 +6,39 @@
#ifdef SWIGJAVA
%include <swiginterface.i>
%include "typemaps.i"
%{
#include <vector>
%}
%import "../../src/upm_javastdvector.i"
%typemap(javaimports) SWIGTYPE %{
import java.util.AbstractList;
import java.lang.Float;
%}
/* Using the JAVA class types outside the core package requires
getCPtr to be public, modify that here */
%typemap(javabody) SWIGTYPE %{
private long swigCPtr;
protected boolean swigCMemOwn;
public $javaclassname(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
public static long getCPtr($javaclassname obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
%}
%typemap(javaout) std::vector<float> {
return (AbstractList<Float>)(new $&javaclassname($jnicall, true));
}
%typemap(jstype) std::vector<float> "AbstractList<Float>"
%template(floatVector) std::vector<float>;
%interface_impl (upm::iClock);
%interface_impl (upm::iCollision);
%interface_impl (upm::iDistance);