On 7/5/06, Matthias Baas <ba...@ir...> wrote:
> Hi,
>
> I have a class with the following static method which can be used to
> register a callback function "func":
>
> static MCallbackId addEventCallback(const MString& event, void (*func)(
> void* clientData ), void* clientData = NULL, MStatus* ReturnStatus = NULL);
>
>
> Pyplusplus does not generate code for this one even so I did not exclude
> it explicitly. Basically, this is ok as the function pointer wouldn't
> work in Python anyway. The thing is just that I don't know *why* it was
> excluded. Actually I did expect it to show up and that I had to remove
> it manually (that's what I was about to do) but pyplusplus did something
> different and I'd just like to know why.
> So is this a "bug" that it doesn't show up in the generated code or is
> there some built-in rule that removed it from the output?
Please take a look on decl_wrappers.calldef_t._exportable_impl function
(http://svn.sourceforge.net/viewcvs.cgi/pygccxml/pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py?view=markup)
It contains code, that checks different conditions, whether function
exportable or not.
And if not it returns the reason.
Using decl_wrapper.decl_wrapper_t.why_not_exportable method, you can find out
why a declaration could not be exported.
( http://svn.sourceforge.net/viewcvs.cgi/pygccxml/pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper.py?view=markup
)
decl_wrapper.decl_wrapper_t.ignore is calculated property, so when
declaration is
not exportable, it returns True, thus forcing pyplusplus to skip the
declaration.
The problem is that, I still looking for a good way to give this
information to the user.
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|