summaryrefslogtreecommitdiffstats
path: root/src/coroutinebuild.h
blob: ddff983fa521ab402e557b18a45a44e904862f05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
****************************************************************************/

// Generated code, do not edit! Use generator at tools/generatebuild/
#ifndef COROUTINE_MAKE_H
#define COROUTINE_MAKE_H

#include "coroutine.h"
#include "coroutinestoredfunctioncall.h"

#ifdef qdoc

    Coroutine* build(Function function, ...);

#else


Coroutine* build(int stackSize, void (*functionPointer)())
{
    return new StoredFunctorCall0<void (*)()>(stackSize, functionPointer);
}
template <typename Param1, typename Arg1>
Coroutine* build(int stackSize, void (*functionPointer)(Param1), const Arg1 &arg1)
{
    return new StoredFunctorCall1<void (*)(Param1), Arg1>(stackSize, functionPointer, arg1);
}
template <typename Param1, typename Arg1, typename Param2, typename Arg2>
Coroutine* build(int stackSize, void (*functionPointer)(Param1, Param2), const Arg1 &arg1, const Arg2 &arg2)
{
    return new StoredFunctorCall2<void (*)(Param1, Param2), Arg1, Arg2>(stackSize, functionPointer, arg1, arg2);
}
template <typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
Coroutine* build(int stackSize, void (*functionPointer)(Param1, Param2, Param3), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
{
    return new StoredFunctorCall3<void (*)(Param1, Param2, Param3), Arg1, Arg2, Arg3>(stackSize, functionPointer, arg1, arg2, arg3);
}
template <typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
Coroutine* build(int stackSize, void (*functionPointer)(Param1, Param2, Param3, Param4), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
{
    return new StoredFunctorCall4<void (*)(Param1, Param2, Param3, Param4), Arg1, Arg2, Arg3, Arg4>(stackSize, functionPointer, arg1, arg2, arg3, arg4);
}
template <typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
Coroutine* build(int stackSize, void (*functionPointer)(Param1, Param2, Param3, Param4, Param5), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
{
    return new StoredFunctorCall5<void (*)(Param1, Param2, Param3, Param4, Param5), Arg1, Arg2, Arg3, Arg4, Arg5>(stackSize, functionPointer, arg1, arg2, arg3, arg4, arg5);
}

template <typename FunctionObject>
Coroutine* build(int stackSize, FunctionObject functionObject)
{
    return new StoredFunctorCall0<FunctionObject>(stackSize, functionObject);
}
template <typename FunctionObject, typename Arg1>
Coroutine* build(int stackSize, FunctionObject functionObject, const Arg1 &arg1)
{
    return new StoredFunctorCall1<FunctionObject, Arg1>(stackSize, functionObject, arg1);
}
template <typename FunctionObject, typename Arg1, typename Arg2>
Coroutine* build(int stackSize, FunctionObject functionObject, const Arg1 &arg1, const Arg2 &arg2)
{
    return new StoredFunctorCall2<FunctionObject, Arg1, Arg2>(stackSize, functionObject, arg1, arg2);
}
template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3>
Coroutine* build(int stackSize, FunctionObject functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
{
    return new StoredFunctorCall3<FunctionObject, Arg1, Arg2, Arg3>(stackSize, functionObject, arg1, arg2, arg3);
}
template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
Coroutine* build(int stackSize, FunctionObject functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
{
    return new StoredFunctorCall4<FunctionObject, Arg1, Arg2, Arg3, Arg4>(stackSize, functionObject, arg1, arg2, arg3, arg4);
}
template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
Coroutine* build(int stackSize, FunctionObject functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
{
    return new StoredFunctorCall5<FunctionObject, Arg1, Arg2, Arg3, Arg4, Arg5>(stackSize, functionObject, arg1, arg2, arg3, arg4, arg5);
}

template <typename FunctionObject>
Coroutine* build(int stackSize, FunctionObject *functionObject)
{
    return new StoredFunctorPointerCall0<FunctionObject>(stackSize, functionObject);
}
template <typename FunctionObject, typename Arg1>
Coroutine* build(int stackSize, FunctionObject *functionObject, const Arg1 &arg1)
{
    return new StoredFunctorPointerCall1<FunctionObject, Arg1>(stackSize, functionObject, arg1);
}
template <typename FunctionObject, typename Arg1, typename Arg2>
Coroutine* build(int stackSize, FunctionObject *functionObject, const Arg1 &arg1, const Arg2 &arg2)
{
    return new StoredFunctorPointerCall2<FunctionObject, Arg1, Arg2>(stackSize, functionObject, arg1, arg2);
}
template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3>
Coroutine* build(int stackSize, FunctionObject *functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
{
    return new StoredFunctorPointerCall3<FunctionObject, Arg1, Arg2, Arg3>(stackSize, functionObject, arg1, arg2, arg3);
}
template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
Coroutine* build(int stackSize, FunctionObject *functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
{
    return new StoredFunctorPointerCall4<FunctionObject, Arg1, Arg2, Arg3, Arg4>(stackSize, functionObject, arg1, arg2, arg3, arg4);
}
template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
Coroutine* build(int stackSize, FunctionObject *functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
{
    return new StoredFunctorPointerCall5<FunctionObject, Arg1, Arg2, Arg3, Arg4, Arg5>(stackSize, functionObject, arg1, arg2, arg3, arg4, arg5);
}

template <typename Class>
Coroutine* build(int stackSize, const Class &object, void (Class::*fn)())
{
    return new StoredMemberFunctionCall0<Class>(stackSize, fn, object);
}
template <typename Class, typename Param1, typename Arg1>
Coroutine* build(int stackSize, const Class &object, void (Class::*fn)(Param1), const Arg1 &arg1)
{
    return new StoredMemberFunctionCall1<Class, Param1, Arg1>(stackSize, fn, object, arg1);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
Coroutine* build(int stackSize, const Class &object, void (Class::*fn)(Param1, Param2), const Arg1 &arg1, const Arg2 &arg2)
{
    return new StoredMemberFunctionCall2<Class, Param1, Arg1, Param2, Arg2>(stackSize, fn, object, arg1, arg2);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
Coroutine* build(int stackSize, const Class &object, void (Class::*fn)(Param1, Param2, Param3), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
{
    return new StoredMemberFunctionCall3<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>(stackSize, fn, object, arg1, arg2, arg3);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
Coroutine* build(int stackSize, const Class &object, void (Class::*fn)(Param1, Param2, Param3, Param4), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
{
    return new StoredMemberFunctionCall4<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>(stackSize, fn, object, arg1, arg2, arg3, arg4);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
Coroutine* build(int stackSize, const Class &object, void (Class::*fn)(Param1, Param2, Param3, Param4, Param5), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
{
    return new StoredMemberFunctionCall5<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>(stackSize, fn, object, arg1, arg2, arg3, arg4, arg5);
}

template <typename Class>
Coroutine *build(int stackSize, const Class &object, void (Class::*fn)() const)
{
    return new StoredConstMemberFunctionCall0<Class>(stackSize, fn, object);
}
template <typename Class, typename Param1, typename Arg1>
Coroutine *build(int stackSize, const Class &object, void (Class::*fn)(Param1) const, const Arg1 &arg1)
{
    return new StoredConstMemberFunctionCall1<Class, Param1, Arg1>(stackSize, fn, object, arg1);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
Coroutine *build(int stackSize, const Class &object, void (Class::*fn)(Param1, Param2) const, const Arg1 &arg1, const Arg2 &arg2)
{
    return new StoredConstMemberFunctionCall2<Class, Param1, Arg1, Param2, Arg2>(stackSize, fn, object, arg1, arg2);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
Coroutine *build(int stackSize, const Class &object, void (Class::*fn)(Param1, Param2, Param3) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
{
    return new StoredConstMemberFunctionCall3<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>(stackSize, fn, object, arg1, arg2, arg3);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
Coroutine *build(int stackSize, const Class &object, void (Class::*fn)(Param1, Param2, Param3, Param4) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
{
    return new StoredConstMemberFunctionCall4<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>(stackSize, fn, object, arg1, arg2, arg3, arg4);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
Coroutine *build(int stackSize, const Class &object, void (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
{
    return new StoredConstMemberFunctionCall5<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>(stackSize, fn, object, arg1, arg2, arg3, arg4, arg5);
}

template <typename Class>
Coroutine* build(int stackSize, Class *object, void (Class::*fn)())
{
    return new StoredMemberFunctionPointerCall0<Class>(stackSize, fn, object);
}
template <typename Class, typename Param1, typename Arg1>
Coroutine* build(int stackSize, Class *object, void (Class::*fn)(Param1), const Arg1 &arg1)
{
    return new StoredMemberFunctionPointerCall1<Class, Param1, Arg1>(stackSize, fn, object, arg1);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
Coroutine* build(int stackSize, Class *object, void (Class::*fn)(Param1, Param2), const Arg1 &arg1, const Arg2 &arg2)
{
    return new StoredMemberFunctionPointerCall2<Class, Param1, Arg1, Param2, Arg2>(stackSize, fn, object, arg1, arg2);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
Coroutine* build(int stackSize, Class *object, void (Class::*fn)(Param1, Param2, Param3), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
{
    return new StoredMemberFunctionPointerCall3<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>(stackSize, fn, object, arg1, arg2, arg3);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
Coroutine* build(int stackSize, Class *object, void (Class::*fn)(Param1, Param2, Param3, Param4), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
{
    return new StoredMemberFunctionPointerCall4<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>(stackSize, fn, object, arg1, arg2, arg3, arg4);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
Coroutine* build(int stackSize, Class *object, void (Class::*fn)(Param1, Param2, Param3, Param4, Param5), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
{
    return new StoredMemberFunctionPointerCall5<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>(stackSize, fn, object, arg1, arg2, arg3, arg4, arg5);
}

template <typename Class>
Coroutine* build(int stackSize, const Class *object, void (Class::*fn)() const)
{
    return new StoredConstMemberFunctionPointerCall0<Class>(stackSize, fn, object);
}
template <typename Class, typename Param1, typename Arg1>
Coroutine* build(int stackSize, const Class *object, void (Class::*fn)(Param1) const, const Arg1 &arg1)
{
    return new StoredConstMemberFunctionPointerCall1<Class, Param1, Arg1>(stackSize, fn, object, arg1);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
Coroutine* build(int stackSize, const Class *object, void (Class::*fn)(Param1, Param2) const, const Arg1 &arg1, const Arg2 &arg2)
{
    return new StoredConstMemberFunctionPointerCall2<Class, Param1, Arg1, Param2, Arg2>(stackSize, fn, object, arg1, arg2);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
Coroutine* build(int stackSize, const Class *object, void (Class::*fn)(Param1, Param2, Param3) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
{
    return new StoredConstMemberFunctionPointerCall3<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>(stackSize, fn, object, arg1, arg2, arg3);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
Coroutine* build(int stackSize, const Class *object, void (Class::*fn)(Param1, Param2, Param3, Param4) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
{
    return new StoredConstMemberFunctionPointerCall4<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>(stackSize, fn, object, arg1, arg2, arg3, arg4);
}
template <typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
Coroutine* build(int stackSize, const Class *object, void (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
{
    return new StoredConstMemberFunctionPointerCall5<Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>(stackSize, fn, object, arg1, arg2, arg3, arg4, arg5);
}


#endif // qdoc

#endif