Member functions
Static functions must be public and cannot be virtual.
The syntax of class method declarations is as follows:
name ([arg]..) [const] [=0] [/optflag[,optflag]../] ; [member_code]
Option flags can be given in a comma separated list of optflags enclosed in slashes. optflags can be boolean or take a value. The following flags are recognized:
Table 4-2. Flags in member function declaration
PyName=py_name Use py_name instead of the C++ function name ReleaseLock Release the python interpreter lock PreHook=hook_function Define hook_function to be called prior to the memberfunc PostHook=hook_function Define hook_function to be called after the memberfunc Transfer Ownership is transferred TransferThis Ownership of this is transferred TransferBack Ownership is transferred back
If the function is protected then call the public wrapper. Otherwise explicitly call the real function and not any version in the wrapper class in case it is virtual. This will prevent virtual loops. Don't need to worry about indirected objects for protected functions.