|
Boost Users : |
From: Wu Yinghui, Freddie (yhwu_at_[hidden])
Date: 2006-09-17 21:57:23
Dear all,
I sent in this on 14 Sept, but have received no reply so far. As I'm not
sure if it was lost in the void, I'm resend the mail again. Please bear
with me if you have received the same question before.
> I'm a happy user of Boost.Signal, as it brings great power to our
> software design in terms of loosening all the coupling between
> components.
>
> However, I recently come across a case where a single-shot slot is
> desired (i.e., a signal-slot connection that is automatically
> disconnected once the signal is invoked for once). In our current
> implementation, we have to keep boost::signals::connection object around
> with the slot implementation, so that it can disconnect it after the
first invocation.
>
> However, we have this problem of boost::signals::connection management,
> since one signal may be connected to different signals and we have
> problem identifying the correct connection to be disconnected. So my
> question is: Is there any easier way (i.e., ways that doesn't involve
> the implementation of the slot function itself) that I can add a
> single-shot signal-slot connection?
>
> Any suggestion is appreciated.
Cheers,
Freddie
-- Wu Yinghui, Freddie Research & Development Senior Software Engineer Volume Interactions Pte Ltd 1 Kim Seng Promenade, #12-01 Great World City East Tower Singapore 237994 Tel: +65 62226962 (Ext 216) Fax: +65 62226215 Email: yhwu_at_[hidden] URL: http://www.volumeinteractions.com Important: This message is intended for the recipient(s) addressed above. It contains privileged and confidential information. If you are not the intended recipient, please notify the sender immediately by replying to this message and then delete it from your system. You must not read, copy, use, or disseminate this communication in any form. Thank you.
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