| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // bar = nullptr; | 58 // bar = nullptr; |
| 59 // // The functor stores an internal scoped_refptr<Bar>, so this is safe. | 59 // // The functor stores an internal scoped_refptr<Bar>, so this is safe. |
| 60 // functor(); | 60 // functor(); |
| 61 // } | 61 // } |
| 62 // | 62 // |
| 63 | 63 |
| 64 #ifndef WEBRTC_BASE_BIND_H_ | 64 #ifndef WEBRTC_BASE_BIND_H_ |
| 65 #define WEBRTC_BASE_BIND_H_ | 65 #define WEBRTC_BASE_BIND_H_ |
| 66 | 66 |
| 67 #include "webrtc/base/scoped_ref_ptr.h" | 67 #include "webrtc/base/scoped_ref_ptr.h" |
| 68 #include "webrtc/base/template_util.h" |
| 68 | 69 |
| 69 #define NONAME | 70 #define NONAME |
| 70 | 71 |
| 71 namespace rtc { | 72 namespace rtc { |
| 72 namespace detail { | 73 namespace detail { |
| 73 // This is needed because the template parameters in Bind can't be resolved | 74 // This is needed because the template parameters in Bind can't be resolved |
| 74 // if they're used both as parameters of the function pointer type and as | 75 // if they're used both as parameters of the function pointer type and as |
| 75 // parameters to Bind itself: the function pointer parameters are exact | 76 // parameters to Bind itself: the function pointer parameters are exact |
| 76 // matches to the function prototype, but the parameters to bind have | 77 // matches to the function prototype, but the parameters to bind have |
| 77 // references stripped. This trick allows the compiler to dictate the Bind | 78 // references stripped. This trick allows the compiler to dictate the Bind |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 122 |
| 122 // PointerType<T>::type will be scoped_refptr<T> for ref counted types, and T* | 123 // PointerType<T>::type will be scoped_refptr<T> for ref counted types, and T* |
| 123 // otherwise. | 124 // otherwise. |
| 124 template <class T> | 125 template <class T> |
| 125 struct PointerType { | 126 struct PointerType { |
| 126 typedef typename TernaryTypeOperator<IsRefCounted<T>::value, | 127 typedef typename TernaryTypeOperator<IsRefCounted<T>::value, |
| 127 scoped_refptr<T>, | 128 scoped_refptr<T>, |
| 128 T*>::type type; | 129 T*>::type type; |
| 129 }; | 130 }; |
| 130 | 131 |
| 131 // RemoveScopedPtrRef will capture scoped_refptr by-value instead of | |
| 132 // by-reference. | |
| 133 template <class T> struct RemoveScopedPtrRef { typedef T type; }; | |
| 134 template <class T> | |
| 135 struct RemoveScopedPtrRef<const scoped_refptr<T>&> { | |
| 136 typedef scoped_refptr<T> type; | |
| 137 }; | |
| 138 template <class T> | |
| 139 struct RemoveScopedPtrRef<scoped_refptr<T>&> { | |
| 140 typedef scoped_refptr<T> type; | |
| 141 }; | |
| 142 | |
| 143 } // namespace detail | 132 } // namespace detail |
| 144 | 133 |
| 145 template <class ObjectT, class MethodT, class R> | 134 template <class ObjectT, class MethodT, class R> |
| 146 class MethodFunctor0 { | 135 class MethodFunctor0 { |
| 147 public: | 136 public: |
| 148 MethodFunctor0(MethodT method, ObjectT* object) | 137 MethodFunctor0(MethodT method, ObjectT* object) |
| 149 : method_(method), object_(object) {} | 138 : method_(method), object_(object) {} |
| 150 R operator()() const { | 139 R operator()() const { |
| 151 return (object_->*method_)(); } | 140 return (object_->*method_)(); } |
| 152 private: | 141 private: |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 public: | 202 public: |
| 214 MethodFunctor1(MethodT method, ObjectT* object, | 203 MethodFunctor1(MethodT method, ObjectT* object, |
| 215 P1 p1) | 204 P1 p1) |
| 216 : method_(method), object_(object), | 205 : method_(method), object_(object), |
| 217 p1_(p1) {} | 206 p1_(p1) {} |
| 218 R operator()() const { | 207 R operator()() const { |
| 219 return (object_->*method_)(p1_); } | 208 return (object_->*method_)(p1_); } |
| 220 private: | 209 private: |
| 221 MethodT method_; | 210 MethodT method_; |
| 222 typename detail::PointerType<ObjectT>::type object_; | 211 typename detail::PointerType<ObjectT>::type object_; |
| 223 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 212 typename rtc::remove_reference<P1>::type p1_; |
| 224 }; | 213 }; |
| 225 | 214 |
| 226 template <class FunctorT, class R, | 215 template <class FunctorT, class R, |
| 227 class P1> | 216 class P1> |
| 228 class Functor1 { | 217 class Functor1 { |
| 229 public: | 218 public: |
| 230 Functor1(const FunctorT& functor, P1 p1) | 219 Functor1(const FunctorT& functor, P1 p1) |
| 231 : functor_(functor), | 220 : functor_(functor), |
| 232 p1_(p1) {} | 221 p1_(p1) {} |
| 233 R operator()() const { | 222 R operator()() const { |
| 234 return functor_(p1_); } | 223 return functor_(p1_); } |
| 235 private: | 224 private: |
| 236 FunctorT functor_; | 225 FunctorT functor_; |
| 237 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 226 typename rtc::remove_reference<P1>::type p1_; |
| 238 }; | 227 }; |
| 239 | 228 |
| 240 | 229 |
| 241 #define FP_T(x) R (ObjectT::*x)(P1) | 230 #define FP_T(x) R (ObjectT::*x)(P1) |
| 242 | 231 |
| 243 template <class ObjectT, class R, | 232 template <class ObjectT, class R, |
| 244 class P1> | 233 class P1> |
| 245 MethodFunctor1<ObjectT, FP_T(NONAME), R, P1> | 234 MethodFunctor1<ObjectT, FP_T(NONAME), R, P1> |
| 246 Bind(FP_T(method), ObjectT* object, | 235 Bind(FP_T(method), ObjectT* object, |
| 247 typename detail::identity<P1>::type p1) { | 236 typename detail::identity<P1>::type p1) { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 P1 p1, | 285 P1 p1, |
| 297 P2 p2) | 286 P2 p2) |
| 298 : method_(method), object_(object), | 287 : method_(method), object_(object), |
| 299 p1_(p1), | 288 p1_(p1), |
| 300 p2_(p2) {} | 289 p2_(p2) {} |
| 301 R operator()() const { | 290 R operator()() const { |
| 302 return (object_->*method_)(p1_, p2_); } | 291 return (object_->*method_)(p1_, p2_); } |
| 303 private: | 292 private: |
| 304 MethodT method_; | 293 MethodT method_; |
| 305 typename detail::PointerType<ObjectT>::type object_; | 294 typename detail::PointerType<ObjectT>::type object_; |
| 306 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 295 typename rtc::remove_reference<P1>::type p1_; |
| 307 typename detail::RemoveScopedPtrRef<P2>::type p2_; | 296 typename rtc::remove_reference<P2>::type p2_; |
| 308 }; | 297 }; |
| 309 | 298 |
| 310 template <class FunctorT, class R, | 299 template <class FunctorT, class R, |
| 311 class P1, | 300 class P1, |
| 312 class P2> | 301 class P2> |
| 313 class Functor2 { | 302 class Functor2 { |
| 314 public: | 303 public: |
| 315 Functor2(const FunctorT& functor, P1 p1, P2 p2) | 304 Functor2(const FunctorT& functor, P1 p1, P2 p2) |
| 316 : functor_(functor), | 305 : functor_(functor), |
| 317 p1_(p1), | 306 p1_(p1), |
| 318 p2_(p2) {} | 307 p2_(p2) {} |
| 319 R operator()() const { | 308 R operator()() const { |
| 320 return functor_(p1_, p2_); } | 309 return functor_(p1_, p2_); } |
| 321 private: | 310 private: |
| 322 FunctorT functor_; | 311 FunctorT functor_; |
| 323 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 312 typename rtc::remove_reference<P1>::type p1_; |
| 324 typename detail::RemoveScopedPtrRef<P2>::type p2_; | 313 typename rtc::remove_reference<P2>::type p2_; |
| 325 }; | 314 }; |
| 326 | 315 |
| 327 | 316 |
| 328 #define FP_T(x) R (ObjectT::*x)(P1, P2) | 317 #define FP_T(x) R (ObjectT::*x)(P1, P2) |
| 329 | 318 |
| 330 template <class ObjectT, class R, | 319 template <class ObjectT, class R, |
| 331 class P1, | 320 class P1, |
| 332 class P2> | 321 class P2> |
| 333 MethodFunctor2<ObjectT, FP_T(NONAME), R, P1, P2> | 322 MethodFunctor2<ObjectT, FP_T(NONAME), R, P1, P2> |
| 334 Bind(FP_T(method), ObjectT* object, | 323 Bind(FP_T(method), ObjectT* object, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 P3 p3) | 383 P3 p3) |
| 395 : method_(method), object_(object), | 384 : method_(method), object_(object), |
| 396 p1_(p1), | 385 p1_(p1), |
| 397 p2_(p2), | 386 p2_(p2), |
| 398 p3_(p3) {} | 387 p3_(p3) {} |
| 399 R operator()() const { | 388 R operator()() const { |
| 400 return (object_->*method_)(p1_, p2_, p3_); } | 389 return (object_->*method_)(p1_, p2_, p3_); } |
| 401 private: | 390 private: |
| 402 MethodT method_; | 391 MethodT method_; |
| 403 typename detail::PointerType<ObjectT>::type object_; | 392 typename detail::PointerType<ObjectT>::type object_; |
| 404 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 393 typename rtc::remove_reference<P1>::type p1_; |
| 405 typename detail::RemoveScopedPtrRef<P2>::type p2_; | 394 typename rtc::remove_reference<P2>::type p2_; |
| 406 typename detail::RemoveScopedPtrRef<P3>::type p3_; | 395 typename rtc::remove_reference<P3>::type p3_; |
| 407 }; | 396 }; |
| 408 | 397 |
| 409 template <class FunctorT, class R, | 398 template <class FunctorT, class R, |
| 410 class P1, | 399 class P1, |
| 411 class P2, | 400 class P2, |
| 412 class P3> | 401 class P3> |
| 413 class Functor3 { | 402 class Functor3 { |
| 414 public: | 403 public: |
| 415 Functor3(const FunctorT& functor, P1 p1, P2 p2, P3 p3) | 404 Functor3(const FunctorT& functor, P1 p1, P2 p2, P3 p3) |
| 416 : functor_(functor), | 405 : functor_(functor), |
| 417 p1_(p1), | 406 p1_(p1), |
| 418 p2_(p2), | 407 p2_(p2), |
| 419 p3_(p3) {} | 408 p3_(p3) {} |
| 420 R operator()() const { | 409 R operator()() const { |
| 421 return functor_(p1_, p2_, p3_); } | 410 return functor_(p1_, p2_, p3_); } |
| 422 private: | 411 private: |
| 423 FunctorT functor_; | 412 FunctorT functor_; |
| 424 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 413 typename rtc::remove_reference<P1>::type p1_; |
| 425 typename detail::RemoveScopedPtrRef<P2>::type p2_; | 414 typename rtc::remove_reference<P2>::type p2_; |
| 426 typename detail::RemoveScopedPtrRef<P3>::type p3_; | 415 typename rtc::remove_reference<P3>::type p3_; |
| 427 }; | 416 }; |
| 428 | 417 |
| 429 | 418 |
| 430 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3) | 419 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3) |
| 431 | 420 |
| 432 template <class ObjectT, class R, | 421 template <class ObjectT, class R, |
| 433 class P1, | 422 class P1, |
| 434 class P2, | 423 class P2, |
| 435 class P3> | 424 class P3> |
| 436 MethodFunctor3<ObjectT, FP_T(NONAME), R, P1, P2, P3> | 425 MethodFunctor3<ObjectT, FP_T(NONAME), R, P1, P2, P3> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 : method_(method), object_(object), | 496 : method_(method), object_(object), |
| 508 p1_(p1), | 497 p1_(p1), |
| 509 p2_(p2), | 498 p2_(p2), |
| 510 p3_(p3), | 499 p3_(p3), |
| 511 p4_(p4) {} | 500 p4_(p4) {} |
| 512 R operator()() const { | 501 R operator()() const { |
| 513 return (object_->*method_)(p1_, p2_, p3_, p4_); } | 502 return (object_->*method_)(p1_, p2_, p3_, p4_); } |
| 514 private: | 503 private: |
| 515 MethodT method_; | 504 MethodT method_; |
| 516 typename detail::PointerType<ObjectT>::type object_; | 505 typename detail::PointerType<ObjectT>::type object_; |
| 517 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 506 typename rtc::remove_reference<P1>::type p1_; |
| 518 typename detail::RemoveScopedPtrRef<P2>::type p2_; | 507 typename rtc::remove_reference<P2>::type p2_; |
| 519 typename detail::RemoveScopedPtrRef<P3>::type p3_; | 508 typename rtc::remove_reference<P3>::type p3_; |
| 520 typename detail::RemoveScopedPtrRef<P4>::type p4_; | 509 typename rtc::remove_reference<P4>::type p4_; |
| 521 }; | 510 }; |
| 522 | 511 |
| 523 template <class FunctorT, class R, | 512 template <class FunctorT, class R, |
| 524 class P1, | 513 class P1, |
| 525 class P2, | 514 class P2, |
| 526 class P3, | 515 class P3, |
| 527 class P4> | 516 class P4> |
| 528 class Functor4 { | 517 class Functor4 { |
| 529 public: | 518 public: |
| 530 Functor4(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4) | 519 Functor4(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4) |
| 531 : functor_(functor), | 520 : functor_(functor), |
| 532 p1_(p1), | 521 p1_(p1), |
| 533 p2_(p2), | 522 p2_(p2), |
| 534 p3_(p3), | 523 p3_(p3), |
| 535 p4_(p4) {} | 524 p4_(p4) {} |
| 536 R operator()() const { | 525 R operator()() const { |
| 537 return functor_(p1_, p2_, p3_, p4_); } | 526 return functor_(p1_, p2_, p3_, p4_); } |
| 538 private: | 527 private: |
| 539 FunctorT functor_; | 528 FunctorT functor_; |
| 540 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 529 typename rtc::remove_reference<P1>::type p1_; |
| 541 typename detail::RemoveScopedPtrRef<P2>::type p2_; | 530 typename rtc::remove_reference<P2>::type p2_; |
| 542 typename detail::RemoveScopedPtrRef<P3>::type p3_; | 531 typename rtc::remove_reference<P3>::type p3_; |
| 543 typename detail::RemoveScopedPtrRef<P4>::type p4_; | 532 typename rtc::remove_reference<P4>::type p4_; |
| 544 }; | 533 }; |
| 545 | 534 |
| 546 | 535 |
| 547 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4) | 536 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4) |
| 548 | 537 |
| 549 template <class ObjectT, class R, | 538 template <class ObjectT, class R, |
| 550 class P1, | 539 class P1, |
| 551 class P2, | 540 class P2, |
| 552 class P3, | 541 class P3, |
| 553 class P4> | 542 class P4> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 p1_(p1), | 624 p1_(p1), |
| 636 p2_(p2), | 625 p2_(p2), |
| 637 p3_(p3), | 626 p3_(p3), |
| 638 p4_(p4), | 627 p4_(p4), |
| 639 p5_(p5) {} | 628 p5_(p5) {} |
| 640 R operator()() const { | 629 R operator()() const { |
| 641 return (object_->*method_)(p1_, p2_, p3_, p4_, p5_); } | 630 return (object_->*method_)(p1_, p2_, p3_, p4_, p5_); } |
| 642 private: | 631 private: |
| 643 MethodT method_; | 632 MethodT method_; |
| 644 typename detail::PointerType<ObjectT>::type object_; | 633 typename detail::PointerType<ObjectT>::type object_; |
| 645 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 634 typename rtc::remove_reference<P1>::type p1_; |
| 646 typename detail::RemoveScopedPtrRef<P2>::type p2_; | 635 typename rtc::remove_reference<P2>::type p2_; |
| 647 typename detail::RemoveScopedPtrRef<P3>::type p3_; | 636 typename rtc::remove_reference<P3>::type p3_; |
| 648 typename detail::RemoveScopedPtrRef<P4>::type p4_; | 637 typename rtc::remove_reference<P4>::type p4_; |
| 649 typename detail::RemoveScopedPtrRef<P5>::type p5_; | 638 typename rtc::remove_reference<P5>::type p5_; |
| 650 }; | 639 }; |
| 651 | 640 |
| 652 template <class FunctorT, class R, | 641 template <class FunctorT, class R, |
| 653 class P1, | 642 class P1, |
| 654 class P2, | 643 class P2, |
| 655 class P3, | 644 class P3, |
| 656 class P4, | 645 class P4, |
| 657 class P5> | 646 class P5> |
| 658 class Functor5 { | 647 class Functor5 { |
| 659 public: | 648 public: |
| 660 Functor5(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) | 649 Functor5(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) |
| 661 : functor_(functor), | 650 : functor_(functor), |
| 662 p1_(p1), | 651 p1_(p1), |
| 663 p2_(p2), | 652 p2_(p2), |
| 664 p3_(p3), | 653 p3_(p3), |
| 665 p4_(p4), | 654 p4_(p4), |
| 666 p5_(p5) {} | 655 p5_(p5) {} |
| 667 R operator()() const { | 656 R operator()() const { |
| 668 return functor_(p1_, p2_, p3_, p4_, p5_); } | 657 return functor_(p1_, p2_, p3_, p4_, p5_); } |
| 669 private: | 658 private: |
| 670 FunctorT functor_; | 659 FunctorT functor_; |
| 671 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 660 typename rtc::remove_reference<P1>::type p1_; |
| 672 typename detail::RemoveScopedPtrRef<P2>::type p2_; | 661 typename rtc::remove_reference<P2>::type p2_; |
| 673 typename detail::RemoveScopedPtrRef<P3>::type p3_; | 662 typename rtc::remove_reference<P3>::type p3_; |
| 674 typename detail::RemoveScopedPtrRef<P4>::type p4_; | 663 typename rtc::remove_reference<P4>::type p4_; |
| 675 typename detail::RemoveScopedPtrRef<P5>::type p5_; | 664 typename rtc::remove_reference<P5>::type p5_; |
| 676 }; | 665 }; |
| 677 | 666 |
| 678 | 667 |
| 679 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5) | 668 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5) |
| 680 | 669 |
| 681 template <class ObjectT, class R, | 670 template <class ObjectT, class R, |
| 682 class P1, | 671 class P1, |
| 683 class P2, | 672 class P2, |
| 684 class P3, | 673 class P3, |
| 685 class P4, | 674 class P4, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 p2_(p2), | 767 p2_(p2), |
| 779 p3_(p3), | 768 p3_(p3), |
| 780 p4_(p4), | 769 p4_(p4), |
| 781 p5_(p5), | 770 p5_(p5), |
| 782 p6_(p6) {} | 771 p6_(p6) {} |
| 783 R operator()() const { | 772 R operator()() const { |
| 784 return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_); } | 773 return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_); } |
| 785 private: | 774 private: |
| 786 MethodT method_; | 775 MethodT method_; |
| 787 typename detail::PointerType<ObjectT>::type object_; | 776 typename detail::PointerType<ObjectT>::type object_; |
| 788 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 777 typename rtc::remove_reference<P1>::type p1_; |
| 789 typename detail::RemoveScopedPtrRef<P2>::type p2_; | 778 typename rtc::remove_reference<P2>::type p2_; |
| 790 typename detail::RemoveScopedPtrRef<P3>::type p3_; | 779 typename rtc::remove_reference<P3>::type p3_; |
| 791 typename detail::RemoveScopedPtrRef<P4>::type p4_; | 780 typename rtc::remove_reference<P4>::type p4_; |
| 792 typename detail::RemoveScopedPtrRef<P5>::type p5_; | 781 typename rtc::remove_reference<P5>::type p5_; |
| 793 typename detail::RemoveScopedPtrRef<P6>::type p6_; | 782 typename rtc::remove_reference<P6>::type p6_; |
| 794 }; | 783 }; |
| 795 | 784 |
| 796 template <class FunctorT, class R, | 785 template <class FunctorT, class R, |
| 797 class P1, | 786 class P1, |
| 798 class P2, | 787 class P2, |
| 799 class P3, | 788 class P3, |
| 800 class P4, | 789 class P4, |
| 801 class P5, | 790 class P5, |
| 802 class P6> | 791 class P6> |
| 803 class Functor6 { | 792 class Functor6 { |
| 804 public: | 793 public: |
| 805 Functor6(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) | 794 Functor6(const FunctorT& functor, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) |
| 806 : functor_(functor), | 795 : functor_(functor), |
| 807 p1_(p1), | 796 p1_(p1), |
| 808 p2_(p2), | 797 p2_(p2), |
| 809 p3_(p3), | 798 p3_(p3), |
| 810 p4_(p4), | 799 p4_(p4), |
| 811 p5_(p5), | 800 p5_(p5), |
| 812 p6_(p6) {} | 801 p6_(p6) {} |
| 813 R operator()() const { | 802 R operator()() const { |
| 814 return functor_(p1_, p2_, p3_, p4_, p5_, p6_); } | 803 return functor_(p1_, p2_, p3_, p4_, p5_, p6_); } |
| 815 private: | 804 private: |
| 816 FunctorT functor_; | 805 FunctorT functor_; |
| 817 typename detail::RemoveScopedPtrRef<P1>::type p1_; | 806 typename rtc::remove_reference<P1>::type p1_; |
| 818 typename detail::RemoveScopedPtrRef<P2>::type p2_; | 807 typename rtc::remove_reference<P2>::type p2_; |
| 819 typename detail::RemoveScopedPtrRef<P3>::type p3_; | 808 typename rtc::remove_reference<P3>::type p3_; |
| 820 typename detail::RemoveScopedPtrRef<P4>::type p4_; | 809 typename rtc::remove_reference<P4>::type p4_; |
| 821 typename detail::RemoveScopedPtrRef<P5>::type p5_; | 810 typename rtc::remove_reference<P5>::type p5_; |
| 822 typename detail::RemoveScopedPtrRef<P6>::type p6_; | 811 typename rtc::remove_reference<P6>::type p6_; |
| 823 }; | 812 }; |
| 824 | 813 |
| 825 | 814 |
| 826 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6) | 815 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6) |
| 827 | 816 |
| 828 template <class ObjectT, class R, | 817 template <class ObjectT, class R, |
| 829 class P1, | 818 class P1, |
| 830 class P2, | 819 class P2, |
| 831 class P3, | 820 class P3, |
| 832 class P4, | 821 class P4, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 typename detail::identity<P3>::type p3, | 894 typename detail::identity<P3>::type p3, |
| 906 typename detail::identity<P4>::type p4, | 895 typename detail::identity<P4>::type p4, |
| 907 typename detail::identity<P5>::type p5, | 896 typename detail::identity<P5>::type p5, |
| 908 typename detail::identity<P6>::type p6) { | 897 typename detail::identity<P6>::type p6) { |
| 909 return Functor6<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6>( | 898 return Functor6<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6>( |
| 910 function, p1, p2, p3, p4, p5, p6); | 899 function, p1, p2, p3, p4, p5, p6); |
| 911 } | 900 } |
| 912 | 901 |
| 913 #undef FP_T | 902 #undef FP_T |
| 914 | 903 |
| 904 template <class ObjectT, |
| 905 class MethodT, |
| 906 class R, |
| 907 class P1, |
| 908 class P2, |
| 909 class P3, |
| 910 class P4, |
| 911 class P5, |
| 912 class P6, |
| 913 class P7> |
| 914 class MethodFunctor7 { |
| 915 public: |
| 916 MethodFunctor7(MethodT method, |
| 917 ObjectT* object, |
| 918 P1 p1, |
| 919 P2 p2, |
| 920 P3 p3, |
| 921 P4 p4, |
| 922 P5 p5, |
| 923 P6 p6, |
| 924 P7 p7) |
| 925 : method_(method), |
| 926 object_(object), |
| 927 p1_(p1), |
| 928 p2_(p2), |
| 929 p3_(p3), |
| 930 p4_(p4), |
| 931 p5_(p5), |
| 932 p6_(p6), |
| 933 p7_(p7) {} |
| 934 R operator()() const { |
| 935 return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_, p7_); |
| 936 } |
| 937 |
| 938 private: |
| 939 MethodT method_; |
| 940 typename detail::PointerType<ObjectT>::type object_; |
| 941 typename rtc::remove_reference<P1>::type p1_; |
| 942 typename rtc::remove_reference<P2>::type p2_; |
| 943 typename rtc::remove_reference<P3>::type p3_; |
| 944 typename rtc::remove_reference<P4>::type p4_; |
| 945 typename rtc::remove_reference<P5>::type p5_; |
| 946 typename rtc::remove_reference<P6>::type p6_; |
| 947 typename rtc::remove_reference<P7>::type p7_; |
| 948 }; |
| 949 |
| 950 template <class FunctorT, |
| 951 class R, |
| 952 class P1, |
| 953 class P2, |
| 954 class P3, |
| 955 class P4, |
| 956 class P5, |
| 957 class P6, |
| 958 class P7> |
| 959 class Functor7 { |
| 960 public: |
| 961 Functor7(const FunctorT& functor, |
| 962 P1 p1, |
| 963 P2 p2, |
| 964 P3 p3, |
| 965 P4 p4, |
| 966 P5 p5, |
| 967 P6 p6, |
| 968 P7 p7) |
| 969 : functor_(functor), |
| 970 p1_(p1), |
| 971 p2_(p2), |
| 972 p3_(p3), |
| 973 p4_(p4), |
| 974 p5_(p5), |
| 975 p6_(p6), |
| 976 p7_(p7) {} |
| 977 R operator()() const { return functor_(p1_, p2_, p3_, p4_, p5_, p6_, p7_); } |
| 978 |
| 979 private: |
| 980 FunctorT functor_; |
| 981 typename rtc::remove_reference<P1>::type p1_; |
| 982 typename rtc::remove_reference<P2>::type p2_; |
| 983 typename rtc::remove_reference<P3>::type p3_; |
| 984 typename rtc::remove_reference<P4>::type p4_; |
| 985 typename rtc::remove_reference<P5>::type p5_; |
| 986 typename rtc::remove_reference<P6>::type p6_; |
| 987 typename rtc::remove_reference<P7>::type p7_; |
| 988 }; |
| 989 |
| 990 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7) |
| 991 |
| 992 template <class ObjectT, |
| 993 class R, |
| 994 class P1, |
| 995 class P2, |
| 996 class P3, |
| 997 class P4, |
| 998 class P5, |
| 999 class P6, |
| 1000 class P7> |
| 1001 MethodFunctor7<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7> Bind( |
| 1002 FP_T(method), |
| 1003 ObjectT* object, |
| 1004 typename detail::identity<P1>::type p1, |
| 1005 typename detail::identity<P2>::type p2, |
| 1006 typename detail::identity<P3>::type p3, |
| 1007 typename detail::identity<P4>::type p4, |
| 1008 typename detail::identity<P5>::type p5, |
| 1009 typename detail::identity<P6>::type p6, |
| 1010 typename detail::identity<P7>::type p7) { |
| 1011 return MethodFunctor7<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7>( |
| 1012 method, object, p1, p2, p3, p4, p5, p6, p7); |
| 1013 } |
| 1014 |
| 1015 #undef FP_T |
| 1016 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7) const |
| 1017 |
| 1018 template <class ObjectT, |
| 1019 class R, |
| 1020 class P1, |
| 1021 class P2, |
| 1022 class P3, |
| 1023 class P4, |
| 1024 class P5, |
| 1025 class P6, |
| 1026 class P7> |
| 1027 MethodFunctor7<const ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7> Bind( |
| 1028 FP_T(method), |
| 1029 const ObjectT* object, |
| 1030 typename detail::identity<P1>::type p1, |
| 1031 typename detail::identity<P2>::type p2, |
| 1032 typename detail::identity<P3>::type p3, |
| 1033 typename detail::identity<P4>::type p4, |
| 1034 typename detail::identity<P5>::type p5, |
| 1035 typename detail::identity<P6>::type p6, |
| 1036 typename detail::identity<P7>::type p7) { |
| 1037 return MethodFunctor7<const ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, |
| 1038 P7>(method, object, p1, p2, p3, p4, p5, p6, p7); |
| 1039 } |
| 1040 |
| 1041 #undef FP_T |
| 1042 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7) |
| 1043 |
| 1044 template <class ObjectT, |
| 1045 class R, |
| 1046 class P1, |
| 1047 class P2, |
| 1048 class P3, |
| 1049 class P4, |
| 1050 class P5, |
| 1051 class P6, |
| 1052 class P7> |
| 1053 MethodFunctor7<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7> Bind( |
| 1054 FP_T(method), |
| 1055 const scoped_refptr<ObjectT>& object, |
| 1056 typename detail::identity<P1>::type p1, |
| 1057 typename detail::identity<P2>::type p2, |
| 1058 typename detail::identity<P3>::type p3, |
| 1059 typename detail::identity<P4>::type p4, |
| 1060 typename detail::identity<P5>::type p5, |
| 1061 typename detail::identity<P6>::type p6, |
| 1062 typename detail::identity<P7>::type p7) { |
| 1063 return MethodFunctor7<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7>( |
| 1064 method, object.get(), p1, p2, p3, p4, p5, p6, p7); |
| 1065 } |
| 1066 |
| 1067 #undef FP_T |
| 1068 #define FP_T(x) R (*x)(P1, P2, P3, P4, P5, P6, P7) |
| 1069 |
| 1070 template <class R, |
| 1071 class P1, |
| 1072 class P2, |
| 1073 class P3, |
| 1074 class P4, |
| 1075 class P5, |
| 1076 class P6, |
| 1077 class P7> |
| 1078 Functor7<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7> Bind( |
| 1079 FP_T(function), |
| 1080 typename detail::identity<P1>::type p1, |
| 1081 typename detail::identity<P2>::type p2, |
| 1082 typename detail::identity<P3>::type p3, |
| 1083 typename detail::identity<P4>::type p4, |
| 1084 typename detail::identity<P5>::type p5, |
| 1085 typename detail::identity<P6>::type p6, |
| 1086 typename detail::identity<P7>::type p7) { |
| 1087 return Functor7<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7>( |
| 1088 function, p1, p2, p3, p4, p5, p6, p7); |
| 1089 } |
| 1090 |
| 1091 #undef FP_T |
| 1092 |
| 1093 template <class ObjectT, |
| 1094 class MethodT, |
| 1095 class R, |
| 1096 class P1, |
| 1097 class P2, |
| 1098 class P3, |
| 1099 class P4, |
| 1100 class P5, |
| 1101 class P6, |
| 1102 class P7, |
| 1103 class P8> |
| 1104 class MethodFunctor8 { |
| 1105 public: |
| 1106 MethodFunctor8(MethodT method, |
| 1107 ObjectT* object, |
| 1108 P1 p1, |
| 1109 P2 p2, |
| 1110 P3 p3, |
| 1111 P4 p4, |
| 1112 P5 p5, |
| 1113 P6 p6, |
| 1114 P7 p7, |
| 1115 P8 p8) |
| 1116 : method_(method), |
| 1117 object_(object), |
| 1118 p1_(p1), |
| 1119 p2_(p2), |
| 1120 p3_(p3), |
| 1121 p4_(p4), |
| 1122 p5_(p5), |
| 1123 p6_(p6), |
| 1124 p7_(p7), |
| 1125 p8_(p8) {} |
| 1126 R operator()() const { |
| 1127 return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_, p7_, p8_); |
| 1128 } |
| 1129 |
| 1130 private: |
| 1131 MethodT method_; |
| 1132 typename detail::PointerType<ObjectT>::type object_; |
| 1133 typename rtc::remove_reference<P1>::type p1_; |
| 1134 typename rtc::remove_reference<P2>::type p2_; |
| 1135 typename rtc::remove_reference<P3>::type p3_; |
| 1136 typename rtc::remove_reference<P4>::type p4_; |
| 1137 typename rtc::remove_reference<P5>::type p5_; |
| 1138 typename rtc::remove_reference<P6>::type p6_; |
| 1139 typename rtc::remove_reference<P7>::type p7_; |
| 1140 typename rtc::remove_reference<P8>::type p8_; |
| 1141 }; |
| 1142 |
| 1143 template <class FunctorT, |
| 1144 class R, |
| 1145 class P1, |
| 1146 class P2, |
| 1147 class P3, |
| 1148 class P4, |
| 1149 class P5, |
| 1150 class P6, |
| 1151 class P7, |
| 1152 class P8> |
| 1153 class Functor8 { |
| 1154 public: |
| 1155 Functor8(const FunctorT& functor, |
| 1156 P1 p1, |
| 1157 P2 p2, |
| 1158 P3 p3, |
| 1159 P4 p4, |
| 1160 P5 p5, |
| 1161 P6 p6, |
| 1162 P7 p7, |
| 1163 P8 p8) |
| 1164 : functor_(functor), |
| 1165 p1_(p1), |
| 1166 p2_(p2), |
| 1167 p3_(p3), |
| 1168 p4_(p4), |
| 1169 p5_(p5), |
| 1170 p6_(p6), |
| 1171 p7_(p7), |
| 1172 p8_(p8) {} |
| 1173 R operator()() const { |
| 1174 return functor_(p1_, p2_, p3_, p4_, p5_, p6_, p7_, p8_); |
| 1175 } |
| 1176 |
| 1177 private: |
| 1178 FunctorT functor_; |
| 1179 typename rtc::remove_reference<P1>::type p1_; |
| 1180 typename rtc::remove_reference<P2>::type p2_; |
| 1181 typename rtc::remove_reference<P3>::type p3_; |
| 1182 typename rtc::remove_reference<P4>::type p4_; |
| 1183 typename rtc::remove_reference<P5>::type p5_; |
| 1184 typename rtc::remove_reference<P6>::type p6_; |
| 1185 typename rtc::remove_reference<P7>::type p7_; |
| 1186 typename rtc::remove_reference<P8>::type p8_; |
| 1187 }; |
| 1188 |
| 1189 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8) |
| 1190 |
| 1191 template <class ObjectT, |
| 1192 class R, |
| 1193 class P1, |
| 1194 class P2, |
| 1195 class P3, |
| 1196 class P4, |
| 1197 class P5, |
| 1198 class P6, |
| 1199 class P7, |
| 1200 class P8> |
| 1201 MethodFunctor8<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, P8> Bind( |
| 1202 FP_T(method), |
| 1203 ObjectT* object, |
| 1204 typename detail::identity<P1>::type p1, |
| 1205 typename detail::identity<P2>::type p2, |
| 1206 typename detail::identity<P3>::type p3, |
| 1207 typename detail::identity<P4>::type p4, |
| 1208 typename detail::identity<P5>::type p5, |
| 1209 typename detail::identity<P6>::type p6, |
| 1210 typename detail::identity<P7>::type p7, |
| 1211 typename detail::identity<P8>::type p8) { |
| 1212 return MethodFunctor8<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, |
| 1213 P8>(method, object, p1, p2, p3, p4, p5, p6, p7, p8); |
| 1214 } |
| 1215 |
| 1216 #undef FP_T |
| 1217 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8) const |
| 1218 |
| 1219 template <class ObjectT, |
| 1220 class R, |
| 1221 class P1, |
| 1222 class P2, |
| 1223 class P3, |
| 1224 class P4, |
| 1225 class P5, |
| 1226 class P6, |
| 1227 class P7, |
| 1228 class P8> |
| 1229 MethodFunctor8<const ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, P8> |
| 1230 Bind(FP_T(method), |
| 1231 const ObjectT* object, |
| 1232 typename detail::identity<P1>::type p1, |
| 1233 typename detail::identity<P2>::type p2, |
| 1234 typename detail::identity<P3>::type p3, |
| 1235 typename detail::identity<P4>::type p4, |
| 1236 typename detail::identity<P5>::type p5, |
| 1237 typename detail::identity<P6>::type p6, |
| 1238 typename detail::identity<P7>::type p7, |
| 1239 typename detail::identity<P8>::type p8) { |
| 1240 return MethodFunctor8<const ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, |
| 1241 P7, P8>(method, object, p1, p2, p3, p4, p5, p6, p7, p8); |
| 1242 } |
| 1243 |
| 1244 #undef FP_T |
| 1245 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8) |
| 1246 |
| 1247 template <class ObjectT, |
| 1248 class R, |
| 1249 class P1, |
| 1250 class P2, |
| 1251 class P3, |
| 1252 class P4, |
| 1253 class P5, |
| 1254 class P6, |
| 1255 class P7, |
| 1256 class P8> |
| 1257 MethodFunctor8<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, P8> Bind( |
| 1258 FP_T(method), |
| 1259 const scoped_refptr<ObjectT>& object, |
| 1260 typename detail::identity<P1>::type p1, |
| 1261 typename detail::identity<P2>::type p2, |
| 1262 typename detail::identity<P3>::type p3, |
| 1263 typename detail::identity<P4>::type p4, |
| 1264 typename detail::identity<P5>::type p5, |
| 1265 typename detail::identity<P6>::type p6, |
| 1266 typename detail::identity<P7>::type p7, |
| 1267 typename detail::identity<P8>::type p8) { |
| 1268 return MethodFunctor8<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, |
| 1269 P8>(method, object.get(), p1, p2, p3, p4, p5, p6, p7, |
| 1270 p8); |
| 1271 } |
| 1272 |
| 1273 #undef FP_T |
| 1274 #define FP_T(x) R (*x)(P1, P2, P3, P4, P5, P6, P7, P8) |
| 1275 |
| 1276 template <class R, |
| 1277 class P1, |
| 1278 class P2, |
| 1279 class P3, |
| 1280 class P4, |
| 1281 class P5, |
| 1282 class P6, |
| 1283 class P7, |
| 1284 class P8> |
| 1285 Functor8<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, P8> Bind( |
| 1286 FP_T(function), |
| 1287 typename detail::identity<P1>::type p1, |
| 1288 typename detail::identity<P2>::type p2, |
| 1289 typename detail::identity<P3>::type p3, |
| 1290 typename detail::identity<P4>::type p4, |
| 1291 typename detail::identity<P5>::type p5, |
| 1292 typename detail::identity<P6>::type p6, |
| 1293 typename detail::identity<P7>::type p7, |
| 1294 typename detail::identity<P8>::type p8) { |
| 1295 return Functor8<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, P8>( |
| 1296 function, p1, p2, p3, p4, p5, p6, p7, p8); |
| 1297 } |
| 1298 |
| 1299 #undef FP_T |
| 1300 |
| 1301 template <class ObjectT, |
| 1302 class MethodT, |
| 1303 class R, |
| 1304 class P1, |
| 1305 class P2, |
| 1306 class P3, |
| 1307 class P4, |
| 1308 class P5, |
| 1309 class P6, |
| 1310 class P7, |
| 1311 class P8, |
| 1312 class P9> |
| 1313 class MethodFunctor9 { |
| 1314 public: |
| 1315 MethodFunctor9(MethodT method, |
| 1316 ObjectT* object, |
| 1317 P1 p1, |
| 1318 P2 p2, |
| 1319 P3 p3, |
| 1320 P4 p4, |
| 1321 P5 p5, |
| 1322 P6 p6, |
| 1323 P7 p7, |
| 1324 P8 p8, |
| 1325 P9 p9) |
| 1326 : method_(method), |
| 1327 object_(object), |
| 1328 p1_(p1), |
| 1329 p2_(p2), |
| 1330 p3_(p3), |
| 1331 p4_(p4), |
| 1332 p5_(p5), |
| 1333 p6_(p6), |
| 1334 p7_(p7), |
| 1335 p8_(p8), |
| 1336 p9_(p9) {} |
| 1337 R operator()() const { |
| 1338 return (object_->*method_)(p1_, p2_, p3_, p4_, p5_, p6_, p7_, p8_, p9_); |
| 1339 } |
| 1340 |
| 1341 private: |
| 1342 MethodT method_; |
| 1343 typename detail::PointerType<ObjectT>::type object_; |
| 1344 typename rtc::remove_reference<P1>::type p1_; |
| 1345 typename rtc::remove_reference<P2>::type p2_; |
| 1346 typename rtc::remove_reference<P3>::type p3_; |
| 1347 typename rtc::remove_reference<P4>::type p4_; |
| 1348 typename rtc::remove_reference<P5>::type p5_; |
| 1349 typename rtc::remove_reference<P6>::type p6_; |
| 1350 typename rtc::remove_reference<P7>::type p7_; |
| 1351 typename rtc::remove_reference<P8>::type p8_; |
| 1352 typename rtc::remove_reference<P9>::type p9_; |
| 1353 }; |
| 1354 |
| 1355 template <class FunctorT, |
| 1356 class R, |
| 1357 class P1, |
| 1358 class P2, |
| 1359 class P3, |
| 1360 class P4, |
| 1361 class P5, |
| 1362 class P6, |
| 1363 class P7, |
| 1364 class P8, |
| 1365 class P9> |
| 1366 class Functor9 { |
| 1367 public: |
| 1368 Functor9(const FunctorT& functor, |
| 1369 P1 p1, |
| 1370 P2 p2, |
| 1371 P3 p3, |
| 1372 P4 p4, |
| 1373 P5 p5, |
| 1374 P6 p6, |
| 1375 P7 p7, |
| 1376 P8 p8, |
| 1377 P9 p9) |
| 1378 : functor_(functor), |
| 1379 p1_(p1), |
| 1380 p2_(p2), |
| 1381 p3_(p3), |
| 1382 p4_(p4), |
| 1383 p5_(p5), |
| 1384 p6_(p6), |
| 1385 p7_(p7), |
| 1386 p8_(p8), |
| 1387 p9_(p9) {} |
| 1388 R operator()() const { |
| 1389 return functor_(p1_, p2_, p3_, p4_, p5_, p6_, p7_, p8_, p9_); |
| 1390 } |
| 1391 |
| 1392 private: |
| 1393 FunctorT functor_; |
| 1394 typename rtc::remove_reference<P1>::type p1_; |
| 1395 typename rtc::remove_reference<P2>::type p2_; |
| 1396 typename rtc::remove_reference<P3>::type p3_; |
| 1397 typename rtc::remove_reference<P4>::type p4_; |
| 1398 typename rtc::remove_reference<P5>::type p5_; |
| 1399 typename rtc::remove_reference<P6>::type p6_; |
| 1400 typename rtc::remove_reference<P7>::type p7_; |
| 1401 typename rtc::remove_reference<P8>::type p8_; |
| 1402 typename rtc::remove_reference<P9>::type p9_; |
| 1403 }; |
| 1404 |
| 1405 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8, P9) |
| 1406 |
| 1407 template <class ObjectT, |
| 1408 class R, |
| 1409 class P1, |
| 1410 class P2, |
| 1411 class P3, |
| 1412 class P4, |
| 1413 class P5, |
| 1414 class P6, |
| 1415 class P7, |
| 1416 class P8, |
| 1417 class P9> |
| 1418 MethodFunctor9<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, P8, P9> |
| 1419 Bind(FP_T(method), |
| 1420 ObjectT* object, |
| 1421 typename detail::identity<P1>::type p1, |
| 1422 typename detail::identity<P2>::type p2, |
| 1423 typename detail::identity<P3>::type p3, |
| 1424 typename detail::identity<P4>::type p4, |
| 1425 typename detail::identity<P5>::type p5, |
| 1426 typename detail::identity<P6>::type p6, |
| 1427 typename detail::identity<P7>::type p7, |
| 1428 typename detail::identity<P8>::type p8, |
| 1429 typename detail::identity<P9>::type p9) { |
| 1430 return MethodFunctor9<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, |
| 1431 P8, P9>(method, object, p1, p2, p3, p4, p5, p6, p7, p8, |
| 1432 p9); |
| 1433 } |
| 1434 |
| 1435 #undef FP_T |
| 1436 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8, P9) const |
| 1437 |
| 1438 template <class ObjectT, |
| 1439 class R, |
| 1440 class P1, |
| 1441 class P2, |
| 1442 class P3, |
| 1443 class P4, |
| 1444 class P5, |
| 1445 class P6, |
| 1446 class P7, |
| 1447 class P8, |
| 1448 class P9> |
| 1449 MethodFunctor9<const ObjectT, |
| 1450 FP_T(NONAME), |
| 1451 R, |
| 1452 P1, |
| 1453 P2, |
| 1454 P3, |
| 1455 P4, |
| 1456 P5, |
| 1457 P6, |
| 1458 P7, |
| 1459 P8, |
| 1460 P9> |
| 1461 Bind(FP_T(method), |
| 1462 const ObjectT* object, |
| 1463 typename detail::identity<P1>::type p1, |
| 1464 typename detail::identity<P2>::type p2, |
| 1465 typename detail::identity<P3>::type p3, |
| 1466 typename detail::identity<P4>::type p4, |
| 1467 typename detail::identity<P5>::type p5, |
| 1468 typename detail::identity<P6>::type p6, |
| 1469 typename detail::identity<P7>::type p7, |
| 1470 typename detail::identity<P8>::type p8, |
| 1471 typename detail::identity<P9>::type p9) { |
| 1472 return MethodFunctor9<const ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, |
| 1473 P7, P8, P9>(method, object, p1, p2, p3, p4, p5, p6, p7, |
| 1474 p8, p9); |
| 1475 } |
| 1476 |
| 1477 #undef FP_T |
| 1478 #define FP_T(x) R (ObjectT::*x)(P1, P2, P3, P4, P5, P6, P7, P8, P9) |
| 1479 |
| 1480 template <class ObjectT, |
| 1481 class R, |
| 1482 class P1, |
| 1483 class P2, |
| 1484 class P3, |
| 1485 class P4, |
| 1486 class P5, |
| 1487 class P6, |
| 1488 class P7, |
| 1489 class P8, |
| 1490 class P9> |
| 1491 MethodFunctor9<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, P8, P9> |
| 1492 Bind(FP_T(method), |
| 1493 const scoped_refptr<ObjectT>& object, |
| 1494 typename detail::identity<P1>::type p1, |
| 1495 typename detail::identity<P2>::type p2, |
| 1496 typename detail::identity<P3>::type p3, |
| 1497 typename detail::identity<P4>::type p4, |
| 1498 typename detail::identity<P5>::type p5, |
| 1499 typename detail::identity<P6>::type p6, |
| 1500 typename detail::identity<P7>::type p7, |
| 1501 typename detail::identity<P8>::type p8, |
| 1502 typename detail::identity<P9>::type p9) { |
| 1503 return MethodFunctor9<ObjectT, FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, |
| 1504 P8, P9>(method, object.get(), p1, p2, p3, p4, p5, p6, |
| 1505 p7, p8, p9); |
| 1506 } |
| 1507 |
| 1508 #undef FP_T |
| 1509 #define FP_T(x) R (*x)(P1, P2, P3, P4, P5, P6, P7, P8, P9) |
| 1510 |
| 1511 template <class R, |
| 1512 class P1, |
| 1513 class P2, |
| 1514 class P3, |
| 1515 class P4, |
| 1516 class P5, |
| 1517 class P6, |
| 1518 class P7, |
| 1519 class P8, |
| 1520 class P9> |
| 1521 Functor9<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, P8, P9> Bind( |
| 1522 FP_T(function), |
| 1523 typename detail::identity<P1>::type p1, |
| 1524 typename detail::identity<P2>::type p2, |
| 1525 typename detail::identity<P3>::type p3, |
| 1526 typename detail::identity<P4>::type p4, |
| 1527 typename detail::identity<P5>::type p5, |
| 1528 typename detail::identity<P6>::type p6, |
| 1529 typename detail::identity<P7>::type p7, |
| 1530 typename detail::identity<P8>::type p8, |
| 1531 typename detail::identity<P9>::type p9) { |
| 1532 return Functor9<FP_T(NONAME), R, P1, P2, P3, P4, P5, P6, P7, P8, P9>( |
| 1533 function, p1, p2, p3, p4, p5, p6, p7, p8, p9); |
| 1534 } |
| 1535 |
| 1536 #undef FP_T |
| 1537 |
| 915 } // namespace rtc | 1538 } // namespace rtc |
| 916 | 1539 |
| 917 #undef NONAME | 1540 #undef NONAME |
| 918 | 1541 |
| 919 #endif // WEBRTC_BASE_BIND_H_ | 1542 #endif // WEBRTC_BASE_BIND_H_ |
| OLD | NEW |