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<int>;
%template(int16Vector)  vector<int16_t>;
%template(floatVector)  vector<float>;
%template(doubleVector) vector<double>;
%template(byteVector)   vector<uint8_t>;

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 <jtrulson@ics.com>
This commit is contained in:
Jon Trulson 2017-03-07 12:38:54 -07:00
parent 6ceebc9a17
commit 2bdde21a2f

14
src/upm_vectortypes.i Normal file
View File

@ -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<int>;
%template(int16Vector) vector<int16_t>;
%template(floatVector) vector<float>;
%template(doubleVector) vector<double>;
%template(byteVector) vector<uint8_t>;
}