Library of Assembled Shared Sources
thread_fun.inl
Go to the documentation of this file.
1/*
2 * *** ATTENTION! DO NOT MODIFY THIS FILE DIRECTLY! ***
3 *
4 * It has automatically been generated from thread_fun.tmpl.inl
5 * by param_expander.py on Mon Oct 6 22:51:38 2025.
6 */
7
8/** @file
9 * @author Bram de Greve (bram@cocamware.com)
10 * @author Tom De Muer (tom@cocamware.com)
11 *
12 * *** BEGIN LICENSE INFORMATION ***
13 *
14 * The contents of this file are subject to the Common Public Attribution License
15 * Version 1.0 (the "License"); you may not use this file except in compliance with
16 * the License. You may obtain a copy of the License at
17 * http://lass.sourceforge.net/cpal-license. The License is based on the
18 * Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover
19 * use of software over a computer network and provide for limited attribution for
20 * the Original Developer. In addition, Exhibit A has been modified to be consistent
21 * with Exhibit B.
22 *
23 * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
24 * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
25 * language governing rights and limitations under the License.
26 *
27 * The Original Code is LASS - Library of Assembled Shared Sources.
28 *
29 * The Initial Developer of the Original Code is Bram de Greve and Tom De Muer.
30 * The Original Developer is the Initial Developer.
31 *
32 * All portions of the code written by the Initial Developer are:
33 * Copyright (C) 2004-2011 the Initial Developer.
34 * All Rights Reserved.
35 *
36 * Contributor(s):
37 *
38 * Alternatively, the contents of this file may be used under the terms of the
39 * GNU General Public License Version 2 or later (the GPL), in which case the
40 * provisions of GPL are applicable instead of those above. If you wish to allow use
41 * of your version of this file only under the terms of the GPL and not to allow
42 * others to use your version of this file under the CPAL, indicate your decision by
43 * deleting the provisions above and replace them with the notice and other
44 * provisions required by the GPL License. If you do not delete the provisions above,
45 * a recipient may use your version of this file under either the CPAL or the GPL.
46 *
47 * *** END LICENSE INFORMATION ***
48 */
49
50
51
52#ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_THREAD_FUN_INL
53#define LASS_GUARDIAN_OF_INCLUSION_UTIL_THREAD_FUN_INL
54
55#include "util_common.h"
56#include "thread_fun.h"
57#include "bind.h"
58
59namespace lass
60{
61namespace util
62{
63
64// --- 0 arguments ---------------------------------------------------------------------------------
65
66/** @relates ThreadFun
67 */
68template <typename Function>
69ThreadFun* threadFun(
70 Function function,
71 ThreadKind kind)
72{
73 return new ThreadFun(bind(function), kind);
74}
75
76
77
78/** @relates ThreadFun
79 */
80template <typename ObjectPtr, typename Method>
81ThreadFun* threadMemFun(
82 ObjectPtr object, Method method,
83 ThreadKind kind)
84{
85 return new ThreadFun(bind(method, object), kind);
86}
87
88
89
90
91// --- 1 argument(s) -----------------------------------------------------------------------------
92
93/** @relates ThreadFun
94 */
95template <typename P1, typename Function>
96ThreadFun* threadFun(
97 Function function,
98 const P1& iP1,
99 ThreadKind kind)
100{
101 return new ThreadFun(bind(function, iP1), kind);
102}
103
104
105
106/** @relates ThreadFun
107 */
108template <typename P1, typename ObjectPtr, typename Method>
109ThreadFun* threadMemFun(
110 ObjectPtr object, Method method,
111 const P1& iP1,
112 ThreadKind kind)
113{
114 return new ThreadFun(bind(method, object, iP1), kind);
115}
116
117
118
119
120// --- 2 argument(s) -----------------------------------------------------------------------------
121
122/** @relates ThreadFun
123 */
124template <typename P1, typename P2, typename Function>
125ThreadFun* threadFun(
126 Function function,
127 const P1& iP1, const P2& iP2,
128 ThreadKind kind)
129{
130 return new ThreadFun(bind(function, iP1, iP2), kind);
131}
132
133
134
135/** @relates ThreadFun
136 */
137template <typename P1, typename P2, typename ObjectPtr, typename Method>
138ThreadFun* threadMemFun(
139 ObjectPtr object, Method method,
140 const P1& iP1, const P2& iP2,
141 ThreadKind kind)
142{
143 return new ThreadFun(bind(method, object, iP1, iP2), kind);
144}
145
146
147
148
149// --- 3 argument(s) -----------------------------------------------------------------------------
150
151/** @relates ThreadFun
152 */
153template <typename P1, typename P2, typename P3, typename Function>
154ThreadFun* threadFun(
155 Function function,
156 const P1& iP1, const P2& iP2, const P3& iP3,
157 ThreadKind kind)
158{
159 return new ThreadFun(bind(function, iP1, iP2, iP3), kind);
160}
161
162
163
164/** @relates ThreadFun
165 */
166template <typename P1, typename P2, typename P3, typename ObjectPtr, typename Method>
167ThreadFun* threadMemFun(
168 ObjectPtr object, Method method,
169 const P1& iP1, const P2& iP2, const P3& iP3,
170 ThreadKind kind)
171{
172 return new ThreadFun(bind(method, object, iP1, iP2, iP3), kind);
173}
174
175
176
177
178// --- 4 argument(s) -----------------------------------------------------------------------------
179
180/** @relates ThreadFun
181 */
182template <typename P1, typename P2, typename P3, typename P4, typename Function>
183ThreadFun* threadFun(
184 Function function,
185 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4,
186 ThreadKind kind)
187{
188 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4), kind);
189}
190
191
192
193/** @relates ThreadFun
194 */
195template <typename P1, typename P2, typename P3, typename P4, typename ObjectPtr, typename Method>
196ThreadFun* threadMemFun(
197 ObjectPtr object, Method method,
198 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4,
199 ThreadKind kind)
200{
201 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4), kind);
202}
203
204
205
206
207// --- 5 argument(s) -----------------------------------------------------------------------------
208
209/** @relates ThreadFun
210 */
211template <typename P1, typename P2, typename P3, typename P4, typename P5, typename Function>
212ThreadFun* threadFun(
213 Function function,
214 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5,
215 ThreadKind kind)
216{
217 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5), kind);
218}
219
220
221
222/** @relates ThreadFun
223 */
224template <typename P1, typename P2, typename P3, typename P4, typename P5, typename ObjectPtr, typename Method>
225ThreadFun* threadMemFun(
226 ObjectPtr object, Method method,
227 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5,
228 ThreadKind kind)
229{
230 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5), kind);
231}
232
233
234
235
236// --- 6 argument(s) -----------------------------------------------------------------------------
237
238/** @relates ThreadFun
239 */
240template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename Function>
241ThreadFun* threadFun(
242 Function function,
243 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6,
244 ThreadKind kind)
245{
246 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6), kind);
247}
248
249
250
251/** @relates ThreadFun
252 */
253template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename ObjectPtr, typename Method>
254ThreadFun* threadMemFun(
255 ObjectPtr object, Method method,
256 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6,
257 ThreadKind kind)
258{
259 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6), kind);
260}
261
262
263
264
265// --- 7 argument(s) -----------------------------------------------------------------------------
266
267/** @relates ThreadFun
268 */
269template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename Function>
270ThreadFun* threadFun(
271 Function function,
272 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7,
273 ThreadKind kind)
274{
275 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7), kind);
276}
277
278
279
280/** @relates ThreadFun
281 */
282template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename ObjectPtr, typename Method>
283ThreadFun* threadMemFun(
284 ObjectPtr object, Method method,
285 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7,
286 ThreadKind kind)
287{
288 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7), kind);
289}
290
291
292
293
294// --- 8 argument(s) -----------------------------------------------------------------------------
295
296/** @relates ThreadFun
297 */
298template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename Function>
299ThreadFun* threadFun(
300 Function function,
301 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8,
302 ThreadKind kind)
303{
304 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8), kind);
305}
306
307
308
309/** @relates ThreadFun
310 */
311template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename ObjectPtr, typename Method>
312ThreadFun* threadMemFun(
313 ObjectPtr object, Method method,
314 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8,
315 ThreadKind kind)
316{
317 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8), kind);
318}
319
320
321
322
323// --- 9 argument(s) -----------------------------------------------------------------------------
324
325/** @relates ThreadFun
326 */
327template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename Function>
328ThreadFun* threadFun(
329 Function function,
330 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9,
331 ThreadKind kind)
332{
333 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9), kind);
334}
335
336
337
338/** @relates ThreadFun
339 */
340template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename ObjectPtr, typename Method>
341ThreadFun* threadMemFun(
342 ObjectPtr object, Method method,
343 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9,
344 ThreadKind kind)
345{
346 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9), kind);
347}
348
349
350
351
352// --- 10 argument(s) -----------------------------------------------------------------------------
353
354/** @relates ThreadFun
355 */
356template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename Function>
357ThreadFun* threadFun(
358 Function function,
359 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10,
360 ThreadKind kind)
361{
362 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10), kind);
363}
364
365
366
367/** @relates ThreadFun
368 */
369template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename ObjectPtr, typename Method>
370ThreadFun* threadMemFun(
371 ObjectPtr object, Method method,
372 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10,
373 ThreadKind kind)
374{
375 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10), kind);
376}
377
378
379
380
381// --- 11 argument(s) -----------------------------------------------------------------------------
382
383/** @relates ThreadFun
384 */
385template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename Function>
386ThreadFun* threadFun(
387 Function function,
388 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11,
389 ThreadKind kind)
390{
391 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11), kind);
392}
393
394
395
396/** @relates ThreadFun
397 */
398template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename ObjectPtr, typename Method>
399ThreadFun* threadMemFun(
400 ObjectPtr object, Method method,
401 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11,
402 ThreadKind kind)
403{
404 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11), kind);
405}
406
407
408
409
410// --- 12 argument(s) -----------------------------------------------------------------------------
411
412/** @relates ThreadFun
413 */
414template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename Function>
415ThreadFun* threadFun(
416 Function function,
417 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12,
418 ThreadKind kind)
419{
420 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12), kind);
421}
422
423
424
425/** @relates ThreadFun
426 */
427template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename ObjectPtr, typename Method>
428ThreadFun* threadMemFun(
429 ObjectPtr object, Method method,
430 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12,
431 ThreadKind kind)
432{
433 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12), kind);
434}
435
436
437
438
439// --- 13 argument(s) -----------------------------------------------------------------------------
440
441/** @relates ThreadFun
442 */
443template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename Function>
444ThreadFun* threadFun(
445 Function function,
446 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13,
447 ThreadKind kind)
448{
449 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13), kind);
450}
451
452
453
454/** @relates ThreadFun
455 */
456template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename ObjectPtr, typename Method>
457ThreadFun* threadMemFun(
458 ObjectPtr object, Method method,
459 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13,
460 ThreadKind kind)
461{
462 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13), kind);
463}
464
465
466
467
468// --- 14 argument(s) -----------------------------------------------------------------------------
469
470/** @relates ThreadFun
471 */
472template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename Function>
473ThreadFun* threadFun(
474 Function function,
475 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13, const P14& iP14,
476 ThreadKind kind)
477{
478 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13, iP14), kind);
479}
480
481
482
483/** @relates ThreadFun
484 */
485template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename ObjectPtr, typename Method>
486ThreadFun* threadMemFun(
487 ObjectPtr object, Method method,
488 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13, const P14& iP14,
489 ThreadKind kind)
490{
491 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13, iP14), kind);
492}
493
494
495
496
497// --- 15 argument(s) -----------------------------------------------------------------------------
498
499/** @relates ThreadFun
500 */
501template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename Function>
502ThreadFun* threadFun(
503 Function function,
504 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13, const P14& iP14, const P15& iP15,
505 ThreadKind kind)
506{
507 return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13, iP14, iP15), kind);
508}
509
510
511
512/** @relates ThreadFun
513 */
514template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename ObjectPtr, typename Method>
515ThreadFun* threadMemFun(
516 ObjectPtr object, Method method,
517 const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8, const P9& iP9, const P10& iP10, const P11& iP11, const P12& iP12, const P13& iP13, const P14& iP14, const P15& iP15,
518 ThreadKind kind)
519{
520 return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13, iP14, iP15), kind);
521}
522
523
524
525
526}
527
528}
529
530#endif
531
532// EOF
ThreadKind
ThreadKind.
Definition thread.h:109
general utility, debug facilities, ...
Library for Assembled Shared Sources.
Definition config.h:53