From: William S F. <ws...@fu...> - 2009-06-23 20:38:52
|
Xin Shuai wrote: > Hi: > As you know, some C++ stl libraries wrapping are provided by swig > library, like <iostream>, <string>, <pair>. > However, some other stl libraries are not. I'm doing C++ library > libsequence mapping, in which <functional> and <algorithm> are > frequently used but no corresponding wrapping provided by swig library. > Thus, I want to know what should I do with it? Do I have to wrap it by > my self ( I think it not easy) , or is there other better way? > Thanks! Yes you'll have to write wrappers for these. Feel free to submit them for inclusion with future versions of SWIG. It shouldn't be too hard... you need to take the template method declarations you are interested in and put them in a library interface file. Then you'd use %template to wrap instances for the types you are interested in. What might be tricky is dealing with iterators as not all languages have wrappers that deal with iterators. William |