Qt 4.8
qtconcurrentstoredfunctioncall.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtCore module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 // Generated code, do not edit! Use generator at tools/qtconcurrent/generaterun/
43 #ifndef QTCONCURRENT_STOREDFUNCTIONCALL_H
44 #define QTCONCURRENT_STOREDFUNCTIONCALL_H
45 
46 #include <QtCore/qglobal.h>
47 
48 #ifndef QT_NO_CONCURRENT
49 #include <QtCore/qtconcurrentrunbase.h>
50 
53 
54 QT_MODULE(Core)
55 
56 #ifndef qdoc
57 
58 namespace QtConcurrent {
59 template <typename T, typename FunctionPointer>
60 struct StoredFunctorCall0: public RunFunctionTask<T>
61 {
62  inline StoredFunctorCall0(FunctionPointer _function)
63  : function(_function) {}
64  void runFunctor() { this->result = function(); }
65  FunctionPointer function;
66 
67 };
68 
69 template <typename FunctionPointer>
70 struct StoredFunctorCall0<void, FunctionPointer>: public RunFunctionTask<void>
71 {
72  inline StoredFunctorCall0(FunctionPointer _function)
73  : function(_function) {}
74  void runFunctor() { function(); }
75  FunctionPointer function;
76 
77 };
78 
79 template <typename T, typename FunctionPointer>
80 struct StoredFunctorPointerCall0: public RunFunctionTask<T>
81 {
82  inline StoredFunctorPointerCall0(FunctionPointer * _function)
83  : function(_function) {}
84  void runFunctor() { this->result =(*function)(); }
85  FunctionPointer * function;
86 
87 };
88 
89 template <typename T, typename FunctionPointer>
90 struct VoidStoredFunctorPointerCall0: public RunFunctionTask<T>
91 {
92  inline VoidStoredFunctorPointerCall0(FunctionPointer * _function)
93  : function(_function) {}
94  void runFunctor() {(*function)(); }
95  FunctionPointer * function;
96 
97 };
98 
99 template <typename T, typename FunctionPointer>
100 struct SelectStoredFunctorPointerCall0
101 {
102  typedef typename SelectSpecialization<T>::template
103  Type<StoredFunctorPointerCall0 <T, FunctionPointer>,
104  VoidStoredFunctorPointerCall0<T, FunctionPointer> >::type type;
105 };
106 template <typename T, typename Class>
107 class StoredMemberFunctionCall0 : public RunFunctionTask<T>
108 {
109 public:
110  StoredMemberFunctionCall0(T (Class::*_fn)() , const Class &_object)
111  : fn(_fn), object(_object){ }
112 
113  void runFunctor()
114  {
115  this->result = (object.*fn)();
116  }
117 private:
118  T (Class::*fn)();
119  Class object;
120 
121 };
122 template <typename T, typename Class>
123 class VoidStoredMemberFunctionCall0 : public RunFunctionTask<T>
124 {
125 public:
126  VoidStoredMemberFunctionCall0(T (Class::*_fn)() , const Class &_object)
127  : fn(_fn), object(_object){ }
128 
129  void runFunctor()
130  {
131  (object.*fn)();
132  }
133 private:
134  T (Class::*fn)();
135  Class object;
136 
137 };
138 template <typename T, typename Class>
139 struct SelectStoredMemberFunctionCall0
140 {
141  typedef typename SelectSpecialization<T>::template
142  Type<StoredMemberFunctionCall0 <T, Class>,
143  VoidStoredMemberFunctionCall0<T, Class> >::type type;
144 };
145 template <typename T, typename Class>
146 class StoredConstMemberFunctionCall0 : public RunFunctionTask<T>
147 {
148 public:
149  StoredConstMemberFunctionCall0(T (Class::*_fn)() const, const Class &_object)
150  : fn(_fn), object(_object){ }
151 
152  void runFunctor()
153  {
154  this->result = (object.*fn)();
155  }
156 private:
157  T (Class::*fn)()const;
158  const Class object;
159 
160 };
161 template <typename T, typename Class>
162 class VoidStoredConstMemberFunctionCall0 : public RunFunctionTask<T>
163 {
164 public:
165  VoidStoredConstMemberFunctionCall0(T (Class::*_fn)() const, const Class &_object)
166  : fn(_fn), object(_object){ }
167 
168  void runFunctor()
169  {
170  (object.*fn)();
171  }
172 private:
173  T (Class::*fn)()const;
174  const Class object;
175 
176 };
177 template <typename T, typename Class>
178 struct SelectStoredConstMemberFunctionCall0
179 {
180  typedef typename SelectSpecialization<T>::template
181  Type<StoredConstMemberFunctionCall0 <T, Class>,
182  VoidStoredConstMemberFunctionCall0<T, Class> >::type type;
183 };
184 template <typename T, typename Class>
185 class StoredMemberFunctionPointerCall0 : public RunFunctionTask<T>
186 {
187 public:
188  StoredMemberFunctionPointerCall0(T (Class::*_fn)() , Class *_object)
189  : fn(_fn), object(_object){ }
190 
191  void runFunctor()
192  {
193  this->result = (object->*fn)();
194  }
195 private:
196  T (Class::*fn)();
197  Class *object;
198 
199 };
200 template <typename T, typename Class>
201 class VoidStoredMemberFunctionPointerCall0 : public RunFunctionTask<T>
202 {
203 public:
204  VoidStoredMemberFunctionPointerCall0(T (Class::*_fn)() , Class *_object)
205  : fn(_fn), object(_object){ }
206 
207  void runFunctor()
208  {
209  (object->*fn)();
210  }
211 private:
212  T (Class::*fn)();
213  Class *object;
214 
215 };
216 template <typename T, typename Class>
217 struct SelectStoredMemberFunctionPointerCall0
218 {
219  typedef typename SelectSpecialization<T>::template
220  Type<StoredMemberFunctionPointerCall0 <T, Class>,
221  VoidStoredMemberFunctionPointerCall0<T, Class> >::type type;
222 };
223 template <typename T, typename Class>
224 class StoredConstMemberFunctionPointerCall0 : public RunFunctionTask<T>
225 {
226 public:
227  StoredConstMemberFunctionPointerCall0(T (Class::*_fn)() const, Class const *_object)
228  : fn(_fn), object(_object){ }
229 
230  void runFunctor()
231  {
232  this->result = (object->*fn)();
233  }
234 private:
235  T (Class::*fn)()const;
236  Class const *object;
237 
238 };
239 template <typename T, typename Class>
240 class VoidStoredConstMemberFunctionPointerCall0 : public RunFunctionTask<T>
241 {
242 public:
243  VoidStoredConstMemberFunctionPointerCall0(T (Class::*_fn)() const, Class const *_object)
244  : fn(_fn), object(_object){ }
245 
246  void runFunctor()
247  {
248  (object->*fn)();
249  }
250 private:
251  T (Class::*fn)()const;
252  Class const *object;
253 
254 };
255 template <typename T, typename Class>
256 struct SelectStoredConstMemberFunctionPointerCall0
257 {
258  typedef typename SelectSpecialization<T>::template
259  Type<StoredConstMemberFunctionPointerCall0 <T, Class>,
260  VoidStoredConstMemberFunctionPointerCall0<T, Class> >::type type;
261 };
262 template <typename T, typename FunctionPointer, typename Arg1>
263 struct StoredFunctorCall1: public RunFunctionTask<T>
264 {
265  inline StoredFunctorCall1(FunctionPointer _function, const Arg1 &_arg1)
266  : function(_function), arg1(_arg1) {}
267  void runFunctor() { this->result = function(arg1); }
268  FunctionPointer function;
269  Arg1 arg1;
270 };
271 
272 template <typename FunctionPointer, typename Arg1>
273 struct StoredFunctorCall1<void, FunctionPointer, Arg1>: public RunFunctionTask<void>
274 {
275  inline StoredFunctorCall1(FunctionPointer _function, const Arg1 &_arg1)
276  : function(_function), arg1(_arg1) {}
277  void runFunctor() { function(arg1); }
278  FunctionPointer function;
279  Arg1 arg1;
280 };
281 
282 template <typename T, typename FunctionPointer, typename Arg1>
283 struct StoredFunctorPointerCall1: public RunFunctionTask<T>
284 {
285  inline StoredFunctorPointerCall1(FunctionPointer * _function, const Arg1 &_arg1)
286  : function(_function), arg1(_arg1) {}
287  void runFunctor() { this->result =(*function)(arg1); }
288  FunctionPointer * function;
289  Arg1 arg1;
290 };
291 
292 template <typename T, typename FunctionPointer, typename Arg1>
293 struct VoidStoredFunctorPointerCall1: public RunFunctionTask<T>
294 {
295  inline VoidStoredFunctorPointerCall1(FunctionPointer * _function, const Arg1 &_arg1)
296  : function(_function), arg1(_arg1) {}
297  void runFunctor() {(*function)(arg1); }
298  FunctionPointer * function;
299  Arg1 arg1;
300 };
301 
302 template <typename T, typename FunctionPointer, typename Arg1>
303 struct SelectStoredFunctorPointerCall1
304 {
305  typedef typename SelectSpecialization<T>::template
306  Type<StoredFunctorPointerCall1 <T, FunctionPointer, Arg1>,
307  VoidStoredFunctorPointerCall1<T, FunctionPointer, Arg1> >::type type;
308 };
309 template <typename T, typename Class, typename Param1, typename Arg1>
310 class StoredMemberFunctionCall1 : public RunFunctionTask<T>
311 {
312 public:
313  StoredMemberFunctionCall1(T (Class::*_fn)(Param1) , const Class &_object, const Arg1 &_arg1)
314  : fn(_fn), object(_object), arg1(_arg1){ }
315 
316  void runFunctor()
317  {
318  this->result = (object.*fn)(arg1);
319  }
320 private:
321  T (Class::*fn)(Param1);
322  Class object;
323  Arg1 arg1;
324 };
325 template <typename T, typename Class, typename Param1, typename Arg1>
326 class VoidStoredMemberFunctionCall1 : public RunFunctionTask<T>
327 {
328 public:
329  VoidStoredMemberFunctionCall1(T (Class::*_fn)(Param1) , const Class &_object, const Arg1 &_arg1)
330  : fn(_fn), object(_object), arg1(_arg1){ }
331 
332  void runFunctor()
333  {
334  (object.*fn)(arg1);
335  }
336 private:
337  T (Class::*fn)(Param1);
338  Class object;
339  Arg1 arg1;
340 };
341 template <typename T, typename Class, typename Param1, typename Arg1>
342 struct SelectStoredMemberFunctionCall1
343 {
344  typedef typename SelectSpecialization<T>::template
345  Type<StoredMemberFunctionCall1 <T, Class, Param1, Arg1>,
346  VoidStoredMemberFunctionCall1<T, Class, Param1, Arg1> >::type type;
347 };
348 template <typename T, typename Class, typename Param1, typename Arg1>
349 class StoredConstMemberFunctionCall1 : public RunFunctionTask<T>
350 {
351 public:
352  StoredConstMemberFunctionCall1(T (Class::*_fn)(Param1) const, const Class &_object, const Arg1 &_arg1)
353  : fn(_fn), object(_object), arg1(_arg1){ }
354 
355  void runFunctor()
356  {
357  this->result = (object.*fn)(arg1);
358  }
359 private:
360  T (Class::*fn)(Param1)const;
361  const Class object;
362  Arg1 arg1;
363 };
364 template <typename T, typename Class, typename Param1, typename Arg1>
365 class VoidStoredConstMemberFunctionCall1 : public RunFunctionTask<T>
366 {
367 public:
368  VoidStoredConstMemberFunctionCall1(T (Class::*_fn)(Param1) const, const Class &_object, const Arg1 &_arg1)
369  : fn(_fn), object(_object), arg1(_arg1){ }
370 
371  void runFunctor()
372  {
373  (object.*fn)(arg1);
374  }
375 private:
376  T (Class::*fn)(Param1)const;
377  const Class object;
378  Arg1 arg1;
379 };
380 template <typename T, typename Class, typename Param1, typename Arg1>
381 struct SelectStoredConstMemberFunctionCall1
382 {
383  typedef typename SelectSpecialization<T>::template
384  Type<StoredConstMemberFunctionCall1 <T, Class, Param1, Arg1>,
385  VoidStoredConstMemberFunctionCall1<T, Class, Param1, Arg1> >::type type;
386 };
387 template <typename T, typename Class, typename Param1, typename Arg1>
388 class StoredMemberFunctionPointerCall1 : public RunFunctionTask<T>
389 {
390 public:
391  StoredMemberFunctionPointerCall1(T (Class::*_fn)(Param1) , Class *_object, const Arg1 &_arg1)
392  : fn(_fn), object(_object), arg1(_arg1){ }
393 
394  void runFunctor()
395  {
396  this->result = (object->*fn)(arg1);
397  }
398 private:
399  T (Class::*fn)(Param1);
400  Class *object;
401  Arg1 arg1;
402 };
403 template <typename T, typename Class, typename Param1, typename Arg1>
404 class VoidStoredMemberFunctionPointerCall1 : public RunFunctionTask<T>
405 {
406 public:
407  VoidStoredMemberFunctionPointerCall1(T (Class::*_fn)(Param1) , Class *_object, const Arg1 &_arg1)
408  : fn(_fn), object(_object), arg1(_arg1){ }
409 
410  void runFunctor()
411  {
412  (object->*fn)(arg1);
413  }
414 private:
415  T (Class::*fn)(Param1);
416  Class *object;
417  Arg1 arg1;
418 };
419 template <typename T, typename Class, typename Param1, typename Arg1>
420 struct SelectStoredMemberFunctionPointerCall1
421 {
422  typedef typename SelectSpecialization<T>::template
423  Type<StoredMemberFunctionPointerCall1 <T, Class, Param1, Arg1>,
424  VoidStoredMemberFunctionPointerCall1<T, Class, Param1, Arg1> >::type type;
425 };
426 template <typename T, typename Class, typename Param1, typename Arg1>
427 class StoredConstMemberFunctionPointerCall1 : public RunFunctionTask<T>
428 {
429 public:
430  StoredConstMemberFunctionPointerCall1(T (Class::*_fn)(Param1) const, Class const *_object, const Arg1 &_arg1)
431  : fn(_fn), object(_object), arg1(_arg1){ }
432 
433  void runFunctor()
434  {
435  this->result = (object->*fn)(arg1);
436  }
437 private:
438  T (Class::*fn)(Param1)const;
439  Class const *object;
440  Arg1 arg1;
441 };
442 template <typename T, typename Class, typename Param1, typename Arg1>
443 class VoidStoredConstMemberFunctionPointerCall1 : public RunFunctionTask<T>
444 {
445 public:
446  VoidStoredConstMemberFunctionPointerCall1(T (Class::*_fn)(Param1) const, Class const *_object, const Arg1 &_arg1)
447  : fn(_fn), object(_object), arg1(_arg1){ }
448 
449  void runFunctor()
450  {
451  (object->*fn)(arg1);
452  }
453 private:
454  T (Class::*fn)(Param1)const;
455  Class const *object;
456  Arg1 arg1;
457 };
458 template <typename T, typename Class, typename Param1, typename Arg1>
459 struct SelectStoredConstMemberFunctionPointerCall1
460 {
461  typedef typename SelectSpecialization<T>::template
462  Type<StoredConstMemberFunctionPointerCall1 <T, Class, Param1, Arg1>,
463  VoidStoredConstMemberFunctionPointerCall1<T, Class, Param1, Arg1> >::type type;
464 };
465 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2>
466 struct StoredFunctorCall2: public RunFunctionTask<T>
467 {
468  inline StoredFunctorCall2(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2)
469  : function(_function), arg1(_arg1), arg2(_arg2) {}
470  void runFunctor() { this->result = function(arg1, arg2); }
471  FunctionPointer function;
472  Arg1 arg1; Arg2 arg2;
473 };
474 
475 template <typename FunctionPointer, typename Arg1, typename Arg2>
476 struct StoredFunctorCall2<void, FunctionPointer, Arg1, Arg2>: public RunFunctionTask<void>
477 {
478  inline StoredFunctorCall2(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2)
479  : function(_function), arg1(_arg1), arg2(_arg2) {}
480  void runFunctor() { function(arg1, arg2); }
481  FunctionPointer function;
482  Arg1 arg1; Arg2 arg2;
483 };
484 
485 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2>
486 struct StoredFunctorPointerCall2: public RunFunctionTask<T>
487 {
488  inline StoredFunctorPointerCall2(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2)
489  : function(_function), arg1(_arg1), arg2(_arg2) {}
490  void runFunctor() { this->result =(*function)(arg1, arg2); }
491  FunctionPointer * function;
492  Arg1 arg1; Arg2 arg2;
493 };
494 
495 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2>
496 struct VoidStoredFunctorPointerCall2: public RunFunctionTask<T>
497 {
498  inline VoidStoredFunctorPointerCall2(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2)
499  : function(_function), arg1(_arg1), arg2(_arg2) {}
500  void runFunctor() {(*function)(arg1, arg2); }
501  FunctionPointer * function;
502  Arg1 arg1; Arg2 arg2;
503 };
504 
505 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2>
506 struct SelectStoredFunctorPointerCall2
507 {
508  typedef typename SelectSpecialization<T>::template
509  Type<StoredFunctorPointerCall2 <T, FunctionPointer, Arg1, Arg2>,
510  VoidStoredFunctorPointerCall2<T, FunctionPointer, Arg1, Arg2> >::type type;
511 };
512 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
513 class StoredMemberFunctionCall2 : public RunFunctionTask<T>
514 {
515 public:
516  StoredMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2)
517  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
518 
519  void runFunctor()
520  {
521  this->result = (object.*fn)(arg1, arg2);
522  }
523 private:
524  T (Class::*fn)(Param1, Param2);
525  Class object;
526  Arg1 arg1; Arg2 arg2;
527 };
528 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
529 class VoidStoredMemberFunctionCall2 : public RunFunctionTask<T>
530 {
531 public:
532  VoidStoredMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2)
533  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
534 
535  void runFunctor()
536  {
537  (object.*fn)(arg1, arg2);
538  }
539 private:
540  T (Class::*fn)(Param1, Param2);
541  Class object;
542  Arg1 arg1; Arg2 arg2;
543 };
544 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
545 struct SelectStoredMemberFunctionCall2
546 {
547  typedef typename SelectSpecialization<T>::template
548  Type<StoredMemberFunctionCall2 <T, Class, Param1, Arg1, Param2, Arg2>,
549  VoidStoredMemberFunctionCall2<T, Class, Param1, Arg1, Param2, Arg2> >::type type;
550 };
551 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
552 class StoredConstMemberFunctionCall2 : public RunFunctionTask<T>
553 {
554 public:
555  StoredConstMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2)
556  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
557 
558  void runFunctor()
559  {
560  this->result = (object.*fn)(arg1, arg2);
561  }
562 private:
563  T (Class::*fn)(Param1, Param2)const;
564  const Class object;
565  Arg1 arg1; Arg2 arg2;
566 };
567 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
568 class VoidStoredConstMemberFunctionCall2 : public RunFunctionTask<T>
569 {
570 public:
571  VoidStoredConstMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2)
572  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
573 
574  void runFunctor()
575  {
576  (object.*fn)(arg1, arg2);
577  }
578 private:
579  T (Class::*fn)(Param1, Param2)const;
580  const Class object;
581  Arg1 arg1; Arg2 arg2;
582 };
583 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
584 struct SelectStoredConstMemberFunctionCall2
585 {
586  typedef typename SelectSpecialization<T>::template
587  Type<StoredConstMemberFunctionCall2 <T, Class, Param1, Arg1, Param2, Arg2>,
588  VoidStoredConstMemberFunctionCall2<T, Class, Param1, Arg1, Param2, Arg2> >::type type;
589 };
590 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
591 class StoredMemberFunctionPointerCall2 : public RunFunctionTask<T>
592 {
593 public:
594  StoredMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2)
595  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
596 
597  void runFunctor()
598  {
599  this->result = (object->*fn)(arg1, arg2);
600  }
601 private:
602  T (Class::*fn)(Param1, Param2);
603  Class *object;
604  Arg1 arg1; Arg2 arg2;
605 };
606 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
607 class VoidStoredMemberFunctionPointerCall2 : public RunFunctionTask<T>
608 {
609 public:
610  VoidStoredMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2)
611  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
612 
613  void runFunctor()
614  {
615  (object->*fn)(arg1, arg2);
616  }
617 private:
618  T (Class::*fn)(Param1, Param2);
619  Class *object;
620  Arg1 arg1; Arg2 arg2;
621 };
622 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
623 struct SelectStoredMemberFunctionPointerCall2
624 {
625  typedef typename SelectSpecialization<T>::template
626  Type<StoredMemberFunctionPointerCall2 <T, Class, Param1, Arg1, Param2, Arg2>,
627  VoidStoredMemberFunctionPointerCall2<T, Class, Param1, Arg1, Param2, Arg2> >::type type;
628 };
629 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
630 class StoredConstMemberFunctionPointerCall2 : public RunFunctionTask<T>
631 {
632 public:
633  StoredConstMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2)
634  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
635 
636  void runFunctor()
637  {
638  this->result = (object->*fn)(arg1, arg2);
639  }
640 private:
641  T (Class::*fn)(Param1, Param2)const;
642  Class const *object;
643  Arg1 arg1; Arg2 arg2;
644 };
645 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
646 class VoidStoredConstMemberFunctionPointerCall2 : public RunFunctionTask<T>
647 {
648 public:
649  VoidStoredConstMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2)
650  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
651 
652  void runFunctor()
653  {
654  (object->*fn)(arg1, arg2);
655  }
656 private:
657  T (Class::*fn)(Param1, Param2)const;
658  Class const *object;
659  Arg1 arg1; Arg2 arg2;
660 };
661 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
662 struct SelectStoredConstMemberFunctionPointerCall2
663 {
664  typedef typename SelectSpecialization<T>::template
665  Type<StoredConstMemberFunctionPointerCall2 <T, Class, Param1, Arg1, Param2, Arg2>,
666  VoidStoredConstMemberFunctionPointerCall2<T, Class, Param1, Arg1, Param2, Arg2> >::type type;
667 };
668 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3>
669 struct StoredFunctorCall3: public RunFunctionTask<T>
670 {
671  inline StoredFunctorCall3(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
672  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3) {}
673  void runFunctor() { this->result = function(arg1, arg2, arg3); }
674  FunctionPointer function;
675  Arg1 arg1; Arg2 arg2; Arg3 arg3;
676 };
677 
678 template <typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3>
679 struct StoredFunctorCall3<void, FunctionPointer, Arg1, Arg2, Arg3>: public RunFunctionTask<void>
680 {
681  inline StoredFunctorCall3(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
682  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3) {}
683  void runFunctor() { function(arg1, arg2, arg3); }
684  FunctionPointer function;
685  Arg1 arg1; Arg2 arg2; Arg3 arg3;
686 };
687 
688 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3>
689 struct StoredFunctorPointerCall3: public RunFunctionTask<T>
690 {
691  inline StoredFunctorPointerCall3(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
692  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3) {}
693  void runFunctor() { this->result =(*function)(arg1, arg2, arg3); }
694  FunctionPointer * function;
695  Arg1 arg1; Arg2 arg2; Arg3 arg3;
696 };
697 
698 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3>
699 struct VoidStoredFunctorPointerCall3: public RunFunctionTask<T>
700 {
701  inline VoidStoredFunctorPointerCall3(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
702  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3) {}
703  void runFunctor() {(*function)(arg1, arg2, arg3); }
704  FunctionPointer * function;
705  Arg1 arg1; Arg2 arg2; Arg3 arg3;
706 };
707 
708 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3>
709 struct SelectStoredFunctorPointerCall3
710 {
711  typedef typename SelectSpecialization<T>::template
712  Type<StoredFunctorPointerCall3 <T, FunctionPointer, Arg1, Arg2, Arg3>,
713  VoidStoredFunctorPointerCall3<T, FunctionPointer, Arg1, Arg2, Arg3> >::type type;
714 };
715 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
716 class StoredMemberFunctionCall3 : public RunFunctionTask<T>
717 {
718 public:
719  StoredMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
720  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
721 
722  void runFunctor()
723  {
724  this->result = (object.*fn)(arg1, arg2, arg3);
725  }
726 private:
727  T (Class::*fn)(Param1, Param2, Param3);
728  Class object;
729  Arg1 arg1; Arg2 arg2; Arg3 arg3;
730 };
731 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
732 class VoidStoredMemberFunctionCall3 : public RunFunctionTask<T>
733 {
734 public:
735  VoidStoredMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
736  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
737 
738  void runFunctor()
739  {
740  (object.*fn)(arg1, arg2, arg3);
741  }
742 private:
743  T (Class::*fn)(Param1, Param2, Param3);
744  Class object;
745  Arg1 arg1; Arg2 arg2; Arg3 arg3;
746 };
747 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
748 struct SelectStoredMemberFunctionCall3
749 {
750  typedef typename SelectSpecialization<T>::template
751  Type<StoredMemberFunctionCall3 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>,
752  VoidStoredMemberFunctionCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3> >::type type;
753 };
754 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
755 class StoredConstMemberFunctionCall3 : public RunFunctionTask<T>
756 {
757 public:
758  StoredConstMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
759  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
760 
761  void runFunctor()
762  {
763  this->result = (object.*fn)(arg1, arg2, arg3);
764  }
765 private:
766  T (Class::*fn)(Param1, Param2, Param3)const;
767  const Class object;
768  Arg1 arg1; Arg2 arg2; Arg3 arg3;
769 };
770 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
771 class VoidStoredConstMemberFunctionCall3 : public RunFunctionTask<T>
772 {
773 public:
774  VoidStoredConstMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
775  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
776 
777  void runFunctor()
778  {
779  (object.*fn)(arg1, arg2, arg3);
780  }
781 private:
782  T (Class::*fn)(Param1, Param2, Param3)const;
783  const Class object;
784  Arg1 arg1; Arg2 arg2; Arg3 arg3;
785 };
786 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
787 struct SelectStoredConstMemberFunctionCall3
788 {
789  typedef typename SelectSpecialization<T>::template
790  Type<StoredConstMemberFunctionCall3 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>,
791  VoidStoredConstMemberFunctionCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3> >::type type;
792 };
793 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
794 class StoredMemberFunctionPointerCall3 : public RunFunctionTask<T>
795 {
796 public:
797  StoredMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
798  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
799 
800  void runFunctor()
801  {
802  this->result = (object->*fn)(arg1, arg2, arg3);
803  }
804 private:
805  T (Class::*fn)(Param1, Param2, Param3);
806  Class *object;
807  Arg1 arg1; Arg2 arg2; Arg3 arg3;
808 };
809 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
810 class VoidStoredMemberFunctionPointerCall3 : public RunFunctionTask<T>
811 {
812 public:
813  VoidStoredMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
814  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
815 
816  void runFunctor()
817  {
818  (object->*fn)(arg1, arg2, arg3);
819  }
820 private:
821  T (Class::*fn)(Param1, Param2, Param3);
822  Class *object;
823  Arg1 arg1; Arg2 arg2; Arg3 arg3;
824 };
825 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
826 struct SelectStoredMemberFunctionPointerCall3
827 {
828  typedef typename SelectSpecialization<T>::template
829  Type<StoredMemberFunctionPointerCall3 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>,
830  VoidStoredMemberFunctionPointerCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3> >::type type;
831 };
832 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
833 class StoredConstMemberFunctionPointerCall3 : public RunFunctionTask<T>
834 {
835 public:
836  StoredConstMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
837  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
838 
839  void runFunctor()
840  {
841  this->result = (object->*fn)(arg1, arg2, arg3);
842  }
843 private:
844  T (Class::*fn)(Param1, Param2, Param3)const;
845  Class const *object;
846  Arg1 arg1; Arg2 arg2; Arg3 arg3;
847 };
848 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
849 class VoidStoredConstMemberFunctionPointerCall3 : public RunFunctionTask<T>
850 {
851 public:
852  VoidStoredConstMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
853  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
854 
855  void runFunctor()
856  {
857  (object->*fn)(arg1, arg2, arg3);
858  }
859 private:
860  T (Class::*fn)(Param1, Param2, Param3)const;
861  Class const *object;
862  Arg1 arg1; Arg2 arg2; Arg3 arg3;
863 };
864 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
865 struct SelectStoredConstMemberFunctionPointerCall3
866 {
867  typedef typename SelectSpecialization<T>::template
868  Type<StoredConstMemberFunctionPointerCall3 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>,
869  VoidStoredConstMemberFunctionPointerCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3> >::type type;
870 };
871 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
872 struct StoredFunctorCall4: public RunFunctionTask<T>
873 {
874  inline StoredFunctorCall4(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
875  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4) {}
876  void runFunctor() { this->result = function(arg1, arg2, arg3, arg4); }
877  FunctionPointer function;
878  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
879 };
880 
881 template <typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
882 struct StoredFunctorCall4<void, FunctionPointer, Arg1, Arg2, Arg3, Arg4>: public RunFunctionTask<void>
883 {
884  inline StoredFunctorCall4(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
885  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4) {}
886  void runFunctor() { function(arg1, arg2, arg3, arg4); }
887  FunctionPointer function;
888  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
889 };
890 
891 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
892 struct StoredFunctorPointerCall4: public RunFunctionTask<T>
893 {
894  inline StoredFunctorPointerCall4(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
895  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4) {}
896  void runFunctor() { this->result =(*function)(arg1, arg2, arg3, arg4); }
897  FunctionPointer * function;
898  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
899 };
900 
901 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
902 struct VoidStoredFunctorPointerCall4: public RunFunctionTask<T>
903 {
904  inline VoidStoredFunctorPointerCall4(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
905  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4) {}
906  void runFunctor() {(*function)(arg1, arg2, arg3, arg4); }
907  FunctionPointer * function;
908  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
909 };
910 
911 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
912 struct SelectStoredFunctorPointerCall4
913 {
914  typedef typename SelectSpecialization<T>::template
915  Type<StoredFunctorPointerCall4 <T, FunctionPointer, Arg1, Arg2, Arg3, Arg4>,
916  VoidStoredFunctorPointerCall4<T, FunctionPointer, Arg1, Arg2, Arg3, Arg4> >::type type;
917 };
918 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
919 class StoredMemberFunctionCall4 : public RunFunctionTask<T>
920 {
921 public:
922  StoredMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
923  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
924 
925  void runFunctor()
926  {
927  this->result = (object.*fn)(arg1, arg2, arg3, arg4);
928  }
929 private:
930  T (Class::*fn)(Param1, Param2, Param3, Param4);
931  Class object;
932  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
933 };
934 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
935 class VoidStoredMemberFunctionCall4 : public RunFunctionTask<T>
936 {
937 public:
938  VoidStoredMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
939  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
940 
941  void runFunctor()
942  {
943  (object.*fn)(arg1, arg2, arg3, arg4);
944  }
945 private:
946  T (Class::*fn)(Param1, Param2, Param3, Param4);
947  Class object;
948  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
949 };
950 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
951 struct SelectStoredMemberFunctionCall4
952 {
953  typedef typename SelectSpecialization<T>::template
954  Type<StoredMemberFunctionCall4 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>,
955  VoidStoredMemberFunctionCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4> >::type type;
956 };
957 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
958 class StoredConstMemberFunctionCall4 : public RunFunctionTask<T>
959 {
960 public:
961  StoredConstMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
962  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
963 
964  void runFunctor()
965  {
966  this->result = (object.*fn)(arg1, arg2, arg3, arg4);
967  }
968 private:
969  T (Class::*fn)(Param1, Param2, Param3, Param4)const;
970  const Class object;
971  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
972 };
973 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
974 class VoidStoredConstMemberFunctionCall4 : public RunFunctionTask<T>
975 {
976 public:
977  VoidStoredConstMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
978  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
979 
980  void runFunctor()
981  {
982  (object.*fn)(arg1, arg2, arg3, arg4);
983  }
984 private:
985  T (Class::*fn)(Param1, Param2, Param3, Param4)const;
986  const Class object;
987  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
988 };
989 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
990 struct SelectStoredConstMemberFunctionCall4
991 {
992  typedef typename SelectSpecialization<T>::template
993  Type<StoredConstMemberFunctionCall4 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>,
994  VoidStoredConstMemberFunctionCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4> >::type type;
995 };
996 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
997 class StoredMemberFunctionPointerCall4 : public RunFunctionTask<T>
998 {
999 public:
1000  StoredMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
1001  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
1002 
1003  void runFunctor()
1004  {
1005  this->result = (object->*fn)(arg1, arg2, arg3, arg4);
1006  }
1007 private:
1008  T (Class::*fn)(Param1, Param2, Param3, Param4);
1009  Class *object;
1010  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
1011 };
1012 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
1013 class VoidStoredMemberFunctionPointerCall4 : public RunFunctionTask<T>
1014 {
1015 public:
1016  VoidStoredMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
1017  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
1018 
1019  void runFunctor()
1020  {
1021  (object->*fn)(arg1, arg2, arg3, arg4);
1022  }
1023 private:
1024  T (Class::*fn)(Param1, Param2, Param3, Param4);
1025  Class *object;
1026  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
1027 };
1028 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
1029 struct SelectStoredMemberFunctionPointerCall4
1030 {
1031  typedef typename SelectSpecialization<T>::template
1032  Type<StoredMemberFunctionPointerCall4 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>,
1033  VoidStoredMemberFunctionPointerCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4> >::type type;
1034 };
1035 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
1036 class StoredConstMemberFunctionPointerCall4 : public RunFunctionTask<T>
1037 {
1038 public:
1039  StoredConstMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
1040  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
1041 
1042  void runFunctor()
1043  {
1044  this->result = (object->*fn)(arg1, arg2, arg3, arg4);
1045  }
1046 private:
1047  T (Class::*fn)(Param1, Param2, Param3, Param4)const;
1048  Class const *object;
1049  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
1050 };
1051 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
1052 class VoidStoredConstMemberFunctionPointerCall4 : public RunFunctionTask<T>
1053 {
1054 public:
1055  VoidStoredConstMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
1056  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
1057 
1058  void runFunctor()
1059  {
1060  (object->*fn)(arg1, arg2, arg3, arg4);
1061  }
1062 private:
1063  T (Class::*fn)(Param1, Param2, Param3, Param4)const;
1064  Class const *object;
1065  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
1066 };
1067 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
1068 struct SelectStoredConstMemberFunctionPointerCall4
1069 {
1070  typedef typename SelectSpecialization<T>::template
1071  Type<StoredConstMemberFunctionPointerCall4 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>,
1072  VoidStoredConstMemberFunctionPointerCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4> >::type type;
1073 };
1074 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
1075 struct StoredFunctorCall5: public RunFunctionTask<T>
1076 {
1077  inline StoredFunctorCall5(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1078  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5) {}
1079  void runFunctor() { this->result = function(arg1, arg2, arg3, arg4, arg5); }
1080  FunctionPointer function;
1081  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1082 };
1083 
1084 template <typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
1085 struct StoredFunctorCall5<void, FunctionPointer, Arg1, Arg2, Arg3, Arg4, Arg5>: public RunFunctionTask<void>
1086 {
1087  inline StoredFunctorCall5(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1088  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5) {}
1089  void runFunctor() { function(arg1, arg2, arg3, arg4, arg5); }
1090  FunctionPointer function;
1091  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1092 };
1093 
1094 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
1095 struct StoredFunctorPointerCall5: public RunFunctionTask<T>
1096 {
1097  inline StoredFunctorPointerCall5(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1098  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5) {}
1099  void runFunctor() { this->result =(*function)(arg1, arg2, arg3, arg4, arg5); }
1100  FunctionPointer * function;
1101  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1102 };
1103 
1104 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
1105 struct VoidStoredFunctorPointerCall5: public RunFunctionTask<T>
1106 {
1107  inline VoidStoredFunctorPointerCall5(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1108  : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5) {}
1109  void runFunctor() {(*function)(arg1, arg2, arg3, arg4, arg5); }
1110  FunctionPointer * function;
1111  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1112 };
1113 
1114 template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
1115 struct SelectStoredFunctorPointerCall5
1116 {
1117  typedef typename SelectSpecialization<T>::template
1118  Type<StoredFunctorPointerCall5 <T, FunctionPointer, Arg1, Arg2, Arg3, Arg4, Arg5>,
1119  VoidStoredFunctorPointerCall5<T, FunctionPointer, Arg1, Arg2, Arg3, Arg4, Arg5> >::type type;
1120 };
1121 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1122 class StoredMemberFunctionCall5 : public RunFunctionTask<T>
1123 {
1124 public:
1125  StoredMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1126  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
1127 
1128  void runFunctor()
1129  {
1130  this->result = (object.*fn)(arg1, arg2, arg3, arg4, arg5);
1131  }
1132 private:
1133  T (Class::*fn)(Param1, Param2, Param3, Param4, Param5);
1134  Class object;
1135  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1136 };
1137 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1138 class VoidStoredMemberFunctionCall5 : public RunFunctionTask<T>
1139 {
1140 public:
1141  VoidStoredMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1142  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
1143 
1144  void runFunctor()
1145  {
1146  (object.*fn)(arg1, arg2, arg3, arg4, arg5);
1147  }
1148 private:
1149  T (Class::*fn)(Param1, Param2, Param3, Param4, Param5);
1150  Class object;
1151  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1152 };
1153 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1154 struct SelectStoredMemberFunctionCall5
1155 {
1156  typedef typename SelectSpecialization<T>::template
1157  Type<StoredMemberFunctionCall5 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>,
1158  VoidStoredMemberFunctionCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5> >::type type;
1159 };
1160 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1161 class StoredConstMemberFunctionCall5 : public RunFunctionTask<T>
1162 {
1163 public:
1164  StoredConstMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1165  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
1166 
1167  void runFunctor()
1168  {
1169  this->result = (object.*fn)(arg1, arg2, arg3, arg4, arg5);
1170  }
1171 private:
1172  T (Class::*fn)(Param1, Param2, Param3, Param4, Param5)const;
1173  const Class object;
1174  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1175 };
1176 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1177 class VoidStoredConstMemberFunctionCall5 : public RunFunctionTask<T>
1178 {
1179 public:
1180  VoidStoredConstMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1181  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
1182 
1183  void runFunctor()
1184  {
1185  (object.*fn)(arg1, arg2, arg3, arg4, arg5);
1186  }
1187 private:
1188  T (Class::*fn)(Param1, Param2, Param3, Param4, Param5)const;
1189  const Class object;
1190  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1191 };
1192 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1193 struct SelectStoredConstMemberFunctionCall5
1194 {
1195  typedef typename SelectSpecialization<T>::template
1196  Type<StoredConstMemberFunctionCall5 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>,
1197  VoidStoredConstMemberFunctionCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5> >::type type;
1198 };
1199 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1200 class StoredMemberFunctionPointerCall5 : public RunFunctionTask<T>
1201 {
1202 public:
1203  StoredMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1204  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
1205 
1206  void runFunctor()
1207  {
1208  this->result = (object->*fn)(arg1, arg2, arg3, arg4, arg5);
1209  }
1210 private:
1211  T (Class::*fn)(Param1, Param2, Param3, Param4, Param5);
1212  Class *object;
1213  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1214 };
1215 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1216 class VoidStoredMemberFunctionPointerCall5 : public RunFunctionTask<T>
1217 {
1218 public:
1219  VoidStoredMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1220  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
1221 
1222  void runFunctor()
1223  {
1224  (object->*fn)(arg1, arg2, arg3, arg4, arg5);
1225  }
1226 private:
1227  T (Class::*fn)(Param1, Param2, Param3, Param4, Param5);
1228  Class *object;
1229  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1230 };
1231 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1232 struct SelectStoredMemberFunctionPointerCall5
1233 {
1234  typedef typename SelectSpecialization<T>::template
1235  Type<StoredMemberFunctionPointerCall5 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>,
1236  VoidStoredMemberFunctionPointerCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5> >::type type;
1237 };
1238 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1239 class StoredConstMemberFunctionPointerCall5 : public RunFunctionTask<T>
1240 {
1241 public:
1242  StoredConstMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1243  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
1244 
1245  void runFunctor()
1246  {
1247  this->result = (object->*fn)(arg1, arg2, arg3, arg4, arg5);
1248  }
1249 private:
1250  T (Class::*fn)(Param1, Param2, Param3, Param4, Param5)const;
1251  Class const *object;
1252  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1253 };
1254 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1255 class VoidStoredConstMemberFunctionPointerCall5 : public RunFunctionTask<T>
1256 {
1257 public:
1258  VoidStoredConstMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
1259  : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
1260 
1261  void runFunctor()
1262  {
1263  (object->*fn)(arg1, arg2, arg3, arg4, arg5);
1264  }
1265 private:
1266  T (Class::*fn)(Param1, Param2, Param3, Param4, Param5)const;
1267  Class const *object;
1268  Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
1269 };
1270 template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
1271 struct SelectStoredConstMemberFunctionPointerCall5
1272 {
1273  typedef typename SelectSpecialization<T>::template
1274  Type<StoredConstMemberFunctionPointerCall5 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>,
1275  VoidStoredConstMemberFunctionPointerCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5> >::type type;
1276 };
1277 
1278 template <typename T, typename Functor>
1279 class StoredFunctorCall : public RunFunctionTask<T>
1280 {
1281 public:
1282  StoredFunctorCall(const Functor &f) : functor(f) { }
1283  void runFunctor()
1284  {
1285  this->result = functor();
1286  }
1287 private:
1288  Functor functor;
1289 };
1290 template <typename Functor>
1291 class StoredFunctorCall<void, Functor> : public RunFunctionTask<void>
1292 {
1293 public:
1294  StoredFunctorCall(const Functor &f) : functor(f) { }
1295  void runFunctor()
1296  {
1297  functor();
1298  }
1299 private:
1300  Functor functor;
1301 };
1302 
1303 
1304 } //namespace QtConcurrent
1305 
1306 #endif // qdoc
1307 
1310 
1311 #endif // QT_NO_CONCURRENT
1312 
1313 #endif
int type
Definition: qmetatype.cpp:239
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
#define QT_MODULE(x)
Definition: qglobal.h:2783
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
The QtConcurrent namespace provides high-level APIs that make it possible to write multi-threaded pro...
static Bool functor(Display *display, XEvent *event, XPointer arg)
#define QT_END_HEADER
Definition: qglobal.h:137