Re: [pygccxml-development] [new feature]add_properties
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-10-04 17:31:14
|
On 10/4/06, Kevin Bluck <kev...@gm...> wrote: > Roman Yakovenko wrote: > > Hi. I added new future - add_properties. > > The idea behind this functionality is to automatically recognize and > > add properties to the class. > > > Excellent idea. I was just thinking about how to script something like this. > > > my_class.add_properties() > > or > > my_class.add_properties( exclude_accessors=True ) > > > > I have a class with both getValue() and setValue(). setValue() is > explicitly excluded (it happens to be a protected member and I don't > want protected members.) > > I noticed that in this case add_properties() does not automatically add > a read-only property Value for the still-visible getValue(). You have to > specify param exclude_accessors=True. > > If I do not explicitly exclude member function setValue(), it binds a > setValue() function as expected, but it still generates a read-only > property Value regardless of exclude_accessors True or False. This is your use case, as I understand it: struct data_t{ int getValue() const { return 1;} protected: void setValue(int){} }; where setValue is excluded, right? If I am right, than I can not reproduce the bug ( behaviour ) you describe, sorry. Can you create small example that reproduce the problem? Thank you -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |