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

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

Issue 6718021: Callback support for unbound reference and array arguments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up. Created 9 years, 9 months 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
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 $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 16 matching lines...) Expand all
27 $range ARITY 0..MAX_ARITY 27 $range ARITY 0..MAX_ARITY
28 $for ARITY [[ 28 $for ARITY [[
29 $range ARG 1..ARITY 29 $range ARG 1..ARITY
30 30
31 // __stdcall Function: Arity $(ARITY). 31 // __stdcall Function: Arity $(ARITY).
32 template <typename R[[]] 32 template <typename R[[]]
33 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]> 33 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
34 struct FunctionTraits<R(__stdcall *)($for ARG , [[X$(ARG)]])> { 34 struct FunctionTraits<R(__stdcall *)($for ARG , [[X$(ARG)]])> {
35 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]); 35 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
36 typedef false_type IsMethod; 36 typedef false_type IsMethod;
37
38 $if ARITY > 0 [[
39
40 // Target type for each bound parameter.
41
42 $for ARG [[
43 typedef X$(ARG) B$(ARG);
44
45 ]] $$ for ARG
46 ]] $$ if ARITY > 0
37 }; 47 };
38 48
39 // __fastcall Function: Arity $(ARITY). 49 // __fastcall Function: Arity $(ARITY).
40 template <typename R[[]] 50 template <typename R[[]]
41 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]> 51 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
42 struct FunctionTraits<R(__fastcall *)($for ARG , [[X$(ARG)]])> { 52 struct FunctionTraits<R(__fastcall *)($for ARG , [[X$(ARG)]])> {
43 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]); 53 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
44 typedef false_type IsMethod; 54 typedef false_type IsMethod;
55
56 $if ARITY > 0 [[
57
58 // Target type for each bound parameter.
59
60 $for ARG [[
61 typedef X$(ARG) B$(ARG);
62
63 ]] $$ for ARG
64 ]] $$ if ARITY > 0
45 }; 65 };
46 66
47 ]] $$for ARITY 67 ]] $$for ARITY
48 68
49 } // namespace internal 69 } // namespace internal
50 } // namespace base 70 } // namespace base
51 71
52 #endif // BASE_BIND_INTERNAL_WIN_H_ 72 #endif // BASE_BIND_INTERNAL_WIN_H_
OLDNEW
« no previous file with comments | « base/bind_internal_win.h ('k') | base/bind_unittest.cc » ('j') | base/callback_internal.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698