| 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 $$ MAX_ARITY controls the number of arguments that dispatch::Invoke() supports. | 7 $$ MAX_ARITY controls the number of arguments that dispatch::Invoke() supports. |
| 8 $$ It is choosen to match the number of arguments base::Bind() supports. | 8 $$ It is choosen to match the number of arguments base::Bind() supports. |
| 9 $var MAX_ARITY = 7 | 9 $var MAX_ARITY = 7 |
| 10 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 10 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 void Swap(VARIANT* other) { | 93 void Swap(VARIANT* other) { |
| 94 VARIANT temp = *other; | 94 VARIANT temp = *other; |
| 95 *other = *this; | 95 *other = *this; |
| 96 *static_cast<VARIANTARG*>(this) = temp; | 96 *static_cast<VARIANTARG*>(this) = temp; |
| 97 } | 97 } |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(ScopedVariantArg); | 99 DISALLOW_COPY_AND_ASSIGN(ScopedVariantArg); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 // Make sure the layouts of |VARIANTARG| and |ScopedVariantArg| are identical. | 102 // Make sure the layouts of |VARIANTARG| and |ScopedVariantArg| are identical. |
| 103 COMPILE_ASSERT(sizeof(ScopedVariantArg) == sizeof(VARIANTARG), | 103 static_assert(sizeof(ScopedVariantArg) == sizeof(VARIANTARG), |
| 104 scoped_variant_arg_should_not_add_data_members); | 104 "scoped variant arg should not add data members"); |
| 105 | 105 |
| 106 } // namespace internal | 106 } // namespace internal |
| 107 | 107 |
| 108 // Invoke() is a convenience wrapper for IDispatch::Invoke. It takes care of | 108 // Invoke() is a convenience wrapper for IDispatch::Invoke. It takes care of |
| 109 // calling the desired method by its ID and implements logic for passing | 109 // calling the desired method by its ID and implements logic for passing |
| 110 // a variable number of in/out parameters to the called method. | 110 // a variable number of in/out parameters to the called method. |
| 111 // | 111 // |
| 112 // The calling convention is: | 112 // The calling convention is: |
| 113 // - [in] parameters are passsed as a constant reference or by value. | 113 // - [in] parameters are passsed as a constant reference or by value. |
| 114 // - [out] and [in] [out] parameters are passed by pointer. The pointed value | 114 // - [out] and [in] [out] parameters are passed by pointer. The pointed value |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 return S_OK; | 203 return S_OK; |
| 204 } | 204 } |
| 205 | 205 |
| 206 ]] | 206 ]] |
| 207 | 207 |
| 208 } // namespace dispatch | 208 } // namespace dispatch |
| 209 | 209 |
| 210 } // namespace remoting | 210 } // namespace remoting |
| 211 | 211 |
| 212 #endif // REMOTING_BASE_IDISPATCH_DRIVER_WIN_H_ | 212 #endif // REMOTING_BASE_IDISPATCH_DRIVER_WIN_H_ |
| OLD | NEW |