Class template slot
boost::slot — Pass slots as function arguments, and associate tracked objects with a slot.
Synopsis
template<typename Signature, // Function type R (T1, T2, ..., TN) typename SlotFunction = function<Signature> > class slot : public slotN<R, T1, T2, ..., TN, SlotFunction> { public: // construct/copy/destruct template<typename F> slot(const F &); template<typename Func, typename Arg1, typename Arg2, ..., typename ArgN> slot(Func, Arg1, Arg2, ..., ArgN); };
Description
Class template slot is a thin wrapper around the numbered class templates slot0, slot1, etc. It accepts a function type with N arguments instead of N separate arguments, and derives from the appropriate slotN instantiation.
All functionality of this class template is in its base class slotN.
slot
public
construct/copy/destruct
-
template<typename F> slot(const F & f);
Effects: Passes argument to the base type slotN constructor.
-
template<typename Func, typename Arg1, typename Arg2, ..., typename ArgN> slot(Func f, Arg1 a1, Arg2 a2, ..., ArgN aN);
Effects: Syntactic sugar for
bind()when the constructor is passed more than one argument. As if:slot(boost::bind(f, a1, a2, ..., aN))