59 #ifndef CONTROL_ARGUMENT_TUPLE_ACCEPT_H 60 #define CONTROL_ARGUMENT_TUPLE_ACCEPT_H 78 using std::make_tuple;
84 template<
class TAR,
class BA,
class RET
92 template<
class TAR,
class BA,
class RET
100 return static_cast<TAR*
> (
this) -> bindArg (std::tuple<>() );
105 template<
class TAR,
class BA,
class RET
114 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1));
119 template<
class TAR,
class BA,
class RET
127 operator() (T1 a1, T2 a2)
129 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2));
134 template<
class TAR,
class BA,
class RET
143 operator() (T1 a1, T2 a2, T3 a3)
145 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3));
150 template<
class TAR,
class BA,
class RET
160 operator() (T1 a1, T2 a2, T3 a3, T4 a4)
162 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4));
167 template<
class TAR,
class BA,
class RET
178 operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
180 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5));
185 template<
class TAR,
class BA,
class RET
197 operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
199 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6));
204 template<
class TAR,
class BA,
class RET
217 operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
219 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7));
224 template<
class TAR,
class BA,
class RET
234 struct AcceptArgs<TAR,BA,RET,
Types<T1,T2,T3,T4,T5,T6,T7,T8> >
238 operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
240 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7,a8));
245 template<
class TAR,
class BA,
class RET
256 struct AcceptArgs<TAR,BA,RET,
Types<T1,T2,T3,T4,T5,T6,T7,T8,T9> >
260 operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
262 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7,a8,a9));
275 template<
class TAR,
class BA,
class RET
283 template<
class TAR,
class BA,
class RET
291 return static_cast<TAR*
> (
this) -> bindArg (std::tuple<>() );
296 template<
class TAR,
class BA,
class RET
305 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1));
310 template<
class TAR,
class BA,
class RET
320 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2));
325 template<
class TAR,
class BA,
class RET
334 bind (T1 a1, T2 a2, T3 a3)
336 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3));
341 template<
class TAR,
class BA,
class RET
351 bind (T1 a1, T2 a2, T3 a3, T4 a4)
353 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4));
358 template<
class TAR,
class BA,
class RET
369 bind (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
371 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5));
376 template<
class TAR,
class BA,
class RET
388 bind (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
390 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6));
395 template<
class TAR,
class BA,
class RET
408 bind (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
410 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7));
415 template<
class TAR,
class BA,
class RET
425 struct AcceptBind<TAR,BA,RET,
Types<T1,T2,T3,T4,T5,T6,T7,T8> >
429 bind (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8)
431 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7,a8));
436 template<
class TAR,
class BA,
class RET
447 struct AcceptBind<TAR,BA,RET,
Types<T1,T2,T3,T4,T5,T6,T7,T8,T9> >
451 bind (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
453 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (a1,a2,a3,a4,a5,a6,a7,a8,a9));
466 template<
class TAR,
class BA,
class RET>
474 return static_cast<TAR*
> (
this) -> bindArg (std::tuple<>());
481 template<
typename...ARGS>
485 return static_cast<TAR*
> (
this) -> bindArg (make_tuple (std::forward<ARGS> (args)...));
495 template<
typename SIG>
504 template<
typename...TYPES>
507 using Args =
typename Types<TYPES...>::Seq;
510 using ArgTuple = std::tuple<TYPES...>;
527 template<
typename SIG,
class TAR,
class BASE =bind_arg::Dummy>
530 , typename bind_arg::_Type<SIG>::Args>
539 template<
typename SIG,
class TAR,
class BASE =bind_arg::Dummy>
542 , typename bind_arg::_Type<SIG>::Args>
549 template<
typename RET,
typename SIG,
class TAR,
class BASE =bind_arg::Dummy>
552 , 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(...