Title: Message
Greetings-
 
I am attempting to wrap a shared library on Linux using SIP. This shared library's API defines several C++ classes that interelate (in both IS-A and HAS-A relationships). Currently, all the classes are declared in a single .h file.
 
Questions:
 
1. What is the difference between %Import and %Include?
2. Should I define a single top level .sip file that has the %Module statement and then %Imports/%Includes each of the .sip files for each class that is being wrapped? If not, where does the %Module statement go? I am confused bt the PyQt file qtmod.sip that %Includes other .sip files, but then those .sip files %Import qtmod.sip.
3. In the PyQt .sip files, the %Module statement includes a 0 (zero) after the module name. This is not in the SIP docs. What does it mean?
4. Should the .sip file for each class %Include or %Import the .sip file for classes that are referenced by the wrapped class?
5. In many of the PyQt .sip files, there isn't any %Include or %Imports to define base classes. How is this so?
6. Is it possible to add methods to classes in the .sip file that don't exist in (or exist differently) the wrapped .cpp code? For example, could I add a method that returns a Python list instead of having the Python client code call getFirst()/getNext() to enumerate a list of items?
7. Are there any tools to automate h2sip (at least the basic stuff that can be automated)?
 
 
Thanks for any help!
 
Regards,
 
Don

Reply via email to