library of assembled shared sources

http://lass.cocamware.com

thread_fun.inl

Go to the documentation of this file.
00001 /*
00002  * *** ATTENTION!  DO NOT MODIFY THIS FILE DIRECTLY! ***
00003  * 
00004  * It has automatically been generated from thread_fun.tmpl.inl
00005  * by param_expander.py on Sun Nov 09 16:55:50 2008.
00006  */
00007 
00008 /** @file
00009  *  @author Bram de Greve (bramz@users.sourceforge.net)
00010  *  @author Tom De Muer (tomdemuer@users.sourceforge.net)
00011  *
00012  *  *** BEGIN LICENSE INFORMATION ***
00013  *  
00014  *  The contents of this file are subject to the Common Public Attribution License 
00015  *  Version 1.0 (the "License"); you may not use this file except in compliance with 
00016  *  the License. You may obtain a copy of the License at 
00017  *  http://lass.sourceforge.net/cpal-license. The License is based on the 
00018  *  Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover 
00019  *  use of software over a computer network and provide for limited attribution for 
00020  *  the Original Developer. In addition, Exhibit A has been modified to be consistent 
00021  *  with Exhibit B.
00022  *  
00023  *  Software distributed under the License is distributed on an "AS IS" basis, WITHOUT 
00024  *  WARRANTY OF ANY KIND, either express or implied. See the License for the specific 
00025  *  language governing rights and limitations under the License.
00026  *  
00027  *  The Original Code is LASS - Library of Assembled Shared Sources.
00028  *  
00029  *  The Initial Developer of the Original Code is Bram de Greve and Tom De Muer.
00030  *  The Original Developer is the Initial Developer.
00031  *  
00032  *  All portions of the code written by the Initial Developer are:
00033  *  Copyright (C) 2004-2007 the Initial Developer.
00034  *  All Rights Reserved.
00035  *  
00036  *  Contributor(s):
00037  *
00038  *  Alternatively, the contents of this file may be used under the terms of the 
00039  *  GNU General Public License Version 2 or later (the GPL), in which case the 
00040  *  provisions of GPL are applicable instead of those above.  If you wish to allow use
00041  *  of your version of this file only under the terms of the GPL and not to allow 
00042  *  others to use your version of this file under the CPAL, indicate your decision by 
00043  *  deleting the provisions above and replace them with the notice and other 
00044  *  provisions required by the GPL License. If you do not delete the provisions above,
00045  *  a recipient may use your version of this file under either the CPAL or the GPL.
00046  *  
00047  *  *** END LICENSE INFORMATION ***
00048  */
00049 
00050 
00051 
00052 #ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_THREAD_FUN_INL
00053 #define LASS_GUARDIAN_OF_INCLUSION_UTIL_THREAD_FUN_INL
00054 
00055 #include "util_common.h"
00056 #include "thread_fun.h"
00057 #include "bind.h"
00058 
00059 namespace lass
00060 {
00061 namespace util
00062 {
00063 
00064 // --- 0 arguments ---------------------------------------------------------------------------------
00065 
00066 /** @relates ThreadFun
00067  */
00068 template <typename Function>
00069 ThreadFun* threadFun(
00070     Function function,
00071     ThreadKind kind)
00072 {
00073     return new ThreadFun(bind(function), kind);
00074 }
00075 
00076 
00077 
00078 /** @relates ThreadFun
00079  */
00080 template <typename ObjectPtr, typename Method>
00081 ThreadFun* threadMemFun(
00082     ObjectPtr object, Method method,
00083     ThreadKind kind)
00084 {
00085     return new ThreadFun(bind(method, object), kind);
00086 }
00087 
00088 
00089 
00090 
00091 // --- 1 argument(s) -----------------------------------------------------------------------------
00092 
00093 /** @relates ThreadFun
00094  */
00095 template <typename P1, typename Function>
00096 ThreadFun* threadFun(
00097     Function function,
00098     const P1& iP1,
00099     ThreadKind kind)
00100 {
00101     return new ThreadFun(bind(function, iP1), kind);
00102 }
00103 
00104 
00105 
00106 /** @relates ThreadFun
00107  */
00108 template <typename P1, typename ObjectPtr, typename Method>
00109 ThreadFun* threadMemFun(
00110     ObjectPtr object, Method method,
00111     const P1& iP1,
00112     ThreadKind kind)
00113 {
00114     return new ThreadFun(bind(method, object, iP1), kind);
00115 }
00116 
00117 
00118 
00119 
00120 // --- 2 argument(s) -----------------------------------------------------------------------------
00121 
00122 /** @relates ThreadFun
00123  */
00124 template <typename P1, typename P2, typename Function>
00125 ThreadFun* threadFun(
00126     Function function,
00127     const P1& iP1, const P2& iP2,
00128     ThreadKind kind)
00129 {
00130     return new ThreadFun(bind(function, iP1, iP2), kind);
00131 }
00132 
00133 
00134 
00135 /** @relates ThreadFun
00136  */
00137 template <typename P1, typename P2, typename ObjectPtr, typename Method>
00138 ThreadFun* threadMemFun(
00139     ObjectPtr object, Method method,
00140     const P1& iP1, const P2& iP2,
00141     ThreadKind kind)
00142 {
00143     return new ThreadFun(bind(method, object, iP1, iP2), kind);
00144 }
00145 
00146 
00147 
00148 
00149 // --- 3 argument(s) -----------------------------------------------------------------------------
00150 
00151 /** @relates ThreadFun
00152  */
00153 template <typename P1, typename P2, typename P3, typename Function>
00154 ThreadFun* threadFun(
00155     Function function,
00156     const P1& iP1, const P2& iP2, const P3& iP3,
00157     ThreadKind kind)
00158 {
00159     return new ThreadFun(bind(function, iP1, iP2, iP3), kind);
00160 }
00161 
00162 
00163 
00164 /** @relates ThreadFun
00165  */
00166 template <typename P1, typename P2, typename P3, typename ObjectPtr, typename Method>
00167 ThreadFun* threadMemFun(
00168     ObjectPtr object, Method method,
00169     const P1& iP1, const P2& iP2, const P3& iP3,
00170     ThreadKind kind)
00171 {
00172     return new ThreadFun(bind(method, object, iP1, iP2, iP3), kind);
00173 }
00174 
00175 
00176 
00177 
00178 // --- 4 argument(s) -----------------------------------------------------------------------------
00179 
00180 /** @relates ThreadFun
00181  */
00182 template <typename P1, typename P2, typename P3, typename P4, typename Function>
00183 ThreadFun* threadFun(
00184     Function function,
00185     const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4,
00186     ThreadKind kind)
00187 {
00188     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4), kind);
00189 }
00190 
00191 
00192 
00193 /** @relates ThreadFun
00194  */
00195 template <typename P1, typename P2, typename P3, typename P4, typename ObjectPtr, typename Method>
00196 ThreadFun* threadMemFun(
00197     ObjectPtr object, Method method,
00198     const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4,
00199     ThreadKind kind)
00200 {
00201     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4), kind);
00202 }
00203 
00204 
00205 
00206 
00207 // --- 5 argument(s) -----------------------------------------------------------------------------
00208 
00209 /** @relates ThreadFun
00210  */
00211 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename Function>
00212 ThreadFun* threadFun(
00213     Function function,
00214     const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5,
00215     ThreadKind kind)
00216 {
00217     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5), kind);
00218 }
00219 
00220 
00221 
00222 /** @relates ThreadFun
00223  */
00224 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename ObjectPtr, typename Method>
00225 ThreadFun* threadMemFun(
00226     ObjectPtr object, Method method,
00227     const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5,
00228     ThreadKind kind)
00229 {
00230     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5), kind);
00231 }
00232 
00233 
00234 
00235 
00236 // --- 6 argument(s) -----------------------------------------------------------------------------
00237 
00238 /** @relates ThreadFun
00239  */
00240 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename Function>
00241 ThreadFun* threadFun(
00242     Function function,
00243     const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6,
00244     ThreadKind kind)
00245 {
00246     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6), kind);
00247 }
00248 
00249 
00250 
00251 /** @relates ThreadFun
00252  */
00253 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename ObjectPtr, typename Method>
00254 ThreadFun* threadMemFun(
00255     ObjectPtr object, Method method,
00256     const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6,
00257     ThreadKind kind)
00258 {
00259     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6), kind);
00260 }
00261 
00262 
00263 
00264 
00265 // --- 7 argument(s) -----------------------------------------------------------------------------
00266 
00267 /** @relates ThreadFun
00268  */
00269 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename Function>
00270 ThreadFun* threadFun(
00271     Function function,
00272     const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7,
00273     ThreadKind kind)
00274 {
00275     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7), kind);
00276 }
00277 
00278 
00279 
00280 /** @relates ThreadFun
00281  */
00282 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename ObjectPtr, typename Method>
00283 ThreadFun* threadMemFun(
00284     ObjectPtr object, Method method,
00285     const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7,
00286     ThreadKind kind)
00287 {
00288     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7), kind);
00289 }
00290 
00291 
00292 
00293 
00294 // --- 8 argument(s) -----------------------------------------------------------------------------
00295 
00296 /** @relates ThreadFun
00297  */
00298 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename Function>
00299 ThreadFun* threadFun(
00300     Function function,
00301     const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8,
00302     ThreadKind kind)
00303 {
00304     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8), kind);
00305 }
00306 
00307 
00308 
00309 /** @relates ThreadFun
00310  */
00311 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename ObjectPtr, typename Method>
00312 ThreadFun* threadMemFun(
00313     ObjectPtr object, Method method,
00314     const P1& iP1, const P2& iP2, const P3& iP3, const P4& iP4, const P5& iP5, const P6& iP6, const P7& iP7, const P8& iP8,
00315     ThreadKind kind)
00316 {
00317     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8), kind);
00318 }
00319 
00320 
00321 
00322 
00323 // --- 9 argument(s) -----------------------------------------------------------------------------
00324 
00325 /** @relates ThreadFun
00326  */
00327 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename Function>
00328 ThreadFun* threadFun(
00329     Function function,
00330     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,
00331     ThreadKind kind)
00332 {
00333     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9), kind);
00334 }
00335 
00336 
00337 
00338 /** @relates ThreadFun
00339  */
00340 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename ObjectPtr, typename Method>
00341 ThreadFun* threadMemFun(
00342     ObjectPtr object, Method method,
00343     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,
00344     ThreadKind kind)
00345 {
00346     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9), kind);
00347 }
00348 
00349 
00350 
00351 
00352 // --- 10 argument(s) -----------------------------------------------------------------------------
00353 
00354 /** @relates ThreadFun
00355  */
00356 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename Function>
00357 ThreadFun* threadFun(
00358     Function function,
00359     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,
00360     ThreadKind kind)
00361 {
00362     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10), kind);
00363 }
00364 
00365 
00366 
00367 /** @relates ThreadFun
00368  */
00369 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename ObjectPtr, typename Method>
00370 ThreadFun* threadMemFun(
00371     ObjectPtr object, Method method,
00372     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,
00373     ThreadKind kind)
00374 {
00375     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10), kind);
00376 }
00377 
00378 
00379 
00380 
00381 // --- 11 argument(s) -----------------------------------------------------------------------------
00382 
00383 /** @relates ThreadFun
00384  */
00385 template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename Function>
00386 ThreadFun* threadFun(
00387     Function function,
00388     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,
00389     ThreadKind kind)
00390 {
00391     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11), kind);
00392 }
00393 
00394 
00395 
00396 /** @relates ThreadFun
00397  */
00398 template <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>
00399 ThreadFun* threadMemFun(
00400     ObjectPtr object, Method method,
00401     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,
00402     ThreadKind kind)
00403 {
00404     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11), kind);
00405 }
00406 
00407 
00408 
00409 
00410 // --- 12 argument(s) -----------------------------------------------------------------------------
00411 
00412 /** @relates ThreadFun
00413  */
00414 template <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>
00415 ThreadFun* threadFun(
00416     Function function,
00417     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,
00418     ThreadKind kind)
00419 {
00420     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12), kind);
00421 }
00422 
00423 
00424 
00425 /** @relates ThreadFun
00426  */
00427 template <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>
00428 ThreadFun* threadMemFun(
00429     ObjectPtr object, Method method,
00430     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,
00431     ThreadKind kind)
00432 {
00433     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12), kind);
00434 }
00435 
00436 
00437 
00438 
00439 // --- 13 argument(s) -----------------------------------------------------------------------------
00440 
00441 /** @relates ThreadFun
00442  */
00443 template <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>
00444 ThreadFun* threadFun(
00445     Function function,
00446     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,
00447     ThreadKind kind)
00448 {
00449     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13), kind);
00450 }
00451 
00452 
00453 
00454 /** @relates ThreadFun
00455  */
00456 template <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>
00457 ThreadFun* threadMemFun(
00458     ObjectPtr object, Method method,
00459     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,
00460     ThreadKind kind)
00461 {
00462     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13), kind);
00463 }
00464 
00465 
00466 
00467 
00468 // --- 14 argument(s) -----------------------------------------------------------------------------
00469 
00470 /** @relates ThreadFun
00471  */
00472 template <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>
00473 ThreadFun* threadFun(
00474     Function function,
00475     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,
00476     ThreadKind kind)
00477 {
00478     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13, iP14), kind);
00479 }
00480 
00481 
00482 
00483 /** @relates ThreadFun
00484  */
00485 template <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>
00486 ThreadFun* threadMemFun(
00487     ObjectPtr object, Method method,
00488     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,
00489     ThreadKind kind)
00490 {
00491     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13, iP14), kind);
00492 }
00493 
00494 
00495 
00496 
00497 // --- 15 argument(s) -----------------------------------------------------------------------------
00498 
00499 /** @relates ThreadFun
00500  */
00501 template <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>
00502 ThreadFun* threadFun(
00503     Function function,
00504     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,
00505     ThreadKind kind)
00506 {
00507     return new ThreadFun(bind(function, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13, iP14, iP15), kind);
00508 }
00509 
00510 
00511 
00512 /** @relates ThreadFun
00513  */
00514 template <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>
00515 ThreadFun* threadMemFun(
00516     ObjectPtr object, Method method,
00517     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,
00518     ThreadKind kind)
00519 {
00520     return new ThreadFun(bind(method, object, iP1, iP2, iP3, iP4, iP5, iP6, iP7, iP8, iP9, iP10, iP11, iP12, iP13, iP14, iP15), kind);
00521 }
00522 
00523 
00524 
00525 
00526 }
00527 
00528 }
00529 
00530 #endif
00531 
00532 // EOF

Generated on Mon Nov 10 14:21:40 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo