50 #ifndef CONTROL_ARGUMENT_TUPLE_ACCEPT_H 51 #define CONTROL_ARGUMENT_TUPLE_ACCEPT_H 69 using std::make_tuple;
75 template<
class TAR,
class BA,
class RET
83 template<
class TAR,
class BA,
class RET
91 return static_cast<TAR*
> (
this) -> bindArg (std::tuple<>() );
96 template<
class TAR,
class BA,
class RET
105 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1));
110 template<
class TAR,
class BA,
class RET
118 operator() (T1 a1, T2 a2)
120 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2));
125 template<
class TAR,
class BA,
class RET
134 operator() (T1 a1, T2 a2, T3 a3)
136 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3));
141 template<
class TAR,
class BA,
class RET
151 operator() (T1 a1, T2 a2, T3 a3, T4 a4)
153 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4));
158 template<
class TAR,
class BA,
class RET
169 operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
171 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5));
176 template<
class TAR,
class BA,
class RET
188 operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
190 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6));
195 template<
class TAR,
class BA,
class RET
208 operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
210 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7));
215 template<
class TAR,
class BA,
class RET
225 struct AcceptArgs<TAR,BA,RET,
Types<T1,T2,T3,T4,T5,T6,T7,T8> >
229 operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
231 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7,a8));
236 template<
class TAR,
class BA,
class RET
247 struct AcceptArgs<TAR,BA,RET,
Types<T1,T2,T3,T4,T5,T6,T7,T8,T9> >
251 operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
253 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7,a8,a9));
266 template<
class TAR,
class BA,
class RET
274 template<
class TAR,
class BA,
class RET
282 return static_cast<TAR*
> (
this) -> bindArg (std::tuple<>() );
287 template<
class TAR,
class BA,
class RET
296 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1));
301 template<
class TAR,
class BA,
class RET
311 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2));
316 template<
class TAR,
class BA,
class RET
325 bind (T1 a1, T2 a2, T3 a3)
327 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3));
332 template<
class TAR,
class BA,
class RET
342 bind (T1 a1, T2 a2, T3 a3, T4 a4)
344 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4));
349 template<
class TAR,
class BA,
class RET
360 bind (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
362 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5));
367 template<
class TAR,
class BA,
class RET
379 bind (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
381 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6));
386 template<
class TAR,
class BA,
class RET
399 bind (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
401 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7));
406 template<
class TAR,
class BA,
class RET
416 struct AcceptBind<TAR,BA,RET,
Types<T1,T2,T3,T4,T5,T6,T7,T8> >
420 bind (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
422 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7,a8));
427 template<
class TAR,
class BA,
class RET
438 struct AcceptBind<TAR,BA,RET,
Types<T1,T2,T3,T4,T5,T6,T7,T8,T9> >
442 bind (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
444 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7,a8,a9));
457 template<
class TAR,
class BA,
class RET>
465 return static_cast<TAR*
> (
this) -> bindArg (std::tuple<>());
472 template<
typename...ARGS>
476 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (std::forward<ARGS> (args)...));
486 template<
typename SIG>
495 template<
typename...TYPES>
498 using Args =
typename Types<TYPES...>::Seq;
501 using ArgTuple = std::tuple<TYPES...>;
518 template<
typename SIG,
class TAR,
class BASE =bind_arg::Dummy>
521 , typename bind_arg::_Type<SIG>::Args>
530 template<
typename SIG,
class TAR,
class BASE =bind_arg::Dummy>
533 , typename bind_arg::_Type<SIG>::Args>
540 template<
typename RET,
typename SIG,
class TAR,
class BASE =bind_arg::Dummy>
543 , typename bind_arg::_Type<SIG>::Args>
Helper Template for Steam-Layer control::Command : mix in a bind(...) function.
A template metaprogramming technique for manipulating collections of types.
typename BuildTupleType< TYPES >::Type Tuple
Build a std::tuple from types given as type sequence.
Helper Template for building a Functor or function-like class: Mix in a function call operator...
Steam-Layer implementation namespace root.
Metaprogramming with tuples-of-types and the std::tuple record.
Helper Template for control::Command, mix-in complete set of bind(...) functions. ...
Metaprogramming tools for transforming functor types.
RET bind()
Accept dummy binding (0 Arg)
RET bind(ARGS &&...args)
mix in bind function to create binding of arbitrary arguments
Variation of AcceptArgumentBinding, allowing to control the return type of the generated bind(...