[PyQt] Getting around Circualr references in SIP modules
Phil Thompson
phil at riverbankcomputing.com
Thu Dec 9 22:33:26 GMT 2010
On Thu, 9 Dec 2010 14:17:31 -0800, Nate Reid <gnatty7 at hotmail.com> wrote:
> I am wrapping a set of components that are generally independent of each
> other, but not always.
>
> For example, I have
> ///////
> // foo module
> %Module foo
> %Import common.sip // Need to get a Blah
> %Include SomeClass.sip
>
> Blah* getTheBlah();
> %MethodCode
> sipRes = ...
> %End
>
> ///////
> // SomeClass.sip
> class SomeClass
> {
> %TypeHeaderCode
> ...
>
> };
>
> ///////
> // common.sip
> %Module common
> %Import foo // Need SomeClass
> class Blah{
> ...
> SomeClass* getVal();
> };
>
>
> So, common and foo are different modules but they use classes from each
> other's modules. How do I get around this problem? Is there something
I
> can do with ConsolidatedModule, or what not to still et these modules be
> build and installed independently but get around this circular reference
/
> Import issue?
They probably all need to be part of the same module, but you could try
playing with the /External/ class annotation.
Phil
More information about the PyQt
mailing list