Re: [pygccxml-development] pyplusplus usage
Brought to you by:
mbaas,
roman_yakovenko
|
From: Roman Y. <rom...@gm...> - 2006-06-01 18:59:09
|
On 6/1/06, Lakin Wecker <lak...@gm...> wrote:
> I've been trying things like:
>
> Matrix4 = ogre_ns.classes('Matrix4').member_operators('operator[]').exclude()
You don't mind I correct your code a little, right?
ogre_ns.classes('Matrix4').member_operators(symbol='[]').exclude()
> and
> ogre_ns.classes('HardwareBuffer').enumerations ('Usage').exclude()
>
> But:
> ogre_ns.classes('HardwareBuffer').enumerations ('Usage')
> and
> Matrix4 = ogre_ns.classes('Matrix4').member_operators('operator[]')
>
> both return a NoneType. And the result is that the only way I can
> achieve this effect is:
>
> def exclude_operator_index (decl):
> value = decl.name.startswith('operator[]')
> if value: decl.exclude()
> return value
> ogre_ns.classes('Matrix4').member_operators (exclude_operator_index)
> ogre_ns.classes('Matrix3').member_operators (exclude_operator_index)
>
> def exclude_usage (decl):
> value = decl.name.startswith('Usage')
> if value: decl.exclude()
> return value
> ogre_ns.classes('HardwareBuffer').enumerations (exclude_usage)
>
>
> I'm not sure if this is a similar issue to one of the ones that Allen
> was talking about, but it would be nice to be able to use the first
> way.
Yes, it is the same issue. But in you case you have simple work around.
The first query don't have to be multiple query:
ogre_ns.class_('Matrix4').member_operators(symbol='[]').exclude()
ogre_ns.class_('HardwareBuffer').enumerations ('Usage')
-------------^^^^^^ class_ instead of classes
This will work for you.
> Lakin
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|