[C++-sig] pyste && private copy constructor question.

Nicodemus nicodemus at esss.com.br
Sat Jan 31 20:19:12 CET 2004


Hanz Meizer wrote:

> Hi,


Hi Hanz, sorry about the delay!

> I'm trying to make the classes of an existing c++-project accessible 
> to python via the means of python. Unfortunately, there is a class 
> that has an interface like this:
>
> <snip example>
> My question is: How can I modify my pyste input file to work around 
> this problem? I figure that it's related to the fact that the copy 
> constructor is private. Unfortunately, I can't find any reasonable 
> pyste tutorial that covers more sophisticated topics and examples.


Actually, Pyste should generate a no_init declaration. This example does:

C++:

struct A
{
protected:
    A(int) {}

private:
    A() {}
    A(const A&) {}
}; 


generated:

BOOST_PYTHON_MODULE(a)
{
    class_< A, boost::noncopyable >("A", no_init)
    ;

}


Perhaps if you provide some code we can figure out the problem?

Regards,
Nicodemus.






More information about the Cplusplus-sig mailing list