[C++-sig] Static, again...

Hugo van der Merwe hugo at adept.co.za
Wed Nov 13 08:25:48 CET 2002


On Wed, Nov 13, 2002 at 08:51:12AM +0200, Hugo van der Merwe wrote:
> Do properties currently only handle straight forward single parameter
> "setters"? How difficult would it be to allow it to do two parameters,
> with e.g. "object.property[5] = 10"? (Or can it do that already?)

I just saw this in another email:

> > It seems natural to expose class Heavy with 3 attributes: x,y and z which
> > will behave like dictionaries.
> > How to do that?
> 
> Use the add_property member of class_<>:
> 
>    http://www.boost.org/libs/python/doc/v2/class.html#class_-spec-modifiers

Cool, I'll try testing it later. Is there a way to expose a 3
parameter "setter" (which can then be addressed like a matrix)? I'd
think this is asking a bit too much, at this point one should probably
just stick with "Get(x,y)" and "Set(x,y,value)" methods.

Thanks,
Hugo van der Merwe




More information about the Cplusplus-sig mailing list