Sip has a number of directives that control the way C++ code
is generated. Since sip is essentially completely undocumented,
it was impossible to clearly describe all directives, or even to
be sure that this is an exhaustive list. Still, this list come
in useful. The directives are grouped according to function:
Documentation, Modules, Conditional Elements, C++ and Header
Code, Python Code sections, Mapped Classes, Special Python
methods and Other.
Python special methods can be
implemented, but code must be supplied. The following
directives define additional sections in a class declaration
(like public, private etc.). A typical sip file section is as
follows:
class X
{
...
PyMethods:
__str__
%MemberCode
C++ code (no enclosing braces needed).
Number and kind of arguments and return value depend on method
(see specialPyMethod in sip.h).
%End
...
}