Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: base/callback.h.pump

Issue 8774032: Add Pass(), which implements move semantics, to scoped_ptr, scoped_array, and scoped_ptr_malloc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed spelling in comments Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/callback.h ('k') | base/callback_internal.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 10
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 } 277 }
278 278
279 R Run($for ARG , 279 R Run($for ARG ,
280 [[typename internal::CallbackParamTraits<A$(ARG)>::ForwardType a$(ARG)]] ) const { 280 [[typename internal::CallbackParamTraits<A$(ARG)>::ForwardType a$(ARG)]] ) const {
281 PolymorphicInvoke f = 281 PolymorphicInvoke f =
282 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_); 282 reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
283 283
284 return f(bind_state_.get()[[]] 284 return f(bind_state_.get()[[]]
285 $if ARITY != 0 [[, ]] 285 $if ARITY != 0 [[, ]]
286 $for ARG , 286 $for ARG ,
287 [[a$(ARG)]]); 287 [[internal::CallbackForward(a$(ARG))]]);
288 } 288 }
289 289
290 private: 290 private:
291 typedef R(*PolymorphicInvoke)( 291 typedef R(*PolymorphicInvoke)(
292 internal::BindStateBase*[[]] 292 internal::BindStateBase*[[]]
293 $if ARITY != 0 [[, ]] 293 $if ARITY != 0 [[, ]]
294 $for ARG , [[typename internal::CallbackParamTraits<A$(ARG)>::ForwardType]]); 294 $for ARG , [[typename internal::CallbackParamTraits<A$(ARG)>::ForwardType]]);
295 295
296 }; 296 };
297 297
298 298
299 ]] $$ for ARITY 299 ]] $$ for ARITY
300 300
301 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it 301 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it
302 // will be used in a lot of APIs with delayed execution. 302 // will be used in a lot of APIs with delayed execution.
303 typedef Callback<void(void)> Closure; 303 typedef Callback<void(void)> Closure;
304 304
305 } // namespace base 305 } // namespace base
306 306
307 #endif // BASE_CALLBACK_H 307 #endif // BASE_CALLBACK_H
OLDNEW
« no previous file with comments | « base/callback.h ('k') | base/callback_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698