RE: [sigc] Template mystery



> now include, say, 8 of these templates to handle 0-7 arguments, and
> you're mostly done. well, done with sigc++ 0.7 :))
> 
> the key element is the presence of a virtual method, in this case
> operator(), which invokes the function (or member function) that was
> stored in the slot, along with any stored arguments.
> 

Supposing all that is done, are we not left with the problem at the signal
side?

class signal 
{
std::list<slot<?, ?, ?> > ls_slots; 

template <Class, Return, Arg> ?
signal::connect(slot<Class, Return, Arg> & s)
{
	ls_slots.push_back(s);
}

signal::fire()
{
	foreach(ls_slots.begin() .... &Fire()) // or something
}
}

The list being the point where this all comes to a head I suppose.

Cheers,


Gaz



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