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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 typename CallbackParamTraits<A7>::ForwardType a7) { | 637 typename CallbackParamTraits<A7>::ForwardType a7) { |
638 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), | 638 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), |
639 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), | 639 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), |
640 CallbackForward(a6), CallbackForward(a7)); | 640 CallbackForward(a6), CallbackForward(a7)); |
641 } | 641 } |
642 | 642 |
643 private: | 643 private: |
644 R (T::*method_)(A1, A2, A3, A4, A5, A6, A7) const; | 644 R (T::*method_)(A1, A2, A3, A4, A5, A6, A7) const; |
645 }; | 645 }; |
646 | 646 |
| 647 // Function: Arity 8. |
| 648 template <typename R, typename A1, typename A2, typename A3, typename A4, |
| 649 typename A5, typename A6, typename A7, typename A8> |
| 650 class RunnableAdapter<R(*)(A1, A2, A3, A4, A5, A6, A7, A8)> { |
| 651 public: |
| 652 typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7, A8); |
| 653 |
| 654 explicit RunnableAdapter(R(*function)(A1, A2, A3, A4, A5, A6, A7, A8)) |
| 655 : function_(function) { |
| 656 } |
| 657 |
| 658 R Run(typename CallbackParamTraits<A1>::ForwardType a1, |
| 659 typename CallbackParamTraits<A2>::ForwardType a2, |
| 660 typename CallbackParamTraits<A3>::ForwardType a3, |
| 661 typename CallbackParamTraits<A4>::ForwardType a4, |
| 662 typename CallbackParamTraits<A5>::ForwardType a5, |
| 663 typename CallbackParamTraits<A6>::ForwardType a6, |
| 664 typename CallbackParamTraits<A7>::ForwardType a7, |
| 665 typename CallbackParamTraits<A8>::ForwardType a8) { |
| 666 return function_(CallbackForward(a1), CallbackForward(a2), |
| 667 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), |
| 668 CallbackForward(a6), CallbackForward(a7), CallbackForward(a8)); |
| 669 } |
| 670 |
| 671 private: |
| 672 R (*function_)(A1, A2, A3, A4, A5, A6, A7, A8); |
| 673 }; |
| 674 |
| 675 // Method: Arity 8. |
| 676 template <typename R, typename T, typename A1, typename A2, typename A3, |
| 677 typename A4, typename A5, typename A6, typename A7, typename A8> |
| 678 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6, A7, A8)> { |
| 679 public: |
| 680 typedef R (RunType)(T*, A1, A2, A3, A4, A5, A6, A7, A8); |
| 681 typedef true_type IsMethod; |
| 682 |
| 683 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7, A8)) |
| 684 : method_(method) { |
| 685 } |
| 686 |
| 687 R Run(T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
| 688 typename CallbackParamTraits<A2>::ForwardType a2, |
| 689 typename CallbackParamTraits<A3>::ForwardType a3, |
| 690 typename CallbackParamTraits<A4>::ForwardType a4, |
| 691 typename CallbackParamTraits<A5>::ForwardType a5, |
| 692 typename CallbackParamTraits<A6>::ForwardType a6, |
| 693 typename CallbackParamTraits<A7>::ForwardType a7, |
| 694 typename CallbackParamTraits<A8>::ForwardType a8) { |
| 695 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), |
| 696 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), |
| 697 CallbackForward(a6), CallbackForward(a7), CallbackForward(a8)); |
| 698 } |
| 699 |
| 700 private: |
| 701 R (T::*method_)(A1, A2, A3, A4, A5, A6, A7, A8); |
| 702 }; |
| 703 |
| 704 // Const Method: Arity 8. |
| 705 template <typename R, typename T, typename A1, typename A2, typename A3, |
| 706 typename A4, typename A5, typename A6, typename A7, typename A8> |
| 707 class RunnableAdapter<R(T::*)(A1, A2, A3, A4, A5, A6, A7, A8) const> { |
| 708 public: |
| 709 typedef R (RunType)(const T*, A1, A2, A3, A4, A5, A6, A7, A8); |
| 710 typedef true_type IsMethod; |
| 711 |
| 712 explicit RunnableAdapter(R(T::*method)(A1, A2, A3, A4, A5, A6, A7, A8) const) |
| 713 : method_(method) { |
| 714 } |
| 715 |
| 716 R Run(const T* object, typename CallbackParamTraits<A1>::ForwardType a1, |
| 717 typename CallbackParamTraits<A2>::ForwardType a2, |
| 718 typename CallbackParamTraits<A3>::ForwardType a3, |
| 719 typename CallbackParamTraits<A4>::ForwardType a4, |
| 720 typename CallbackParamTraits<A5>::ForwardType a5, |
| 721 typename CallbackParamTraits<A6>::ForwardType a6, |
| 722 typename CallbackParamTraits<A7>::ForwardType a7, |
| 723 typename CallbackParamTraits<A8>::ForwardType a8) { |
| 724 return (object->*method_)(CallbackForward(a1), CallbackForward(a2), |
| 725 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), |
| 726 CallbackForward(a6), CallbackForward(a7), CallbackForward(a8)); |
| 727 } |
| 728 |
| 729 private: |
| 730 R (T::*method_)(A1, A2, A3, A4, A5, A6, A7, A8) const; |
| 731 }; |
647 | 732 |
648 // FunctionTraits<> | 733 // FunctionTraits<> |
649 // | 734 // |
650 // Breaks a function signature apart into typedefs for easier introspection. | 735 // Breaks a function signature apart into typedefs for easier introspection. |
651 template <typename Sig> | 736 template <typename Sig> |
652 struct FunctionTraits; | 737 struct FunctionTraits; |
653 | 738 |
654 template <typename R> | 739 template <typename R> |
655 struct FunctionTraits<R()> { | 740 struct FunctionTraits<R()> { |
656 typedef R ReturnType; | 741 typedef R ReturnType; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 typedef R ReturnType; | 800 typedef R ReturnType; |
716 typedef A1 A1Type; | 801 typedef A1 A1Type; |
717 typedef A2 A2Type; | 802 typedef A2 A2Type; |
718 typedef A3 A3Type; | 803 typedef A3 A3Type; |
719 typedef A4 A4Type; | 804 typedef A4 A4Type; |
720 typedef A5 A5Type; | 805 typedef A5 A5Type; |
721 typedef A6 A6Type; | 806 typedef A6 A6Type; |
722 typedef A7 A7Type; | 807 typedef A7 A7Type; |
723 }; | 808 }; |
724 | 809 |
| 810 template <typename R, typename A1, typename A2, typename A3, typename A4, |
| 811 typename A5, typename A6, typename A7, typename A8> |
| 812 struct FunctionTraits<R(A1, A2, A3, A4, A5, A6, A7, A8)> { |
| 813 typedef R ReturnType; |
| 814 typedef A1 A1Type; |
| 815 typedef A2 A2Type; |
| 816 typedef A3 A3Type; |
| 817 typedef A4 A4Type; |
| 818 typedef A5 A5Type; |
| 819 typedef A6 A6Type; |
| 820 typedef A7 A7Type; |
| 821 typedef A8 A8Type; |
| 822 }; |
725 | 823 |
726 // ForceVoidReturn<> | 824 // ForceVoidReturn<> |
727 // | 825 // |
728 // Set of templates that support forcing the function return type to void. | 826 // Set of templates that support forcing the function return type to void. |
729 template <typename Sig> | 827 template <typename Sig> |
730 struct ForceVoidReturn; | 828 struct ForceVoidReturn; |
731 | 829 |
732 template <typename R> | 830 template <typename R> |
733 struct ForceVoidReturn<R()> { | 831 struct ForceVoidReturn<R()> { |
734 typedef void(RunType)(); | 832 typedef void(RunType)(); |
(...skipping 30 matching lines...) Expand all Loading... |
765 struct ForceVoidReturn<R(A1, A2, A3, A4, A5, A6)> { | 863 struct ForceVoidReturn<R(A1, A2, A3, A4, A5, A6)> { |
766 typedef void(RunType)(A1, A2, A3, A4, A5, A6); | 864 typedef void(RunType)(A1, A2, A3, A4, A5, A6); |
767 }; | 865 }; |
768 | 866 |
769 template <typename R, typename A1, typename A2, typename A3, typename A4, | 867 template <typename R, typename A1, typename A2, typename A3, typename A4, |
770 typename A5, typename A6, typename A7> | 868 typename A5, typename A6, typename A7> |
771 struct ForceVoidReturn<R(A1, A2, A3, A4, A5, A6, A7)> { | 869 struct ForceVoidReturn<R(A1, A2, A3, A4, A5, A6, A7)> { |
772 typedef void(RunType)(A1, A2, A3, A4, A5, A6, A7); | 870 typedef void(RunType)(A1, A2, A3, A4, A5, A6, A7); |
773 }; | 871 }; |
774 | 872 |
| 873 template <typename R, typename A1, typename A2, typename A3, typename A4, |
| 874 typename A5, typename A6, typename A7, typename A8> |
| 875 struct ForceVoidReturn<R(A1, A2, A3, A4, A5, A6, A7, A8)> { |
| 876 typedef void(RunType)(A1, A2, A3, A4, A5, A6, A7, A8); |
| 877 }; |
775 | 878 |
776 // FunctorTraits<> | 879 // FunctorTraits<> |
777 // | 880 // |
778 // See description at top of file. | 881 // See description at top of file. |
779 template <typename T> | 882 template <typename T> |
780 struct FunctorTraits { | 883 struct FunctorTraits { |
781 typedef RunnableAdapter<T> RunnableType; | 884 typedef RunnableAdapter<T> RunnableType; |
782 typedef typename RunnableType::RunType RunType; | 885 typedef typename RunnableType::RunType RunType; |
783 }; | 886 }; |
784 | 887 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 struct InvokeHelper<false, ReturnType, Runnable, | 1116 struct InvokeHelper<false, ReturnType, Runnable, |
1014 void(A1, A2, A3, A4, A5, A6)> { | 1117 void(A1, A2, A3, A4, A5, A6)> { |
1015 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, | 1118 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, |
1016 A5 a5, A6 a6) { | 1119 A5 a5, A6 a6) { |
1017 return runnable.Run(CallbackForward(a1), CallbackForward(a2), | 1120 return runnable.Run(CallbackForward(a1), CallbackForward(a2), |
1018 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), | 1121 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), |
1019 CallbackForward(a6)); | 1122 CallbackForward(a6)); |
1020 } | 1123 } |
1021 }; | 1124 }; |
1022 | 1125 |
1023 template <typename Runnable,typename A1, typename A2, typename A3, typename A4, | 1126 template <typename Runnable, typename A1, typename A2, typename A3, typename A4, |
1024 typename A5, typename A6> | 1127 typename A5, typename A6> |
1025 struct InvokeHelper<false, void, Runnable, | 1128 struct InvokeHelper<false, void, Runnable, |
1026 void(A1, A2, A3, A4, A5, A6)> { | 1129 void(A1, A2, A3, A4, A5, A6)> { |
1027 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, | 1130 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, |
1028 A6 a6) { | 1131 A6 a6) { |
1029 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), | 1132 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), |
1030 CallbackForward(a4), CallbackForward(a5), CallbackForward(a6)); | 1133 CallbackForward(a4), CallbackForward(a5), CallbackForward(a6)); |
1031 } | 1134 } |
1032 }; | 1135 }; |
1033 | 1136 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 if (!a1.get()) { | 1182 if (!a1.get()) { |
1080 return; | 1183 return; |
1081 } | 1184 } |
1082 | 1185 |
1083 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), | 1186 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), |
1084 CallbackForward(a4), CallbackForward(a5), CallbackForward(a6), | 1187 CallbackForward(a4), CallbackForward(a5), CallbackForward(a6), |
1085 CallbackForward(a7)); | 1188 CallbackForward(a7)); |
1086 } | 1189 } |
1087 }; | 1190 }; |
1088 | 1191 |
| 1192 template <typename ReturnType, typename Runnable,typename A1, typename A2, |
| 1193 typename A3, typename A4, typename A5, typename A6, typename A7, |
| 1194 typename A8> |
| 1195 struct InvokeHelper<false, ReturnType, Runnable, |
| 1196 void(A1, A2, A3, A4, A5, A6, A7, A8)> { |
| 1197 static ReturnType MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, |
| 1198 A5 a5, A6 a6, A7 a7, A8 a8) { |
| 1199 return runnable.Run(CallbackForward(a1), CallbackForward(a2), |
| 1200 CallbackForward(a3), CallbackForward(a4), CallbackForward(a5), |
| 1201 CallbackForward(a6), CallbackForward(a7), CallbackForward(a8)); |
| 1202 } |
| 1203 }; |
| 1204 |
| 1205 template <typename Runnable,typename A1, typename A2, typename A3, typename A4, |
| 1206 typename A5, typename A6, typename A7, typename A8> |
| 1207 struct InvokeHelper<false, void, Runnable, |
| 1208 void(A1, A2, A3, A4, A5, A6, A7, A8)> { |
| 1209 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, |
| 1210 A6 a6, A7 a7, A8 a8) { |
| 1211 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), |
| 1212 CallbackForward(a4), CallbackForward(a5), CallbackForward(a6), |
| 1213 CallbackForward(a7), CallbackForward(a8)); |
| 1214 } |
| 1215 }; |
| 1216 |
| 1217 template <typename Runnable, typename A1, typename A2, typename A3, |
| 1218 typename A4, typename A5, typename A6, typename A7, typename A8> |
| 1219 struct InvokeHelper<true, void, Runnable, |
| 1220 void(A1, A2, A3, A4, A5, A6, A7, A8)> { |
| 1221 static void MakeItSo(Runnable runnable, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, |
| 1222 A6 a6, A7 a7, A8 a8) { |
| 1223 if (!a1.get()) { |
| 1224 return; |
| 1225 } |
| 1226 |
| 1227 runnable.Run(CallbackForward(a1), CallbackForward(a2), CallbackForward(a3), |
| 1228 CallbackForward(a4), CallbackForward(a5), CallbackForward(a6), |
| 1229 CallbackForward(a7), CallbackForward(a8)); |
| 1230 } |
| 1231 }; |
| 1232 |
1089 #if !defined(_MSC_VER) | 1233 #if !defined(_MSC_VER) |
1090 | 1234 |
1091 template <typename ReturnType, typename Runnable, typename ArgsType> | 1235 template <typename ReturnType, typename Runnable, typename ArgsType> |
1092 struct InvokeHelper<true, ReturnType, Runnable, ArgsType> { | 1236 struct InvokeHelper<true, ReturnType, Runnable, ArgsType> { |
1093 // WeakCalls are only supported for functions with a void return type. | 1237 // WeakCalls are only supported for functions with a void return type. |
1094 // Otherwise, the function result would be undefined if the the WeakPtr<> | 1238 // Otherwise, the function result would be undefined if the the WeakPtr<> |
1095 // is invalidated. | 1239 // is invalidated. |
1096 COMPILE_ASSERT(is_void<ReturnType>::value, | 1240 COMPILE_ASSERT(is_void<ReturnType>::value, |
1097 weak_ptrs_can_only_bind_to_methods_without_return_values); | 1241 weak_ptrs_can_only_bind_to_methods_without_return_values); |
1098 }; | 1242 }; |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 typename Bound5UnwrapTraits::ForwardType, | 2655 typename Bound5UnwrapTraits::ForwardType, |
2512 typename Bound6UnwrapTraits::ForwardType, | 2656 typename Bound6UnwrapTraits::ForwardType, |
2513 typename Bound7UnwrapTraits::ForwardType)> | 2657 typename Bound7UnwrapTraits::ForwardType)> |
2514 ::MakeItSo(storage->runnable_, CallbackForward(x1), | 2658 ::MakeItSo(storage->runnable_, CallbackForward(x1), |
2515 CallbackForward(x2), CallbackForward(x3), | 2659 CallbackForward(x2), CallbackForward(x3), |
2516 CallbackForward(x4), CallbackForward(x5), | 2660 CallbackForward(x4), CallbackForward(x5), |
2517 CallbackForward(x6), CallbackForward(x7)); | 2661 CallbackForward(x6), CallbackForward(x7)); |
2518 } | 2662 } |
2519 }; | 2663 }; |
2520 | 2664 |
| 2665 // Arity 8 -> 8. |
| 2666 template <typename StorageType, typename R,typename X1, typename X2, |
| 2667 typename X3, typename X4, typename X5, typename X6, typename X7, |
| 2668 typename X8> |
| 2669 struct Invoker<0, StorageType, R(X1, X2, X3, X4, X5, X6, X7, X8)> { |
| 2670 typedef R(RunType)(BindStateBase*, |
| 2671 typename CallbackParamTraits<X1>::ForwardType, |
| 2672 typename CallbackParamTraits<X2>::ForwardType, |
| 2673 typename CallbackParamTraits<X3>::ForwardType, |
| 2674 typename CallbackParamTraits<X4>::ForwardType, |
| 2675 typename CallbackParamTraits<X5>::ForwardType, |
| 2676 typename CallbackParamTraits<X6>::ForwardType, |
| 2677 typename CallbackParamTraits<X7>::ForwardType, |
| 2678 typename CallbackParamTraits<X8>::ForwardType); |
| 2679 |
| 2680 typedef R(UnboundRunType)(X1, X2, X3, X4, X5, X6, X7, X8); |
| 2681 |
| 2682 static R Run(BindStateBase* base, |
| 2683 typename CallbackParamTraits<X1>::ForwardType x1, |
| 2684 typename CallbackParamTraits<X2>::ForwardType x2, |
| 2685 typename CallbackParamTraits<X3>::ForwardType x3, |
| 2686 typename CallbackParamTraits<X4>::ForwardType x4, |
| 2687 typename CallbackParamTraits<X5>::ForwardType x5, |
| 2688 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2689 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2690 typename CallbackParamTraits<X8>::ForwardType x8) { |
| 2691 StorageType* storage = static_cast<StorageType*>(base); |
| 2692 |
| 2693 // Local references to make debugger stepping easier. If in a debugger, |
| 2694 // you really want to warp ahead and step through the |
| 2695 // InvokeHelper<>::MakeItSo() call below. |
| 2696 |
| 2697 return InvokeHelper<StorageType::IsWeakCall::value, R, |
| 2698 typename StorageType::RunnableType, |
| 2699 void(typename CallbackParamTraits<X1>::ForwardType x1, |
| 2700 typename CallbackParamTraits<X2>::ForwardType x2, |
| 2701 typename CallbackParamTraits<X3>::ForwardType x3, |
| 2702 typename CallbackParamTraits<X4>::ForwardType x4, |
| 2703 typename CallbackParamTraits<X5>::ForwardType x5, |
| 2704 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2705 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2706 typename CallbackParamTraits<X8>::ForwardType x8)> |
| 2707 ::MakeItSo(storage->runnable_, CallbackForward(x1), |
| 2708 CallbackForward(x2), CallbackForward(x3), |
| 2709 CallbackForward(x4), CallbackForward(x5), |
| 2710 CallbackForward(x6), CallbackForward(x7), |
| 2711 CallbackForward(x8)); |
| 2712 } |
| 2713 }; |
| 2714 |
| 2715 // Arity 8 -> 7. |
| 2716 template <typename StorageType, typename R,typename X1, typename X2, |
| 2717 typename X3, typename X4, typename X5, typename X6, typename X7, |
| 2718 typename X8> |
| 2719 struct Invoker<1, StorageType, R(X1, X2, X3, X4, X5, X6, X7, X8)> { |
| 2720 typedef R(RunType)(BindStateBase*, |
| 2721 typename CallbackParamTraits<X2>::ForwardType, |
| 2722 typename CallbackParamTraits<X3>::ForwardType, |
| 2723 typename CallbackParamTraits<X4>::ForwardType, |
| 2724 typename CallbackParamTraits<X5>::ForwardType, |
| 2725 typename CallbackParamTraits<X6>::ForwardType, |
| 2726 typename CallbackParamTraits<X7>::ForwardType, |
| 2727 typename CallbackParamTraits<X8>::ForwardType); |
| 2728 |
| 2729 typedef R(UnboundRunType)(X2, X3, X4, X5, X6, X7, X8); |
| 2730 |
| 2731 static R Run(BindStateBase* base, |
| 2732 typename CallbackParamTraits<X2>::ForwardType x2, |
| 2733 typename CallbackParamTraits<X3>::ForwardType x3, |
| 2734 typename CallbackParamTraits<X4>::ForwardType x4, |
| 2735 typename CallbackParamTraits<X5>::ForwardType x5, |
| 2736 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2737 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2738 typename CallbackParamTraits<X8>::ForwardType x8) { |
| 2739 StorageType* storage = static_cast<StorageType*>(base); |
| 2740 |
| 2741 // Local references to make debugger stepping easier. If in a debugger, |
| 2742 // you really want to warp ahead and step through the |
| 2743 // InvokeHelper<>::MakeItSo() call below. |
| 2744 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
| 2745 |
| 2746 typename Bound1UnwrapTraits::ForwardType x1 = |
| 2747 Bound1UnwrapTraits::Unwrap(storage->p1_); |
| 2748 return InvokeHelper<StorageType::IsWeakCall::value, R, |
| 2749 typename StorageType::RunnableType, |
| 2750 void(typename Bound1UnwrapTraits::ForwardType, |
| 2751 typename CallbackParamTraits<X2>::ForwardType x2, |
| 2752 typename CallbackParamTraits<X3>::ForwardType x3, |
| 2753 typename CallbackParamTraits<X4>::ForwardType x4, |
| 2754 typename CallbackParamTraits<X5>::ForwardType x5, |
| 2755 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2756 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2757 typename CallbackParamTraits<X8>::ForwardType x8)> |
| 2758 ::MakeItSo(storage->runnable_, CallbackForward(x1), |
| 2759 CallbackForward(x2), CallbackForward(x3), |
| 2760 CallbackForward(x4), CallbackForward(x5), |
| 2761 CallbackForward(x6), CallbackForward(x7), |
| 2762 CallbackForward(x8)); |
| 2763 } |
| 2764 }; |
| 2765 |
| 2766 // Arity 8 -> 6. |
| 2767 template <typename StorageType, typename R,typename X1, typename X2, |
| 2768 typename X3, typename X4, typename X5, typename X6, typename X7, |
| 2769 typename X8> |
| 2770 struct Invoker<2, StorageType, R(X1, X2, X3, X4, X5, X6, X7, X8)> { |
| 2771 typedef R(RunType)(BindStateBase*, |
| 2772 typename CallbackParamTraits<X3>::ForwardType, |
| 2773 typename CallbackParamTraits<X4>::ForwardType, |
| 2774 typename CallbackParamTraits<X5>::ForwardType, |
| 2775 typename CallbackParamTraits<X6>::ForwardType, |
| 2776 typename CallbackParamTraits<X7>::ForwardType, |
| 2777 typename CallbackParamTraits<X8>::ForwardType); |
| 2778 |
| 2779 typedef R(UnboundRunType)(X3, X4, X5, X6, X7, X8); |
| 2780 |
| 2781 static R Run(BindStateBase* base, |
| 2782 typename CallbackParamTraits<X3>::ForwardType x3, |
| 2783 typename CallbackParamTraits<X4>::ForwardType x4, |
| 2784 typename CallbackParamTraits<X5>::ForwardType x5, |
| 2785 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2786 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2787 typename CallbackParamTraits<X8>::ForwardType x8) { |
| 2788 StorageType* storage = static_cast<StorageType*>(base); |
| 2789 |
| 2790 // Local references to make debugger stepping easier. If in a debugger, |
| 2791 // you really want to warp ahead and step through the |
| 2792 // InvokeHelper<>::MakeItSo() call below. |
| 2793 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
| 2794 typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; |
| 2795 |
| 2796 typename Bound1UnwrapTraits::ForwardType x1 = |
| 2797 Bound1UnwrapTraits::Unwrap(storage->p1_); |
| 2798 typename Bound2UnwrapTraits::ForwardType x2 = |
| 2799 Bound2UnwrapTraits::Unwrap(storage->p2_); |
| 2800 return InvokeHelper<StorageType::IsWeakCall::value, R, |
| 2801 typename StorageType::RunnableType, |
| 2802 void(typename Bound1UnwrapTraits::ForwardType, |
| 2803 typename Bound2UnwrapTraits::ForwardType, |
| 2804 typename CallbackParamTraits<X3>::ForwardType x3, |
| 2805 typename CallbackParamTraits<X4>::ForwardType x4, |
| 2806 typename CallbackParamTraits<X5>::ForwardType x5, |
| 2807 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2808 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2809 typename CallbackParamTraits<X8>::ForwardType x8)> |
| 2810 ::MakeItSo(storage->runnable_, CallbackForward(x1), |
| 2811 CallbackForward(x2), CallbackForward(x3), |
| 2812 CallbackForward(x4), CallbackForward(x5), |
| 2813 CallbackForward(x6), CallbackForward(x7), |
| 2814 CallbackForward(x8)); |
| 2815 } |
| 2816 }; |
| 2817 |
| 2818 // Arity 8 -> 5. |
| 2819 template <typename StorageType, typename R,typename X1, typename X2, |
| 2820 typename X3, typename X4, typename X5, typename X6, typename X7, |
| 2821 typename X8> |
| 2822 struct Invoker<3, StorageType, R(X1, X2, X3, X4, X5, X6, X7, X8)> { |
| 2823 typedef R(RunType)(BindStateBase*, |
| 2824 typename CallbackParamTraits<X4>::ForwardType, |
| 2825 typename CallbackParamTraits<X5>::ForwardType, |
| 2826 typename CallbackParamTraits<X6>::ForwardType, |
| 2827 typename CallbackParamTraits<X7>::ForwardType, |
| 2828 typename CallbackParamTraits<X8>::ForwardType); |
| 2829 |
| 2830 typedef R(UnboundRunType)(X4, X5, X6, X7, X8); |
| 2831 |
| 2832 static R Run(BindStateBase* base, |
| 2833 typename CallbackParamTraits<X4>::ForwardType x4, |
| 2834 typename CallbackParamTraits<X5>::ForwardType x5, |
| 2835 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2836 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2837 typename CallbackParamTraits<X8>::ForwardType x8) { |
| 2838 StorageType* storage = static_cast<StorageType*>(base); |
| 2839 |
| 2840 // Local references to make debugger stepping easier. If in a debugger, |
| 2841 // you really want to warp ahead and step through the |
| 2842 // InvokeHelper<>::MakeItSo() call below. |
| 2843 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
| 2844 typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; |
| 2845 typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; |
| 2846 |
| 2847 typename Bound1UnwrapTraits::ForwardType x1 = |
| 2848 Bound1UnwrapTraits::Unwrap(storage->p1_); |
| 2849 typename Bound2UnwrapTraits::ForwardType x2 = |
| 2850 Bound2UnwrapTraits::Unwrap(storage->p2_); |
| 2851 typename Bound3UnwrapTraits::ForwardType x3 = |
| 2852 Bound3UnwrapTraits::Unwrap(storage->p3_); |
| 2853 return InvokeHelper<StorageType::IsWeakCall::value, R, |
| 2854 typename StorageType::RunnableType, |
| 2855 void(typename Bound1UnwrapTraits::ForwardType, |
| 2856 typename Bound2UnwrapTraits::ForwardType, |
| 2857 typename Bound3UnwrapTraits::ForwardType, |
| 2858 typename CallbackParamTraits<X4>::ForwardType x4, |
| 2859 typename CallbackParamTraits<X5>::ForwardType x5, |
| 2860 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2861 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2862 typename CallbackParamTraits<X8>::ForwardType x8)> |
| 2863 ::MakeItSo(storage->runnable_, CallbackForward(x1), |
| 2864 CallbackForward(x2), CallbackForward(x3), |
| 2865 CallbackForward(x4), CallbackForward(x5), |
| 2866 CallbackForward(x6), CallbackForward(x7), |
| 2867 CallbackForward(x8)); |
| 2868 } |
| 2869 }; |
| 2870 |
| 2871 // Arity 8 -> 4. |
| 2872 template <typename StorageType, typename R,typename X1, typename X2, |
| 2873 typename X3, typename X4, typename X5, typename X6, typename X7, |
| 2874 typename X8> |
| 2875 struct Invoker<4, StorageType, R(X1, X2, X3, X4, X5, X6, X7, X8)> { |
| 2876 typedef R(RunType)(BindStateBase*, |
| 2877 typename CallbackParamTraits<X5>::ForwardType, |
| 2878 typename CallbackParamTraits<X6>::ForwardType, |
| 2879 typename CallbackParamTraits<X7>::ForwardType, |
| 2880 typename CallbackParamTraits<X8>::ForwardType); |
| 2881 |
| 2882 typedef R(UnboundRunType)(X5, X6, X7, X8); |
| 2883 |
| 2884 static R Run(BindStateBase* base, |
| 2885 typename CallbackParamTraits<X5>::ForwardType x5, |
| 2886 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2887 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2888 typename CallbackParamTraits<X8>::ForwardType x8) { |
| 2889 StorageType* storage = static_cast<StorageType*>(base); |
| 2890 |
| 2891 // Local references to make debugger stepping easier. If in a debugger, |
| 2892 // you really want to warp ahead and step through the |
| 2893 // InvokeHelper<>::MakeItSo() call below. |
| 2894 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
| 2895 typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; |
| 2896 typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; |
| 2897 typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; |
| 2898 |
| 2899 typename Bound1UnwrapTraits::ForwardType x1 = |
| 2900 Bound1UnwrapTraits::Unwrap(storage->p1_); |
| 2901 typename Bound2UnwrapTraits::ForwardType x2 = |
| 2902 Bound2UnwrapTraits::Unwrap(storage->p2_); |
| 2903 typename Bound3UnwrapTraits::ForwardType x3 = |
| 2904 Bound3UnwrapTraits::Unwrap(storage->p3_); |
| 2905 typename Bound4UnwrapTraits::ForwardType x4 = |
| 2906 Bound4UnwrapTraits::Unwrap(storage->p4_); |
| 2907 return InvokeHelper<StorageType::IsWeakCall::value, R, |
| 2908 typename StorageType::RunnableType, |
| 2909 void(typename Bound1UnwrapTraits::ForwardType, |
| 2910 typename Bound2UnwrapTraits::ForwardType, |
| 2911 typename Bound3UnwrapTraits::ForwardType, |
| 2912 typename Bound4UnwrapTraits::ForwardType, |
| 2913 typename CallbackParamTraits<X5>::ForwardType x5, |
| 2914 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2915 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2916 typename CallbackParamTraits<X8>::ForwardType x8)> |
| 2917 ::MakeItSo(storage->runnable_, CallbackForward(x1), |
| 2918 CallbackForward(x2), CallbackForward(x3), |
| 2919 CallbackForward(x4), CallbackForward(x5), |
| 2920 CallbackForward(x6), CallbackForward(x7), |
| 2921 CallbackForward(x8)); |
| 2922 } |
| 2923 }; |
| 2924 |
| 2925 // Arity 8 -> 3. |
| 2926 template <typename StorageType, typename R,typename X1, typename X2, |
| 2927 typename X3, typename X4, typename X5, typename X6, typename X7, |
| 2928 typename X8> |
| 2929 struct Invoker<5, StorageType, R(X1, X2, X3, X4, X5, X6, X7, X8)> { |
| 2930 typedef R(RunType)(BindStateBase*, |
| 2931 typename CallbackParamTraits<X6>::ForwardType, |
| 2932 typename CallbackParamTraits<X7>::ForwardType, |
| 2933 typename CallbackParamTraits<X8>::ForwardType); |
| 2934 |
| 2935 typedef R(UnboundRunType)(X6, X7, X8); |
| 2936 |
| 2937 static R Run(BindStateBase* base, |
| 2938 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2939 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2940 typename CallbackParamTraits<X8>::ForwardType x8) { |
| 2941 StorageType* storage = static_cast<StorageType*>(base); |
| 2942 |
| 2943 // Local references to make debugger stepping easier. If in a debugger, |
| 2944 // you really want to warp ahead and step through the |
| 2945 // InvokeHelper<>::MakeItSo() call below. |
| 2946 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
| 2947 typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; |
| 2948 typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; |
| 2949 typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; |
| 2950 typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits; |
| 2951 |
| 2952 typename Bound1UnwrapTraits::ForwardType x1 = |
| 2953 Bound1UnwrapTraits::Unwrap(storage->p1_); |
| 2954 typename Bound2UnwrapTraits::ForwardType x2 = |
| 2955 Bound2UnwrapTraits::Unwrap(storage->p2_); |
| 2956 typename Bound3UnwrapTraits::ForwardType x3 = |
| 2957 Bound3UnwrapTraits::Unwrap(storage->p3_); |
| 2958 typename Bound4UnwrapTraits::ForwardType x4 = |
| 2959 Bound4UnwrapTraits::Unwrap(storage->p4_); |
| 2960 typename Bound5UnwrapTraits::ForwardType x5 = |
| 2961 Bound5UnwrapTraits::Unwrap(storage->p5_); |
| 2962 return InvokeHelper<StorageType::IsWeakCall::value, R, |
| 2963 typename StorageType::RunnableType, |
| 2964 void(typename Bound1UnwrapTraits::ForwardType, |
| 2965 typename Bound2UnwrapTraits::ForwardType, |
| 2966 typename Bound3UnwrapTraits::ForwardType, |
| 2967 typename Bound4UnwrapTraits::ForwardType, |
| 2968 typename Bound5UnwrapTraits::ForwardType, |
| 2969 typename CallbackParamTraits<X6>::ForwardType x6, |
| 2970 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2971 typename CallbackParamTraits<X8>::ForwardType x8)> |
| 2972 ::MakeItSo(storage->runnable_, CallbackForward(x1), |
| 2973 CallbackForward(x2), CallbackForward(x3), |
| 2974 CallbackForward(x4), CallbackForward(x5), |
| 2975 CallbackForward(x6), CallbackForward(x7), |
| 2976 CallbackForward(x8)); |
| 2977 } |
| 2978 }; |
| 2979 |
| 2980 // Arity 8 -> 2. |
| 2981 template <typename StorageType, typename R,typename X1, typename X2, |
| 2982 typename X3, typename X4, typename X5, typename X6, typename X7, |
| 2983 typename X8> |
| 2984 struct Invoker<6, StorageType, R(X1, X2, X3, X4, X5, X6, X7, X8)> { |
| 2985 typedef R(RunType)(BindStateBase*, |
| 2986 typename CallbackParamTraits<X7>::ForwardType, |
| 2987 typename CallbackParamTraits<X8>::ForwardType); |
| 2988 |
| 2989 typedef R(UnboundRunType)(X7, X8); |
| 2990 |
| 2991 static R Run(BindStateBase* base, |
| 2992 typename CallbackParamTraits<X7>::ForwardType x7, |
| 2993 typename CallbackParamTraits<X8>::ForwardType x8) { |
| 2994 StorageType* storage = static_cast<StorageType*>(base); |
| 2995 |
| 2996 // Local references to make debugger stepping easier. If in a debugger, |
| 2997 // you really want to warp ahead and step through the |
| 2998 // InvokeHelper<>::MakeItSo() call below. |
| 2999 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
| 3000 typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; |
| 3001 typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; |
| 3002 typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; |
| 3003 typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits; |
| 3004 typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits; |
| 3005 |
| 3006 typename Bound1UnwrapTraits::ForwardType x1 = |
| 3007 Bound1UnwrapTraits::Unwrap(storage->p1_); |
| 3008 typename Bound2UnwrapTraits::ForwardType x2 = |
| 3009 Bound2UnwrapTraits::Unwrap(storage->p2_); |
| 3010 typename Bound3UnwrapTraits::ForwardType x3 = |
| 3011 Bound3UnwrapTraits::Unwrap(storage->p3_); |
| 3012 typename Bound4UnwrapTraits::ForwardType x4 = |
| 3013 Bound4UnwrapTraits::Unwrap(storage->p4_); |
| 3014 typename Bound5UnwrapTraits::ForwardType x5 = |
| 3015 Bound5UnwrapTraits::Unwrap(storage->p5_); |
| 3016 typename Bound6UnwrapTraits::ForwardType x6 = |
| 3017 Bound6UnwrapTraits::Unwrap(storage->p6_); |
| 3018 return InvokeHelper<StorageType::IsWeakCall::value, R, |
| 3019 typename StorageType::RunnableType, |
| 3020 void(typename Bound1UnwrapTraits::ForwardType, |
| 3021 typename Bound2UnwrapTraits::ForwardType, |
| 3022 typename Bound3UnwrapTraits::ForwardType, |
| 3023 typename Bound4UnwrapTraits::ForwardType, |
| 3024 typename Bound5UnwrapTraits::ForwardType, |
| 3025 typename Bound6UnwrapTraits::ForwardType, |
| 3026 typename CallbackParamTraits<X7>::ForwardType x7, |
| 3027 typename CallbackParamTraits<X8>::ForwardType x8)> |
| 3028 ::MakeItSo(storage->runnable_, CallbackForward(x1), |
| 3029 CallbackForward(x2), CallbackForward(x3), |
| 3030 CallbackForward(x4), CallbackForward(x5), |
| 3031 CallbackForward(x6), CallbackForward(x7), |
| 3032 CallbackForward(x8)); |
| 3033 } |
| 3034 }; |
| 3035 |
| 3036 // Arity 8 -> 1. |
| 3037 template <typename StorageType, typename R,typename X1, typename X2, |
| 3038 typename X3, typename X4, typename X5, typename X6, typename X7, |
| 3039 typename X8> |
| 3040 struct Invoker<7, StorageType, R(X1, X2, X3, X4, X5, X6, X7, X8)> { |
| 3041 typedef R(RunType)(BindStateBase*, |
| 3042 typename CallbackParamTraits<X8>::ForwardType); |
| 3043 |
| 3044 typedef R(UnboundRunType)(X8); |
| 3045 |
| 3046 static R Run(BindStateBase* base, |
| 3047 typename CallbackParamTraits<X8>::ForwardType x8) { |
| 3048 StorageType* storage = static_cast<StorageType*>(base); |
| 3049 |
| 3050 // Local references to make debugger stepping easier. If in a debugger, |
| 3051 // you really want to warp ahead and step through the |
| 3052 // InvokeHelper<>::MakeItSo() call below. |
| 3053 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
| 3054 typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; |
| 3055 typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; |
| 3056 typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; |
| 3057 typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits; |
| 3058 typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits; |
| 3059 typedef typename StorageType::Bound7UnwrapTraits Bound7UnwrapTraits; |
| 3060 |
| 3061 typename Bound1UnwrapTraits::ForwardType x1 = |
| 3062 Bound1UnwrapTraits::Unwrap(storage->p1_); |
| 3063 typename Bound2UnwrapTraits::ForwardType x2 = |
| 3064 Bound2UnwrapTraits::Unwrap(storage->p2_); |
| 3065 typename Bound3UnwrapTraits::ForwardType x3 = |
| 3066 Bound3UnwrapTraits::Unwrap(storage->p3_); |
| 3067 typename Bound4UnwrapTraits::ForwardType x4 = |
| 3068 Bound4UnwrapTraits::Unwrap(storage->p4_); |
| 3069 typename Bound5UnwrapTraits::ForwardType x5 = |
| 3070 Bound5UnwrapTraits::Unwrap(storage->p5_); |
| 3071 typename Bound6UnwrapTraits::ForwardType x6 = |
| 3072 Bound6UnwrapTraits::Unwrap(storage->p6_); |
| 3073 typename Bound7UnwrapTraits::ForwardType x7 = |
| 3074 Bound7UnwrapTraits::Unwrap(storage->p7_); |
| 3075 return InvokeHelper<StorageType::IsWeakCall::value, R, |
| 3076 typename StorageType::RunnableType, |
| 3077 void(typename Bound1UnwrapTraits::ForwardType, |
| 3078 typename Bound2UnwrapTraits::ForwardType, |
| 3079 typename Bound3UnwrapTraits::ForwardType, |
| 3080 typename Bound4UnwrapTraits::ForwardType, |
| 3081 typename Bound5UnwrapTraits::ForwardType, |
| 3082 typename Bound6UnwrapTraits::ForwardType, |
| 3083 typename Bound7UnwrapTraits::ForwardType, |
| 3084 typename CallbackParamTraits<X8>::ForwardType x8)> |
| 3085 ::MakeItSo(storage->runnable_, CallbackForward(x1), |
| 3086 CallbackForward(x2), CallbackForward(x3), |
| 3087 CallbackForward(x4), CallbackForward(x5), |
| 3088 CallbackForward(x6), CallbackForward(x7), |
| 3089 CallbackForward(x8)); |
| 3090 } |
| 3091 }; |
| 3092 |
| 3093 // Arity 8 -> 0. |
| 3094 template <typename StorageType, typename R,typename X1, typename X2, |
| 3095 typename X3, typename X4, typename X5, typename X6, typename X7, |
| 3096 typename X8> |
| 3097 struct Invoker<8, StorageType, R(X1, X2, X3, X4, X5, X6, X7, X8)> { |
| 3098 typedef R(RunType)(BindStateBase*); |
| 3099 |
| 3100 typedef R(UnboundRunType)(); |
| 3101 |
| 3102 static R Run(BindStateBase* base) { |
| 3103 StorageType* storage = static_cast<StorageType*>(base); |
| 3104 |
| 3105 // Local references to make debugger stepping easier. If in a debugger, |
| 3106 // you really want to warp ahead and step through the |
| 3107 // InvokeHelper<>::MakeItSo() call below. |
| 3108 typedef typename StorageType::Bound1UnwrapTraits Bound1UnwrapTraits; |
| 3109 typedef typename StorageType::Bound2UnwrapTraits Bound2UnwrapTraits; |
| 3110 typedef typename StorageType::Bound3UnwrapTraits Bound3UnwrapTraits; |
| 3111 typedef typename StorageType::Bound4UnwrapTraits Bound4UnwrapTraits; |
| 3112 typedef typename StorageType::Bound5UnwrapTraits Bound5UnwrapTraits; |
| 3113 typedef typename StorageType::Bound6UnwrapTraits Bound6UnwrapTraits; |
| 3114 typedef typename StorageType::Bound7UnwrapTraits Bound7UnwrapTraits; |
| 3115 typedef typename StorageType::Bound8UnwrapTraits Bound8UnwrapTraits; |
| 3116 |
| 3117 typename Bound1UnwrapTraits::ForwardType x1 = |
| 3118 Bound1UnwrapTraits::Unwrap(storage->p1_); |
| 3119 typename Bound2UnwrapTraits::ForwardType x2 = |
| 3120 Bound2UnwrapTraits::Unwrap(storage->p2_); |
| 3121 typename Bound3UnwrapTraits::ForwardType x3 = |
| 3122 Bound3UnwrapTraits::Unwrap(storage->p3_); |
| 3123 typename Bound4UnwrapTraits::ForwardType x4 = |
| 3124 Bound4UnwrapTraits::Unwrap(storage->p4_); |
| 3125 typename Bound5UnwrapTraits::ForwardType x5 = |
| 3126 Bound5UnwrapTraits::Unwrap(storage->p5_); |
| 3127 typename Bound6UnwrapTraits::ForwardType x6 = |
| 3128 Bound6UnwrapTraits::Unwrap(storage->p6_); |
| 3129 typename Bound7UnwrapTraits::ForwardType x7 = |
| 3130 Bound7UnwrapTraits::Unwrap(storage->p7_); |
| 3131 typename Bound8UnwrapTraits::ForwardType x8 = |
| 3132 Bound8UnwrapTraits::Unwrap(storage->p8_); |
| 3133 return InvokeHelper<StorageType::IsWeakCall::value, R, |
| 3134 typename StorageType::RunnableType, |
| 3135 void(typename Bound1UnwrapTraits::ForwardType, |
| 3136 typename Bound2UnwrapTraits::ForwardType, |
| 3137 typename Bound3UnwrapTraits::ForwardType, |
| 3138 typename Bound4UnwrapTraits::ForwardType, |
| 3139 typename Bound5UnwrapTraits::ForwardType, |
| 3140 typename Bound6UnwrapTraits::ForwardType, |
| 3141 typename Bound7UnwrapTraits::ForwardType, |
| 3142 typename Bound8UnwrapTraits::ForwardType)> |
| 3143 ::MakeItSo(storage->runnable_, CallbackForward(x1), |
| 3144 CallbackForward(x2), CallbackForward(x3), |
| 3145 CallbackForward(x4), CallbackForward(x5), |
| 3146 CallbackForward(x6), CallbackForward(x7), |
| 3147 CallbackForward(x8)); |
| 3148 } |
| 3149 }; |
2521 | 3150 |
2522 // BindState<> | 3151 // BindState<> |
2523 // | 3152 // |
2524 // This stores all the state passed into Bind() and is also where most | 3153 // This stores all the state passed into Bind() and is also where most |
2525 // of the template resolution magic occurs. | 3154 // of the template resolution magic occurs. |
2526 // | 3155 // |
2527 // Runnable is the functor we are binding arguments to. | 3156 // Runnable is the functor we are binding arguments to. |
2528 // RunType is type of the Run() function that the Invoker<> should use. | 3157 // RunType is type of the Run() function that the Invoker<> should use. |
2529 // Normally, this is the same as the RunType of the Runnable, but it can | 3158 // Normally, this is the same as the RunType of the Runnable, but it can |
2530 // be different if an adapter like IgnoreResult() has been used. | 3159 // be different if an adapter like IgnoreResult() has been used. |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2779 RunnableType runnable_; | 3408 RunnableType runnable_; |
2780 P1 p1_; | 3409 P1 p1_; |
2781 P2 p2_; | 3410 P2 p2_; |
2782 P3 p3_; | 3411 P3 p3_; |
2783 P4 p4_; | 3412 P4 p4_; |
2784 P5 p5_; | 3413 P5 p5_; |
2785 P6 p6_; | 3414 P6 p6_; |
2786 P7 p7_; | 3415 P7 p7_; |
2787 }; | 3416 }; |
2788 | 3417 |
| 3418 template <typename Runnable, typename RunType, typename P1, typename P2, |
| 3419 typename P3, typename P4, typename P5, typename P6, typename P7, |
| 3420 typename P8> |
| 3421 struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6, |
| 3422 P7, P8)> : public BindStateBase { |
| 3423 typedef Runnable RunnableType; |
| 3424 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall; |
| 3425 typedef Invoker<8, BindState, RunType> InvokerType; |
| 3426 typedef typename InvokerType::UnboundRunType UnboundRunType; |
| 3427 |
| 3428 // Convenience typedefs for bound argument types. |
| 3429 typedef UnwrapTraits<P1> Bound1UnwrapTraits; |
| 3430 typedef UnwrapTraits<P2> Bound2UnwrapTraits; |
| 3431 typedef UnwrapTraits<P3> Bound3UnwrapTraits; |
| 3432 typedef UnwrapTraits<P4> Bound4UnwrapTraits; |
| 3433 typedef UnwrapTraits<P5> Bound5UnwrapTraits; |
| 3434 typedef UnwrapTraits<P6> Bound6UnwrapTraits; |
| 3435 typedef UnwrapTraits<P7> Bound7UnwrapTraits; |
| 3436 typedef UnwrapTraits<P8> Bound8UnwrapTraits; |
| 3437 |
| 3438 BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3, |
| 3439 const P4& p4, const P5& p5, const P6& p6, const P7& p7, const P8& p8) |
| 3440 : runnable_(runnable), |
| 3441 p1_(p1), |
| 3442 p2_(p2), |
| 3443 p3_(p3), |
| 3444 p4_(p4), |
| 3445 p5_(p5), |
| 3446 p6_(p6), |
| 3447 p7_(p7), |
| 3448 p8_(p8) { |
| 3449 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_); |
| 3450 } |
| 3451 |
| 3452 virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value, |
| 3453 P1>::Release(p1_); } |
| 3454 |
| 3455 RunnableType runnable_; |
| 3456 P1 p1_; |
| 3457 P2 p2_; |
| 3458 P3 p3_; |
| 3459 P4 p4_; |
| 3460 P5 p5_; |
| 3461 P6 p6_; |
| 3462 P7 p7_; |
| 3463 P8 p8_; |
| 3464 }; |
| 3465 |
2789 } // namespace internal | 3466 } // namespace internal |
2790 } // namespace base | 3467 } // namespace base |
2791 | 3468 |
2792 #endif // BASE_BIND_INTERNAL_H_ | 3469 #endif // BASE_BIND_INTERNAL_H_ |
OLD | NEW |