[C++-sig] pyste and virtual classes.

Nicodemus nicodemus at globalite.com.br
Tue Apr 1 13:43:49 CEST 2003


Giulio Eulisse wrote:

>>But Giulio, what's the problem in exporting all virtual functions? I 
>>assume you have something like:
>>
>>struct A
>>{
>>    virtual C getC();
>>};
>>    
>>
>
>it's more like:
>
>struct A
>{
>	virtual void setC(C *ptr); 
>};
>
>  
>
>>and you don't want to export the class C, right? But remember that 
>>exporting class A without class C will compile just fine. If you try to 
>>call getC in Python, you will just get an exception. Was that the 
>>problem, or I misunderstood?
>>    
>>
>
>It doesn't compile fine: it complains about non declared class C...
>I'll send you a real example as soon as I prepare one...
>

Ah! Indeed, but that's because QPopupMenu is forward declared in you 
header. Try to add:
Include("qpopupmenu.h")
to your pyste file. That should solve the problem.

>
>Ciao,
>Giulio
>
>
>_______________________________________________
>C++-sig mailing list
>C++-sig at python.org
>http://mail.python.org/mailman/listinfo/c++-sig
>
>.
>
>  
>






More information about the Cplusplus-sig mailing list