OLD | NEW |
1 // This file was GENERATED by command: | 1 // This file was GENERATED by command: |
2 // pump.py bind_internal.h.pump | 2 // pump.py bind_internal.h.pump |
3 // DO NOT EDIT BY HAND!!! | 3 // DO NOT EDIT BY HAND!!! |
4 | 4 |
5 | 5 |
6 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 6 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
7 // Use of this source code is governed by a BSD-style license that can be | 7 // Use of this source code is governed by a BSD-style license that can be |
8 // found in the LICENSE file. | 8 // found in the LICENSE file. |
9 | 9 |
10 #ifndef BASE_BIND_INTERNAL_H_ | 10 #ifndef BASE_BIND_INTERNAL_H_ |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // and for ignoring return values. This is separate from | 69 // and for ignoring return values. This is separate from |
70 // Invoker to avoid creating multiple version of Invoker<> | 70 // Invoker to avoid creating multiple version of Invoker<> |
71 // which grows at O(n^2) with the arity. | 71 // which grows at O(n^2) with the arity. |
72 // There are |k*ARITY| InvokeHelper types. | 72 // There are |k*ARITY| InvokeHelper types. |
73 // Invoker<> -- Unwraps the curried parameters and executes the Runnable. | 73 // Invoker<> -- Unwraps the curried parameters and executes the Runnable. |
74 // There are |(ARITY^2 + ARITY)/2| Invoketypes. | 74 // There are |(ARITY^2 + ARITY)/2| Invoketypes. |
75 // BindState<> -- Stores the curried parameters, and is the main entry point | 75 // BindState<> -- Stores the curried parameters, and is the main entry point |
76 // into the Bind() system, doing most of the type resolution. | 76 // into the Bind() system, doing most of the type resolution. |
77 // There are ARITY BindState types. | 77 // There are ARITY BindState types. |
78 | 78 |
| 79 |
79 // RunnableAdapter<> | 80 // RunnableAdapter<> |
80 // | 81 // |
81 // The RunnableAdapter<> templates provide a uniform interface for invoking | 82 // The RunnableAdapter<> templates provide a uniform interface for invoking |
82 // a function pointer, method pointer, or const method pointer. The adapter | 83 // a function pointer, method pointer, or const method pointer. The adapter |
83 // exposes a Run() method with an appropriate signature. Using this wrapper | 84 // exposes a Run() method with an appropriate signature. Using this wrapper |
84 // allows for writing code that supports all three pointer types without | 85 // allows for writing code that supports all three pointer types without |
85 // undue repetition. Without it, a lot of code would need to be repeated 3 | 86 // undue repetition. Without it, a lot of code would need to be repeated 3 |
86 // times. | 87 // times. |
87 // | 88 // |
88 // For method pointers and const method pointers the first argument to Run() | 89 // For method pointers and const method pointers the first argument to Run() |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 template <typename R, typename A1> | 160 template <typename R, typename A1> |
160 class RunnableAdapter<R(*)(A1)> { | 161 class RunnableAdapter<R(*)(A1)> { |
161 public: | 162 public: |
162 typedef R (RunType)(A1); | 163 typedef R (RunType)(A1); |
163 | 164 |
164 explicit RunnableAdapter(R(*function)(A1)) | 165 explicit RunnableAdapter(R(*function)(A1)) |
165 : function_(function) { | 166 : function_(function) { |
166 } | 167 } |
167 | 168 |
168 R Run(typename CallbackParamTraits<A1>::ForwardType a1) { | 169 R Run(typename CallbackParamTraits<A1>::ForwardType a1) { |
169 return function_(CallbackForward(a1)); | 170 return function_(a1); |
170 } | 171 } |
171 | 172 |
172 private: | 173 private: |
173 R (*function_)(A1); | 174 R (*function_)(A1); |
174 }; | 175 }; |
175 | 176 |
176 // Method: Arity 1. | 177 // Method: Arity 1. |
177 template <typename R, typename T, typename A1> | 178 template <typename R, typename T, typename A1> |
178 class RunnableAdapter<R(T::*)(A1)> { | 179 class RunnableAdapter<R(T::*)(A1)> { |
179 public: | 180 public: |
180 typedef R (RunType)(T*, A1); | 181 typedef R (RunType)(T*, A1); |
181 typedef true_type IsMethod; | 182 typedef true_type IsMethod; |
182 | 183 |
183 explicit RunnableAdapter(R(T::*method)(A1)) | 184 explicit RunnableAdapter(R(T::*method)(A1)) |
184 : method_(method) { | 185 : method_(method) { |
185 } | 186 } |
186 | 187 |
187 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1) { | 188 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1) { |
188 return (object->*method_)(CallbackForward(a1)); | 189 return (object->*method_)(a1); |
189 } | 190 } |
190 | 191 |
191 private: | 192 private: |
192 R (T::*method_)(A1); | 193 R (T::*method_)(A1); |
193 }; | 194 }; |
194 | 195 |
195 // Const Method: Arity 1. | 196 // Const Method: Arity 1. |
196 template <typename R, typename T, typename A1> | 197 template <typename R, typename T, typename A1> |
197 class RunnableAdapter<R(T::*)(A1) const> { | 198 class RunnableAdapter<R(T::*)(A1) const> { |
198 public: | 199 public: |
199 typedef R (RunType)(const T*, A1); | 200 typedef R (RunType)(const T*, A1); |
200 typedef true_type IsMethod; | 201 typedef true_type IsMethod; |
201 | 202 |
202 explicit RunnableAdapter(R(T::*method)(A1) const) | 203 explicit RunnableAdapter(R(T::*method)(A1) const) |
203 : method_(method) { | 204 : method_(method) { |
204 } | 205 } |
205 | 206 |
206 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1) { | 207 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1) { |
207 return (object->*method_)(CallbackForward(a1)); | 208 return (object->*method_)(a1); |
208 } | 209 } |
209 | 210 |
210 private: | 211 private: |
211 R (T::*method_)(A1) const; | 212 R (T::*method_)(A1) const; |
212 }; | 213 }; |
213 | 214 |
214 // Function: Arity 2. | 215 // Function: Arity 2. |
215 template <typename R, typename A1, typename A2> | 216 template <typename R, typename A1, typename A2> |
216 class RunnableAdapter<R(*)(A1, A2)> { | 217 class RunnableAdapter<R(*)(A1, A2)> { |
217 public: | 218 public: |
218 typedef R (RunType)(A1, A2); | 219 typedef R (RunType)(A1, A2); |
219 | 220 |
220 explicit RunnableAdapter(R(*function)(A1, A2)) | 221 explicit RunnableAdapter(R(*function)(A1, A2)) |
221 : function_(function) { | 222 : function_(function) { |
222 } | 223 } |
223 | 224 |
224 R Run(typename CallbackParamTraits<A1>::ForwardType a1, | 225 R Run(typename CallbackParamTraits<A1>::ForwardType a1, |
225 typename CallbackParamTraits<A2>::ForwardType a2) { | 226 typename CallbackParamTraits<A2>::ForwardType a2) { |
226 return function_(CallbackForward(a1), CallbackForward(a2)); | 227 return function_(a1, a2); |
227 } | 228 } |
228 | 229 |
229 private: | 230 private: |
230 R (*function_)(A1, A2); | 231 R (*function_)(A1, A2); |
231 }; | 232 }; |
232 | 233 |
233 // Method: Arity 2. | 234 // Method: Arity 2. |
234 template <typename R, typename T, typename A1, typename A2> | 235 template <typename R, typename T, typename A1, typename A2> |
235 class RunnableAdapter<R(T::*)(A1, A2)> { | 236 class RunnableAdapter<R(T::*)(A1, A2)> { |
236 public: | 237 public: |
237 typedef R (RunType)(T*, A1, A2); | 238 typedef R (RunType)(T*, A1, A2); |
238 typedef true_type IsMethod; | 239 typedef true_type IsMethod; |
239 | 240 |
240 explicit RunnableAdapter(R(T::*method)(A1, A2)) | 241 explicit RunnableAdapter(R(T::*method)(A1, A2)) |
241 : method_(method) { | 242 : method_(method) { |
242 } | 243 } |
243 | 244 |
244 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 245 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
245 typename CallbackParamTraits<A2>::ForwardType a2) { | 246 typename CallbackParamTraits<A2>::ForwardType a2) { |
246 return (object->*method_)(CallbackForward(a1), CallbackForward(a2)); | 247 return (object->*method_)(a1, a2); |
247 } | 248 } |
248 | 249 |
249 private: | 250 private: |
250 R (T::*method_)(A1, A2); | 251 R (T::*method_)(A1, A2); |
251 }; | 252 }; |
252 | 253 |
253 // Const Method: Arity 2. | 254 // Const Method: Arity 2. |
254 template <typename R, typename T, typename A1, typename A2> | 255 template <typename R, typename T, typename A1, typename A2> |
255 class RunnableAdapter<R(T::*)(A1, A2) const> { | 256 class RunnableAdapter<R(T::*)(A1, A2) const> { |
256 public: | 257 public: |
257 typedef R (RunType)(const T*, A1, A2); | 258 typedef R (RunType)(const T*, A1, A2); |
258 typedef true_type IsMethod; | 259 typedef true_type IsMethod; |
259 | 260 |
260 explicit RunnableAdapter(R(T::*method)(A1, A2) const) | 261 explicit RunnableAdapter(R(T::*method)(A1, A2) const) |
261 : method_(method) { | 262 : method_(method) { |
262 } | 263 } |
263 | 264 |
264 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 265 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
265 typename CallbackParamTraits<A2>::ForwardType a2) { | 266 typename CallbackParamTraits<A2>::ForwardType a2) { |
266 return (object->*method_)(CallbackForward(a1), CallbackForward(a2)); | 267 return (object->*method_)(a1, a2); |
267 } | 268 } |
268 | 269 |
269 private: | 270 private: |
270 R (T::*method_)(A1, A2) const; | 271 R (T::*method_)(A1, A2) const; |
271 }; | 272 }; |
272 | 273 |
273 // Function: Arity 3. | 274 // Function: Arity 3. |
274 template <typename R, typename A1, typename A2, typename A3> | 275 template <typename R, typename A1, typename A2, typename A3> |
275 class RunnableAdapter<R(*)(A1, A2, A3)> { | 276 class RunnableAdapter<R(*)(A1, A2, A3)> { |
276 public: | 277 public: |
277 typedef R (RunType)(A1, A2, A3); | 278 typedef R (RunType)(A1, A2, A3); |
278 | 279 |
279 explicit RunnableAdapter(R(*function)(A1, A2, A3)) | 280 explicit RunnableAdapter(R(*function)(A1, A2, A3)) |
280 : function_(function) { | 281 : function_(function) { |
281 } | 282 } |
282 | 283 |
283 R Run(typename CallbackParamTraits<A1>::ForwardType a1, | 284 R Run(typename CallbackParamTraits<A1>::ForwardType a1, |
284 typename CallbackParamTraits<A2>::ForwardType a2, | 285 typename CallbackParamTraits<A2>::ForwardType a2, |
285 typename CallbackParamTraits<A3>::ForwardType a3) { | 286 typename CallbackParamTraits<A3>::ForwardType a3) { |
286 return function_(CallbackForward(a1), CallbackForward(a2), | 287 return function_(a1, a2, a3); |
287 CallbackForward(a3)); | |
288 } | 288 } |
289 | 289 |
290 private: | 290 private: |
291 R (*function_)(A1, A2, A3); | 291 R (*function_)(A1, A2, A3); |
292 }; | 292 }; |
293 | 293 |
294 // Method: Arity 3. | 294 // Method: Arity 3. |
295 template <typename R, typename T, typename A1, typename A2, typename A3> | 295 template <typename R, typename T, typename A1, typename A2, typename A3> |
296 class RunnableAdapter<R(T::*)(A1, A2, A3)> { | 296 class RunnableAdapter<R(T::*)(A1, A2, A3)> { |
297 public: | 297 public: |
298 typedef R (RunType)(T*, A1, A2, A3); | 298 typedef R (RunType)(T*, A1, A2, A3); |
299 typedef true_type IsMethod; | 299 typedef true_type IsMethod; |
300 | 300 |
301 explicit RunnableAdapter(R(T::*method)(A1, A2, A3)) | 301 explicit RunnableAdapter(R(T::*method)(A1, A2, A3)) |
302 : method_(method) { | 302 : method_(method) { |
303 } | 303 } |
304 | 304 |
305 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 305 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
306 typename CallbackParamTraits<A2>::ForwardType a2, | 306 typename CallbackParamTraits<A2>::ForwardType a2, |
307 typename CallbackParamTraits<A3>::ForwardType a3) { | 307 typename CallbackParamTraits<A3>::ForwardType a3) { |
308 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), | 308 return (object->*method_)(a1, a2, a3); |
309 CallbackForward(a3)); | |
310 } | 309 } |
311 | 310 |
312 private: | 311 private: |
313 R (T::*method_)(A1, A2, A3); | 312 R (T::*method_)(A1, A2, A3); |
314 }; | 313 }; |
315 | 314 |
316 // Const Method: Arity 3. | 315 // Const Method: Arity 3. |
317 template <typename R, typename T, typename A1, typename A2, typename A3> | 316 template <typename R, typename T, typename A1, typename A2, typename A3> |
318 class RunnableAdapter<R(T::*)(A1, A2, A3) const> { | 317 class RunnableAdapter<R(T::*)(A1, A2, A3) const> { |
319 public: | 318 public: |
320 typedef R (RunType)(const T*, A1, A2, A3); | 319 typedef R (RunType)(const T*, A1, A2, A3); |
321 typedef true_type IsMethod; | 320 typedef true_type IsMethod; |
322 | 321 |
323 explicit RunnableAdapter(R(T::*method)(A1, A2, A3) const) | 322 explicit RunnableAdapter(R(T::*method)(A1, A2, A3) const) |
324 : method_(method) { | 323 : method_(method) { |
325 } | 324 } |
326 | 325 |
327 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 326 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
328 typename CallbackParamTraits<A2>::ForwardType a2, | 327 typename CallbackParamTraits<A2>::ForwardType a2, |
329 typename CallbackParamTraits<A3>::ForwardType a3) { | 328 typename CallbackParamTraits<A3>::ForwardType a3) { |
330 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), | 329 return (object->*method_)(a1, a2, a3); |
331 CallbackForward(a3)); | |
332 } | 330 } |
333 | 331 |
334 private: | 332 private: |
335 R (T::*method_)(A1, A2, A3) const; | 333 R (T::*method_)(A1, A2, A3) const; |
336 }; | 334 }; |
337 | 335 |
338 // Function: Arity 4. | 336 // Function: Arity 4. |
339 template <typename R, typename A1, typename A2, typename A3, typename A4> | 337 template <typename R, typename A1, typename A2, typename A3, typename A4> |
340 class RunnableAdapter<R(*)(A1, A2, A3, A4)> { | 338 class RunnableAdapter<R(*)(A1, A2, A3, A4)> { |
341 public: | 339 public: |
342 typedef R (RunType)(A1, A2, A3, A4); | 340 typedef R (RunType)(A1, A2, A3, A4); |
343 | 341 |
344 explicit RunnableAdapter(R(*function)(A1, A2, A3, A4)) | 342 explicit RunnableAdapter(R(*function)(A1, A2, A3, A4)) |
345 : function_(function) { | 343 : function_(function) { |
346 } | 344 } |
347 | 345 |
348 R Run(typename CallbackParamTraits<A1>::ForwardType a1, | 346 R Run(typename CallbackParamTraits<A1>::ForwardType a1, |
349 typename CallbackParamTraits<A2>::ForwardType a2, | 347 typename CallbackParamTraits<A2>::ForwardType a2, |
350 typename CallbackParamTraits<A3>::ForwardType a3, | 348 typename CallbackParamTraits<A3>::ForwardType a3, |
351 typename CallbackParamTraits<A4>::ForwardType a4) { | 349 typename CallbackParamTraits<A4>::ForwardType a4) { |
352 return function_(CallbackForward(a1), CallbackForward(a2), | 350 return function_(a1, a2, a3, a4); |
353 CallbackForward(a3), CallbackForward(a4)); | |
354 } | 351 } |
355 | 352 |
356 private: | 353 private: |
357 R (*function_)(A1, A2, A3, A4); | 354 R (*function_)(A1, A2, A3, A4); |
358 }; | 355 }; |
359 | 356 |
360 // Method: Arity 4. | 357 // Method: Arity 4. |
361 template <typename R, typename T, typename A1, typename A2, typename A3, | 358 template <typename R, typename T, typename A1, typename A2, typename A3, |
362 typename A4> | 359 typename A4> |
363 class RunnableAdapter<R(T::*)(A1, A2, A3, A4)> { | 360 class RunnableAdapter<R(T::*)(A1, A2, A3, A4)> { |
364 public: | 361 public: |
365 typedef R (RunType)(T*, A1, A2, A3, A4); | 362 typedef R (RunType)(T*, A1, A2, A3, A4); |
366 typedef true_type IsMethod; | 363 typedef true_type IsMethod; |
367 | 364 |
368 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4)) | 365 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4)) |
369 : method_(method) { | 366 : method_(method) { |
370 } | 367 } |
371 | 368 |
372 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 369 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
373 typename CallbackParamTraits<A2>::ForwardType a2, | 370 typename CallbackParamTraits<A2>::ForwardType a2, |
374 typename CallbackParamTraits<A3>::ForwardType a3, | 371 typename CallbackParamTraits<A3>::ForwardType a3, |
375 typename CallbackParamTraits<A4>::ForwardType a4) { | 372 typename CallbackParamTraits<A4>::ForwardType a4) { |
376 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), | 373 return (object->*method_)(a1, a2, a3, a4); |
377 CallbackForward(a3), CallbackForward(a4)); | |
378 } | 374 } |
379 | 375 |
380 private: | 376 private: |
381 R (T::*method_)(A1, A2, A3, A4); | 377 R (T::*method_)(A1, A2, A3, A4); |
382 }; | 378 }; |
383 | 379 |
384 // Const Method: Arity 4. | 380 // Const Method: Arity 4. |
385 template <typename R, typename T, typename A1, typename A2, typename A3, | 381 template <typename R, typename T, typename A1, typename A2, typename A3, |
386 typename A4> | 382 typename A4> |
387 class RunnableAdapter<R(T::*)(A1, A2, A3, A4) const> { | 383 class RunnableAdapter<R(T::*)(A1, A2, A3, A4) const> { |
388 public: | 384 public: |
389 typedef R (RunType)(const T*, A1, A2, A3, A4); | 385 typedef R (RunType)(const T*, A1, A2, A3, A4); |
390 typedef true_type IsMethod; | 386 typedef true_type IsMethod; |
391 | 387 |
392 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4) const) | 388 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4) const) |
393 : method_(method) { | 389 : method_(method) { |
394 } | 390 } |
395 | 391 |
396 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 392 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
397 typename CallbackParamTraits<A2>::ForwardType a2, | 393 typename CallbackParamTraits<A2>::ForwardType a2, |
398 typename CallbackParamTraits<A3>::ForwardType a3, | 394 typename CallbackParamTraits<A3>::ForwardType a3, |
399 typename CallbackParamTraits<A4>::ForwardType a4) { | 395 typename CallbackParamTraits<A4>::ForwardType a4) { |
400 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), | 396 return (object->*method_)(a1, a2, a3, a4); |
401 CallbackForward(a3), CallbackForward(a4)); | |
402 } | 397 } |
403 | 398 |
404 private: | 399 private: |
405 R (T::*method_)(A1, A2, A3, A4) const; | 400 R (T::*method_)(A1, A2, A3, A4) const; |
406 }; | 401 }; |
407 | 402 |
408 // Function: Arity 5. | 403 // Function: Arity 5. |
409 template <typename R, typename A1, typename A2, typename A3, typename A4, | 404 template <typename R, typename A1, typename A2, typename A3, typename A4, |
410 typename A5> | 405 typename A5> |
411 class RunnableAdapter<R(*)(A1, A2, A3, A4, A5)> { | 406 class RunnableAdapter<R(*)(A1, A2, A3, A4, A5)> { |
412 public: | 407 public: |
413 typedef R (RunType)(A1, A2, A3, A4, A5); | 408 typedef R (RunType)(A1, A2, A3, A4, A5); |
414 | 409 |
415 explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5)) | 410 explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5)) |
416 : function_(function) { | 411 : function_(function) { |
417 } | 412 } |
418 | 413 |
419 R Run(typename CallbackParamTraits<A1>::ForwardType a1, | 414 R Run(typename CallbackParamTraits<A1>::ForwardType a1, |
420 typename CallbackParamTraits<A2>::ForwardType a2, | 415 typename CallbackParamTraits<A2>::ForwardType a2, |
421 typename CallbackParamTraits<A3>::ForwardType a3, | 416 typename CallbackParamTraits<A3>::ForwardType a3, |
422 typename CallbackParamTraits<A4>::ForwardType a4, | 417 typename CallbackParamTraits<A4>::ForwardType a4, |
423 typename CallbackParamTraits<A5>::ForwardType a5) { | 418 typename CallbackParamTraits<A5>::ForwardType a5) { |
424 return function_(CallbackForward(a1), CallbackForward(a2), | 419 return function_(a1, a2, a3, a4, a5); |
425 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5)); | |
426 } | 420 } |
427 | 421 |
428 private: | 422 private: |
429 R (*function_)(A1, A2, A3, A4, A5); | 423 R (*function_)(A1, A2, A3, A4, A5); |
430 }; | 424 }; |
431 | 425 |
432 // Method: Arity 5. | 426 // Method: Arity 5. |
433 template <typename R, typename T, typename A1, typename A2, typename A3, | 427 template <typename R, typename T, typename A1, typename A2, typename A3, |
434 typename A4, typename A5> | 428 typename A4, typename A5> |
435 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5)> { | 429 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5)> { |
436 public: | 430 public: |
437 typedef R (RunType)(T*, A1, A2, A3, A4, A5); | 431 typedef R (RunType)(T*, A1, A2, A3, A4, A5); |
438 typedef true_type IsMethod; | 432 typedef true_type IsMethod; |
439 | 433 |
440 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5)) | 434 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5)) |
441 : method_(method) { | 435 : method_(method) { |
442 } | 436 } |
443 | 437 |
444 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 438 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
445 typename CallbackParamTraits<A2>::ForwardType a2, | 439 typename CallbackParamTraits<A2>::ForwardType a2, |
446 typename CallbackParamTraits<A3>::ForwardType a3, | 440 typename CallbackParamTraits<A3>::ForwardType a3, |
447 typename CallbackParamTraits<A4>::ForwardType a4, | 441 typename CallbackParamTraits<A4>::ForwardType a4, |
448 typename CallbackParamTraits<A5>::ForwardType a5) { | 442 typename CallbackParamTraits<A5>::ForwardType a5) { |
449 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), | 443 return (object->*method_)(a1, a2, a3, a4, a5); |
450 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5)); | |
451 } | 444 } |
452 | 445 |
453 private: | 446 private: |
454 R (T::*method_)(A1, A2, A3, A4, A5); | 447 R (T::*method_)(A1, A2, A3, A4, A5); |
455 }; | 448 }; |
456 | 449 |
457 // Const Method: Arity 5. | 450 // Const Method: Arity 5. |
458 template <typename R, typename T, typename A1, typename A2, typename A3, | 451 template <typename R, typename T, typename A1, typename A2, typename A3, |
459 typename A4, typename A5> | 452 typename A4, typename A5> |
460 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5) const> { | 453 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5) const> { |
461 public: | 454 public: |
462 typedef R (RunType)(const T*, A1, A2, A3, A4, A5); | 455 typedef R (RunType)(const T*, A1, A2, A3, A4, A5); |
463 typedef true_type IsMethod; | 456 typedef true_type IsMethod; |
464 | 457 |
465 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5) const) | 458 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5) const) |
466 : method_(method) { | 459 : method_(method) { |
467 } | 460 } |
468 | 461 |
469 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 462 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
470 typename CallbackParamTraits<A2>::ForwardType a2, | 463 typename CallbackParamTraits<A2>::ForwardType a2, |
471 typename CallbackParamTraits<A3>::ForwardType a3, | 464 typename CallbackParamTraits<A3>::ForwardType a3, |
472 typename CallbackParamTraits<A4>::ForwardType a4, | 465 typename CallbackParamTraits<A4>::ForwardType a4, |
473 typename CallbackParamTraits<A5>::ForwardType a5) { | 466 typename CallbackParamTraits<A5>::ForwardType a5) { |
474 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), | 467 return (object->*method_)(a1, a2, a3, a4, a5); |
475 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5)); | |
476 } | 468 } |
477 | 469 |
478 private: | 470 private: |
479 R (T::*method_)(A1, A2, A3, A4, A5) const; | 471 R (T::*method_)(A1, A2, A3, A4, A5) const; |
480 }; | 472 }; |
481 | 473 |
482 // Function: Arity 6. | 474 // Function: Arity 6. |
483 template <typename R, typename A1, typename A2, typename A3, typename A4, | 475 template <typename R, typename A1, typename A2, typename A3, typename A4, |
484 typename A5, typename A6> | 476 typename A5, typename A6> |
485 class RunnableAdapter<R(*)(A1, A2, A3, A4, A5, A6)> { | 477 class RunnableAdapter<R(*)(A1, A2, A3, A4, A5, A6)> { |
486 public: | 478 public: |
487 typedef R (RunType)(A1, A2, A3, A4, A5, A6); | 479 typedef R (RunType)(A1, A2, A3, A4, A5, A6); |
488 | 480 |
489 explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5, A6)) | 481 explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5, A6)) |
490 : function_(function) { | 482 : function_(function) { |
491 } | 483 } |
492 | 484 |
493 R Run(typename CallbackParamTraits<A1>::ForwardType a1, | 485 R Run(typename CallbackParamTraits<A1>::ForwardType a1, |
494 typename CallbackParamTraits<A2>::ForwardType a2, | 486 typename CallbackParamTraits<A2>::ForwardType a2, |
495 typename CallbackParamTraits<A3>::ForwardType a3, | 487 typename CallbackParamTraits<A3>::ForwardType a3, |
496 typename CallbackParamTraits<A4>::ForwardType a4, | 488 typename CallbackParamTraits<A4>::ForwardType a4, |
497 typename CallbackParamTraits<A5>::ForwardType a5, | 489 typename CallbackParamTraits<A5>::ForwardType a5, |
498 typename CallbackParamTraits<A6>::ForwardType a6) { | 490 typename CallbackParamTraits<A6>::ForwardType a6) { |
499 return function_(CallbackForward(a1), CallbackForward(a2), | 491 return function_(a1, a2, a3, a4, a5, a6); |
500 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), | |
501 CallbackForward(a6)); | |
502 } | 492 } |
503 | 493 |
504 private: | 494 private: |
505 R (*function_)(A1, A2, A3, A4, A5, A6); | 495 R (*function_)(A1, A2, A3, A4, A5, A6); |
506 }; | 496 }; |
507 | 497 |
508 // Method: Arity 6. | 498 // Method: Arity 6. |
509 template <typename R, typename T, typename A1, typename A2, typename A3, | 499 template <typename R, typename T, typename A1, typename A2, typename A3, |
510 typename A4, typename A5, typename A6> | 500 typename A4, typename A5, typename A6> |
511 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6)> { | 501 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6)> { |
512 public: | 502 public: |
513 typedef R (RunType)(T*, A1, A2, A3, A4, A5, A6); | 503 typedef R (RunType)(T*, A1, A2, A3, A4, A5, A6); |
514 typedef true_type IsMethod; | 504 typedef true_type IsMethod; |
515 | 505 |
516 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6)) | 506 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6)) |
517 : method_(method) { | 507 : method_(method) { |
518 } | 508 } |
519 | 509 |
520 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 510 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
521 typename CallbackParamTraits<A2>::ForwardType a2, | 511 typename CallbackParamTraits<A2>::ForwardType a2, |
522 typename CallbackParamTraits<A3>::ForwardType a3, | 512 typename CallbackParamTraits<A3>::ForwardType a3, |
523 typename CallbackParamTraits<A4>::ForwardType a4, | 513 typename CallbackParamTraits<A4>::ForwardType a4, |
524 typename CallbackParamTraits<A5>::ForwardType a5, | 514 typename CallbackParamTraits<A5>::ForwardType a5, |
525 typename CallbackParamTraits<A6>::ForwardType a6) { | 515 typename CallbackParamTraits<A6>::ForwardType a6) { |
526 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), | 516 return (object->*method_)(a1, a2, a3, a4, a5, a6); |
527 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), | |
528 CallbackForward(a6)); | |
529 } | 517 } |
530 | 518 |
531 private: | 519 private: |
532 R (T::*method_)(A1, A2, A3, A4, A5, A6); | 520 R (T::*method_)(A1, A2, A3, A4, A5, A6); |
533 }; | 521 }; |
534 | 522 |
535 // Const Method: Arity 6. | 523 // Const Method: Arity 6. |
536 template <typename R, typename T, typename A1, typename A2, typename A3, | 524 template <typename R, typename T, typename A1, typename A2, typename A3, |
537 typename A4, typename A5, typename A6> | 525 typename A4, typename A5, typename A6> |
538 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6) const> { | 526 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6) const> { |
539 public: | 527 public: |
540 typedef R (RunType)(const T*, A1, A2, A3, A4, A5, A6); | 528 typedef R (RunType)(const T*, A1, A2, A3, A4, A5, A6); |
541 typedef true_type IsMethod; | 529 typedef true_type IsMethod; |
542 | 530 |
543 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6) const) | 531 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6) const) |
544 : method_(method) { | 532 : method_(method) { |
545 } | 533 } |
546 | 534 |
547 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 535 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
548 typename CallbackParamTraits<A2>::ForwardType a2, | 536 typename CallbackParamTraits<A2>::ForwardType a2, |
549 typename CallbackParamTraits<A3>::ForwardType a3, | 537 typename CallbackParamTraits<A3>::ForwardType a3, |
550 typename CallbackParamTraits<A4>::ForwardType a4, | 538 typename CallbackParamTraits<A4>::ForwardType a4, |
551 typename CallbackParamTraits<A5>::ForwardType a5, | 539 typename CallbackParamTraits<A5>::ForwardType a5, |
552 typename CallbackParamTraits<A6>::ForwardType a6) { | 540 typename CallbackParamTraits<A6>::ForwardType a6) { |
553 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), | 541 return (object->*method_)(a1, a2, a3, a4, a5, a6); |
554 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), | |
555 CallbackForward(a6)); | |
556 } | 542 } |
557 | 543 |
558 private: | 544 private: |
559 R (T::*method_)(A1, A2, A3, A4, A5, A6) const; | 545 R (T::*method_)(A1, A2, A3, A4, A5, A6) const; |
560 }; | 546 }; |
561 | 547 |
562 // Function: Arity 7. | 548 // Function: Arity 7. |
563 template <typename R, typename A1, typename A2, typename A3, typename A4, | 549 template <typename R, typename A1, typename A2, typename A3, typename A4, |
564 typename A5, typename A6, typename A7> | 550 typename A5, typename A6, typename A7> |
565 class RunnableAdapter<R(*)(A1, A2, A3, A4, A5, A6, A7)> { | 551 class RunnableAdapter<R(*)(A1, A2, A3, A4, A5, A6, A7)> { |
566 public: | 552 public: |
567 typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7); | 553 typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7); |
568 | 554 |
569 explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5, A6, A7)) | 555 explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5, A6, A7)) |
570 : function_(function) { | 556 : function_(function) { |
571 } | 557 } |
572 | 558 |
573 R Run(typename CallbackParamTraits<A1>::ForwardType a1, | 559 R Run(typename CallbackParamTraits<A1>::ForwardType a1, |
574 typename CallbackParamTraits<A2>::ForwardType a2, | 560 typename CallbackParamTraits<A2>::ForwardType a2, |
575 typename CallbackParamTraits<A3>::ForwardType a3, | 561 typename CallbackParamTraits<A3>::ForwardType a3, |
576 typename CallbackParamTraits<A4>::ForwardType a4, | 562 typename CallbackParamTraits<A4>::ForwardType a4, |
577 typename CallbackParamTraits<A5>::ForwardType a5, | 563 typename CallbackParamTraits<A5>::ForwardType a5, |
578 typename CallbackParamTraits<A6>::ForwardType a6, | 564 typename CallbackParamTraits<A6>::ForwardType a6, |
579 typename CallbackParamTraits<A7>::ForwardType a7) { | 565 typename CallbackParamTraits<A7>::ForwardType a7) { |
580 return function_(CallbackForward(a1), CallbackForward(a2), | 566 return function_(a1, a2, a3, a4, a5, a6, a7); |
581 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), | |
582 CallbackForward(a6), CallbackForward(a7)); | |
583 } | 567 } |
584 | 568 |
585 private: | 569 private: |
586 R (*function_)(A1, A2, A3, A4, A5, A6, A7); | 570 R (*function_)(A1, A2, A3, A4, A5, A6, A7); |
587 }; | 571 }; |
588 | 572 |
589 // Method: Arity 7. | 573 // Method: Arity 7. |
590 template <typename R, typename T, typename A1, typename A2, typename A3, | 574 template <typename R, typename T, typename A1, typename A2, typename A3, |
591 typename A4, typename A5, typename A6, typename A7> | 575 typename A4, typename A5, typename A6, typename A7> |
592 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6, A7)> { | 576 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6, A7)> { |
593 public: | 577 public: |
594 typedef R (RunType)(T*, A1, A2, A3, A4, A5, A6, A7); | 578 typedef R (RunType)(T*, A1, A2, A3, A4, A5, A6, A7); |
595 typedef true_type IsMethod; | 579 typedef true_type IsMethod; |
596 | 580 |
597 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7)) | 581 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7)) |
598 : method_(method) { | 582 : method_(method) { |
599 } | 583 } |
600 | 584 |
601 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 585 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
602 typename CallbackParamTraits<A2>::ForwardType a2, | 586 typename CallbackParamTraits<A2>::ForwardType a2, |
603 typename CallbackParamTraits<A3>::ForwardType a3, | 587 typename CallbackParamTraits<A3>::ForwardType a3, |
604 typename CallbackParamTraits<A4>::ForwardType a4, | 588 typename CallbackParamTraits<A4>::ForwardType a4, |
605 typename CallbackParamTraits<A5>::ForwardType a5, | 589 typename CallbackParamTraits<A5>::ForwardType a5, |
606 typename CallbackParamTraits<A6>::ForwardType a6, | 590 typename CallbackParamTraits<A6>::ForwardType a6, |
607 typename CallbackParamTraits<A7>::ForwardType a7) { | 591 typename CallbackParamTraits<A7>::ForwardType a7) { |
608 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), | 592 return (object->*method_)(a1, a2, a3, a4, a5, a6, a7); |
609 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), | |
610 CallbackForward(a6), CallbackForward(a7)); | |
611 } | 593 } |
612 | 594 |
613 private: | 595 private: |
614 R (T::*method_)(A1, A2, A3, A4, A5, A6, A7); | 596 R (T::*method_)(A1, A2, A3, A4, A5, A6, A7); |
615 }; | 597 }; |
616 | 598 |
617 // Const Method: Arity 7. | 599 // Const Method: Arity 7. |
618 template <typename R, typename T, typename A1, typename A2, typename A3, | 600 template <typename R, typename T, typename A1, typename A2, typename A3, |
619 typename A4, typename A5, typename A6, typename A7> | 601 typename A4, typename A5, typename A6, typename A7> |
620 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6, A7) const> { | 602 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6, A7) const> { |
621 public: | 603 public: |
622 typedef R (RunType)(const T*, A1, A2, A3, A4, A5, A6, A7); | 604 typedef R (RunType)(const T*, A1, A2, A3, A4, A5, A6, A7); |
623 typedef true_type IsMethod; | 605 typedef true_type IsMethod; |
624 | 606 |
625 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7) const) | 607 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7) const) |
626 : method_(method) { | 608 : method_(method) { |
627 } | 609 } |
628 | 610 |
629 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, | 611 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
630 typename CallbackParamTraits<A2>::ForwardType a2, | 612 typename CallbackParamTraits<A2>::ForwardType a2, |
631 typename CallbackParamTraits<A3>::ForwardType a3, | 613 typename CallbackParamTraits<A3>::ForwardType a3, |
632 typename CallbackParamTraits<A4>::ForwardType a4, | 614 typename CallbackParamTraits<A4>::ForwardType a4, |
633 typename CallbackParamTraits<A5>::ForwardType a5, | 615 typename CallbackParamTraits<A5>::ForwardType a5, |
634 typename CallbackParamTraits<A6>::ForwardType a6, | 616 typename CallbackParamTraits<A6>::ForwardType a6, |
635 typename CallbackParamTraits<A7>::ForwardType a7) { | 617 typename CallbackParamTraits<A7>::ForwardType a7) { |
636 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), | 618 return (object->*method_)(a1, a2, a3, a4, a5, a6, a7); |
637 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), | |
638 CallbackForward(a6), CallbackForward(a7)); | |
639 } | 619 } |
640 | 620 |
641 private: | 621 private: |
642 R (T::*method_)(A1, A2, A3, A4, A5, A6, A7) const; | 622 R (T::*method_)(A1, A2, A3, A4, A5, A6, A7) const; |
643 }; | 623 }; |
644 | 624 |
645 | 625 |
646 // FunctionTraits<> | 626 // FunctionTraits<> |
647 // | 627 // |
648 // Breaks a function signature apart into typedefs for easier introspection. | 628 // Breaks a function signature apart into typedefs for easier introspection. |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 void()> { | 830 void()> { |
851 static void MakeItSo(Runnable runnable) { | 831 static void MakeItSo(Runnable runnable) { |
852 runnable.Run(); | 832 runnable.Run(); |
853 } | 833 } |
854 }; | 834 }; |
855 | 835 |
856 template <typename ReturnType, typename Runnable,typename A1> | 836 template <typename ReturnType, typename Runnable,typename A1> |
857 struct InvokeHelper<false, ReturnType, Runnable, | 837 struct InvokeHelper<false, ReturnType, Runnable, |
858 void(A1)> { | 838 void(A1)> { |
859 static ReturnType MakeItSo(Runnable runnable, A1 a1) { | 839 static ReturnType MakeItSo(Runnable runnable, A1 a1) { |
860 return runnable.Run(CallbackForward(a1)); | 840 return runnable.Run(a1); |
861 } | 841 } |
862 }; | 842 }; |
863 | 843 |
864 template <typename Runnable,typename A1> | 844 template <typename Runnable,typename A1> |
865 struct InvokeHelper<false, void, Runnable, | 845 struct InvokeHelper<false, void, Runnable, |
866 void(A1)> { | 846 void(A1)> { |
867 static void MakeItSo(Runnable runnable, A1 a1) { | 847 static void MakeItSo(Runnable runnable, A1 a1) { |
868 runnable.Run(CallbackForward(a1)); | 848 runnable.Run(a1); |
869 } | 849 } |
870 }; | 850 }; |
871 | 851 |
872 template <typename Runnable, typename A1> | 852 template <typename Runnable, typename A1> |
873 struct InvokeHelper<true, void, Runnable, | 853 struct InvokeHelper<true, void, Runnable, |
874 void(A1)> { | 854 void(A1)> { |
875 static void MakeItSo(Runnable runnable, A1 a1) { | 855 static void MakeItSo(Runnable runnable, A1 a1) { |
876 if (!a1.get()) { | 856 if (!a1.get()) { |
877 return; | 857 return; |
878 } | 858 } |
879 | 859 |
880 runnable.Run(CallbackForward(a1)); | 860 runnable.Run(a1); |
881 } | 861 } |
882 }; | 862 }; |
883 | 863 |
884 template <typename ReturnType, typename Runnable,typename A1, typename A2> | 864 template <typename ReturnType, typename Runnable,typename A1, typename A2> |
885 struct InvokeHelper<false, ReturnType, Runnable, | 865 struct InvokeHelper<false, ReturnType, Runnable, |
886 void(A1, A2)> { | 866 void(A1, A2)> { |
887 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2) { | 867 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2) { |
888 return runnable.Run(CallbackForward(a1), CallbackForward(a2)); | 868 return runnable.Run(a1, a2); |
889 } | 869 } |
890 }; | 870 }; |
891 | 871 |
892 template <typename Runnable,typename A1, typename A2> | 872 template <typename Runnable,typename A1, typename A2> |
893 struct InvokeHelper<false, void, Runnable, | 873 struct InvokeHelper<false, void, Runnable, |
894 void(A1, A2)> { | 874 void(A1, A2)> { |
895 static void MakeItSo(Runnable runnable, A1 a1, A2 a2) { | 875 static void MakeItSo(Runnable runnable, A1 a1, A2 a2) { |
896 runnable.Run(CallbackForward(a1), CallbackForward(a2)); | 876 runnable.Run(a1, a2); |
897 } | 877 } |
898 }; | 878 }; |
899 | 879 |
900 template <typename Runnable, typename A1, typename A2> | 880 template <typename Runnable, typename A1, typename A2> |
901 struct InvokeHelper<true, void, Runnable, | 881 struct InvokeHelper<true, void, Runnable, |
902 void(A1, A2)> { | 882 void(A1, A2)> { |
903 static void MakeItSo(Runnable runnable, A1 a1, A2 a2) { | 883 static void MakeItSo(Runnable runnable, A1 a1, A2 a2) { |
904 if (!a1.get()) { | 884 if (!a1.get()) { |
905 return; | 885 return; |
906 } | 886 } |
907 | 887 |
908 runnable.Run(CallbackForward(a1), CallbackForward(a2)); | 888 runnable.Run(a1, a2); |
909 } | 889 } |
910 }; | 890 }; |
911 | 891 |
912 template <typename ReturnType, typename Runnable,typename A1, typename A2, | 892 template <typename ReturnType, typename Runnable,typename A1, typename A2, |
913 typename A3> | 893 typename A3> |
914 struct InvokeHelper<false, ReturnType, Runnable, | 894 struct InvokeHelper<false, ReturnType, Runnable, |
915 void(A1, A2, A3)> { | 895 void(A1, A2, A3)> { |
916 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) { | 896 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) { |
917 return runnable.Run(CallbackForward(a1), CallbackForward(a2), | 897 return runnable.Run(a1, a2, a3); |
918 CallbackForward(a3)); | |
919 } | 898 } |
920 }; | 899 }; |
921 | 900 |
922 template <typename Runnable,typename A1, typename A2, typename A3> | 901 template <typename Runnable,typename A1, typename A2, typename A3> |
923 struct InvokeHelper<false, void, Runnable, | 902 struct InvokeHelper<false, void, Runnable, |
924 void(A1, A2, A3)> { | 903 void(A1, A2, A3)> { |
925 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) { | 904 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) { |
926 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3)); | 905 runnable.Run(a1, a2, a3); |
927 } | 906 } |
928 }; | 907 }; |
929 | 908 |
930 template <typename Runnable, typename A1, typename A2, typename A3> | 909 template <typename Runnable, typename A1, typename A2, typename A3> |
931 struct InvokeHelper<true, void, Runnable, | 910 struct InvokeHelper<true, void, Runnable, |
932 void(A1, A2, A3)> { | 911 void(A1, A2, A3)> { |
933 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) { | 912 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3) { |
934 if (!a1.get()) { | 913 if (!a1.get()) { |
935 return; | 914 return; |
936 } | 915 } |
937 | 916 |
938 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3)); | 917 runnable.Run(a1, a2, a3); |
939 } | 918 } |
940 }; | 919 }; |
941 | 920 |
942 template <typename ReturnType, typename Runnable,typename A1, typename A2, | 921 template <typename ReturnType, typename Runnable,typename A1, typename A2, |
943 typename A3, typename A4> | 922 typename A3, typename A4> |
944 struct InvokeHelper<false, ReturnType, Runnable, | 923 struct InvokeHelper<false, ReturnType, Runnable, |
945 void(A1, A2, A3, A4)> { | 924 void(A1, A2, A3, A4)> { |
946 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) { | 925 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) { |
947 return runnable.Run(CallbackForward(a1), CallbackForward(a2), | 926 return runnable.Run(a1, a2, a3, a4); |
948 CallbackForward(a3), CallbackForward(a4)); | |
949 } | 927 } |
950 }; | 928 }; |
951 | 929 |
952 template <typename Runnable,typename A1, typename A2, typename A3, typename A4> | 930 template <typename Runnable,typename A1, typename A2, typename A3, typename A4> |
953 struct InvokeHelper<false, void, Runnable, | 931 struct InvokeHelper<false, void, Runnable, |
954 void(A1, A2, A3, A4)> { | 932 void(A1, A2, A3, A4)> { |
955 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) { | 933 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) { |
956 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), | 934 runnable.Run(a1, a2, a3, a4); |
957 CallbackForward(a4)); | |
958 } | 935 } |
959 }; | 936 }; |
960 | 937 |
961 template <typename Runnable, typename A1, typename A2, typename A3, typename A4> | 938 template <typename Runnable, typename A1, typename A2, typename A3, typename A4> |
962 struct InvokeHelper<true, void, Runnable, | 939 struct InvokeHelper<true, void, Runnable, |
963 void(A1, A2, A3, A4)> { | 940 void(A1, A2, A3, A4)> { |
964 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) { | 941 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4) { |
965 if (!a1.get()) { | 942 if (!a1.get()) { |
966 return; | 943 return; |
967 } | 944 } |
968 | 945 |
969 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), | 946 runnable.Run(a1, a2, a3, a4); |
970 CallbackForward(a4)); | |
971 } | 947 } |
972 }; | 948 }; |
973 | 949 |
974 template <typename ReturnType, typename Runnable,typename A1, typename A2, | 950 template <typename ReturnType, typename Runnable,typename A1, typename A2, |
975 typename A3, typename A4, typename A5> | 951 typename A3, typename A4, typename A5> |
976 struct InvokeHelper<false, ReturnType, Runnable, | 952 struct InvokeHelper<false, ReturnType, Runnable, |
977 void(A1, A2, A3, A4, A5)> { | 953 void(A1, A2, A3, A4, A5)> { |
978 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, | 954 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, |
979 A5 a5) { | 955 A5 a5) { |
980 return runnable.Run(CallbackForward(a1), CallbackForward(a2), | 956 return runnable.Run(a1, a2, a3, a4, a5); |
981 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5)); | |
982 } | 957 } |
983 }; | 958 }; |
984 | 959 |
985 template <typename Runnable,typename A1, typename A2, typename A3, typename A4, | 960 template <typename Runnable,typename A1, typename A2, typename A3, typename A4, |
986 typename A5> | 961 typename A5> |
987 struct InvokeHelper<false, void, Runnable, | 962 struct InvokeHelper<false, void, Runnable, |
988 void(A1, A2, A3, A4, A5)> { | 963 void(A1, A2, A3, A4, A5)> { |
989 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { | 964 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { |
990 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), | 965 runnable.Run(a1, a2, a3, a4, a5); |
991 CallbackForward(a4), CallbackForward(a5)); | |
992 } | 966 } |
993 }; | 967 }; |
994 | 968 |
995 template <typename Runnable, typename A1, typename A2, typename A3, | 969 template <typename Runnable, typename A1, typename A2, typename A3, |
996 typename A4, typename A5> | 970 typename A4, typename A5> |
997 struct InvokeHelper<true, void, Runnable, | 971 struct InvokeHelper<true, void, Runnable, |
998 void(A1, A2, A3, A4, A5)> { | 972 void(A1, A2, A3, A4, A5)> { |
999 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { | 973 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { |
1000 if (!a1.get()) { | 974 if (!a1.get()) { |
1001 return; | 975 return; |
1002 } | 976 } |
1003 | 977 |
1004 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), | 978 runnable.Run(a1, a2, a3, a4, a5); |
1005 CallbackForward(a4), CallbackForward(a5)); | |
1006 } | 979 } |
1007 }; | 980 }; |
1008 | 981 |
1009 template <typename ReturnType, typename Runnable,typename A1, typename A2, | 982 template <typename ReturnType, typename Runnable,typename A1, typename A2, |
1010 typename A3, typename A4, typename A5, typename A6> | 983 typename A3, typename A4, typename A5, typename A6> |
1011 struct InvokeHelper<false, ReturnType, Runnable, | 984 struct InvokeHelper<false, ReturnType, Runnable, |
1012 void(A1, A2, A3, A4, A5, A6)> { | 985 void(A1, A2, A3, A4, A5, A6)> { |
1013 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, | 986 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, |
1014 A5 a5, A6 a6) { | 987 A5 a5, A6 a6) { |
1015 return runnable.Run(CallbackForward(a1), CallbackForward(a2), | 988 return runnable.Run(a1, a2, a3, a4, a5, a6); |
1016 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), | |
1017 CallbackForward(a6)); | |
1018 } | 989 } |
1019 }; | 990 }; |
1020 | 991 |
1021 template <typename Runnable,typename A1, typename A2, typename A3, typename A4, | 992 template <typename Runnable,typename A1, typename A2, typename A3, typename A4, |
1022 typename A5, typename A6> | 993 typename A5, typename A6> |
1023 struct InvokeHelper<false, void, Runnable, | 994 struct InvokeHelper<false, void, Runnable, |
1024 void(A1, A2, A3, A4, A5, A6)> { | 995 void(A1, A2, A3, A4, A5, A6)> { |
1025 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, | 996 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, |
1026 A6 a6) { | 997 A6 a6) { |
1027 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), | 998 runnable.Run(a1, a2, a3, a4, a5, a6); |
1028 CallbackForward(a4), CallbackForward(a5), CallbackForward(a6)); | |
1029 } | 999 } |
1030 }; | 1000 }; |
1031 | 1001 |
1032 template <typename Runnable, typename A1, typename A2, typename A3, | 1002 template <typename Runnable, typename A1, typename A2, typename A3, |
1033 typename A4, typename A5, typename A6> | 1003 typename A4, typename A5, typename A6> |
1034 struct InvokeHelper<true, void, Runnable, | 1004 struct InvokeHelper<true, void, Runnable, |
1035 void(A1, A2, A3, A4, A5, A6)> { | 1005 void(A1, A2, A3, A4, A5, A6)> { |
1036 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, | 1006 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, |
1037 A6 a6) { | 1007 A6 a6) { |
1038 if (!a1.get()) { | 1008 if (!a1.get()) { |
1039 return; | 1009 return; |
1040 } | 1010 } |
1041 | 1011 |
1042 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), | 1012 runnable.Run(a1, a2, a3, a4, a5, a6); |
1043 CallbackForward(a4), CallbackForward(a5), CallbackForward(a6)); | |
1044 } | 1013 } |
1045 }; | 1014 }; |
1046 | 1015 |
1047 template <typename ReturnType, typename Runnable,typename A1, typename A2, | 1016 template <typename ReturnType, typename Runnable,typename A1, typename A2, |
1048 typename A3, typename A4, typename A5, typename A6, typename A7> | 1017 typename A3, typename A4, typename A5, typename A6, typename A7> |
1049 struct InvokeHelper<false, ReturnType, Runnable, | 1018 struct InvokeHelper<false, ReturnType, Runnable, |
1050 void(A1, A2, A3, A4, A5, A6, A7)> { | 1019 void(A1, A2, A3, A4, A5, A6, A7)> { |
1051 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, | 1020 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, |
1052 A5 a5, A6 a6, A7 a7) { | 1021 A5 a5, A6 a6, A7 a7) { |
1053 return runnable.Run(CallbackForward(a1), CallbackForward(a2), | 1022 return runnable.Run(a1, a2, a3, a4, a5, a6, a7); |
1054 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), | |
1055 CallbackForward(a6), CallbackForward(a7)); | |
1056 } | 1023 } |
1057 }; | 1024 }; |
1058 | 1025 |
1059 template <typename Runnable,typename A1, typename A2, typename A3, typename A4, | 1026 template <typename Runnable,typename A1, typename A2, typename A3, typename A4, |
1060 typename A5, typename A6, typename A7> | 1027 typename A5, typename A6, typename A7> |
1061 struct InvokeHelper<false, void, Runnable, | 1028 struct InvokeHelper<false, void, Runnable, |
1062 void(A1, A2, A3, A4, A5, A6, A7)> { | 1029 void(A1, A2, A3, A4, A5, A6, A7)> { |
1063 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, | 1030 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, |
1064 A6 a6, A7 a7) { | 1031 A6 a6, A7 a7) { |
1065 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), | 1032 runnable.Run(a1, a2, a3, a4, a5, a6, a7); |
1066 CallbackForward(a4), CallbackForward(a5), CallbackForward(a6), | |
1067 CallbackForward(a7)); | |
1068 } | 1033 } |
1069 }; | 1034 }; |
1070 | 1035 |
1071 template <typename Runnable, typename A1, typename A2, typename A3, | 1036 template <typename Runnable, typename A1, typename A2, typename A3, |
1072 typename A4, typename A5, typename A6, typename A7> | 1037 typename A4, typename A5, typename A6, typename A7> |
1073 struct InvokeHelper<true, void, Runnable, | 1038 struct InvokeHelper<true, void, Runnable, |
1074 void(A1, A2, A3, A4, A5, A6, A7)> { | 1039 void(A1, A2, A3, A4, A5, A6, A7)> { |
1075 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, | 1040 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, |
1076 A6 a6, A7 a7) { | 1041 A6 a6, A7 a7) { |
1077 if (!a1.get()) { | 1042 if (!a1.get()) { |
1078 return; | 1043 return; |
1079 } | 1044 } |
1080 | 1045 |
1081 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), | 1046 runnable.Run(a1, a2, a3, a4, a5, a6, a7); |
1082 CallbackForward(a4), CallbackForward(a5), CallbackForward(a6), | |
1083 CallbackForward(a7)); | |
1084 } | 1047 } |
1085 }; | 1048 }; |
1086 | 1049 |
1087 #if !defined(_MSC_VER) | 1050 #if !defined(_MSC_VER) |
1088 | 1051 |
1089 template <typename ReturnType, typename Runnable, typename ArgsType> | 1052 template <typename ReturnType, typename Runnable, typename ArgsType> |
1090 struct InvokeHelper<true, ReturnType, Runnable, ArgsType> { | 1053 struct InvokeHelper<true, ReturnType, Runnable, ArgsType> { |
1091 // WeakCalls are only supported for functions with a void return type. | 1054 // WeakCalls are only supported for functions with a void return type. |
1092 // Otherwise, the function result would be undefined if the the WeakPtr<> | 1055 // Otherwise, the function result would be undefined if the the WeakPtr<> |
1093 // is invalidated. | 1056 // is invalidated. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 typename CallbackParamTraits<X1>::ForwardType x1) { | 1099 typename CallbackParamTraits<X1>::ForwardType x1) { |
1137 StorageType* storage = static_cast<StorageType*>(base); | 1100 StorageType* storage = static_cast<StorageType*>(base); |
1138 | 1101 |
1139 // Local references to make debugger stepping easier. If in a debugger, | 1102 // Local references to make debugger stepping easier. If in a debugger, |
1140 // you really want to warp ahead and step through the | 1103 // you really want to warp ahead and step through the |
1141 // InvokeHelper<>::MakeItSo() call below. | 1104 // InvokeHelper<>::MakeItSo() call below. |
1142 | 1105 |
1143 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1106 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1144 typename StorageType::RunnableType, | 1107 typename StorageType::RunnableType, |
1145 void(typename CallbackParamTraits<X1>::ForwardType x1)> | 1108 void(typename CallbackParamTraits<X1>::ForwardType x1)> |
1146 ::MakeItSo(storage->runnable_, CallbackForward(x1)); | 1109 ::MakeItSo(storage->runnable_, x1); |
1147 } | 1110 } |
1148 }; | 1111 }; |
1149 | 1112 |
1150 // Arity 1 -> 0. | 1113 // Arity 1 -> 0. |
1151 template <typename StorageType, typename R,typename X1> | 1114 template <typename StorageType, typename R,typename X1> |
1152 struct Invoker<1, StorageType, R(X1)> { | 1115 struct Invoker<1, StorageType, R(X1)> { |
1153 typedef R(RunType)(BindStateBase*); | 1116 typedef R(RunType)(BindStateBase*); |
1154 | 1117 |
1155 typedef R(UnboundRunType)(); | 1118 typedef R(UnboundRunType)(); |
1156 | 1119 |
1157 static R Run(BindStateBase* base) { | 1120 static R Run(BindStateBase* base) { |
1158 StorageType* storage = static_cast<StorageType*>(base); | 1121 StorageType* storage = static_cast<StorageType*>(base); |
1159 | 1122 |
1160 // Local references to make debugger stepping easier. If in a debugger, | 1123 // Local references to make debugger stepping easier. If in a debugger, |
1161 // you really want to warp ahead and step through the | 1124 // you really want to warp ahead and step through the |
1162 // InvokeHelper<>::MakeItSo() call below. | 1125 // InvokeHelper<>::MakeItSo() call below. |
1163 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; | 1126 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
1164 | 1127 |
1165 typename Bound1UnwrapTraits::ForwardType x1 = | 1128 typename Bound1UnwrapTraits::ForwardType x1 = |
1166 Bound1UnwrapTraits::Unwrap(storage->p1_); | 1129 Bound1UnwrapTraits::Unwrap(storage->p1_); |
1167 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1130 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1168 typename StorageType::RunnableType, | 1131 typename StorageType::RunnableType, |
1169 void(typename Bound1UnwrapTraits::ForwardType)> | 1132 void(typename Bound1UnwrapTraits::ForwardType)> |
1170 ::MakeItSo(storage->runnable_, CallbackForward(x1)); | 1133 ::MakeItSo(storage->runnable_, x1); |
1171 } | 1134 } |
1172 }; | 1135 }; |
1173 | 1136 |
1174 // Arity 2 -> 2. | 1137 // Arity 2 -> 2. |
1175 template <typename StorageType, typename R,typename X1, typename X2> | 1138 template <typename StorageType, typename R,typename X1, typename X2> |
1176 struct Invoker<0, StorageType, R(X1, X2)> { | 1139 struct Invoker<0, StorageType, R(X1, X2)> { |
1177 typedef R(RunType)(BindStateBase*, | 1140 typedef R(RunType)(BindStateBase*, |
1178 typename CallbackParamTraits<X1>::ForwardType, | 1141 typename CallbackParamTraits<X1>::ForwardType, |
1179 typename CallbackParamTraits<X2>::ForwardType); | 1142 typename CallbackParamTraits<X2>::ForwardType); |
1180 | 1143 |
1181 typedef R(UnboundRunType)(X1, X2); | 1144 typedef R(UnboundRunType)(X1, X2); |
1182 | 1145 |
1183 static R Run(BindStateBase* base, | 1146 static R Run(BindStateBase* base, |
1184 typename CallbackParamTraits<X1>::ForwardType x1, | 1147 typename CallbackParamTraits<X1>::ForwardType x1, |
1185 typename CallbackParamTraits<X2>::ForwardType x2) { | 1148 typename CallbackParamTraits<X2>::ForwardType x2) { |
1186 StorageType* storage = static_cast<StorageType*>(base); | 1149 StorageType* storage = static_cast<StorageType*>(base); |
1187 | 1150 |
1188 // Local references to make debugger stepping easier. If in a debugger, | 1151 // Local references to make debugger stepping easier. If in a debugger, |
1189 // you really want to warp ahead and step through the | 1152 // you really want to warp ahead and step through the |
1190 // InvokeHelper<>::MakeItSo() call below. | 1153 // InvokeHelper<>::MakeItSo() call below. |
1191 | 1154 |
1192 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1155 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1193 typename StorageType::RunnableType, | 1156 typename StorageType::RunnableType, |
1194 void(typename CallbackParamTraits<X1>::ForwardType x1, | 1157 void(typename CallbackParamTraits<X1>::ForwardType x1, |
1195 typename CallbackParamTraits<X2>::ForwardType x2)> | 1158 typename CallbackParamTraits<X2>::ForwardType x2)> |
1196 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1159 ::MakeItSo(storage->runnable_, x1, x2); |
1197 CallbackForward(x2)); | |
1198 } | 1160 } |
1199 }; | 1161 }; |
1200 | 1162 |
1201 // Arity 2 -> 1. | 1163 // Arity 2 -> 1. |
1202 template <typename StorageType, typename R,typename X1, typename X2> | 1164 template <typename StorageType, typename R,typename X1, typename X2> |
1203 struct Invoker<1, StorageType, R(X1, X2)> { | 1165 struct Invoker<1, StorageType, R(X1, X2)> { |
1204 typedef R(RunType)(BindStateBase*, | 1166 typedef R(RunType)(BindStateBase*, |
1205 typename CallbackParamTraits<X2>::ForwardType); | 1167 typename CallbackParamTraits<X2>::ForwardType); |
1206 | 1168 |
1207 typedef R(UnboundRunType)(X2); | 1169 typedef R(UnboundRunType)(X2); |
1208 | 1170 |
1209 static R Run(BindStateBase* base, | 1171 static R Run(BindStateBase* base, |
1210 typename CallbackParamTraits<X2>::ForwardType x2) { | 1172 typename CallbackParamTraits<X2>::ForwardType x2) { |
1211 StorageType* storage = static_cast<StorageType*>(base); | 1173 StorageType* storage = static_cast<StorageType*>(base); |
1212 | 1174 |
1213 // Local references to make debugger stepping easier. If in a debugger, | 1175 // Local references to make debugger stepping easier. If in a debugger, |
1214 // you really want to warp ahead and step through the | 1176 // you really want to warp ahead and step through the |
1215 // InvokeHelper<>::MakeItSo() call below. | 1177 // InvokeHelper<>::MakeItSo() call below. |
1216 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; | 1178 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
1217 | 1179 |
1218 typename Bound1UnwrapTraits::ForwardType x1 = | 1180 typename Bound1UnwrapTraits::ForwardType x1 = |
1219 Bound1UnwrapTraits::Unwrap(storage->p1_); | 1181 Bound1UnwrapTraits::Unwrap(storage->p1_); |
1220 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1182 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1221 typename StorageType::RunnableType, | 1183 typename StorageType::RunnableType, |
1222 void(typename Bound1UnwrapTraits::ForwardType, | 1184 void(typename Bound1UnwrapTraits::ForwardType, |
1223 typename CallbackParamTraits<X2>::ForwardType x2)> | 1185 typename CallbackParamTraits<X2>::ForwardType x2)> |
1224 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1186 ::MakeItSo(storage->runnable_, x1, x2); |
1225 CallbackForward(x2)); | |
1226 } | 1187 } |
1227 }; | 1188 }; |
1228 | 1189 |
1229 // Arity 2 -> 0. | 1190 // Arity 2 -> 0. |
1230 template <typename StorageType, typename R,typename X1, typename X2> | 1191 template <typename StorageType, typename R,typename X1, typename X2> |
1231 struct Invoker<2, StorageType, R(X1, X2)> { | 1192 struct Invoker<2, StorageType, R(X1, X2)> { |
1232 typedef R(RunType)(BindStateBase*); | 1193 typedef R(RunType)(BindStateBase*); |
1233 | 1194 |
1234 typedef R(UnboundRunType)(); | 1195 typedef R(UnboundRunType)(); |
1235 | 1196 |
1236 static R Run(BindStateBase* base) { | 1197 static R Run(BindStateBase* base) { |
1237 StorageType* storage = static_cast<StorageType*>(base); | 1198 StorageType* storage = static_cast<StorageType*>(base); |
1238 | 1199 |
1239 // Local references to make debugger stepping easier. If in a debugger, | 1200 // Local references to make debugger stepping easier. If in a debugger, |
1240 // you really want to warp ahead and step through the | 1201 // you really want to warp ahead and step through the |
1241 // InvokeHelper<>::MakeItSo() call below. | 1202 // InvokeHelper<>::MakeItSo() call below. |
1242 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; | 1203 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
1243 typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; | 1204 typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; |
1244 | 1205 |
1245 typename Bound1UnwrapTraits::ForwardType x1 = | 1206 typename Bound1UnwrapTraits::ForwardType x1 = |
1246 Bound1UnwrapTraits::Unwrap(storage->p1_); | 1207 Bound1UnwrapTraits::Unwrap(storage->p1_); |
1247 typename Bound2UnwrapTraits::ForwardType x2 = | 1208 typename Bound2UnwrapTraits::ForwardType x2 = |
1248 Bound2UnwrapTraits::Unwrap(storage->p2_); | 1209 Bound2UnwrapTraits::Unwrap(storage->p2_); |
1249 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1210 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1250 typename StorageType::RunnableType, | 1211 typename StorageType::RunnableType, |
1251 void(typename Bound1UnwrapTraits::ForwardType, | 1212 void(typename Bound1UnwrapTraits::ForwardType, |
1252 typename Bound2UnwrapTraits::ForwardType)> | 1213 typename Bound2UnwrapTraits::ForwardType)> |
1253 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1214 ::MakeItSo(storage->runnable_, x1, x2); |
1254 CallbackForward(x2)); | |
1255 } | 1215 } |
1256 }; | 1216 }; |
1257 | 1217 |
1258 // Arity 3 -> 3. | 1218 // Arity 3 -> 3. |
1259 template <typename StorageType, typename R,typename X1, typename X2, | 1219 template <typename StorageType, typename R,typename X1, typename X2, |
1260 typename X3> | 1220 typename X3> |
1261 struct Invoker<0, StorageType, R(X1, X2, X3)> { | 1221 struct Invoker<0, StorageType, R(X1, X2, X3)> { |
1262 typedef R(RunType)(BindStateBase*, | 1222 typedef R(RunType)(BindStateBase*, |
1263 typename CallbackParamTraits<X1>::ForwardType, | 1223 typename CallbackParamTraits<X1>::ForwardType, |
1264 typename CallbackParamTraits<X2>::ForwardType, | 1224 typename CallbackParamTraits<X2>::ForwardType, |
1265 typename CallbackParamTraits<X3>::ForwardType); | 1225 typename CallbackParamTraits<X3>::ForwardType); |
1266 | 1226 |
1267 typedef R(UnboundRunType)(X1, X2, X3); | 1227 typedef R(UnboundRunType)(X1, X2, X3); |
1268 | 1228 |
1269 static R Run(BindStateBase* base, | 1229 static R Run(BindStateBase* base, |
1270 typename CallbackParamTraits<X1>::ForwardType x1, | 1230 typename CallbackParamTraits<X1>::ForwardType x1, |
1271 typename CallbackParamTraits<X2>::ForwardType x2, | 1231 typename CallbackParamTraits<X2>::ForwardType x2, |
1272 typename CallbackParamTraits<X3>::ForwardType x3) { | 1232 typename CallbackParamTraits<X3>::ForwardType x3) { |
1273 StorageType* storage = static_cast<StorageType*>(base); | 1233 StorageType* storage = static_cast<StorageType*>(base); |
1274 | 1234 |
1275 // Local references to make debugger stepping easier. If in a debugger, | 1235 // Local references to make debugger stepping easier. If in a debugger, |
1276 // you really want to warp ahead and step through the | 1236 // you really want to warp ahead and step through the |
1277 // InvokeHelper<>::MakeItSo() call below. | 1237 // InvokeHelper<>::MakeItSo() call below. |
1278 | 1238 |
1279 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1239 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1280 typename StorageType::RunnableType, | 1240 typename StorageType::RunnableType, |
1281 void(typename CallbackParamTraits<X1>::ForwardType x1, | 1241 void(typename CallbackParamTraits<X1>::ForwardType x1, |
1282 typename CallbackParamTraits<X2>::ForwardType x2, | 1242 typename CallbackParamTraits<X2>::ForwardType x2, |
1283 typename CallbackParamTraits<X3>::ForwardType x3)> | 1243 typename CallbackParamTraits<X3>::ForwardType x3)> |
1284 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1244 ::MakeItSo(storage->runnable_, x1, x2, x3); |
1285 CallbackForward(x2), CallbackForward(x3)); | |
1286 } | 1245 } |
1287 }; | 1246 }; |
1288 | 1247 |
1289 // Arity 3 -> 2. | 1248 // Arity 3 -> 2. |
1290 template <typename StorageType, typename R,typename X1, typename X2, | 1249 template <typename StorageType, typename R,typename X1, typename X2, |
1291 typename X3> | 1250 typename X3> |
1292 struct Invoker<1, StorageType, R(X1, X2, X3)> { | 1251 struct Invoker<1, StorageType, R(X1, X2, X3)> { |
1293 typedef R(RunType)(BindStateBase*, | 1252 typedef R(RunType)(BindStateBase*, |
1294 typename CallbackParamTraits<X2>::ForwardType, | 1253 typename CallbackParamTraits<X2>::ForwardType, |
1295 typename CallbackParamTraits<X3>::ForwardType); | 1254 typename CallbackParamTraits<X3>::ForwardType); |
(...skipping 10 matching lines...) Expand all Loading... |
1306 // InvokeHelper<>::MakeItSo() call below. | 1265 // InvokeHelper<>::MakeItSo() call below. |
1307 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; | 1266 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
1308 | 1267 |
1309 typename Bound1UnwrapTraits::ForwardType x1 = | 1268 typename Bound1UnwrapTraits::ForwardType x1 = |
1310 Bound1UnwrapTraits::Unwrap(storage->p1_); | 1269 Bound1UnwrapTraits::Unwrap(storage->p1_); |
1311 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1270 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1312 typename StorageType::RunnableType, | 1271 typename StorageType::RunnableType, |
1313 void(typename Bound1UnwrapTraits::ForwardType, | 1272 void(typename Bound1UnwrapTraits::ForwardType, |
1314 typename CallbackParamTraits<X2>::ForwardType x2, | 1273 typename CallbackParamTraits<X2>::ForwardType x2, |
1315 typename CallbackParamTraits<X3>::ForwardType x3)> | 1274 typename CallbackParamTraits<X3>::ForwardType x3)> |
1316 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1275 ::MakeItSo(storage->runnable_, x1, x2, x3); |
1317 CallbackForward(x2), CallbackForward(x3)); | |
1318 } | 1276 } |
1319 }; | 1277 }; |
1320 | 1278 |
1321 // Arity 3 -> 1. | 1279 // Arity 3 -> 1. |
1322 template <typename StorageType, typename R,typename X1, typename X2, | 1280 template <typename StorageType, typename R,typename X1, typename X2, |
1323 typename X3> | 1281 typename X3> |
1324 struct Invoker<2, StorageType, R(X1, X2, X3)> { | 1282 struct Invoker<2, StorageType, R(X1, X2, X3)> { |
1325 typedef R(RunType)(BindStateBase*, | 1283 typedef R(RunType)(BindStateBase*, |
1326 typename CallbackParamTraits<X3>::ForwardType); | 1284 typename CallbackParamTraits<X3>::ForwardType); |
1327 | 1285 |
(...skipping 11 matching lines...) Expand all Loading... |
1339 | 1297 |
1340 typename Bound1UnwrapTraits::ForwardType x1 = | 1298 typename Bound1UnwrapTraits::ForwardType x1 = |
1341 Bound1UnwrapTraits::Unwrap(storage->p1_); | 1299 Bound1UnwrapTraits::Unwrap(storage->p1_); |
1342 typename Bound2UnwrapTraits::ForwardType x2 = | 1300 typename Bound2UnwrapTraits::ForwardType x2 = |
1343 Bound2UnwrapTraits::Unwrap(storage->p2_); | 1301 Bound2UnwrapTraits::Unwrap(storage->p2_); |
1344 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1302 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1345 typename StorageType::RunnableType, | 1303 typename StorageType::RunnableType, |
1346 void(typename Bound1UnwrapTraits::ForwardType, | 1304 void(typename Bound1UnwrapTraits::ForwardType, |
1347 typename Bound2UnwrapTraits::ForwardType, | 1305 typename Bound2UnwrapTraits::ForwardType, |
1348 typename CallbackParamTraits<X3>::ForwardType x3)> | 1306 typename CallbackParamTraits<X3>::ForwardType x3)> |
1349 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1307 ::MakeItSo(storage->runnable_, x1, x2, x3); |
1350 CallbackForward(x2), CallbackForward(x3)); | |
1351 } | 1308 } |
1352 }; | 1309 }; |
1353 | 1310 |
1354 // Arity 3 -> 0. | 1311 // Arity 3 -> 0. |
1355 template <typename StorageType, typename R,typename X1, typename X2, | 1312 template <typename StorageType, typename R,typename X1, typename X2, |
1356 typename X3> | 1313 typename X3> |
1357 struct Invoker<3, StorageType, R(X1, X2, X3)> { | 1314 struct Invoker<3, StorageType, R(X1, X2, X3)> { |
1358 typedef R(RunType)(BindStateBase*); | 1315 typedef R(RunType)(BindStateBase*); |
1359 | 1316 |
1360 typedef R(UnboundRunType)(); | 1317 typedef R(UnboundRunType)(); |
(...skipping 12 matching lines...) Expand all Loading... |
1373 Bound1UnwrapTraits::Unwrap(storage->p1_); | 1330 Bound1UnwrapTraits::Unwrap(storage->p1_); |
1374 typename Bound2UnwrapTraits::ForwardType x2 = | 1331 typename Bound2UnwrapTraits::ForwardType x2 = |
1375 Bound2UnwrapTraits::Unwrap(storage->p2_); | 1332 Bound2UnwrapTraits::Unwrap(storage->p2_); |
1376 typename Bound3UnwrapTraits::ForwardType x3 = | 1333 typename Bound3UnwrapTraits::ForwardType x3 = |
1377 Bound3UnwrapTraits::Unwrap(storage->p3_); | 1334 Bound3UnwrapTraits::Unwrap(storage->p3_); |
1378 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1335 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1379 typename StorageType::RunnableType, | 1336 typename StorageType::RunnableType, |
1380 void(typename Bound1UnwrapTraits::ForwardType, | 1337 void(typename Bound1UnwrapTraits::ForwardType, |
1381 typename Bound2UnwrapTraits::ForwardType, | 1338 typename Bound2UnwrapTraits::ForwardType, |
1382 typename Bound3UnwrapTraits::ForwardType)> | 1339 typename Bound3UnwrapTraits::ForwardType)> |
1383 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1340 ::MakeItSo(storage->runnable_, x1, x2, x3); |
1384 CallbackForward(x2), CallbackForward(x3)); | |
1385 } | 1341 } |
1386 }; | 1342 }; |
1387 | 1343 |
1388 // Arity 4 -> 4. | 1344 // Arity 4 -> 4. |
1389 template <typename StorageType, typename R,typename X1, typename X2, | 1345 template <typename StorageType, typename R,typename X1, typename X2, |
1390 typename X3, typename X4> | 1346 typename X3, typename X4> |
1391 struct Invoker<0, StorageType, R(X1, X2, X3, X4)> { | 1347 struct Invoker<0, StorageType, R(X1, X2, X3, X4)> { |
1392 typedef R(RunType)(BindStateBase*, | 1348 typedef R(RunType)(BindStateBase*, |
1393 typename CallbackParamTraits<X1>::ForwardType, | 1349 typename CallbackParamTraits<X1>::ForwardType, |
1394 typename CallbackParamTraits<X2>::ForwardType, | 1350 typename CallbackParamTraits<X2>::ForwardType, |
(...skipping 12 matching lines...) Expand all Loading... |
1407 // Local references to make debugger stepping easier. If in a debugger, | 1363 // Local references to make debugger stepping easier. If in a debugger, |
1408 // you really want to warp ahead and step through the | 1364 // you really want to warp ahead and step through the |
1409 // InvokeHelper<>::MakeItSo() call below. | 1365 // InvokeHelper<>::MakeItSo() call below. |
1410 | 1366 |
1411 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1367 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1412 typename StorageType::RunnableType, | 1368 typename StorageType::RunnableType, |
1413 void(typename CallbackParamTraits<X1>::ForwardType x1, | 1369 void(typename CallbackParamTraits<X1>::ForwardType x1, |
1414 typename CallbackParamTraits<X2>::ForwardType x2, | 1370 typename CallbackParamTraits<X2>::ForwardType x2, |
1415 typename CallbackParamTraits<X3>::ForwardType x3, | 1371 typename CallbackParamTraits<X3>::ForwardType x3, |
1416 typename CallbackParamTraits<X4>::ForwardType x4)> | 1372 typename CallbackParamTraits<X4>::ForwardType x4)> |
1417 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1373 ::MakeItSo(storage->runnable_, x1, x2, x3, x4); |
1418 CallbackForward(x2), CallbackForward(x3), | |
1419 CallbackForward(x4)); | |
1420 } | 1374 } |
1421 }; | 1375 }; |
1422 | 1376 |
1423 // Arity 4 -> 3. | 1377 // Arity 4 -> 3. |
1424 template <typename StorageType, typename R,typename X1, typename X2, | 1378 template <typename StorageType, typename R,typename X1, typename X2, |
1425 typename X3, typename X4> | 1379 typename X3, typename X4> |
1426 struct Invoker<1, StorageType, R(X1, X2, X3, X4)> { | 1380 struct Invoker<1, StorageType, R(X1, X2, X3, X4)> { |
1427 typedef R(RunType)(BindStateBase*, | 1381 typedef R(RunType)(BindStateBase*, |
1428 typename CallbackParamTraits<X2>::ForwardType, | 1382 typename CallbackParamTraits<X2>::ForwardType, |
1429 typename CallbackParamTraits<X3>::ForwardType, | 1383 typename CallbackParamTraits<X3>::ForwardType, |
(...skipping 13 matching lines...) Expand all Loading... |
1443 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; | 1397 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
1444 | 1398 |
1445 typename Bound1UnwrapTraits::ForwardType x1 = | 1399 typename Bound1UnwrapTraits::ForwardType x1 = |
1446 Bound1UnwrapTraits::Unwrap(storage->p1_); | 1400 Bound1UnwrapTraits::Unwrap(storage->p1_); |
1447 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1401 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1448 typename StorageType::RunnableType, | 1402 typename StorageType::RunnableType, |
1449 void(typename Bound1UnwrapTraits::ForwardType, | 1403 void(typename Bound1UnwrapTraits::ForwardType, |
1450 typename CallbackParamTraits<X2>::ForwardType x2, | 1404 typename CallbackParamTraits<X2>::ForwardType x2, |
1451 typename CallbackParamTraits<X3>::ForwardType x3, | 1405 typename CallbackParamTraits<X3>::ForwardType x3, |
1452 typename CallbackParamTraits<X4>::ForwardType x4)> | 1406 typename CallbackParamTraits<X4>::ForwardType x4)> |
1453 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1407 ::MakeItSo(storage->runnable_, x1, x2, x3, x4); |
1454 CallbackForward(x2), CallbackForward(x3), | |
1455 CallbackForward(x4)); | |
1456 } | 1408 } |
1457 }; | 1409 }; |
1458 | 1410 |
1459 // Arity 4 -> 2. | 1411 // Arity 4 -> 2. |
1460 template <typename StorageType, typename R,typename X1, typename X2, | 1412 template <typename StorageType, typename R,typename X1, typename X2, |
1461 typename X3, typename X4> | 1413 typename X3, typename X4> |
1462 struct Invoker<2, StorageType, R(X1, X2, X3, X4)> { | 1414 struct Invoker<2, StorageType, R(X1, X2, X3, X4)> { |
1463 typedef R(RunType)(BindStateBase*, | 1415 typedef R(RunType)(BindStateBase*, |
1464 typename CallbackParamTraits<X3>::ForwardType, | 1416 typename CallbackParamTraits<X3>::ForwardType, |
1465 typename CallbackParamTraits<X4>::ForwardType); | 1417 typename CallbackParamTraits<X4>::ForwardType); |
(...skipping 14 matching lines...) Expand all Loading... |
1480 typename Bound1UnwrapTraits::ForwardType x1 = | 1432 typename Bound1UnwrapTraits::ForwardType x1 = |
1481 Bound1UnwrapTraits::Unwrap(storage->p1_); | 1433 Bound1UnwrapTraits::Unwrap(storage->p1_); |
1482 typename Bound2UnwrapTraits::ForwardType x2 = | 1434 typename Bound2UnwrapTraits::ForwardType x2 = |
1483 Bound2UnwrapTraits::Unwrap(storage->p2_); | 1435 Bound2UnwrapTraits::Unwrap(storage->p2_); |
1484 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1436 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1485 typename StorageType::RunnableType, | 1437 typename StorageType::RunnableType, |
1486 void(typename Bound1UnwrapTraits::ForwardType, | 1438 void(typename Bound1UnwrapTraits::ForwardType, |
1487 typename Bound2UnwrapTraits::ForwardType, | 1439 typename Bound2UnwrapTraits::ForwardType, |
1488 typename CallbackParamTraits<X3>::ForwardType x3, | 1440 typename CallbackParamTraits<X3>::ForwardType x3, |
1489 typename CallbackParamTraits<X4>::ForwardType x4)> | 1441 typename CallbackParamTraits<X4>::ForwardType x4)> |
1490 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1442 ::MakeItSo(storage->runnable_, x1, x2, x3, x4); |
1491 CallbackForward(x2), CallbackForward(x3), | |
1492 CallbackForward(x4)); | |
1493 } | 1443 } |
1494 }; | 1444 }; |
1495 | 1445 |
1496 // Arity 4 -> 1. | 1446 // Arity 4 -> 1. |
1497 template <typename StorageType, typename R,typename X1, typename X2, | 1447 template <typename StorageType, typename R,typename X1, typename X2, |
1498 typename X3, typename X4> | 1448 typename X3, typename X4> |
1499 struct Invoker<3, StorageType, R(X1, X2, X3, X4)> { | 1449 struct Invoker<3, StorageType, R(X1, X2, X3, X4)> { |
1500 typedef R(RunType)(BindStateBase*, | 1450 typedef R(RunType)(BindStateBase*, |
1501 typename CallbackParamTraits<X4>::ForwardType); | 1451 typename CallbackParamTraits<X4>::ForwardType); |
1502 | 1452 |
(...skipping 15 matching lines...) Expand all Loading... |
1518 typename Bound2UnwrapTraits::ForwardType x2 = | 1468 typename Bound2UnwrapTraits::ForwardType x2 = |
1519 Bound2UnwrapTraits::Unwrap(storage->p2_); | 1469 Bound2UnwrapTraits::Unwrap(storage->p2_); |
1520 typename Bound3UnwrapTraits::ForwardType x3 = | 1470 typename Bound3UnwrapTraits::ForwardType x3 = |
1521 Bound3UnwrapTraits::Unwrap(storage->p3_); | 1471 Bound3UnwrapTraits::Unwrap(storage->p3_); |
1522 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1472 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1523 typename StorageType::RunnableType, | 1473 typename StorageType::RunnableType, |
1524 void(typename Bound1UnwrapTraits::ForwardType, | 1474 void(typename Bound1UnwrapTraits::ForwardType, |
1525 typename Bound2UnwrapTraits::ForwardType, | 1475 typename Bound2UnwrapTraits::ForwardType, |
1526 typename Bound3UnwrapTraits::ForwardType, | 1476 typename Bound3UnwrapTraits::ForwardType, |
1527 typename CallbackParamTraits<X4>::ForwardType x4)> | 1477 typename CallbackParamTraits<X4>::ForwardType x4)> |
1528 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1478 ::MakeItSo(storage->runnable_, x1, x2, x3, x4); |
1529 CallbackForward(x2), CallbackForward(x3), | |
1530 CallbackForward(x4)); | |
1531 } | 1479 } |
1532 }; | 1480 }; |
1533 | 1481 |
1534 // Arity 4 -> 0. | 1482 // Arity 4 -> 0. |
1535 template <typename StorageType, typename R,typename X1, typename X2, | 1483 template <typename StorageType, typename R,typename X1, typename X2, |
1536 typename X3, typename X4> | 1484 typename X3, typename X4> |
1537 struct Invoker<4, StorageType, R(X1, X2, X3, X4)> { | 1485 struct Invoker<4, StorageType, R(X1, X2, X3, X4)> { |
1538 typedef R(RunType)(BindStateBase*); | 1486 typedef R(RunType)(BindStateBase*); |
1539 | 1487 |
1540 typedef R(UnboundRunType)(); | 1488 typedef R(UnboundRunType)(); |
(...skipping 16 matching lines...) Expand all Loading... |
1557 typename Bound3UnwrapTraits::ForwardType x3 = | 1505 typename Bound3UnwrapTraits::ForwardType x3 = |
1558 Bound3UnwrapTraits::Unwrap(storage->p3_); | 1506 Bound3UnwrapTraits::Unwrap(storage->p3_); |
1559 typename Bound4UnwrapTraits::ForwardType x4 = | 1507 typename Bound4UnwrapTraits::ForwardType x4 = |
1560 Bound4UnwrapTraits::Unwrap(storage->p4_); | 1508 Bound4UnwrapTraits::Unwrap(storage->p4_); |
1561 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1509 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1562 typename StorageType::RunnableType, | 1510 typename StorageType::RunnableType, |
1563 void(typename Bound1UnwrapTraits::ForwardType, | 1511 void(typename Bound1UnwrapTraits::ForwardType, |
1564 typename Bound2UnwrapTraits::ForwardType, | 1512 typename Bound2UnwrapTraits::ForwardType, |
1565 typename Bound3UnwrapTraits::ForwardType, | 1513 typename Bound3UnwrapTraits::ForwardType, |
1566 typename Bound4UnwrapTraits::ForwardType)> | 1514 typename Bound4UnwrapTraits::ForwardType)> |
1567 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1515 ::MakeItSo(storage->runnable_, x1, x2, x3, x4); |
1568 CallbackForward(x2), CallbackForward(x3), | |
1569 CallbackForward(x4)); | |
1570 } | 1516 } |
1571 }; | 1517 }; |
1572 | 1518 |
1573 // Arity 5 -> 5. | 1519 // Arity 5 -> 5. |
1574 template <typename StorageType, typename R,typename X1, typename X2, | 1520 template <typename StorageType, typename R,typename X1, typename X2, |
1575 typename X3, typename X4, typename X5> | 1521 typename X3, typename X4, typename X5> |
1576 struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5)> { | 1522 struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5)> { |
1577 typedef R(RunType)(BindStateBase*, | 1523 typedef R(RunType)(BindStateBase*, |
1578 typename CallbackParamTraits<X1>::ForwardType, | 1524 typename CallbackParamTraits<X1>::ForwardType, |
1579 typename CallbackParamTraits<X2>::ForwardType, | 1525 typename CallbackParamTraits<X2>::ForwardType, |
(...skipping 15 matching lines...) Expand all Loading... |
1595 // you really want to warp ahead and step through the | 1541 // you really want to warp ahead and step through the |
1596 // InvokeHelper<>::MakeItSo() call below. | 1542 // InvokeHelper<>::MakeItSo() call below. |
1597 | 1543 |
1598 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1544 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1599 typename StorageType::RunnableType, | 1545 typename StorageType::RunnableType, |
1600 void(typename CallbackParamTraits<X1>::ForwardType x1, | 1546 void(typename CallbackParamTraits<X1>::ForwardType x1, |
1601 typename CallbackParamTraits<X2>::ForwardType x2, | 1547 typename CallbackParamTraits<X2>::ForwardType x2, |
1602 typename CallbackParamTraits<X3>::ForwardType x3, | 1548 typename CallbackParamTraits<X3>::ForwardType x3, |
1603 typename CallbackParamTraits<X4>::ForwardType x4, | 1549 typename CallbackParamTraits<X4>::ForwardType x4, |
1604 typename CallbackParamTraits<X5>::ForwardType x5)> | 1550 typename CallbackParamTraits<X5>::ForwardType x5)> |
1605 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1551 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5); |
1606 CallbackForward(x2), CallbackForward(x3), | |
1607 CallbackForward(x4), CallbackForward(x5)); | |
1608 } | 1552 } |
1609 }; | 1553 }; |
1610 | 1554 |
1611 // Arity 5 -> 4. | 1555 // Arity 5 -> 4. |
1612 template <typename StorageType, typename R,typename X1, typename X2, | 1556 template <typename StorageType, typename R,typename X1, typename X2, |
1613 typename X3, typename X4, typename X5> | 1557 typename X3, typename X4, typename X5> |
1614 struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5)> { | 1558 struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5)> { |
1615 typedef R(RunType)(BindStateBase*, | 1559 typedef R(RunType)(BindStateBase*, |
1616 typename CallbackParamTraits<X2>::ForwardType, | 1560 typename CallbackParamTraits<X2>::ForwardType, |
1617 typename CallbackParamTraits<X3>::ForwardType, | 1561 typename CallbackParamTraits<X3>::ForwardType, |
(...skipping 16 matching lines...) Expand all Loading... |
1634 | 1578 |
1635 typename Bound1UnwrapTraits::ForwardType x1 = | 1579 typename Bound1UnwrapTraits::ForwardType x1 = |
1636 Bound1UnwrapTraits::Unwrap(storage->p1_); | 1580 Bound1UnwrapTraits::Unwrap(storage->p1_); |
1637 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1581 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1638 typename StorageType::RunnableType, | 1582 typename StorageType::RunnableType, |
1639 void(typename Bound1UnwrapTraits::ForwardType, | 1583 void(typename Bound1UnwrapTraits::ForwardType, |
1640 typename CallbackParamTraits<X2>::ForwardType x2, | 1584 typename CallbackParamTraits<X2>::ForwardType x2, |
1641 typename CallbackParamTraits<X3>::ForwardType x3, | 1585 typename CallbackParamTraits<X3>::ForwardType x3, |
1642 typename CallbackParamTraits<X4>::ForwardType x4, | 1586 typename CallbackParamTraits<X4>::ForwardType x4, |
1643 typename CallbackParamTraits<X5>::ForwardType x5)> | 1587 typename CallbackParamTraits<X5>::ForwardType x5)> |
1644 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1588 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5); |
1645 CallbackForward(x2), CallbackForward(x3), | |
1646 CallbackForward(x4), CallbackForward(x5)); | |
1647 } | 1589 } |
1648 }; | 1590 }; |
1649 | 1591 |
1650 // Arity 5 -> 3. | 1592 // Arity 5 -> 3. |
1651 template <typename StorageType, typename R,typename X1, typename X2, | 1593 template <typename StorageType, typename R,typename X1, typename X2, |
1652 typename X3, typename X4, typename X5> | 1594 typename X3, typename X4, typename X5> |
1653 struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5)> { | 1595 struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5)> { |
1654 typedef R(RunType)(BindStateBase*, | 1596 typedef R(RunType)(BindStateBase*, |
1655 typename CallbackParamTraits<X3>::ForwardType, | 1597 typename CallbackParamTraits<X3>::ForwardType, |
1656 typename CallbackParamTraits<X4>::ForwardType, | 1598 typename CallbackParamTraits<X4>::ForwardType, |
(...skipping 17 matching lines...) Expand all Loading... |
1674 Bound1UnwrapTraits::Unwrap(storage->p1_); | 1616 Bound1UnwrapTraits::Unwrap(storage->p1_); |
1675 typename Bound2UnwrapTraits::ForwardType x2 = | 1617 typename Bound2UnwrapTraits::ForwardType x2 = |
1676 Bound2UnwrapTraits::Unwrap(storage->p2_); | 1618 Bound2UnwrapTraits::Unwrap(storage->p2_); |
1677 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1619 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1678 typename StorageType::RunnableType, | 1620 typename StorageType::RunnableType, |
1679 void(typename Bound1UnwrapTraits::ForwardType, | 1621 void(typename Bound1UnwrapTraits::ForwardType, |
1680 typename Bound2UnwrapTraits::ForwardType, | 1622 typename Bound2UnwrapTraits::ForwardType, |
1681 typename CallbackParamTraits<X3>::ForwardType x3, | 1623 typename CallbackParamTraits<X3>::ForwardType x3, |
1682 typename CallbackParamTraits<X4>::ForwardType x4, | 1624 typename CallbackParamTraits<X4>::ForwardType x4, |
1683 typename CallbackParamTraits<X5>::ForwardType x5)> | 1625 typename CallbackParamTraits<X5>::ForwardType x5)> |
1684 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1626 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5); |
1685 CallbackForward(x2), CallbackForward(x3), | |
1686 CallbackForward(x4), CallbackForward(x5)); | |
1687 } | 1627 } |
1688 }; | 1628 }; |
1689 | 1629 |
1690 // Arity 5 -> 2. | 1630 // Arity 5 -> 2. |
1691 template <typename StorageType, typename R,typename X1, typename X2, | 1631 template <typename StorageType, typename R,typename X1, typename X2, |
1692 typename X3, typename X4, typename X5> | 1632 typename X3, typename X4, typename X5> |
1693 struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5)> { | 1633 struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5)> { |
1694 typedef R(RunType)(BindStateBase*, | 1634 typedef R(RunType)(BindStateBase*, |
1695 typename CallbackParamTraits<X4>::ForwardType, | 1635 typename CallbackParamTraits<X4>::ForwardType, |
1696 typename CallbackParamTraits<X5>::ForwardType); | 1636 typename CallbackParamTraits<X5>::ForwardType); |
(...skipping 18 matching lines...) Expand all Loading... |
1715 Bound2UnwrapTraits::Unwrap(storage->p2_); | 1655 Bound2UnwrapTraits::Unwrap(storage->p2_); |
1716 typename Bound3UnwrapTraits::ForwardType x3 = | 1656 typename Bound3UnwrapTraits::ForwardType x3 = |
1717 Bound3UnwrapTraits::Unwrap(storage->p3_); | 1657 Bound3UnwrapTraits::Unwrap(storage->p3_); |
1718 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1658 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1719 typename StorageType::RunnableType, | 1659 typename StorageType::RunnableType, |
1720 void(typename Bound1UnwrapTraits::ForwardType, | 1660 void(typename Bound1UnwrapTraits::ForwardType, |
1721 typename Bound2UnwrapTraits::ForwardType, | 1661 typename Bound2UnwrapTraits::ForwardType, |
1722 typename Bound3UnwrapTraits::ForwardType, | 1662 typename Bound3UnwrapTraits::ForwardType, |
1723 typename CallbackParamTraits<X4>::ForwardType x4, | 1663 typename CallbackParamTraits<X4>::ForwardType x4, |
1724 typename CallbackParamTraits<X5>::ForwardType x5)> | 1664 typename CallbackParamTraits<X5>::ForwardType x5)> |
1725 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1665 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5); |
1726 CallbackForward(x2), CallbackForward(x3), | |
1727 CallbackForward(x4), CallbackForward(x5)); | |
1728 } | 1666 } |
1729 }; | 1667 }; |
1730 | 1668 |
1731 // Arity 5 -> 1. | 1669 // Arity 5 -> 1. |
1732 template <typename StorageType, typename R,typename X1, typename X2, | 1670 template <typename StorageType, typename R,typename X1, typename X2, |
1733 typename X3, typename X4, typename X5> | 1671 typename X3, typename X4, typename X5> |
1734 struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5)> { | 1672 struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5)> { |
1735 typedef R(RunType)(BindStateBase*, | 1673 typedef R(RunType)(BindStateBase*, |
1736 typename CallbackParamTraits<X5>::ForwardType); | 1674 typename CallbackParamTraits<X5>::ForwardType); |
1737 | 1675 |
(...skipping 19 matching lines...) Expand all Loading... |
1757 Bound3UnwrapTraits::Unwrap(storage->p3_); | 1695 Bound3UnwrapTraits::Unwrap(storage->p3_); |
1758 typename Bound4UnwrapTraits::ForwardType x4 = | 1696 typename Bound4UnwrapTraits::ForwardType x4 = |
1759 Bound4UnwrapTraits::Unwrap(storage->p4_); | 1697 Bound4UnwrapTraits::Unwrap(storage->p4_); |
1760 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1698 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1761 typename StorageType::RunnableType, | 1699 typename StorageType::RunnableType, |
1762 void(typename Bound1UnwrapTraits::ForwardType, | 1700 void(typename Bound1UnwrapTraits::ForwardType, |
1763 typename Bound2UnwrapTraits::ForwardType, | 1701 typename Bound2UnwrapTraits::ForwardType, |
1764 typename Bound3UnwrapTraits::ForwardType, | 1702 typename Bound3UnwrapTraits::ForwardType, |
1765 typename Bound4UnwrapTraits::ForwardType, | 1703 typename Bound4UnwrapTraits::ForwardType, |
1766 typename CallbackParamTraits<X5>::ForwardType x5)> | 1704 typename CallbackParamTraits<X5>::ForwardType x5)> |
1767 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1705 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5); |
1768 CallbackForward(x2), CallbackForward(x3), | |
1769 CallbackForward(x4), CallbackForward(x5)); | |
1770 } | 1706 } |
1771 }; | 1707 }; |
1772 | 1708 |
1773 // Arity 5 -> 0. | 1709 // Arity 5 -> 0. |
1774 template <typename StorageType, typename R,typename X1, typename X2, | 1710 template <typename StorageType, typename R,typename X1, typename X2, |
1775 typename X3, typename X4, typename X5> | 1711 typename X3, typename X4, typename X5> |
1776 struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5)> { | 1712 struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5)> { |
1777 typedef R(RunType)(BindStateBase*); | 1713 typedef R(RunType)(BindStateBase*); |
1778 | 1714 |
1779 typedef R(UnboundRunType)(); | 1715 typedef R(UnboundRunType)(); |
(...skipping 20 matching lines...) Expand all Loading... |
1800 Bound4UnwrapTraits::Unwrap(storage->p4_); | 1736 Bound4UnwrapTraits::Unwrap(storage->p4_); |
1801 typename Bound5UnwrapTraits::ForwardType x5 = | 1737 typename Bound5UnwrapTraits::ForwardType x5 = |
1802 Bound5UnwrapTraits::Unwrap(storage->p5_); | 1738 Bound5UnwrapTraits::Unwrap(storage->p5_); |
1803 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1739 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1804 typename StorageType::RunnableType, | 1740 typename StorageType::RunnableType, |
1805 void(typename Bound1UnwrapTraits::ForwardType, | 1741 void(typename Bound1UnwrapTraits::ForwardType, |
1806 typename Bound2UnwrapTraits::ForwardType, | 1742 typename Bound2UnwrapTraits::ForwardType, |
1807 typename Bound3UnwrapTraits::ForwardType, | 1743 typename Bound3UnwrapTraits::ForwardType, |
1808 typename Bound4UnwrapTraits::ForwardType, | 1744 typename Bound4UnwrapTraits::ForwardType, |
1809 typename Bound5UnwrapTraits::ForwardType)> | 1745 typename Bound5UnwrapTraits::ForwardType)> |
1810 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1746 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5); |
1811 CallbackForward(x2), CallbackForward(x3), | |
1812 CallbackForward(x4), CallbackForward(x5)); | |
1813 } | 1747 } |
1814 }; | 1748 }; |
1815 | 1749 |
1816 // Arity 6 -> 6. | 1750 // Arity 6 -> 6. |
1817 template <typename StorageType, typename R,typename X1, typename X2, | 1751 template <typename StorageType, typename R,typename X1, typename X2, |
1818 typename X3, typename X4, typename X5, typename X6> | 1752 typename X3, typename X4, typename X5, typename X6> |
1819 struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5, X6)> { | 1753 struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5, X6)> { |
1820 typedef R(RunType)(BindStateBase*, | 1754 typedef R(RunType)(BindStateBase*, |
1821 typename CallbackParamTraits<X1>::ForwardType, | 1755 typename CallbackParamTraits<X1>::ForwardType, |
1822 typename CallbackParamTraits<X2>::ForwardType, | 1756 typename CallbackParamTraits<X2>::ForwardType, |
(...skipping 18 matching lines...) Expand all Loading... |
1841 // InvokeHelper<>::MakeItSo() call below. | 1775 // InvokeHelper<>::MakeItSo() call below. |
1842 | 1776 |
1843 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1777 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1844 typename StorageType::RunnableType, | 1778 typename StorageType::RunnableType, |
1845 void(typename CallbackParamTraits<X1>::ForwardType x1, | 1779 void(typename CallbackParamTraits<X1>::ForwardType x1, |
1846 typename CallbackParamTraits<X2>::ForwardType x2, | 1780 typename CallbackParamTraits<X2>::ForwardType x2, |
1847 typename CallbackParamTraits<X3>::ForwardType x3, | 1781 typename CallbackParamTraits<X3>::ForwardType x3, |
1848 typename CallbackParamTraits<X4>::ForwardType x4, | 1782 typename CallbackParamTraits<X4>::ForwardType x4, |
1849 typename CallbackParamTraits<X5>::ForwardType x5, | 1783 typename CallbackParamTraits<X5>::ForwardType x5, |
1850 typename CallbackParamTraits<X6>::ForwardType x6)> | 1784 typename CallbackParamTraits<X6>::ForwardType x6)> |
1851 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1785 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6); |
1852 CallbackForward(x2), CallbackForward(x3), | |
1853 CallbackForward(x4), CallbackForward(x5), | |
1854 CallbackForward(x6)); | |
1855 } | 1786 } |
1856 }; | 1787 }; |
1857 | 1788 |
1858 // Arity 6 -> 5. | 1789 // Arity 6 -> 5. |
1859 template <typename StorageType, typename R,typename X1, typename X2, | 1790 template <typename StorageType, typename R,typename X1, typename X2, |
1860 typename X3, typename X4, typename X5, typename X6> | 1791 typename X3, typename X4, typename X5, typename X6> |
1861 struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5, X6)> { | 1792 struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5, X6)> { |
1862 typedef R(RunType)(BindStateBase*, | 1793 typedef R(RunType)(BindStateBase*, |
1863 typename CallbackParamTraits<X2>::ForwardType, | 1794 typename CallbackParamTraits<X2>::ForwardType, |
1864 typename CallbackParamTraits<X3>::ForwardType, | 1795 typename CallbackParamTraits<X3>::ForwardType, |
(...skipping 19 matching lines...) Expand all Loading... |
1884 typename Bound1UnwrapTraits::ForwardType x1 = | 1815 typename Bound1UnwrapTraits::ForwardType x1 = |
1885 Bound1UnwrapTraits::Unwrap(storage->p1_); | 1816 Bound1UnwrapTraits::Unwrap(storage->p1_); |
1886 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1817 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1887 typename StorageType::RunnableType, | 1818 typename StorageType::RunnableType, |
1888 void(typename Bound1UnwrapTraits::ForwardType, | 1819 void(typename Bound1UnwrapTraits::ForwardType, |
1889 typename CallbackParamTraits<X2>::ForwardType x2, | 1820 typename CallbackParamTraits<X2>::ForwardType x2, |
1890 typename CallbackParamTraits<X3>::ForwardType x3, | 1821 typename CallbackParamTraits<X3>::ForwardType x3, |
1891 typename CallbackParamTraits<X4>::ForwardType x4, | 1822 typename CallbackParamTraits<X4>::ForwardType x4, |
1892 typename CallbackParamTraits<X5>::ForwardType x5, | 1823 typename CallbackParamTraits<X5>::ForwardType x5, |
1893 typename CallbackParamTraits<X6>::ForwardType x6)> | 1824 typename CallbackParamTraits<X6>::ForwardType x6)> |
1894 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1825 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6); |
1895 CallbackForward(x2), CallbackForward(x3), | |
1896 CallbackForward(x4), CallbackForward(x5), | |
1897 CallbackForward(x6)); | |
1898 } | 1826 } |
1899 }; | 1827 }; |
1900 | 1828 |
1901 // Arity 6 -> 4. | 1829 // Arity 6 -> 4. |
1902 template <typename StorageType, typename R,typename X1, typename X2, | 1830 template <typename StorageType, typename R,typename X1, typename X2, |
1903 typename X3, typename X4, typename X5, typename X6> | 1831 typename X3, typename X4, typename X5, typename X6> |
1904 struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5, X6)> { | 1832 struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5, X6)> { |
1905 typedef R(RunType)(BindStateBase*, | 1833 typedef R(RunType)(BindStateBase*, |
1906 typename CallbackParamTraits<X3>::ForwardType, | 1834 typename CallbackParamTraits<X3>::ForwardType, |
1907 typename CallbackParamTraits<X4>::ForwardType, | 1835 typename CallbackParamTraits<X4>::ForwardType, |
(...skipping 20 matching lines...) Expand all Loading... |
1928 typename Bound2UnwrapTraits::ForwardType x2 = | 1856 typename Bound2UnwrapTraits::ForwardType x2 = |
1929 Bound2UnwrapTraits::Unwrap(storage->p2_); | 1857 Bound2UnwrapTraits::Unwrap(storage->p2_); |
1930 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1858 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1931 typename StorageType::RunnableType, | 1859 typename StorageType::RunnableType, |
1932 void(typename Bound1UnwrapTraits::ForwardType, | 1860 void(typename Bound1UnwrapTraits::ForwardType, |
1933 typename Bound2UnwrapTraits::ForwardType, | 1861 typename Bound2UnwrapTraits::ForwardType, |
1934 typename CallbackParamTraits<X3>::ForwardType x3, | 1862 typename CallbackParamTraits<X3>::ForwardType x3, |
1935 typename CallbackParamTraits<X4>::ForwardType x4, | 1863 typename CallbackParamTraits<X4>::ForwardType x4, |
1936 typename CallbackParamTraits<X5>::ForwardType x5, | 1864 typename CallbackParamTraits<X5>::ForwardType x5, |
1937 typename CallbackParamTraits<X6>::ForwardType x6)> | 1865 typename CallbackParamTraits<X6>::ForwardType x6)> |
1938 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1866 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6); |
1939 CallbackForward(x2), CallbackForward(x3), | |
1940 CallbackForward(x4), CallbackForward(x5), | |
1941 CallbackForward(x6)); | |
1942 } | 1867 } |
1943 }; | 1868 }; |
1944 | 1869 |
1945 // Arity 6 -> 3. | 1870 // Arity 6 -> 3. |
1946 template <typename StorageType, typename R,typename X1, typename X2, | 1871 template <typename StorageType, typename R,typename X1, typename X2, |
1947 typename X3, typename X4, typename X5, typename X6> | 1872 typename X3, typename X4, typename X5, typename X6> |
1948 struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5, X6)> { | 1873 struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5, X6)> { |
1949 typedef R(RunType)(BindStateBase*, | 1874 typedef R(RunType)(BindStateBase*, |
1950 typename CallbackParamTraits<X4>::ForwardType, | 1875 typename CallbackParamTraits<X4>::ForwardType, |
1951 typename CallbackParamTraits<X5>::ForwardType, | 1876 typename CallbackParamTraits<X5>::ForwardType, |
(...skipping 21 matching lines...) Expand all Loading... |
1973 typename Bound3UnwrapTraits::ForwardType x3 = | 1898 typename Bound3UnwrapTraits::ForwardType x3 = |
1974 Bound3UnwrapTraits::Unwrap(storage->p3_); | 1899 Bound3UnwrapTraits::Unwrap(storage->p3_); |
1975 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1900 return InvokeHelper<StorageType::IsWeakCall::value, R, |
1976 typename StorageType::RunnableType, | 1901 typename StorageType::RunnableType, |
1977 void(typename Bound1UnwrapTraits::ForwardType, | 1902 void(typename Bound1UnwrapTraits::ForwardType, |
1978 typename Bound2UnwrapTraits::ForwardType, | 1903 typename Bound2UnwrapTraits::ForwardType, |
1979 typename Bound3UnwrapTraits::ForwardType, | 1904 typename Bound3UnwrapTraits::ForwardType, |
1980 typename CallbackParamTraits<X4>::ForwardType x4, | 1905 typename CallbackParamTraits<X4>::ForwardType x4, |
1981 typename CallbackParamTraits<X5>::ForwardType x5, | 1906 typename CallbackParamTraits<X5>::ForwardType x5, |
1982 typename CallbackParamTraits<X6>::ForwardType x6)> | 1907 typename CallbackParamTraits<X6>::ForwardType x6)> |
1983 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1908 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6); |
1984 CallbackForward(x2), CallbackForward(x3), | |
1985 CallbackForward(x4), CallbackForward(x5), | |
1986 CallbackForward(x6)); | |
1987 } | 1909 } |
1988 }; | 1910 }; |
1989 | 1911 |
1990 // Arity 6 -> 2. | 1912 // Arity 6 -> 2. |
1991 template <typename StorageType, typename R,typename X1, typename X2, | 1913 template <typename StorageType, typename R,typename X1, typename X2, |
1992 typename X3, typename X4, typename X5, typename X6> | 1914 typename X3, typename X4, typename X5, typename X6> |
1993 struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5, X6)> { | 1915 struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5, X6)> { |
1994 typedef R(RunType)(BindStateBase*, | 1916 typedef R(RunType)(BindStateBase*, |
1995 typename CallbackParamTraits<X5>::ForwardType, | 1917 typename CallbackParamTraits<X5>::ForwardType, |
1996 typename CallbackParamTraits<X6>::ForwardType); | 1918 typename CallbackParamTraits<X6>::ForwardType); |
(...skipping 22 matching lines...) Expand all Loading... |
2019 typename Bound4UnwrapTraits::ForwardType x4 = | 1941 typename Bound4UnwrapTraits::ForwardType x4 = |
2020 Bound4UnwrapTraits::Unwrap(storage->p4_); | 1942 Bound4UnwrapTraits::Unwrap(storage->p4_); |
2021 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1943 return InvokeHelper<StorageType::IsWeakCall::value, R, |
2022 typename StorageType::RunnableType, | 1944 typename StorageType::RunnableType, |
2023 void(typename Bound1UnwrapTraits::ForwardType, | 1945 void(typename Bound1UnwrapTraits::ForwardType, |
2024 typename Bound2UnwrapTraits::ForwardType, | 1946 typename Bound2UnwrapTraits::ForwardType, |
2025 typename Bound3UnwrapTraits::ForwardType, | 1947 typename Bound3UnwrapTraits::ForwardType, |
2026 typename Bound4UnwrapTraits::ForwardType, | 1948 typename Bound4UnwrapTraits::ForwardType, |
2027 typename CallbackParamTraits<X5>::ForwardType x5, | 1949 typename CallbackParamTraits<X5>::ForwardType x5, |
2028 typename CallbackParamTraits<X6>::ForwardType x6)> | 1950 typename CallbackParamTraits<X6>::ForwardType x6)> |
2029 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1951 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6); |
2030 CallbackForward(x2), CallbackForward(x3), | |
2031 CallbackForward(x4), CallbackForward(x5), | |
2032 CallbackForward(x6)); | |
2033 } | 1952 } |
2034 }; | 1953 }; |
2035 | 1954 |
2036 // Arity 6 -> 1. | 1955 // Arity 6 -> 1. |
2037 template <typename StorageType, typename R,typename X1, typename X2, | 1956 template <typename StorageType, typename R,typename X1, typename X2, |
2038 typename X3, typename X4, typename X5, typename X6> | 1957 typename X3, typename X4, typename X5, typename X6> |
2039 struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5, X6)> { | 1958 struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5, X6)> { |
2040 typedef R(RunType)(BindStateBase*, | 1959 typedef R(RunType)(BindStateBase*, |
2041 typename CallbackParamTraits<X6>::ForwardType); | 1960 typename CallbackParamTraits<X6>::ForwardType); |
2042 | 1961 |
(...skipping 23 matching lines...) Expand all Loading... |
2066 typename Bound5UnwrapTraits::ForwardType x5 = | 1985 typename Bound5UnwrapTraits::ForwardType x5 = |
2067 Bound5UnwrapTraits::Unwrap(storage->p5_); | 1986 Bound5UnwrapTraits::Unwrap(storage->p5_); |
2068 return InvokeHelper<StorageType::IsWeakCall::value, R, | 1987 return InvokeHelper<StorageType::IsWeakCall::value, R, |
2069 typename StorageType::RunnableType, | 1988 typename StorageType::RunnableType, |
2070 void(typename Bound1UnwrapTraits::ForwardType, | 1989 void(typename Bound1UnwrapTraits::ForwardType, |
2071 typename Bound2UnwrapTraits::ForwardType, | 1990 typename Bound2UnwrapTraits::ForwardType, |
2072 typename Bound3UnwrapTraits::ForwardType, | 1991 typename Bound3UnwrapTraits::ForwardType, |
2073 typename Bound4UnwrapTraits::ForwardType, | 1992 typename Bound4UnwrapTraits::ForwardType, |
2074 typename Bound5UnwrapTraits::ForwardType, | 1993 typename Bound5UnwrapTraits::ForwardType, |
2075 typename CallbackParamTraits<X6>::ForwardType x6)> | 1994 typename CallbackParamTraits<X6>::ForwardType x6)> |
2076 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 1995 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6); |
2077 CallbackForward(x2), CallbackForward(x3), | |
2078 CallbackForward(x4), CallbackForward(x5), | |
2079 CallbackForward(x6)); | |
2080 } | 1996 } |
2081 }; | 1997 }; |
2082 | 1998 |
2083 // Arity 6 -> 0. | 1999 // Arity 6 -> 0. |
2084 template <typename StorageType, typename R,typename X1, typename X2, | 2000 template <typename StorageType, typename R,typename X1, typename X2, |
2085 typename X3, typename X4, typename X5, typename X6> | 2001 typename X3, typename X4, typename X5, typename X6> |
2086 struct Invoker<6, StorageType, R(X1, X2, X3, X4, X5, X6)> { | 2002 struct Invoker<6, StorageType, R(X1, X2, X3, X4, X5, X6)> { |
2087 typedef R(RunType)(BindStateBase*); | 2003 typedef R(RunType)(BindStateBase*); |
2088 | 2004 |
2089 typedef R(UnboundRunType)(); | 2005 typedef R(UnboundRunType)(); |
(...skipping 24 matching lines...) Expand all Loading... |
2114 typename Bound6UnwrapTraits::ForwardType x6 = | 2030 typename Bound6UnwrapTraits::ForwardType x6 = |
2115 Bound6UnwrapTraits::Unwrap(storage->p6_); | 2031 Bound6UnwrapTraits::Unwrap(storage->p6_); |
2116 return InvokeHelper<StorageType::IsWeakCall::value, R, | 2032 return InvokeHelper<StorageType::IsWeakCall::value, R, |
2117 typename StorageType::RunnableType, | 2033 typename StorageType::RunnableType, |
2118 void(typename Bound1UnwrapTraits::ForwardType, | 2034 void(typename Bound1UnwrapTraits::ForwardType, |
2119 typename Bound2UnwrapTraits::ForwardType, | 2035 typename Bound2UnwrapTraits::ForwardType, |
2120 typename Bound3UnwrapTraits::ForwardType, | 2036 typename Bound3UnwrapTraits::ForwardType, |
2121 typename Bound4UnwrapTraits::ForwardType, | 2037 typename Bound4UnwrapTraits::ForwardType, |
2122 typename Bound5UnwrapTraits::ForwardType, | 2038 typename Bound5UnwrapTraits::ForwardType, |
2123 typename Bound6UnwrapTraits::ForwardType)> | 2039 typename Bound6UnwrapTraits::ForwardType)> |
2124 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 2040 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6); |
2125 CallbackForward(x2), CallbackForward(x3), | |
2126 CallbackForward(x4), CallbackForward(x5), | |
2127 CallbackForward(x6)); | |
2128 } | 2041 } |
2129 }; | 2042 }; |
2130 | 2043 |
2131 // Arity 7 -> 7. | 2044 // Arity 7 -> 7. |
2132 template <typename StorageType, typename R,typename X1, typename X2, | 2045 template <typename StorageType, typename R,typename X1, typename X2, |
2133 typename X3, typename X4, typename X5, typename X6, typename X7> | 2046 typename X3, typename X4, typename X5, typename X6, typename X7> |
2134 struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { | 2047 struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { |
2135 typedef R(RunType)(BindStateBase*, | 2048 typedef R(RunType)(BindStateBase*, |
2136 typename CallbackParamTraits<X1>::ForwardType, | 2049 typename CallbackParamTraits<X1>::ForwardType, |
2137 typename CallbackParamTraits<X2>::ForwardType, | 2050 typename CallbackParamTraits<X2>::ForwardType, |
(...skipping 21 matching lines...) Expand all Loading... |
2159 | 2072 |
2160 return InvokeHelper<StorageType::IsWeakCall::value, R, | 2073 return InvokeHelper<StorageType::IsWeakCall::value, R, |
2161 typename StorageType::RunnableType, | 2074 typename StorageType::RunnableType, |
2162 void(typename CallbackParamTraits<X1>::ForwardType x1, | 2075 void(typename CallbackParamTraits<X1>::ForwardType x1, |
2163 typename CallbackParamTraits<X2>::ForwardType x2, | 2076 typename CallbackParamTraits<X2>::ForwardType x2, |
2164 typename CallbackParamTraits<X3>::ForwardType x3, | 2077 typename CallbackParamTraits<X3>::ForwardType x3, |
2165 typename CallbackParamTraits<X4>::ForwardType x4, | 2078 typename CallbackParamTraits<X4>::ForwardType x4, |
2166 typename CallbackParamTraits<X5>::ForwardType x5, | 2079 typename CallbackParamTraits<X5>::ForwardType x5, |
2167 typename CallbackParamTraits<X6>::ForwardType x6, | 2080 typename CallbackParamTraits<X6>::ForwardType x6, |
2168 typename CallbackParamTraits<X7>::ForwardType x7)> | 2081 typename CallbackParamTraits<X7>::ForwardType x7)> |
2169 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 2082 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6, x7); |
2170 CallbackForward(x2), CallbackForward(x3), | |
2171 CallbackForward(x4), CallbackForward(x5), | |
2172 CallbackForward(x6), CallbackForward(x7)); | |
2173 } | 2083 } |
2174 }; | 2084 }; |
2175 | 2085 |
2176 // Arity 7 -> 6. | 2086 // Arity 7 -> 6. |
2177 template <typename StorageType, typename R,typename X1, typename X2, | 2087 template <typename StorageType, typename R,typename X1, typename X2, |
2178 typename X3, typename X4, typename X5, typename X6, typename X7> | 2088 typename X3, typename X4, typename X5, typename X6, typename X7> |
2179 struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { | 2089 struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { |
2180 typedef R(RunType)(BindStateBase*, | 2090 typedef R(RunType)(BindStateBase*, |
2181 typename CallbackParamTraits<X2>::ForwardType, | 2091 typename CallbackParamTraits<X2>::ForwardType, |
2182 typename CallbackParamTraits<X3>::ForwardType, | 2092 typename CallbackParamTraits<X3>::ForwardType, |
(...skipping 22 matching lines...) Expand all Loading... |
2205 Bound1UnwrapTraits::Unwrap(storage->p1_); | 2115 Bound1UnwrapTraits::Unwrap(storage->p1_); |
2206 return InvokeHelper<StorageType::IsWeakCall::value, R, | 2116 return InvokeHelper<StorageType::IsWeakCall::value, R, |
2207 typename StorageType::RunnableType, | 2117 typename StorageType::RunnableType, |
2208 void(typename Bound1UnwrapTraits::ForwardType, | 2118 void(typename Bound1UnwrapTraits::ForwardType, |
2209 typename CallbackParamTraits<X2>::ForwardType x2, | 2119 typename CallbackParamTraits<X2>::ForwardType x2, |
2210 typename CallbackParamTraits<X3>::ForwardType x3, | 2120 typename CallbackParamTraits<X3>::ForwardType x3, |
2211 typename CallbackParamTraits<X4>::ForwardType x4, | 2121 typename CallbackParamTraits<X4>::ForwardType x4, |
2212 typename CallbackParamTraits<X5>::ForwardType x5, | 2122 typename CallbackParamTraits<X5>::ForwardType x5, |
2213 typename CallbackParamTraits<X6>::ForwardType x6, | 2123 typename CallbackParamTraits<X6>::ForwardType x6, |
2214 typename CallbackParamTraits<X7>::ForwardType x7)> | 2124 typename CallbackParamTraits<X7>::ForwardType x7)> |
2215 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 2125 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6, x7); |
2216 CallbackForward(x2), CallbackForward(x3), | |
2217 CallbackForward(x4), CallbackForward(x5), | |
2218 CallbackForward(x6), CallbackForward(x7)); | |
2219 } | 2126 } |
2220 }; | 2127 }; |
2221 | 2128 |
2222 // Arity 7 -> 5. | 2129 // Arity 7 -> 5. |
2223 template <typename StorageType, typename R,typename X1, typename X2, | 2130 template <typename StorageType, typename R,typename X1, typename X2, |
2224 typename X3, typename X4, typename X5, typename X6, typename X7> | 2131 typename X3, typename X4, typename X5, typename X6, typename X7> |
2225 struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { | 2132 struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { |
2226 typedef R(RunType)(BindStateBase*, | 2133 typedef R(RunType)(BindStateBase*, |
2227 typename CallbackParamTraits<X3>::ForwardType, | 2134 typename CallbackParamTraits<X3>::ForwardType, |
2228 typename CallbackParamTraits<X4>::ForwardType, | 2135 typename CallbackParamTraits<X4>::ForwardType, |
(...skipping 23 matching lines...) Expand all Loading... |
2252 Bound2UnwrapTraits::Unwrap(storage->p2_); | 2159 Bound2UnwrapTraits::Unwrap(storage->p2_); |
2253 return InvokeHelper<StorageType::IsWeakCall::value, R, | 2160 return InvokeHelper<StorageType::IsWeakCall::value, R, |
2254 typename StorageType::RunnableType, | 2161 typename StorageType::RunnableType, |
2255 void(typename Bound1UnwrapTraits::ForwardType, | 2162 void(typename Bound1UnwrapTraits::ForwardType, |
2256 typename Bound2UnwrapTraits::ForwardType, | 2163 typename Bound2UnwrapTraits::ForwardType, |
2257 typename CallbackParamTraits<X3>::ForwardType x3, | 2164 typename CallbackParamTraits<X3>::ForwardType x3, |
2258 typename CallbackParamTraits<X4>::ForwardType x4, | 2165 typename CallbackParamTraits<X4>::ForwardType x4, |
2259 typename CallbackParamTraits<X5>::ForwardType x5, | 2166 typename CallbackParamTraits<X5>::ForwardType x5, |
2260 typename CallbackParamTraits<X6>::ForwardType x6, | 2167 typename CallbackParamTraits<X6>::ForwardType x6, |
2261 typename CallbackParamTraits<X7>::ForwardType x7)> | 2168 typename CallbackParamTraits<X7>::ForwardType x7)> |
2262 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 2169 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6, x7); |
2263 CallbackForward(x2), CallbackForward(x3), | |
2264 CallbackForward(x4), CallbackForward(x5), | |
2265 CallbackForward(x6), CallbackForward(x7)); | |
2266 } | 2170 } |
2267 }; | 2171 }; |
2268 | 2172 |
2269 // Arity 7 -> 4. | 2173 // Arity 7 -> 4. |
2270 template <typename StorageType, typename R,typename X1, typename X2, | 2174 template <typename StorageType, typename R,typename X1, typename X2, |
2271 typename X3, typename X4, typename X5, typename X6, typename X7> | 2175 typename X3, typename X4, typename X5, typename X6, typename X7> |
2272 struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { | 2176 struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { |
2273 typedef R(RunType)(BindStateBase*, | 2177 typedef R(RunType)(BindStateBase*, |
2274 typename CallbackParamTraits<X4>::ForwardType, | 2178 typename CallbackParamTraits<X4>::ForwardType, |
2275 typename CallbackParamTraits<X5>::ForwardType, | 2179 typename CallbackParamTraits<X5>::ForwardType, |
(...skipping 24 matching lines...) Expand all Loading... |
2300 Bound3UnwrapTraits::Unwrap(storage->p3_); | 2204 Bound3UnwrapTraits::Unwrap(storage->p3_); |
2301 return InvokeHelper<StorageType::IsWeakCall::value, R, | 2205 return InvokeHelper<StorageType::IsWeakCall::value, R, |
2302 typename StorageType::RunnableType, | 2206 typename StorageType::RunnableType, |
2303 void(typename Bound1UnwrapTraits::ForwardType, | 2207 void(typename Bound1UnwrapTraits::ForwardType, |
2304 typename Bound2UnwrapTraits::ForwardType, | 2208 typename Bound2UnwrapTraits::ForwardType, |
2305 typename Bound3UnwrapTraits::ForwardType, | 2209 typename Bound3UnwrapTraits::ForwardType, |
2306 typename CallbackParamTraits<X4>::ForwardType x4, | 2210 typename CallbackParamTraits<X4>::ForwardType x4, |
2307 typename CallbackParamTraits<X5>::ForwardType x5, | 2211 typename CallbackParamTraits<X5>::ForwardType x5, |
2308 typename CallbackParamTraits<X6>::ForwardType x6, | 2212 typename CallbackParamTraits<X6>::ForwardType x6, |
2309 typename CallbackParamTraits<X7>::ForwardType x7)> | 2213 typename CallbackParamTraits<X7>::ForwardType x7)> |
2310 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 2214 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6, x7); |
2311 CallbackForward(x2), CallbackForward(x3), | |
2312 CallbackForward(x4), CallbackForward(x5), | |
2313 CallbackForward(x6), CallbackForward(x7)); | |
2314 } | 2215 } |
2315 }; | 2216 }; |
2316 | 2217 |
2317 // Arity 7 -> 3. | 2218 // Arity 7 -> 3. |
2318 template <typename StorageType, typename R,typename X1, typename X2, | 2219 template <typename StorageType, typename R,typename X1, typename X2, |
2319 typename X3, typename X4, typename X5, typename X6, typename X7> | 2220 typename X3, typename X4, typename X5, typename X6, typename X7> |
2320 struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { | 2221 struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { |
2321 typedef R(RunType)(BindStateBase*, | 2222 typedef R(RunType)(BindStateBase*, |
2322 typename CallbackParamTraits<X5>::ForwardType, | 2223 typename CallbackParamTraits<X5>::ForwardType, |
2323 typename CallbackParamTraits<X6>::ForwardType, | 2224 typename CallbackParamTraits<X6>::ForwardType, |
(...skipping 25 matching lines...) Expand all Loading... |
2349 Bound4UnwrapTraits::Unwrap(storage->p4_); | 2250 Bound4UnwrapTraits::Unwrap(storage->p4_); |
2350 return InvokeHelper<StorageType::IsWeakCall::value, R, | 2251 return InvokeHelper<StorageType::IsWeakCall::value, R, |
2351 typename StorageType::RunnableType, | 2252 typename StorageType::RunnableType, |
2352 void(typename Bound1UnwrapTraits::ForwardType, | 2253 void(typename Bound1UnwrapTraits::ForwardType, |
2353 typename Bound2UnwrapTraits::ForwardType, | 2254 typename Bound2UnwrapTraits::ForwardType, |
2354 typename Bound3UnwrapTraits::ForwardType, | 2255 typename Bound3UnwrapTraits::ForwardType, |
2355 typename Bound4UnwrapTraits::ForwardType, | 2256 typename Bound4UnwrapTraits::ForwardType, |
2356 typename CallbackParamTraits<X5>::ForwardType x5, | 2257 typename CallbackParamTraits<X5>::ForwardType x5, |
2357 typename CallbackParamTraits<X6>::ForwardType x6, | 2258 typename CallbackParamTraits<X6>::ForwardType x6, |
2358 typename CallbackParamTraits<X7>::ForwardType x7)> | 2259 typename CallbackParamTraits<X7>::ForwardType x7)> |
2359 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 2260 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6, x7); |
2360 CallbackForward(x2), CallbackForward(x3), | |
2361 CallbackForward(x4), CallbackForward(x5), | |
2362 CallbackForward(x6), CallbackForward(x7)); | |
2363 } | 2261 } |
2364 }; | 2262 }; |
2365 | 2263 |
2366 // Arity 7 -> 2. | 2264 // Arity 7 -> 2. |
2367 template <typename StorageType, typename R,typename X1, typename X2, | 2265 template <typename StorageType, typename R,typename X1, typename X2, |
2368 typename X3, typename X4, typename X5, typename X6, typename X7> | 2266 typename X3, typename X4, typename X5, typename X6, typename X7> |
2369 struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { | 2267 struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { |
2370 typedef R(RunType)(BindStateBase*, | 2268 typedef R(RunType)(BindStateBase*, |
2371 typename CallbackParamTraits<X6>::ForwardType, | 2269 typename CallbackParamTraits<X6>::ForwardType, |
2372 typename CallbackParamTraits<X7>::ForwardType); | 2270 typename CallbackParamTraits<X7>::ForwardType); |
(...skipping 26 matching lines...) Expand all Loading... |
2399 Bound5UnwrapTraits::Unwrap(storage->p5_); | 2297 Bound5UnwrapTraits::Unwrap(storage->p5_); |
2400 return InvokeHelper<StorageType::IsWeakCall::value, R, | 2298 return InvokeHelper<StorageType::IsWeakCall::value, R, |
2401 typename StorageType::RunnableType, | 2299 typename StorageType::RunnableType, |
2402 void(typename Bound1UnwrapTraits::ForwardType, | 2300 void(typename Bound1UnwrapTraits::ForwardType, |
2403 typename Bound2UnwrapTraits::ForwardType, | 2301 typename Bound2UnwrapTraits::ForwardType, |
2404 typename Bound3UnwrapTraits::ForwardType, | 2302 typename Bound3UnwrapTraits::ForwardType, |
2405 typename Bound4UnwrapTraits::ForwardType, | 2303 typename Bound4UnwrapTraits::ForwardType, |
2406 typename Bound5UnwrapTraits::ForwardType, | 2304 typename Bound5UnwrapTraits::ForwardType, |
2407 typename CallbackParamTraits<X6>::ForwardType x6, | 2305 typename CallbackParamTraits<X6>::ForwardType x6, |
2408 typename CallbackParamTraits<X7>::ForwardType x7)> | 2306 typename CallbackParamTraits<X7>::ForwardType x7)> |
2409 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 2307 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6, x7); |
2410 CallbackForward(x2), CallbackForward(x3), | |
2411 CallbackForward(x4), CallbackForward(x5), | |
2412 CallbackForward(x6), CallbackForward(x7)); | |
2413 } | 2308 } |
2414 }; | 2309 }; |
2415 | 2310 |
2416 // Arity 7 -> 1. | 2311 // Arity 7 -> 1. |
2417 template <typename StorageType, typename R,typename X1, typename X2, | 2312 template <typename StorageType, typename R,typename X1, typename X2, |
2418 typename X3, typename X4, typename X5, typename X6, typename X7> | 2313 typename X3, typename X4, typename X5, typename X6, typename X7> |
2419 struct Invoker<6, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { | 2314 struct Invoker<6, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { |
2420 typedef R(RunType)(BindStateBase*, | 2315 typedef R(RunType)(BindStateBase*, |
2421 typename CallbackParamTraits<X7>::ForwardType); | 2316 typename CallbackParamTraits<X7>::ForwardType); |
2422 | 2317 |
(...skipping 27 matching lines...) Expand all Loading... |
2450 Bound6UnwrapTraits::Unwrap(storage->p6_); | 2345 Bound6UnwrapTraits::Unwrap(storage->p6_); |
2451 return InvokeHelper<StorageType::IsWeakCall::value, R, | 2346 return InvokeHelper<StorageType::IsWeakCall::value, R, |
2452 typename StorageType::RunnableType, | 2347 typename StorageType::RunnableType, |
2453 void(typename Bound1UnwrapTraits::ForwardType, | 2348 void(typename Bound1UnwrapTraits::ForwardType, |
2454 typename Bound2UnwrapTraits::ForwardType, | 2349 typename Bound2UnwrapTraits::ForwardType, |
2455 typename Bound3UnwrapTraits::ForwardType, | 2350 typename Bound3UnwrapTraits::ForwardType, |
2456 typename Bound4UnwrapTraits::ForwardType, | 2351 typename Bound4UnwrapTraits::ForwardType, |
2457 typename Bound5UnwrapTraits::ForwardType, | 2352 typename Bound5UnwrapTraits::ForwardType, |
2458 typename Bound6UnwrapTraits::ForwardType, | 2353 typename Bound6UnwrapTraits::ForwardType, |
2459 typename CallbackParamTraits<X7>::ForwardType x7)> | 2354 typename CallbackParamTraits<X7>::ForwardType x7)> |
2460 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 2355 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6, x7); |
2461 CallbackForward(x2), CallbackForward(x3), | |
2462 CallbackForward(x4), CallbackForward(x5), | |
2463 CallbackForward(x6), CallbackForward(x7)); | |
2464 } | 2356 } |
2465 }; | 2357 }; |
2466 | 2358 |
2467 // Arity 7 -> 0. | 2359 // Arity 7 -> 0. |
2468 template <typename StorageType, typename R,typename X1, typename X2, | 2360 template <typename StorageType, typename R,typename X1, typename X2, |
2469 typename X3, typename X4, typename X5, typename X6, typename X7> | 2361 typename X3, typename X4, typename X5, typename X6, typename X7> |
2470 struct Invoker<7, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { | 2362 struct Invoker<7, StorageType, R(X1, X2, X3, X4, X5, X6, X7)> { |
2471 typedef R(RunType)(BindStateBase*); | 2363 typedef R(RunType)(BindStateBase*); |
2472 | 2364 |
2473 typedef R(UnboundRunType)(); | 2365 typedef R(UnboundRunType)(); |
(...skipping 28 matching lines...) Expand all Loading... |
2502 Bound7UnwrapTraits::Unwrap(storage->p7_); | 2394 Bound7UnwrapTraits::Unwrap(storage->p7_); |
2503 return InvokeHelper<StorageType::IsWeakCall::value, R, | 2395 return InvokeHelper<StorageType::IsWeakCall::value, R, |
2504 typename StorageType::RunnableType, | 2396 typename StorageType::RunnableType, |
2505 void(typename Bound1UnwrapTraits::ForwardType, | 2397 void(typename Bound1UnwrapTraits::ForwardType, |
2506 typename Bound2UnwrapTraits::ForwardType, | 2398 typename Bound2UnwrapTraits::ForwardType, |
2507 typename Bound3UnwrapTraits::ForwardType, | 2399 typename Bound3UnwrapTraits::ForwardType, |
2508 typename Bound4UnwrapTraits::ForwardType, | 2400 typename Bound4UnwrapTraits::ForwardType, |
2509 typename Bound5UnwrapTraits::ForwardType, | 2401 typename Bound5UnwrapTraits::ForwardType, |
2510 typename Bound6UnwrapTraits::ForwardType, | 2402 typename Bound6UnwrapTraits::ForwardType, |
2511 typename Bound7UnwrapTraits::ForwardType)> | 2403 typename Bound7UnwrapTraits::ForwardType)> |
2512 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 2404 ::MakeItSo(storage->runnable_, x1, x2, x3, x4, x5, x6, x7); |
2513 CallbackForward(x2), CallbackForward(x3), | |
2514 CallbackForward(x4), CallbackForward(x5), | |
2515 CallbackForward(x6), CallbackForward(x7)); | |
2516 } | 2405 } |
2517 }; | 2406 }; |
2518 | 2407 |
2519 | 2408 |
2520 // BindState<> | 2409 // BindState<> |
2521 // | 2410 // |
2522 // This stores all the state passed into Bind() and is also where most | 2411 // This stores all the state passed into Bind() and is also where most |
2523 // of the template resolution magic occurs. | 2412 // of the template resolution magic occurs. |
2524 // | 2413 // |
2525 // Runnable is the functor we are binding arguments to. | 2414 // Runnable is the functor we are binding arguments to. |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2781 P4 p4_; | 2670 P4 p4_; |
2782 P5 p5_; | 2671 P5 p5_; |
2783 P6 p6_; | 2672 P6 p6_; |
2784 P7 p7_; | 2673 P7 p7_; |
2785 }; | 2674 }; |
2786 | 2675 |
2787 } // namespace internal | 2676 } // namespace internal |
2788 } // namespace base | 2677 } // namespace base |
2789 | 2678 |
2790 #endif // BASE_BIND_INTERNAL_H_ | 2679 #endif // BASE_BIND_INTERNAL_H_ |
OLD | NEW |