From 2bdde21a2f48731a9b56705fe41048fe99e3a9d6 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Tue, 7 Mar 2017 12:38:54 -0700 Subject: [PATCH] src/upm_vectortypes.i: SWIG interface file for vector types This interface file can be used to support some standard vector types in our SWIG interface code. The current vector types supported are: %template(intVector) vector; %template(int16Vector) vector; %template(floatVector) vector; %template(doubleVector) vector; %template(byteVector) vector; Using these makes it much easier and more "natural" for use with the SWIG languages rather than the currently used mechanism of array pointers and certain other pointer-based methods. Signed-off-by: Jon Trulson --- src/upm_vectortypes.i | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/upm_vectortypes.i diff --git a/src/upm_vectortypes.i b/src/upm_vectortypes.i new file mode 100644 index 00000000..04338317 --- /dev/null +++ b/src/upm_vectortypes.i @@ -0,0 +1,14 @@ +/* Standardized vector types usable in SWIG for those C++ functions + * that use them. + */ + +%include "std_vector.i" +%include "stdint.i" + +namespace std { + %template(intVector) vector; + %template(int16Vector) vector; + %template(floatVector) vector; + %template(doubleVector) vector; + %template(byteVector) vector; +}