[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] sip doesn't recognize structs with parent structs/classes
From:       Jim Bublitz <jbublitz () nwinternet ! com>
Date:       2008-07-16 23:44:58
Message-ID: 200807161644.58593.jbublitz () nwinternet ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wednesday 16 July 2008 16:12, Erick Tryzelaar wrote:
> I've got a simple sip file that has:
> 
> struct Foo {
> %TypeHeaderCode
> #include "foo.h"
> %End
> 
> virtual Foo();
> };
> 
> struct Bar: Foo {
> %TypeHeaderCode
> #include "foo.h"
> %End
> 
> virtual Bar();
> };
> 
> 
> That should be valid code though, right?


It's valid C++, sip may or may not accept it (sip only covers a meaningful subset of \
C++), and it's identical to the following code which sip will accept:

class Foo {
%TypeHeaderCode
#include "foo.h"
%End

public:
  virtual Foo();
};

class Bar: Foo {
%TypeHeaderCode
#include "foo.h"
%End

public:
   virtual Bar();
};

Jim


[Attachment #5 (text/html)]

<html><head><meta name="qrichtext" content="1" /></head><body \
style="font-size:10pt;font-family:Sans Serif"> <p>On Wednesday 16 July 2008 16:12, \
Erick Tryzelaar wrote:</p> <p>&gt; I've got a simple sip file that has:</p>
<p>&gt;</p>
<p>&gt; struct Foo {</p>
<p>&gt; %TypeHeaderCode</p>
<p>&gt; #include &quot;foo.h&quot;</p>
<p>&gt; %End</p>
<p>&gt;</p>
<p>&gt;   virtual Foo();</p>
<p>&gt; };</p>
<p>&gt;</p>
<p>&gt; struct Bar: Foo {</p>
<p>&gt; %TypeHeaderCode</p>
<p>&gt; #include &quot;foo.h&quot;</p>
<p>&gt; %End</p>
<p>&gt;</p>
<p>&gt;   virtual Bar();</p>
<p>&gt; };</p>
<p>&gt;</p>
<p>&gt;</p>
<p>&gt; That should be valid code though, right?</p>
<p></p>
<p></p>
<p>It's valid C++, sip may or may not accept it (sip only covers a meaningful subset \
of C++), and it's identical to the following code which sip will accept:</p> <p></p>
<p>class Foo {</p>
<p>%TypeHeaderCode</p>
<p>#include &quot;foo.h&quot;</p>
<p>%End</p>
<p></p>
<p>public:</p>
<p>  virtual Foo();</p>
<p>};</p>
<p></p>
<p>class Bar: Foo {</p>
<p>%TypeHeaderCode</p>
<p>#include &quot;foo.h&quot;</p>
<p>%End</p>
<p></p>
<p>public:</p>
<p>   virtual Bar();</p>
<p>};</p>
<p></p>
<p>Jim</p>
</body></html>



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic