boost::python and operator overloading
hi all, i'm using boost::python to add acces to a C++ based network logging system from python and i'm running into a few snags wrt operator overloading .. specifically.. some of the classes support some operator signatures that i'm not sure how to export to python .. the python docs & boost::python discuss overloading operators, but only in the context of numeric extensions, and there is some things about a __coerce__ method .. but i'm not clear on how they should be used .. for example supports a stream-like interface: class LogStream { ILogStream& operator<<(long double ld); ILogStream& operator<<(std::string s); //for stream manipulators ILogStream& operator<<( ILogStream& (*pf)(ILogStream&)); } ; these are clearly not numeric operator overloads is there any way i can map these operators to their python equivalents ? --vat __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com
participants (1)
-
srivatsan raghavan