From: kentavr <an...@rb...> - 2009-10-15 14:14:03
|
Hi All, I am new to swig and here is the question: I am looking for example how I can use specialized templates defined in std_map.i. It looks like that template specialize_std_map_on_both can solve my problem. (may be not) My function in C++ returns std::map<std::string,double> foo(); declared in my.i file as %include "C:\swig\swigwin-1.3.39\swigwin-1.3.39\Lib\csharp\std_map.i" %template(DoubleMap) std::map<std::string,double>; When I am trying to access values in this map from C# the return type is not "double". I had to do this: SWIGTYPE_p_double swD = myMap.get(s); I bet that there should be an easy way to export pure doubles. Thanks for any help, Sergey -- View this message in context: http://www.nabble.com/C%2B%2B--%3E-CSharp-usage-of-std_map.i---tp25909398p25909398.html Sent from the swig-user mailing list archive at Nabble.com. |