Boost logo

Boost :

Subject: Re: [boost] [Signal] Variadic template implementation of signal/slot
From: Kevin Brandon (staticrealm_at_[hidden])
Date: 2009-05-21 14:11:47


>On Thu, May 21, 2009 at 10:56 AM, Frank Mori Hess <frank.hess_at_[hidden]> wrote:
>>
>> On Thursday 21 May 2009, Kevin Brandon wrote:
>>
>>> One neat feature that my implementation does allow for is that both
>>> functions and function pointers are considered "slots" and all can connect
>>> to the signal of the correct signature.

>> But your interface only supports a subset of the slot types supported by
>> Boost.Signals, since it doesn't support functor objects such as those
>> returned by boost::bind.

I should have said is that I did not baseline at all off of Signals or
Signals2. I did peruse
through them while I was searching for examples of Signal and Slots. I
did like what I saw;
however, my thought and intention was how to make a variadic template
version of what I
was seeing. So in effort what I created was a proof of concept, not a
full fledged
enhancement of Signals or Signals2. Once I had success, I thought it
would be fun and interesting
to see if I could help implementing this through Boosts Signals if it
was desired.

>> However, your Signal class does highlight the fact that the boost signal0,
>> signal1, ..., signalN classes might be implemented through a single variadic
>> template class when compiling with a C++0x compiler.  This might reduce
>> compile time overhead, since the compiler wouldn't have to generate and parse
>> all the individual signalN classes.

And less code to maintain! :P


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk