swig template integration