|
From: James C. <mr...@gm...> - 2006-06-15 13:53:24
|
Hi I'm wrapping some C++ for python, and using stl::map.
So far I have:
%import stl.i
//%template() std::pair<std::string, std::string>;
//%template(String_StringMap) std::map<std::string, std::string>;
typedef std::map<std::string, std::string> String_StringMap;
class GraphProperty
{
public:
const String_StringMap& GetProperties();
....
( I've tried it with and without the %template declarations. Using
them gives me compile errors when my generated wrapper code is
compiled.)
What happens here is:
d = bright.Graph()
d.GetProperties()
<Swig Object at
_145fd601_p_std__mapTstd__string_std__string_std__lessTstd__string_t_std__allocatorTstd__pairTstd__string_const_std__string_t_t_t>
How do I make this work?
Thanks,
-Jim
|