qtconcurrentstoredfunctioncall.h 53 KB

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