13 #ifndef ML_ARGUMENT_LIST_H
14 #define ML_ARGUMENT_LIST_H
21 ML_UTILS_START_NAMESPACE
37 template<
class Arg1,
class Arg2>
40 ArgumentList2(
const Arg1& arg1,
const Arg2& arg2):_arg1(arg1),_arg2(arg2) {}
46 template<
class Arg1,
class Arg2,
class Arg3>
49 ArgumentList3(
const Arg1& arg1,
const Arg2& arg2,
const Arg3& arg3):_arg1(arg1),_arg2(arg2),_arg3(arg3) {}
56 template<
class Arg1,
class Arg2,
class Arg3,
class Arg4>
59 ArgumentList4(
const Arg1& arg1,
const Arg2& arg2,
const Arg3& arg3,
const Arg4& arg4):_arg1(arg1),_arg2(arg2),_arg3(arg3),_arg4(arg4) {}
67 template<
class Arg1,
class Arg2,
class Arg3,
class Arg4,
class Arg5>
70 ArgumentList5(
const Arg1& arg1,
const Arg2& arg2,
const Arg3& arg3,
const Arg4& arg4,
const Arg5& arg5):_arg1(arg1),_arg2(arg2),_arg3(arg3),_arg4(arg4),_arg5(arg5) {}
88 template<
class Arg1,
class Arg2>
92 template<
class Arg1,
class Arg2,
class Arg3>
97 template<
class Arg1,
class Arg2,
class Arg3,
class Arg4>
101 template<
class Arg1,
class Arg2,
class Arg3,
class Arg4,
class Arg5>
107 template<
class Object,
class Method>
112 template<
class Object,
class Method,
class Arg1>
114 (
object->*method)(args.
_arg1);
117 template<
class Object,
class Method,
class Arg1,
class Arg2>
123 template<
class Object,
class Method,
class Arg1,
class Arg2,
class Arg3>
128 template<
class Object,
class Method,
class Arg1,
class Arg2,
class Arg3,
class Arg4>
133 template<
class Object,
class Method,
class Arg1,
class Arg2,
class Arg3,
class Arg4,
class Arg5>
138 ML_UTILS_END_NAMESPACE
void MLCallMethodWithArguments(Object *object, Method method, const ArgumentList5< Arg1, Arg2, Arg3, Arg4, Arg5 > &args)
Calls a method on given object with five arguments.
ArgumentList5< Arg1, Arg2, Arg3, Arg4, Arg5 > MLGenerateArgumentList(const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
Creates argument list with five arguments.
Empty argument to allow running with zero arguments.
ArgumentList with one argument.
ArgumentList1(const Arg1 &arg1)
ArgumentList with two arguments.
ArgumentList2(const Arg1 &arg1, const Arg2 &arg2)
ArgumentList with three arguments.
ArgumentList3(const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
ArgumentList with four arguments.
ArgumentList4(const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
ArgumentList with five arguments.
ArgumentList5(const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)