|
Boost : |
From: John Max Skaller (skaller_at_[hidden])
Date: 2001-05-07 14:28:41
Douglas Gregor wrote:
> > I have no idea what 'set, clear, empty' etc
> > might be for: functions can't be set, cleared,
> > or emptied. They should act like values, and be
> > callable.
> >
> > {Have I missed something deep here?]
>
> Prefix 'function' with 'boost::' and you've missed something :)
> boost::function is a generalized function object adaptor that is declared
> with some given function signature and that can contain any function object
> with a compatible signature. It overloads the function call operator to call
> the underlying function object's function call operator. One of its uses (the
> one we're debating currently) is as a callback.
Are you saying that 'set', for example, is to be used to
change the object to which the adaptor delegates?
So for example, if an adaptor f were registered as a callback,
the actual callback can be dynamically changed without
changing the object registered?
-- John (Max) Skaller, mailto:skaller_at_[hidden] 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk