| OLD | NEW |
| 1 // This file was GENERATED by command: | 1 // This file was GENERATED by command: |
| 2 // pump.py bind.h.pump | 2 // pump.py bind.h.pump |
| 3 // DO NOT EDIT BY HAND!!! | 3 // DO NOT EDIT BY HAND!!! |
| 4 | 4 |
| 5 /* | 5 /* |
| 6 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 6 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
| 7 * | 7 * |
| 8 * Use of this source code is governed by a BSD-style license | 8 * Use of this source code is governed by a BSD-style license |
| 9 * that can be found in the LICENSE file in the root of the source | 9 * that can be found in the LICENSE file in the root of the source |
| 10 * tree. An additional intellectual property rights grant can be found | 10 * tree. An additional intellectual property rights grant can be found |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 typename detail::identity<P1>::type p1, | 572 typename detail::identity<P1>::type p1, |
| 573 typename detail::identity<P2>::type p2, | 573 typename detail::identity<P2>::type p2, |
| 574 typename detail::identity<P3>::type p3, | 574 typename detail::identity<P3>::type p3, |
| 575 typename detail::identity<P4>::type p4, | 575 typename detail::identity<P4>::type p4, |
| 576 typename detail::identity<P5>::type p5) { | 576 typename detail::identity<P5>::type p5) { |
| 577 return Functor5<FP_T(NONAME), R, P1, P2, P3, P4, P5>( | 577 return Functor5<FP_T(NONAME), R, P1, P2, P3, P4, P5>( |
| 578 function, p1, p2, p3, p4, p5); | 578 function, p1, p2, p3, p4, p5); |
| 579 } | 579 } |
| 580 | 580 |
| 581 #undef FP_T | 581 #undef FP_T |
| 582 template <class ObjectT, | 582 |
| 583 class MethodT, | 583 template <class ObjectT, class MethodT, class R, |
| 584 class R, | |
| 585 class P1, | 584 class P1, |
| 586 class P2, | 585 class P2, |
| 587 class P3, | 586 class P3, |
| 588 class P4, | 587 class P4, |
| 589 class P5, | 588 class P5, |
| 590 class P6> | 589 class P6> |
| 591 class MethodFunctor6 { | 590 class MethodFunctor6 { |
| 592 public: | 591 public: |
| 593 MethodFunctor6(MethodT method, | 592 MethodFunctor6(MethodT method, ObjectT* object, |
| 594 ObjectT* object, | |
| 595 P1 p1, | 593 P1 p1, |
| 596 P2 p2, | 594 P2 p2, |
| 597 P3 p3, | 595 P3 p3, |
| 598 P4 p4, | 596 P4 p4, |
| 599 P5 p5, | 597 P5 p5, |
| 600 P6 p6) | 598 P6 p6) |
| 601 : method_(method), | 599 : method_(method), object_(object), |
| 602 object_(object), | 600 p1_(p1), |
| 603 p1_(p1), | 601 p2_(p2), |
| 604 p2_(p2), | 602 p3_(p3), |
| 605 p3_(p3), | 603 p4_(p4), |
| 606 p4_(p4), | 604 p5_(p5), |
| 607 p5_(p5), | 605 p6_(p6) {} |
| 608 p6_(p6) {} | |
| 609 R operator()() const { | 606 R operator()() const { |
| 610 return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_); | 607 return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_); } |
| 611 } | |
| 612 | |
| 613 private: | 608 private: |
| 614 MethodT method_; | 609 MethodT method_; |
| 615 ObjectT* object_; | 610 ObjectT* object_; |
| 616 P1 p1_; | 611 P1 p1_; |
| 617 P2 p2_; | 612 P2 p2_; |
| 618 P3 p3_; | 613 P3 p3_; |
| 619 P4 p4_; | 614 P4 p4_; |
| 620 P5 p5_; | 615 P5 p5_; |
| 621 P6 p6_; | 616 P6 p6_; |
| 622 }; | 617 }; |
| 623 | 618 |
| 624 template <class FunctorT, | 619 template <class FunctorT, class R, |
| 625 class R, | |
| 626 class P1, | 620 class P1, |
| 627 class P2, | 621 class P2, |
| 628 class P3, | 622 class P3, |
| 629 class P4, | 623 class P4, |
| 630 class P5, | 624 class P5, |
| 631 class P6> | 625 class P6> |
| 632 class Functor6 { | 626 class Functor6 { |
| 633 public: | 627 public: |
| 634 Functor6(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) | 628 Functor6(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) |
| 635 : functor_(functor), | 629 : functor_(functor), |
| 636 p1_(p1), | 630 p1_(p1), |
| 637 p2_(p2), | 631 p2_(p2), |
| 638 p3_(p3), | 632 p3_(p3), |
| 639 p4_(p4), | 633 p4_(p4), |
| 640 p5_(p5), | 634 p5_(p5), |
| 641 p6_(p6) {} | 635 p6_(p6) {} |
| 642 R operator()() const { return functor_(p1_, p2_, p3_, p4_, p5_, p6_); } | 636 R operator()() const { |
| 643 | 637 return functor_(p1_, p2_, p3_, p4_, p5_, p6_); } |
| 644 private: | 638 private: |
| 645 FunctorT functor_; | 639 FunctorT functor_; |
| 646 P1 p1_; | 640 P1 p1_; |
| 647 P2 p2_; | 641 P2 p2_; |
| 648 P3 p3_; | 642 P3 p3_; |
| 649 P4 p4_; | 643 P4 p4_; |
| 650 P5 p5_; | 644 P5 p5_; |
| 651 P6 p6_; | 645 P6 p6_; |
| 652 }; | 646 }; |
| 653 | 647 |
| 648 |
| 654 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6) | 649 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6) |
| 655 | 650 |
| 656 template <class ObjectT, | 651 template <class ObjectT, class R, |
| 657 class R, | |
| 658 class P1, | 652 class P1, |
| 659 class P2, | 653 class P2, |
| 660 class P3, | 654 class P3, |
| 661 class P4, | 655 class P4, |
| 662 class P5, | 656 class P5, |
| 663 class P6> | 657 class P6> |
| 664 MethodFunctor6<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6> Bind( | 658 MethodFunctor6<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6> |
| 665 FP_T(method), | 659 Bind(FP_T(method), ObjectT* object, |
| 666 ObjectT* object, | 660 typename detail::identity<P1>::type p1, |
| 667 typename detail::identity<P1>::type p1, | 661 typename detail::identity<P2>::type p2, |
| 668 typename detail::identity<P2>::type p2, | 662 typename detail::identity<P3>::type p3, |
| 669 typename detail::identity<P3>::type p3, | 663 typename detail::identity<P4>::type p4, |
| 670 typename detail::identity<P4>::type p4, | 664 typename detail::identity<P5>::type p5, |
| 671 typename detail::identity<P5>::type p5, | 665 typename detail::identity<P6>::type p6) { |
| 672 typename detail::identity<P6>::type p6) { | |
| 673 return MethodFunctor6<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6>( | 666 return MethodFunctor6<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6>( |
| 674 method, object, p1, p2, p3, p4, p5, p6); | 667 method, object, p1, p2, p3, p4, p5, p6); |
| 675 } | 668 } |
| 676 | 669 |
| 677 #undef FP_T | 670 #undef FP_T |
| 678 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6) const | 671 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6) const |
| 679 | 672 |
| 680 template <class ObjectT, | 673 template <class ObjectT, class R, |
| 681 class R, | |
| 682 class P1, | 674 class P1, |
| 683 class P2, | 675 class P2, |
| 684 class P3, | 676 class P3, |
| 685 class P4, | 677 class P4, |
| 686 class P5, | 678 class P5, |
| 687 class P6> | 679 class P6> |
| 688 MethodFunctor6<const ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6> Bind( | 680 MethodFunctor6<const ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6> |
| 689 FP_T(method), | 681 Bind(FP_T(method), const ObjectT* object, |
| 690 const ObjectT* object, | 682 typename detail::identity<P1>::type p1, |
| 691 typename detail::identity<P1>::type p1, | 683 typename detail::identity<P2>::type p2, |
| 692 typename detail::identity<P2>::type p2, | 684 typename detail::identity<P3>::type p3, |
| 693 typename detail::identity<P3>::type p3, | 685 typename detail::identity<P4>::type p4, |
| 694 typename detail::identity<P4>::type p4, | 686 typename detail::identity<P5>::type p5, |
| 695 typename detail::identity<P5>::type p5, | 687 typename detail::identity<P6>::type p6) { |
| 696 typename detail::identity<P6>::type p6) { | |
| 697 return MethodFunctor6<const ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6>( | 688 return MethodFunctor6<const ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6>( |
| 698 method, object, p1, p2, p3, p4, p5, p6); | 689 method, object, p1, p2, p3, p4, p5, p6); |
| 699 } | 690 } |
| 700 | 691 |
| 701 #undef FP_T | 692 #undef FP_T |
| 702 #define FP_T(x) R (*x)(P1, P2, P3, P4, P5, P6) | 693 #define FP_T(x) R (*x)(P1, P2, P3, P4, P5, P6) |
| 703 | 694 |
| 704 template <class R, class P1, class P2, class P3, class P4, class P5, class P6> | 695 template <class R, |
| 705 Functor6<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6> Bind( | 696 class P1, |
| 706 FP_T(function), | 697 class P2, |
| 707 typename detail::identity<P1>::type p1, | 698 class P3, |
| 708 typename detail::identity<P2>::type p2, | 699 class P4, |
| 709 typename detail::identity<P3>::type p3, | 700 class P5, |
| 710 typename detail::identity<P4>::type p4, | 701 class P6> |
| 711 typename detail::identity<P5>::type p5, | 702 Functor6<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6> |
| 712 typename detail::identity<P5>::type p6) { | 703 Bind(FP_T(function), |
| 713 return Functor6<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6>(function, p1, p2, p3, | 704 typename detail::identity<P1>::type p1, |
| 714 p4, p5, p6); | 705 typename detail::identity<P2>::type p2, |
| 706 typename detail::identity<P3>::type p3, |
| 707 typename detail::identity<P4>::type p4, |
| 708 typename detail::identity<P5>::type p5, |
| 709 typename detail::identity<P6>::type p6) { |
| 710 return Functor6<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6>( |
| 711 function, p1, p2, p3, p4, p5, p6); |
| 715 } | 712 } |
| 716 | 713 |
| 717 #undef FP_T | 714 #undef FP_T |
| 718 | 715 |
| 719 } // namespace rtc | 716 } // namespace rtc |
| 720 | 717 |
| 721 #undef NONAME | 718 #undef NONAME |
| 722 | 719 |
| 723 #endif // WEBRTC_BASE_BIND_H_ | 720 #endif // WEBRTC_BASE_BIND_H_ |
| OLD | NEW |