From e9d13165bcc125df204f5427515eec24ef5e75ef Mon Sep 17 00:00:00 2001 From: vainocio Date: Thu, 24 Nov 2016 14:40:46 -0200 Subject: [PATCH] Update libfluid_msg_of10.i MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Debido a que Swig no lee la variable std::vector necesitaba aƱadirle la libreria y ademas asignarle la opcion para que no creara una clase swigtype_p_std_vectorT_fluid_msg_of10_port_t en java si no una clase "Ports_" de la cual puedo obtener mediante un ciclo, los puertos del switch --- examples/java/swig/libfluid_msg_of10.i | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/java/swig/libfluid_msg_of10.i b/examples/java/swig/libfluid_msg_of10.i index 010a65f..5be00ed 100755 --- a/examples/java/swig/libfluid_msg_of10.i +++ b/examples/java/swig/libfluid_msg_of10.i @@ -7,6 +7,7 @@ typedef unsigned int of_error; %include "stdint.i" %include "various.i" +%include "std_vector.i" %typemap(jni) (uint8_t *) "jbyteArray" %typemap(jni) (void *) "jbyteArray" @@ -14,6 +15,7 @@ typedef unsigned int of_error; %typemap(jtype) (void *) "byte[]" %typemap(jstype) (uint8_t *) "byte[]" %typemap(jstype) (void *) "byte[]" +%template(Ports_) std::vector; %typemap(in) void* { $1 = (void *) JCALL2(GetByteArrayElements, jenv, $input, 0);