| 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 $var MAX_ARITY = 6 | 8 $var MAX_ARITY = 6 |
| 9 | 9 |
| 10 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 10 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 $for ARITY [[ | 33 $for ARITY [[ |
| 34 $range ARG 1..ARITY | 34 $range ARG 1..ARITY |
| 35 | 35 |
| 36 // __stdcall Function: Arity $(ARITY). | 36 // __stdcall Function: Arity $(ARITY). |
| 37 template <typename R[[]] | 37 template <typename R[[]] |
| 38 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]> | 38 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]> |
| 39 struct FunctionTraits<R(__stdcall *)($for ARG , [[X$(ARG)]])> { | 39 struct FunctionTraits<R(__stdcall *)($for ARG , [[X$(ARG)]])> { |
| 40 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]); | 40 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]); |
| 41 typedef false_type IsMethod; | 41 typedef false_type IsMethod; |
| 42 | 42 |
| 43 typedef R Return; |
| 44 |
| 43 $if ARITY > 0 [[ | 45 $if ARITY > 0 [[ |
| 44 | 46 |
| 45 // Target type for each bound parameter. | 47 // Target type for each bound parameter. |
| 46 | 48 |
| 47 $for ARG [[ | 49 $for ARG [[ |
| 48 typedef X$(ARG) B$(ARG); | 50 typedef X$(ARG) B$(ARG); |
| 49 | 51 |
| 50 ]] $$ for ARG | 52 ]] $$ for ARG |
| 51 ]] $$ if ARITY > 0 | 53 ]] $$ if ARITY > 0 |
| 52 }; | 54 }; |
| 53 | 55 |
| 54 // __fastcall Function: Arity $(ARITY). | 56 // __fastcall Function: Arity $(ARITY). |
| 55 template <typename R[[]] | 57 template <typename R[[]] |
| 56 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]> | 58 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]> |
| 57 struct FunctionTraits<R(__fastcall *)($for ARG , [[X$(ARG)]])> { | 59 struct FunctionTraits<R(__fastcall *)($for ARG , [[X$(ARG)]])> { |
| 58 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]); | 60 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]); |
| 59 typedef false_type IsMethod; | 61 typedef false_type IsMethod; |
| 60 | 62 |
| 63 typedef R Return; |
| 64 |
| 61 $if ARITY > 0 [[ | 65 $if ARITY > 0 [[ |
| 62 | 66 |
| 63 // Target type for each bound parameter. | 67 // Target type for each bound parameter. |
| 64 | 68 |
| 65 $for ARG [[ | 69 $for ARG [[ |
| 66 typedef X$(ARG) B$(ARG); | 70 typedef X$(ARG) B$(ARG); |
| 67 | 71 |
| 68 ]] $$ for ARG | 72 ]] $$ for ARG |
| 69 ]] $$ if ARITY > 0 | 73 ]] $$ if ARITY > 0 |
| 70 }; | 74 }; |
| 71 | 75 |
| 72 ]] $$for ARITY | 76 ]] $$for ARITY |
| 73 | 77 |
| 74 } // namespace internal | 78 } // namespace internal |
| 75 } // namespace base | 79 } // namespace base |
| 76 | 80 |
| 77 #endif // !defined(ARCH_CPU_X86_64) | 81 #endif // !defined(ARCH_CPU_X86_64) |
| 78 | 82 |
| 79 #endif // BASE_BIND_INTERNAL_WIN_H_ | 83 #endif // BASE_BIND_INTERNAL_WIN_H_ |
| OLD | NEW |