Re: [C++-sig] Static, again...
by Hugo van der Merwe other posts by this author
Nov 13 2002 7:25AM messages near this date
Re: [C++-sig] Static, again...
|
Re: [C++-sig] Static, again...
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
_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
Hugo van der Merwe
Scott A. Smith
David Abrahams
Scott A. Smith
Nicodemus
Scott A. Smith
Mike Rovner
David Abrahams
David Abrahams
Hugo van der Merwe
Hugo van der Merwe
David Abrahams
Hugo van der Merwe
David Abrahams
|