Re: [sigc] getting number of connected slots

Am 2003.10.24 18:27 schrieb(en) Roel Vanhout:
Hi all,

Sorry if this is in the documentation somewhere, I couldn't find it.
I'm writing a library that exposes a few signal objects that users of the library can connect to. Now I have a situation where I want to do a default operation if the user of the library hasn't connected a slot to one of those signals. Is there a way to get the number of slots that are connected to a signal? Are there any other ways I can do this? Thanks.

SignalN<...>::empty() indicates whether there are slots connected to
a signal. In libsigc++2 signal has an STL-like list API including
size(). If it is an option for you to work with an unstable library
you might want to try it out.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]