OLD | NEW |
1 // This file was GENERATED by command: | 1 // This file was GENERATED by command: |
2 // pump.py callback.h.pump | 2 // pump.py callback.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_CALLBACK_H_ | 10 #ifndef BASE_CALLBACK_H_ |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 } | 305 } |
306 | 306 |
307 bool Equals(const Callback& other) const { | 307 bool Equals(const Callback& other) const { |
308 return CallbackBase::Equals(other); | 308 return CallbackBase::Equals(other); |
309 } | 309 } |
310 | 310 |
311 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1) const { | 311 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1) const { |
312 PolymorphicInvoke f = | 312 PolymorphicInvoke f = |
313 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 313 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
314 | 314 |
315 return f(bind_state_.get(), a1); | 315 return f(bind_state_.get(), internal::CallbackForward(a1)); |
316 } | 316 } |
317 | 317 |
318 private: | 318 private: |
319 typedef R(*PolymorphicInvoke)( | 319 typedef R(*PolymorphicInvoke)( |
320 internal::BindStateBase*, | 320 internal::BindStateBase*, |
321 typename internal::CallbackParamTraits<A1>::ForwardType); | 321 typename internal::CallbackParamTraits<A1>::ForwardType); |
322 | 322 |
323 }; | 323 }; |
324 | 324 |
325 template <typename R, typename A1, typename A2> | 325 template <typename R, typename A1, typename A2> |
(...skipping 20 matching lines...) Expand all Loading... |
346 | 346 |
347 bool Equals(const Callback& other) const { | 347 bool Equals(const Callback& other) const { |
348 return CallbackBase::Equals(other); | 348 return CallbackBase::Equals(other); |
349 } | 349 } |
350 | 350 |
351 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 351 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
352 typename internal::CallbackParamTraits<A2>::ForwardType a2) const { | 352 typename internal::CallbackParamTraits<A2>::ForwardType a2) const { |
353 PolymorphicInvoke f = | 353 PolymorphicInvoke f = |
354 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 354 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
355 | 355 |
356 return f(bind_state_.get(), a1, | 356 return f(bind_state_.get(), internal::CallbackForward(a1), |
357 a2); | 357 internal::CallbackForward(a2)); |
358 } | 358 } |
359 | 359 |
360 private: | 360 private: |
361 typedef R(*PolymorphicInvoke)( | 361 typedef R(*PolymorphicInvoke)( |
362 internal::BindStateBase*, | 362 internal::BindStateBase*, |
363 typename internal::CallbackParamTraits<A1>::ForwardType, | 363 typename internal::CallbackParamTraits<A1>::ForwardType, |
364 typename internal::CallbackParamTraits<A2>::ForwardType); | 364 typename internal::CallbackParamTraits<A2>::ForwardType); |
365 | 365 |
366 }; | 366 }; |
367 | 367 |
(...skipping 22 matching lines...) Expand all Loading... |
390 bool Equals(const Callback& other) const { | 390 bool Equals(const Callback& other) const { |
391 return CallbackBase::Equals(other); | 391 return CallbackBase::Equals(other); |
392 } | 392 } |
393 | 393 |
394 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 394 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
395 typename internal::CallbackParamTraits<A2>::ForwardType a2, | 395 typename internal::CallbackParamTraits<A2>::ForwardType a2, |
396 typename internal::CallbackParamTraits<A3>::ForwardType a3) const { | 396 typename internal::CallbackParamTraits<A3>::ForwardType a3) const { |
397 PolymorphicInvoke f = | 397 PolymorphicInvoke f = |
398 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 398 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
399 | 399 |
400 return f(bind_state_.get(), a1, | 400 return f(bind_state_.get(), internal::CallbackForward(a1), |
401 a2, | 401 internal::CallbackForward(a2), |
402 a3); | 402 internal::CallbackForward(a3)); |
403 } | 403 } |
404 | 404 |
405 private: | 405 private: |
406 typedef R(*PolymorphicInvoke)( | 406 typedef R(*PolymorphicInvoke)( |
407 internal::BindStateBase*, | 407 internal::BindStateBase*, |
408 typename internal::CallbackParamTraits<A1>::ForwardType, | 408 typename internal::CallbackParamTraits<A1>::ForwardType, |
409 typename internal::CallbackParamTraits<A2>::ForwardType, | 409 typename internal::CallbackParamTraits<A2>::ForwardType, |
410 typename internal::CallbackParamTraits<A3>::ForwardType); | 410 typename internal::CallbackParamTraits<A3>::ForwardType); |
411 | 411 |
412 }; | 412 }; |
(...skipping 24 matching lines...) Expand all Loading... |
437 return CallbackBase::Equals(other); | 437 return CallbackBase::Equals(other); |
438 } | 438 } |
439 | 439 |
440 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 440 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
441 typename internal::CallbackParamTraits<A2>::ForwardType a2, | 441 typename internal::CallbackParamTraits<A2>::ForwardType a2, |
442 typename internal::CallbackParamTraits<A3>::ForwardType a3, | 442 typename internal::CallbackParamTraits<A3>::ForwardType a3, |
443 typename internal::CallbackParamTraits<A4>::ForwardType a4) const { | 443 typename internal::CallbackParamTraits<A4>::ForwardType a4) const { |
444 PolymorphicInvoke f = | 444 PolymorphicInvoke f = |
445 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 445 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
446 | 446 |
447 return f(bind_state_.get(), a1, | 447 return f(bind_state_.get(), internal::CallbackForward(a1), |
448 a2, | 448 internal::CallbackForward(a2), |
449 a3, | 449 internal::CallbackForward(a3), |
450 a4); | 450 internal::CallbackForward(a4)); |
451 } | 451 } |
452 | 452 |
453 private: | 453 private: |
454 typedef R(*PolymorphicInvoke)( | 454 typedef R(*PolymorphicInvoke)( |
455 internal::BindStateBase*, | 455 internal::BindStateBase*, |
456 typename internal::CallbackParamTraits<A1>::ForwardType, | 456 typename internal::CallbackParamTraits<A1>::ForwardType, |
457 typename internal::CallbackParamTraits<A2>::ForwardType, | 457 typename internal::CallbackParamTraits<A2>::ForwardType, |
458 typename internal::CallbackParamTraits<A3>::ForwardType, | 458 typename internal::CallbackParamTraits<A3>::ForwardType, |
459 typename internal::CallbackParamTraits<A4>::ForwardType); | 459 typename internal::CallbackParamTraits<A4>::ForwardType); |
460 | 460 |
(...skipping 27 matching lines...) Expand all Loading... |
488 } | 488 } |
489 | 489 |
490 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 490 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
491 typename internal::CallbackParamTraits<A2>::ForwardType a2, | 491 typename internal::CallbackParamTraits<A2>::ForwardType a2, |
492 typename internal::CallbackParamTraits<A3>::ForwardType a3, | 492 typename internal::CallbackParamTraits<A3>::ForwardType a3, |
493 typename internal::CallbackParamTraits<A4>::ForwardType a4, | 493 typename internal::CallbackParamTraits<A4>::ForwardType a4, |
494 typename internal::CallbackParamTraits<A5>::ForwardType a5) const { | 494 typename internal::CallbackParamTraits<A5>::ForwardType a5) const { |
495 PolymorphicInvoke f = | 495 PolymorphicInvoke f = |
496 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 496 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
497 | 497 |
498 return f(bind_state_.get(), a1, | 498 return f(bind_state_.get(), internal::CallbackForward(a1), |
499 a2, | 499 internal::CallbackForward(a2), |
500 a3, | 500 internal::CallbackForward(a3), |
501 a4, | 501 internal::CallbackForward(a4), |
502 a5); | 502 internal::CallbackForward(a5)); |
503 } | 503 } |
504 | 504 |
505 private: | 505 private: |
506 typedef R(*PolymorphicInvoke)( | 506 typedef R(*PolymorphicInvoke)( |
507 internal::BindStateBase*, | 507 internal::BindStateBase*, |
508 typename internal::CallbackParamTraits<A1>::ForwardType, | 508 typename internal::CallbackParamTraits<A1>::ForwardType, |
509 typename internal::CallbackParamTraits<A2>::ForwardType, | 509 typename internal::CallbackParamTraits<A2>::ForwardType, |
510 typename internal::CallbackParamTraits<A3>::ForwardType, | 510 typename internal::CallbackParamTraits<A3>::ForwardType, |
511 typename internal::CallbackParamTraits<A4>::ForwardType, | 511 typename internal::CallbackParamTraits<A4>::ForwardType, |
512 typename internal::CallbackParamTraits<A5>::ForwardType); | 512 typename internal::CallbackParamTraits<A5>::ForwardType); |
(...skipping 29 matching lines...) Expand all Loading... |
542 | 542 |
543 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 543 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
544 typename internal::CallbackParamTraits<A2>::ForwardType a2, | 544 typename internal::CallbackParamTraits<A2>::ForwardType a2, |
545 typename internal::CallbackParamTraits<A3>::ForwardType a3, | 545 typename internal::CallbackParamTraits<A3>::ForwardType a3, |
546 typename internal::CallbackParamTraits<A4>::ForwardType a4, | 546 typename internal::CallbackParamTraits<A4>::ForwardType a4, |
547 typename internal::CallbackParamTraits<A5>::ForwardType a5, | 547 typename internal::CallbackParamTraits<A5>::ForwardType a5, |
548 typename internal::CallbackParamTraits<A6>::ForwardType a6) const { | 548 typename internal::CallbackParamTraits<A6>::ForwardType a6) const { |
549 PolymorphicInvoke f = | 549 PolymorphicInvoke f = |
550 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 550 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
551 | 551 |
552 return f(bind_state_.get(), a1, | 552 return f(bind_state_.get(), internal::CallbackForward(a1), |
553 a2, | 553 internal::CallbackForward(a2), |
554 a3, | 554 internal::CallbackForward(a3), |
555 a4, | 555 internal::CallbackForward(a4), |
556 a5, | 556 internal::CallbackForward(a5), |
557 a6); | 557 internal::CallbackForward(a6)); |
558 } | 558 } |
559 | 559 |
560 private: | 560 private: |
561 typedef R(*PolymorphicInvoke)( | 561 typedef R(*PolymorphicInvoke)( |
562 internal::BindStateBase*, | 562 internal::BindStateBase*, |
563 typename internal::CallbackParamTraits<A1>::ForwardType, | 563 typename internal::CallbackParamTraits<A1>::ForwardType, |
564 typename internal::CallbackParamTraits<A2>::ForwardType, | 564 typename internal::CallbackParamTraits<A2>::ForwardType, |
565 typename internal::CallbackParamTraits<A3>::ForwardType, | 565 typename internal::CallbackParamTraits<A3>::ForwardType, |
566 typename internal::CallbackParamTraits<A4>::ForwardType, | 566 typename internal::CallbackParamTraits<A4>::ForwardType, |
567 typename internal::CallbackParamTraits<A5>::ForwardType, | 567 typename internal::CallbackParamTraits<A5>::ForwardType, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 599 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
600 typename internal::CallbackParamTraits<A2>::ForwardType a2, | 600 typename internal::CallbackParamTraits<A2>::ForwardType a2, |
601 typename internal::CallbackParamTraits<A3>::ForwardType a3, | 601 typename internal::CallbackParamTraits<A3>::ForwardType a3, |
602 typename internal::CallbackParamTraits<A4>::ForwardType a4, | 602 typename internal::CallbackParamTraits<A4>::ForwardType a4, |
603 typename internal::CallbackParamTraits<A5>::ForwardType a5, | 603 typename internal::CallbackParamTraits<A5>::ForwardType a5, |
604 typename internal::CallbackParamTraits<A6>::ForwardType a6, | 604 typename internal::CallbackParamTraits<A6>::ForwardType a6, |
605 typename internal::CallbackParamTraits<A7>::ForwardType a7) const { | 605 typename internal::CallbackParamTraits<A7>::ForwardType a7) const { |
606 PolymorphicInvoke f = | 606 PolymorphicInvoke f = |
607 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 607 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
608 | 608 |
609 return f(bind_state_.get(), a1, | 609 return f(bind_state_.get(), internal::CallbackForward(a1), |
610 a2, | 610 internal::CallbackForward(a2), |
611 a3, | 611 internal::CallbackForward(a3), |
612 a4, | 612 internal::CallbackForward(a4), |
613 a5, | 613 internal::CallbackForward(a5), |
614 a6, | 614 internal::CallbackForward(a6), |
615 a7); | 615 internal::CallbackForward(a7)); |
616 } | 616 } |
617 | 617 |
618 private: | 618 private: |
619 typedef R(*PolymorphicInvoke)( | 619 typedef R(*PolymorphicInvoke)( |
620 internal::BindStateBase*, | 620 internal::BindStateBase*, |
621 typename internal::CallbackParamTraits<A1>::ForwardType, | 621 typename internal::CallbackParamTraits<A1>::ForwardType, |
622 typename internal::CallbackParamTraits<A2>::ForwardType, | 622 typename internal::CallbackParamTraits<A2>::ForwardType, |
623 typename internal::CallbackParamTraits<A3>::ForwardType, | 623 typename internal::CallbackParamTraits<A3>::ForwardType, |
624 typename internal::CallbackParamTraits<A4>::ForwardType, | 624 typename internal::CallbackParamTraits<A4>::ForwardType, |
625 typename internal::CallbackParamTraits<A5>::ForwardType, | 625 typename internal::CallbackParamTraits<A5>::ForwardType, |
626 typename internal::CallbackParamTraits<A6>::ForwardType, | 626 typename internal::CallbackParamTraits<A6>::ForwardType, |
627 typename internal::CallbackParamTraits<A7>::ForwardType); | 627 typename internal::CallbackParamTraits<A7>::ForwardType); |
628 | 628 |
629 }; | 629 }; |
630 | 630 |
631 | 631 |
632 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it | 632 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it |
633 // will be used in a lot of APIs with delayed execution. | 633 // will be used in a lot of APIs with delayed execution. |
634 typedef Callback<void(void)> Closure; | 634 typedef Callback<void(void)> Closure; |
635 | 635 |
636 } // namespace base | 636 } // namespace base |
637 | 637 |
638 #endif // BASE_CALLBACK_H | 638 #endif // BASE_CALLBACK_H |
OLD | NEW |