|
Boost : |
From: Johan Torp (johan.torp_at_[hidden])
Date: 2007-05-21 11:31:33
>Looks good to me. You might consider a few minor additions:
>
> - A copy constructor for signalling_value, that just copies the
>underlying value
> - A copy assignment operator for signalling_value, that just
>copies the underlying value
Both should definitely be there.
> - A conversion to const T& (same functionality as get)
> - An assignment operator that takes a const T& (same functionality
>as set)
I think I prefer forcing users to be specific about what they do, in
this case to point out that they are not just setting a value but also
possibly signalling receivers. On the other hand, enabling these two
features would allow users to treat this class as a regular value in
generic programming. Which do you think is better?
>> 4. Do you have a better naming suggestion?
>Did you consider "observable_value"? Or even just "observable"?
I did, but I wanted to point out that I was using signals and slots.
Observable would be great if it was in the namespace boost::signals.
Do you think this class might be useful enough to be added to boost
slots and signals?
Best Regards, Johan Torp
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk