MeVisLab Toolbox Reference
mlArgumentList.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2009, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_ARGUMENT_LIST_H
14#define ML_ARGUMENT_LIST_H
15
18
19#include "mlUtilsSystem.h"
20
22
25{
26};
27
29template<class Arg1>
31{
32 ArgumentList1(const Arg1& arg1):_arg1(arg1) {}
34};
35
37template<class Arg1, class Arg2>
39{
40 ArgumentList2(const Arg1& arg1, const Arg2& arg2):_arg1(arg1),_arg2(arg2) {}
43};
44
46template<class Arg1, class Arg2, class Arg3>
48{
49 ArgumentList3(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3):_arg1(arg1),_arg2(arg2),_arg3(arg3) {}
53};
54
56template<class Arg1, class Arg2, class Arg3, class Arg4>
58{
59 ArgumentList4(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3, const Arg4& arg4):_arg1(arg1),_arg2(arg2),_arg3(arg3),_arg4(arg4) {}
64};
65
67template<class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
69{
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) {}
76};
77
78//----------------------------------------------------------------
83template<class Arg1>
86
88template<class Arg1, class Arg2>
92template<class Arg1, class Arg2, class Arg3>
95
97template<class Arg1, class Arg2, class Arg3, class Arg4>
101template<class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
104
105//----------------------------------------------------------------
107template<class Object, class Method>
109 (object->*method)();
110}
112template<class Object, class Method, class Arg1>
114 (object->*method)(args._arg1);
115}
117template<class Object, class Method, class Arg1, class Arg2>
119 (object->*method)(args._arg1, args._arg2);
120}
121
123template<class Object, class Method, class Arg1, class Arg2, class Arg3>
125 (object->*method)(args._arg1, args._arg2, args._arg3);
126}
128template<class Object, class Method, class Arg1, class Arg2, class Arg3, class Arg4>
130 (object->*method)(args._arg1, args._arg2, args._arg3, args._arg4);
131}
133template<class Object, class Method, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
135 (object->*method)(args._arg1, args._arg2, args._arg3, args._arg4, args._arg5);
136}
137
139
140#endif // __mlArgumentList_H
141
142
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
ArgumentList0 MLGenerateArgumentList()
Creates argument list with 0 arguments.
void MLCallMethodWithArguments(Object *object, Method method, const ArgumentList0 &)
Calls a method on given object with 0 arguments.
Empty argument to allow running with 0 arguments.
ArgumentList with 1 argument.
ArgumentList1(const Arg1 &arg1)
ArgumentList with 2 arguments.
ArgumentList2(const Arg1 &arg1, const Arg2 &arg2)
ArgumentList with 3 arguments.
ArgumentList3(const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
ArgumentList with 4 arguments.
ArgumentList4(const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
ArgumentList with 5 arguments.
ArgumentList5(const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)