|
Boost Users : |
From: Christian Holmquist (c.holmquist_at_[hidden])
Date: 2007-10-02 06:07:04
Nevermind,
I'll just keep a vector<connection> in a signal-derived class, and
disconnects these after every invocation of the signal. Maybe not the most
clever way, but it works.
If there is an efficient way of doing this, I'll be happy to now about it
though.
Thanks,
Christian
On 02/10/2007, Christian Holmquist <c.holmquist_at_[hidden]> wrote:
>
> Hello,
>
> Is there a way to automatically have a slot disconnected after it has been
> called once, without managing the connection manually?
>
>
> void f()
> {
> }
>
> signal<void()> sig;
> sig.connect(&f);
> sig(); // f gets called
> sig(); // f shouldn't get called
>
>
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net