Implementing SWIG Templating.