bug-commoncpp
[Top][All Lists]
Advanced

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

Re: Signals/Slots for CommonC++


From: David Sugar
Subject: Re: Signals/Slots for CommonC++
Date: Tue, 13 Jan 2004 22:51:50 -0500
User-agent: KMail/1.5.3

Is libsigc++ threadsafe?  Are there potential threading/synchronization 
issues/implications in slots/signal libraries?  These are the first two 
questions that came to my mind.

David

On Tuesday 13 January 2004 07:49 pm, Alex Pavloff wrote:
> For signals/slots, I would suggest just folding in the libsgic++ library
> that the gtkmm people created for help with making the C++ bindings for
> gtk.
>
> http://libsigc.sourceforge.net/
>
> Alex Pavloff - address@hidden
> ESA Technology ---- www.esatechnology.com
> ------- Linux-based industrial HMI ------
> -------- www.esatechnology.com/5k -------
>
> > -----Original Message-----
> > From: "Marc Boris Dürner" [mailto:address@hidden
> > Sent: Tuesday, January 13, 2004 10:13 AM
> > To: address@hidden
> > Subject: Signals/Slots for CommonC++
> >
> >
> > Hi,
> > A signal/slot implementation for CommonC++ is attached. This
> > is a preview and not yet
> > thread-safe(need help for this). It works as follows:
> >
> > class MyClass {
> >     Signal<int> signal;  // a signal carrying an int
> >     void printInt(int i) {
> >             std::cout << i << std::endl;
> >     }
> >     public:
> >     MyClass() {
> >             signal.connect(this, &MyClass::printInt);
> > //connect signal
> >             signal(100); // emit signal
> >     }
> > };
> >
> > The template class Signal takes the type of data it carries
> > as template type. Currently
> > Signals can transport no data or one parameter. It can be
> > connected/disconnected to
> > functions matching the type of parameter. Signals can be
> > connected to multiple slots and
> > other signals.
> >
> > Source is attached with a a simple test case.
> >
> > regards,
> > Marc
> >
> >
> >
> >
> >
> >
> >
> > --
> > +++ GMX - die erste Adresse für Mail, Message, More +++
> > Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net
>
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp





reply via email to

[Prev in Thread] Current Thread [Next in Thread]