Re: [pygccxml-development] __str__ and op<<
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <ba...@ir...> - 2006-10-11 16:59:20
|
Allen Bierbaum wrote: > Does anyone have any code that "automatically" creates a __str__ > operator for a class if it has an ostream op<< that can write it out in C++? For the Maya bindings I manually create __str__ methods and use cdef to assign them to the classes (luckily I don't need such a method for every class). I don't remember the details but I had some problems when I tried to wrap the << operator directly. As to a fully automatic solution, isn't one of the problems that Py++ doesn't take friend functions into account? (or does it meanwhile?) - Matthias - |