|
Boost : |
Subject: Re: [boost] the best possible c++ properties (implementation).
From: Germán Diago (germandiago_at_[hidden])
Date: 2010-03-02 13:00:31
> Can I just make mention another implementation in case you are not
> already aware of it; Matthew Wilson's from his STLSoft libraries
>
> http://www.stlsoft.org/doc-1.9/group__group____library____properties.html
>
> Though the main documentation for it is possibly only available in his
> Imperfect C++ book.
Thanks for the link.
I've been able to implement a better version than the first I posted.
Now there are just TWO pointers to member functions
per class, not per object. So every property has a pointer to an
object and the pointers to member functions are shared.
The properties can be virtual as well. You need to initialize
non-trivial properties with this pointer. You can also initialize it
with the this pointer and a value, but you don't need to initialize in
the runtime parameters the getters and setters anymore.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk