[C++-sig] Exposing inherited members with Py++

Roman Yakovenko roman.yakovenko at gmail.com
Thu Sep 20 11:46:56 CEST 2007


On 9/20/07, Pertti Kellomäki <pertti.kellomaki at tut.fi> wrote:
>
> Is there a way to expose inherited members without exposing
> the classes they were inherited from?


No

If I have the following
> classes and expose them using Py++, C1::f() is exposed:
>
>    class C {
>    public:
>      C();
>      virtual ~C();
>      virtual int f();
>    };
>
>    class C1 : public C {
>    public:
>      C1();
>    };
>
> However, if I exclude class C, C1::f() is no longer exposed. If
> I repeat f() in the declaration of C1, it is exposed, but this is
> not really an option for me.
>
> The reason for excluding C is that it is defined in another library,
> separately exposed using Py++.
>

Please read this:
http://language-binding.net/pyplusplus/documentation/multi_module_development.html

If your use case is pretty complex ( contains many classes and functions ),
than SVN version of Py++ contains new functionality that does such things
automatically:

mb = module_builder_t( ... )
mb.register_module_dependency( path to directory where other module
generated the code )

Of course the order of running code generators is important.


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070920/907ce42a/attachment.htm>


More information about the Cplusplus-sig mailing list