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 | 582 |
hbos
2015/06/12 09:34:48
mrooe
| |
583 template <class ObjectT, class MethodT, class R, | |
584 class P1, | |
585 class P2, | |
586 class P3, | |
587 class P4, | |
588 class P5, | |
589 class P6> | |
590 class MethodFunctor6 { | |
591 public: | |
592 MethodFunctor6(MethodT method, ObjectT* object, | |
593 P1 p1, | |
594 P2 p2, | |
595 P3 p3, | |
596 P4 p4, | |
597 P5 p5, | |
598 P6 p6) | |
599 : method_(method), object_(object), | |
600 p1_(p1), | |
601 p2_(p2), | |
602 p3_(p3), | |
603 p4_(p4), | |
604 p5_(p5), | |
605 p6_(p6) {} | |
606 R operator()() const { | |
607 return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_); } | |
608 private: | |
609 MethodT method_; | |
610 ObjectT* object_; | |
611 P1 p1_; | |
612 P2 p2_; | |
613 P3 p3_; | |
614 P4 p4_; | |
615 P5 p5_; | |
616 P6 p6_; | |
617 }; | |
618 | |
619 template <class FunctorT, class R, | |
620 class P1, | |
621 class P2, | |
622 class P3, | |
623 class P4, | |
624 class P5, | |
625 class P6> | |
626 class Functor6 { | |
627 public: | |
628 Functor6(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) | |
629 : functor_(functor), | |
630 p1_(p1), | |
631 p2_(p2), | |
632 p3_(p3), | |
633 p4_(p4), | |
634 p5_(p5), | |
635 p6_(p6) {} | |
636 R operator()() const { | |
637 return functor_(p1_, p2_, p3_, p4_, p5_, p6_); } | |
638 private: | |
639 FunctorT functor_; | |
640 P1 p1_; | |
641 P2 p2_; | |
642 P3 p3_; | |
643 P4 p4_; | |
644 P5 p5_; | |
645 P6 p6_; | |
646 }; | |
647 | |
648 | |
649 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6) | |
650 | |
651 template <class ObjectT, class R, | |
652 class P1, | |
653 class P2, | |
654 class P3, | |
655 class P4, | |
656 class P5, | |
657 class P6> | |
658 MethodFunctor6<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6> | |
659 Bind(FP_T(method), ObjectT* object, | |
660 typename detail::identity<P1>::type p1, | |
661 typename detail::identity<P2>::type p2, | |
662 typename detail::identity<P3>::type p3, | |
663 typename detail::identity<P4>::type p4, | |
664 typename detail::identity<P5>::type p5, | |
665 typename detail::identity<P6>::type p6) { | |
666 return MethodFunctor6<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6>( | |
667 method, object, p1, p2, p3, p4, p5, p6); | |
668 } | |
669 | |
670 #undef FP_T | |
671 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6) const | |
672 | |
673 template <class ObjectT, class R, | |
674 class P1, | |
675 class P2, | |
676 class P3, | |
677 class P4, | |
678 class P5, | |
679 class P6> | |
680 MethodFunctor6<const ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6> | |
681 Bind(FP_T(method), const ObjectT* object, | |
682 typename detail::identity<P1>::type p1, | |
683 typename detail::identity<P2>::type p2, | |
684 typename detail::identity<P3>::type p3, | |
685 typename detail::identity<P4>::type p4, | |
686 typename detail::identity<P5>::type p5, | |
687 typename detail::identity<P6>::type p6) { | |
688 return MethodFunctor6<const ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6>( | |
689 method, object, p1, p2, p3, p4, p5, p6); | |
690 } | |
691 | |
692 #undef FP_T | |
693 #define FP_T(x) R (*x)(P1, P2, P3, P4, P5, P6) | |
694 | |
695 template <class R, | |
696 class P1, | |
697 class P2, | |
698 class P3, | |
699 class P4, | |
700 class P5, | |
701 class P6> | |
702 Functor6<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6> | |
703 Bind(FP_T(function), | |
704 typename detail::identity<P1>::type p1, | |
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); | |
712 } | |
713 | |
714 #undef FP_T | |
715 | |
583 } // namespace rtc | 716 } // namespace rtc |
584 | 717 |
585 #undef NONAME | 718 #undef NONAME |
586 | 719 |
587 #endif // WEBRTC_BASE_BIND_H_ | 720 #endif // WEBRTC_BASE_BIND_H_ |
OLD | NEW |