[C++-sig] Re: Making copy of function derived from C++ pure virtual function
dave at boost-consulting.com
Wed Dec 8 20:44:52 CET 2004
Paul F. Kunz wrote:
> I have a function written in Python derived from C++. Now I want
> to clone this function in C++. What should I do in the copy
> constructor of the function wrapper? I have...
Way too much detail missing for me to say anything useful.
Start by defining your terms (or used established terminology):
What does it mean to have a "function written in Python derived from
C++?" What does it mean to clone a function?
> FunctionWrap ( const FunctionWrap & wrap )
> : FunctionBase ( wrap ),
> m_self ( wrap.m_self )
> // what should be here to create a new PyObject that is copy of old one?
What old one?
> FunctionBase *
> clone () const
> return new FunctionWrap ( *this );
More information about the Cplusplus-sig