Re: [pygccxml-development] More questions on the Ogre Binding
Brought to you by:
mbaas,
roman_yakovenko
|
From: Roman Y. <rom...@gm...> - 2006-05-29 18:13:18
|
On 5/29/06, Lakin Wecker <lak...@gm...> wrote:
> Yeah, something like that will work, but it would be better if py++
> would export these variables automatically. Are you planning on
> fixing this? (If so, then the rest of this letter is not necessary.)
>
> I looked at the code causing the problem, and it's all code similar to:
>
> class Foo{
> union {
> struct {
> float r,g,b,a;
> };
> float val[4];
> };
> };
>
> So (if my understanding is correct), the union is unnamed, but the
> union's members can be access through Foo::r, Foo::g, Foo::b, Foo::a,
> and Foo::val.
>
> It would be awesome if py++ exported these appropriately.
I will add this feature, but not in a week or two. I could be wrong,
but there are
4 or 5 places, where ogre uses such constructs.
mb =3D module_builder_t(...)
ogre =3D mb.namespace( 'ogre' )
print len( ogre.classes( '' ) ) / 2
for unnamed_cls in ogre.classes( '' ):
named_parent =3D unnamed.parent
if not named_parent.name:
named_parent =3D named_parent.parent
for mvar in named_paret.member_variables():
named_parent.add_code(
'add_property( "%(mvar)s", &Ogre::Vector3::%(mvar)s)"
% dict( mvar=3Dmvar.name ) ) )
May be the previous code needs to be fixed, but I think you've got the idea=
.
I work on preparing source code to release. This means: source code is open
for bug fixes + documentation. I have to do it, otherwise my project will
never have documentation :-(.
--=20
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|