| OLD | NEW |
| 1 $$ This is a pump file for generating file templates. Pump is a python | 1 $$ This is a pump file for generating file templates. Pump is a python |
| 2 $$ script that is part of the Google Test suite of utilities. Description | 2 $$ script that is part of the Google Test suite of utilities. Description |
| 3 $$ can be found here: | 3 $$ can be found here: |
| 4 $$ | 4 $$ |
| 5 $$ http://code.google.com/p/googletest/wiki/PumpManual | 5 $$ http://code.google.com/p/googletest/wiki/PumpManual |
| 6 $$ | 6 $$ |
| 7 | 7 |
| 8 $$ See comment for MAX_ARITY in base/bind.h.pump. | 8 $$ See comment for MAX_ARITY in base/bind.h.pump. |
| 9 $var MAX_ARITY = 7 | 9 $var MAX_ARITY = 7 |
| 10 $range ARITY 0..MAX_ARITY | 10 $range ARITY 0..MAX_ARITY |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 ]] $else [[ | 485 ]] $else [[ |
| 486 , $for ARG , [[ | 486 , $for ARG , [[ |
| 487 | 487 |
| 488 p$(ARG)_(p$(ARG)) | 488 p$(ARG)_(p$(ARG)) |
| 489 ]] { | 489 ]] { |
| 490 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_); | 490 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_); |
| 491 | 491 |
| 492 ]] | 492 ]] |
| 493 } | 493 } |
| 494 | 494 |
| 495 virtual ~BindState() { | |
| 496 $if ARITY > 0 [[ | |
| 497 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::Release(p1_); | |
| 498 ]] | |
| 499 } | |
| 500 | |
| 501 RunnableType runnable_; | 495 RunnableType runnable_; |
| 502 | 496 |
| 503 $for ARG [[ | 497 $for ARG [[ |
| 504 P$(ARG) p$(ARG)_; | 498 P$(ARG) p$(ARG)_; |
| 505 | 499 |
| 506 ]] | 500 ]] |
| 501 |
| 502 private: |
| 503 ~BindState() override { |
| 504 $if ARITY > 0 [[ |
| 505 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::Release(p1_); |
| 506 ]] |
| 507 } |
| 508 |
| 507 }; | 509 }; |
| 508 | 510 |
| 509 ]] $$ for ARITY | 511 ]] $$ for ARITY |
| 510 | 512 |
| 511 } // namespace internal | 513 } // namespace internal |
| 512 } // namespace base | 514 } // namespace base |
| 513 | 515 |
| 514 #endif // BASE_BIND_INTERNAL_H_ | 516 #endif // BASE_BIND_INTERNAL_H_ |
| OLD | NEW |