[review] [PyKDE] Does SIP support nested class definition

John Drummond john.drummond at homecall.co.uk
Fri Aug 5 02:01:54 BST 2005


I was using Windows XP and MSVC6

After reading your email I changed to MSVC.NET and that fixed the problem.

Thanks for your help.

Jim Bublitz wrote:

>On Monday 01 August 2005 17:25, John Drummond wrote:
>  
>
>>Hi, Im trying to wrap a C++ class that has another class nested within it.
>>
>>I looked at PyQt sip files to find an example and qdawg.sip shows a
>>nested class, so I assume it should work.
>>
>>class Cmf : SMLEvent, SMLMessageReceiver
>>{
>>%TypeHeaderCode
>>#include "cmf.h"
>>%End
>>public:
>>    Cmf(Cmf* = 0, int=false);
>>
>>    class CommonStatus : SMLMessage
>>    {
>>    public:
>>        CommonStatus(unsigned char= 0);
>>        int IsMOBGuarding();
>>    };
>>};
>>
>>No sip errors but I get the following error in sipsmlCmfCommonStatus.cpp
>>when compiling:
>>error C2039: 'Cmf' : is not a member of 'CommonStatus
>>
>>        Cmf::CommonStatus *sipCpp;
>>        if
>>(sipParseArgs(&sipArgsParsed,sipArgs,"m",sipSelf,sipClass_Cmf_CommonStatus,
>>&sipCpp)) {
>>            int sipRes;
>>
>>            sipRes = sipCpp -> Cmf::CommonStatus::IsMOBGuarding();
>>
>>            return PyInt_FromLong((long)sipRes);
>>        }
>>
>>If I manually edit sipsmlCmfCommonStatus.cpp and change
>>sipRes = sipCpp -> Cmf::CommonStatus::IsMOBGuarding();
>>to
>>sipRes = sipCpp -> IsMOBGuarding();
>>then it compiles.
>>    
>>
>
>
>Which compiler and OS are  you using?
>
>The fully qualified method name (x::y->x::y::z()) is accepted by gcc/Linux - 
>KURL::List in PyKDE has similar generated code and compiles correctly.
>
>Jim
>
>
>  
>

-- 
John Drummond
Home email: mailto:john.drummond at homecall.co.uk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20050805/2b50b704/attachment.html


More information about the PyQt mailing list