Re: [sigc] is possible make the emission of a signal private for a particular class?
- From: Paul Davis <paul linuxaudiosystems com>
- To: VinIPSmaker <vini ipsmaker gmail com>
- Cc: Libsigc++ <libsigc-list gnome org>
- Subject: Re: [sigc] is possible make the emission of a signal private for a particular class?
- Date: Wed, 5 May 2010 20:02:11 -0400
On Wed, May 5, 2010 at 7:52 PM, VinIPSmaker
<vini ipsmaker gmail com> wrote:
Hi guys, I was used to Qt, and I found libsigc++. Now I
like much the flexibility of libsigc++, and I wanna know how can I make a
behavior that is default and inflexible on Qt framework:
On Qt, if I
have a class that emit signals, only the objects of this class can emit
them, and anyone piece of code can only use the connect method of
signals. How can I make this using libsigc++?
your question seems quite confused. but to take a guess: if the signal is declared with public visibility then anyone can emit the signal:
class Foobar {
public:
...
sigc::signal0<void> mySignal;
...
};
Foobar foobar;
foobar.mySignal(); // emit signal
OR
foobar.mySignal.emit() // if you prefer a more explicit syntax
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]