Boost logo

Boost Users :

From: srivatsan raghavan (machinshin2002_at_[hidden])
Date: 2002-07-16 14:59:42


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net