OLD | NEW |
1 // This file was GENERATED by command: | 1 // This file was GENERATED by command: |
2 // pump.py callback.h.pump | 2 // pump.py callback.h.pump |
3 // DO NOT EDIT BY HAND!!! | 3 // DO NOT EDIT BY HAND!!! |
4 | 4 |
5 | 5 |
6 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 6 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
7 // Use of this source code is governed by a BSD-style license that can be | 7 // Use of this source code is governed by a BSD-style license that can be |
8 // found in the LICENSE file. | 8 // found in the LICENSE file. |
9 | 9 |
10 #ifndef BASE_CALLBACK_H_ | 10 #ifndef BASE_CALLBACK_H_ |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 } | 298 } |
299 | 299 |
300 bool Equals(const Callback& other) const { | 300 bool Equals(const Callback& other) const { |
301 return CallbackBase::Equals(other); | 301 return CallbackBase::Equals(other); |
302 } | 302 } |
303 | 303 |
304 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1) const { | 304 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1) const { |
305 PolymorphicInvoke f = | 305 PolymorphicInvoke f = |
306 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 306 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
307 | 307 |
308 return f(bind_state_.get(), a1); | 308 return f(bind_state_.get(), internal::CallbackForward(a1)); |
309 } | 309 } |
310 | 310 |
311 private: | 311 private: |
312 typedef R(*PolymorphicInvoke)( | 312 typedef R(*PolymorphicInvoke)( |
313 internal::BindStateBase*, | 313 internal::BindStateBase*, |
314 typename internal::CallbackParamTraits<A1>::ForwardType); | 314 typename internal::CallbackParamTraits<A1>::ForwardType); |
315 | 315 |
316 }; | 316 }; |
317 | 317 |
318 template <typename R, typename A1, typename A2> | 318 template <typename R, typename A1, typename A2> |
(...skipping 22 matching lines...) Expand all Loading... |
341 | 341 |
342 bool Equals(const Callback& other) const { | 342 bool Equals(const Callback& other) const { |
343 return CallbackBase::Equals(other); | 343 return CallbackBase::Equals(other); |
344 } | 344 } |
345 | 345 |
346 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 346 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
347 typename internal::CallbackParamTraits<A2>::ForwardType a2) const { | 347 typename internal::CallbackParamTraits<A2>::ForwardType a2) const { |
348 PolymorphicInvoke f = | 348 PolymorphicInvoke f = |
349 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 349 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
350 | 350 |
351 return f(bind_state_.get(), a1, | 351 return f(bind_state_.get(), internal::CallbackForward(a1), |
352 a2); | 352 internal::CallbackForward(a2)); |
353 } | 353 } |
354 | 354 |
355 private: | 355 private: |
356 typedef R(*PolymorphicInvoke)( | 356 typedef R(*PolymorphicInvoke)( |
357 internal::BindStateBase*, | 357 internal::BindStateBase*, |
358 typename internal::CallbackParamTraits<A1>::ForwardType, | 358 typename internal::CallbackParamTraits<A1>::ForwardType, |
359 typename internal::CallbackParamTraits<A2>::ForwardType); | 359 typename internal::CallbackParamTraits<A2>::ForwardType); |
360 | 360 |
361 }; | 361 }; |
362 | 362 |
(...skipping 24 matching lines...) Expand all Loading... |
387 bool Equals(const Callback& other) const { | 387 bool Equals(const Callback& other) const { |
388 return CallbackBase::Equals(other); | 388 return CallbackBase::Equals(other); |
389 } | 389 } |
390 | 390 |
391 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 391 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
392 typename internal::CallbackParamTraits<A2>::ForwardType a2, | 392 typename internal::CallbackParamTraits<A2>::ForwardType a2, |
393 typename internal::CallbackParamTraits<A3>::ForwardType a3) const { | 393 typename internal::CallbackParamTraits<A3>::ForwardType a3) const { |
394 PolymorphicInvoke f = | 394 PolymorphicInvoke f = |
395 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 395 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
396 | 396 |
397 return f(bind_state_.get(), a1, | 397 return f(bind_state_.get(), internal::CallbackForward(a1), |
398 a2, | 398 internal::CallbackForward(a2), |
399 a3); | 399 internal::CallbackForward(a3)); |
400 } | 400 } |
401 | 401 |
402 private: | 402 private: |
403 typedef R(*PolymorphicInvoke)( | 403 typedef R(*PolymorphicInvoke)( |
404 internal::BindStateBase*, | 404 internal::BindStateBase*, |
405 typename internal::CallbackParamTraits<A1>::ForwardType, | 405 typename internal::CallbackParamTraits<A1>::ForwardType, |
406 typename internal::CallbackParamTraits<A2>::ForwardType, | 406 typename internal::CallbackParamTraits<A2>::ForwardType, |
407 typename internal::CallbackParamTraits<A3>::ForwardType); | 407 typename internal::CallbackParamTraits<A3>::ForwardType); |
408 | 408 |
409 }; | 409 }; |
(...skipping 26 matching lines...) Expand all Loading... |
436 return CallbackBase::Equals(other); | 436 return CallbackBase::Equals(other); |
437 } | 437 } |
438 | 438 |
439 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 439 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
440 typename internal::CallbackParamTraits<A2>::ForwardType a2, | 440 typename internal::CallbackParamTraits<A2>::ForwardType a2, |
441 typename internal::CallbackParamTraits<A3>::ForwardType a3, | 441 typename internal::CallbackParamTraits<A3>::ForwardType a3, |
442 typename internal::CallbackParamTraits<A4>::ForwardType a4) const { | 442 typename internal::CallbackParamTraits<A4>::ForwardType a4) const { |
443 PolymorphicInvoke f = | 443 PolymorphicInvoke f = |
444 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 444 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
445 | 445 |
446 return f(bind_state_.get(), a1, | 446 return f(bind_state_.get(), internal::CallbackForward(a1), |
447 a2, | 447 internal::CallbackForward(a2), |
448 a3, | 448 internal::CallbackForward(a3), |
449 a4); | 449 internal::CallbackForward(a4)); |
450 } | 450 } |
451 | 451 |
452 private: | 452 private: |
453 typedef R(*PolymorphicInvoke)( | 453 typedef R(*PolymorphicInvoke)( |
454 internal::BindStateBase*, | 454 internal::BindStateBase*, |
455 typename internal::CallbackParamTraits<A1>::ForwardType, | 455 typename internal::CallbackParamTraits<A1>::ForwardType, |
456 typename internal::CallbackParamTraits<A2>::ForwardType, | 456 typename internal::CallbackParamTraits<A2>::ForwardType, |
457 typename internal::CallbackParamTraits<A3>::ForwardType, | 457 typename internal::CallbackParamTraits<A3>::ForwardType, |
458 typename internal::CallbackParamTraits<A4>::ForwardType); | 458 typename internal::CallbackParamTraits<A4>::ForwardType); |
459 | 459 |
(...skipping 29 matching lines...) Expand all Loading... |
489 } | 489 } |
490 | 490 |
491 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 491 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
492 typename internal::CallbackParamTraits<A2>::ForwardType a2, | 492 typename internal::CallbackParamTraits<A2>::ForwardType a2, |
493 typename internal::CallbackParamTraits<A3>::ForwardType a3, | 493 typename internal::CallbackParamTraits<A3>::ForwardType a3, |
494 typename internal::CallbackParamTraits<A4>::ForwardType a4, | 494 typename internal::CallbackParamTraits<A4>::ForwardType a4, |
495 typename internal::CallbackParamTraits<A5>::ForwardType a5) const { | 495 typename internal::CallbackParamTraits<A5>::ForwardType a5) const { |
496 PolymorphicInvoke f = | 496 PolymorphicInvoke f = |
497 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 497 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
498 | 498 |
499 return f(bind_state_.get(), a1, | 499 return f(bind_state_.get(), internal::CallbackForward(a1), |
500 a2, | 500 internal::CallbackForward(a2), |
501 a3, | 501 internal::CallbackForward(a3), |
502 a4, | 502 internal::CallbackForward(a4), |
503 a5); | 503 internal::CallbackForward(a5)); |
504 } | 504 } |
505 | 505 |
506 private: | 506 private: |
507 typedef R(*PolymorphicInvoke)( | 507 typedef R(*PolymorphicInvoke)( |
508 internal::BindStateBase*, | 508 internal::BindStateBase*, |
509 typename internal::CallbackParamTraits<A1>::ForwardType, | 509 typename internal::CallbackParamTraits<A1>::ForwardType, |
510 typename internal::CallbackParamTraits<A2>::ForwardType, | 510 typename internal::CallbackParamTraits<A2>::ForwardType, |
511 typename internal::CallbackParamTraits<A3>::ForwardType, | 511 typename internal::CallbackParamTraits<A3>::ForwardType, |
512 typename internal::CallbackParamTraits<A4>::ForwardType, | 512 typename internal::CallbackParamTraits<A4>::ForwardType, |
513 typename internal::CallbackParamTraits<A5>::ForwardType); | 513 typename internal::CallbackParamTraits<A5>::ForwardType); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 | 545 |
546 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 546 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
547 typename internal::CallbackParamTraits<A2>::ForwardType a2, | 547 typename internal::CallbackParamTraits<A2>::ForwardType a2, |
548 typename internal::CallbackParamTraits<A3>::ForwardType a3, | 548 typename internal::CallbackParamTraits<A3>::ForwardType a3, |
549 typename internal::CallbackParamTraits<A4>::ForwardType a4, | 549 typename internal::CallbackParamTraits<A4>::ForwardType a4, |
550 typename internal::CallbackParamTraits<A5>::ForwardType a5, | 550 typename internal::CallbackParamTraits<A5>::ForwardType a5, |
551 typename internal::CallbackParamTraits<A6>::ForwardType a6) const { | 551 typename internal::CallbackParamTraits<A6>::ForwardType a6) const { |
552 PolymorphicInvoke f = | 552 PolymorphicInvoke f = |
553 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 553 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
554 | 554 |
555 return f(bind_state_.get(), a1, | 555 return f(bind_state_.get(), internal::CallbackForward(a1), |
556 a2, | 556 internal::CallbackForward(a2), |
557 a3, | 557 internal::CallbackForward(a3), |
558 a4, | 558 internal::CallbackForward(a4), |
559 a5, | 559 internal::CallbackForward(a5), |
560 a6); | 560 internal::CallbackForward(a6)); |
561 } | 561 } |
562 | 562 |
563 private: | 563 private: |
564 typedef R(*PolymorphicInvoke)( | 564 typedef R(*PolymorphicInvoke)( |
565 internal::BindStateBase*, | 565 internal::BindStateBase*, |
566 typename internal::CallbackParamTraits<A1>::ForwardType, | 566 typename internal::CallbackParamTraits<A1>::ForwardType, |
567 typename internal::CallbackParamTraits<A2>::ForwardType, | 567 typename internal::CallbackParamTraits<A2>::ForwardType, |
568 typename internal::CallbackParamTraits<A3>::ForwardType, | 568 typename internal::CallbackParamTraits<A3>::ForwardType, |
569 typename internal::CallbackParamTraits<A4>::ForwardType, | 569 typename internal::CallbackParamTraits<A4>::ForwardType, |
570 typename internal::CallbackParamTraits<A5>::ForwardType, | 570 typename internal::CallbackParamTraits<A5>::ForwardType, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, | 604 R Run(typename internal::CallbackParamTraits<A1>::ForwardType a1, |
605 typename internal::CallbackParamTraits<A2>::ForwardType a2, | 605 typename internal::CallbackParamTraits<A2>::ForwardType a2, |
606 typename internal::CallbackParamTraits<A3>::ForwardType a3, | 606 typename internal::CallbackParamTraits<A3>::ForwardType a3, |
607 typename internal::CallbackParamTraits<A4>::ForwardType a4, | 607 typename internal::CallbackParamTraits<A4>::ForwardType a4, |
608 typename internal::CallbackParamTraits<A5>::ForwardType a5, | 608 typename internal::CallbackParamTraits<A5>::ForwardType a5, |
609 typename internal::CallbackParamTraits<A6>::ForwardType a6, | 609 typename internal::CallbackParamTraits<A6>::ForwardType a6, |
610 typename internal::CallbackParamTraits<A7>::ForwardType a7) const { | 610 typename internal::CallbackParamTraits<A7>::ForwardType a7) const { |
611 PolymorphicInvoke f = | 611 PolymorphicInvoke f = |
612 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); | 612 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); |
613 | 613 |
614 return f(bind_state_.get(), a1, | 614 return f(bind_state_.get(), internal::CallbackForward(a1), |
615 a2, | 615 internal::CallbackForward(a2), |
616 a3, | 616 internal::CallbackForward(a3), |
617 a4, | 617 internal::CallbackForward(a4), |
618 a5, | 618 internal::CallbackForward(a5), |
619 a6, | 619 internal::CallbackForward(a6), |
620 a7); | 620 internal::CallbackForward(a7)); |
621 } | 621 } |
622 | 622 |
623 private: | 623 private: |
624 typedef R(*PolymorphicInvoke)( | 624 typedef R(*PolymorphicInvoke)( |
625 internal::BindStateBase*, | 625 internal::BindStateBase*, |
626 typename internal::CallbackParamTraits<A1>::ForwardType, | 626 typename internal::CallbackParamTraits<A1>::ForwardType, |
627 typename internal::CallbackParamTraits<A2>::ForwardType, | 627 typename internal::CallbackParamTraits<A2>::ForwardType, |
628 typename internal::CallbackParamTraits<A3>::ForwardType, | 628 typename internal::CallbackParamTraits<A3>::ForwardType, |
629 typename internal::CallbackParamTraits<A4>::ForwardType, | 629 typename internal::CallbackParamTraits<A4>::ForwardType, |
630 typename internal::CallbackParamTraits<A5>::ForwardType, | 630 typename internal::CallbackParamTraits<A5>::ForwardType, |
631 typename internal::CallbackParamTraits<A6>::ForwardType, | 631 typename internal::CallbackParamTraits<A6>::ForwardType, |
632 typename internal::CallbackParamTraits<A7>::ForwardType); | 632 typename internal::CallbackParamTraits<A7>::ForwardType); |
633 | 633 |
634 }; | 634 }; |
635 | 635 |
636 | 636 |
637 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it | 637 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it |
638 // will be used in a lot of APIs with delayed execution. | 638 // will be used in a lot of APIs with delayed execution. |
639 typedef Callback<void(void)> Closure; | 639 typedef Callback<void(void)> Closure; |
640 | 640 |
641 } // namespace base | 641 } // namespace base |
642 | 642 |
643 #endif // BASE_CALLBACK_H | 643 #endif // BASE_CALLBACK_H |
OLD | NEW |