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

Side by Side Diff: base/bind_internal_win.h

Issue 6561004: Callback support for __fastcall and __stdcall functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: Address will's comments. Created 9 years, 10 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
(Empty)
1 // This file was GENERATED by command:
2 // pump.py bind_internal_win.h.pump
3 // DO NOT EDIT BY HAND!!!
4
5
6 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
7 // Use of this source code is governed by a BSD-style license that can be
8 // found in the LICENSE file.
9
10 // Specializations of FunctionTraits<> for Windows specific calling
11 // conventions. Please see base/bind_internal.h for more info.
12
13 #ifndef BASE_BIND_INTERNAL_WIN_H_
14 #define BASE_BIND_INTERNAL_WIN_H_
15 #pragma once
16
17 namespace base {
18 namespace internal {
19
20 template <typename Sig>
21 struct FunctionTraits;
22
23 // __stdcall Function: Arity 0.
24 template <typename R>
25 struct FunctionTraits<R(__stdcall *)()> {
26 typedef R (*NormalizedSig)();
27 typedef false_type IsMethod;
28 };
29
30 // __fastcall Function: Arity 0.
31 template <typename R>
32 struct FunctionTraits<R(__fastcall *)()> {
33 typedef R (*NormalizedSig)();
34 typedef false_type IsMethod;
35 };
36
37 // __stdcall Function: Arity 1.
38 template <typename R, typename X1>
39 struct FunctionTraits<R(__stdcall *)(X1)> {
40 typedef R (*NormalizedSig)(X1);
41 typedef false_type IsMethod;
42 };
43
44 // __fastcall Function: Arity 1.
45 template <typename R, typename X1>
46 struct FunctionTraits<R(__fastcall *)(X1)> {
47 typedef R (*NormalizedSig)(X1);
48 typedef false_type IsMethod;
49 };
50
51 // __stdcall Function: Arity 2.
52 template <typename R, typename X1, typename X2>
53 struct FunctionTraits<R(__stdcall *)(X1, X2)> {
54 typedef R (*NormalizedSig)(X1, X2);
55 typedef false_type IsMethod;
56 };
57
58 // __fastcall Function: Arity 2.
59 template <typename R, typename X1, typename X2>
60 struct FunctionTraits<R(__fastcall *)(X1, X2)> {
61 typedef R (*NormalizedSig)(X1, X2);
62 typedef false_type IsMethod;
63 };
64
65 // __stdcall Function: Arity 3.
66 template <typename R, typename X1, typename X2, typename X3>
67 struct FunctionTraits<R(__stdcall *)(X1, X2, X3)> {
68 typedef R (*NormalizedSig)(X1, X2, X3);
69 typedef false_type IsMethod;
70 };
71
72 // __fastcall Function: Arity 3.
73 template <typename R, typename X1, typename X2, typename X3>
74 struct FunctionTraits<R(__fastcall *)(X1, X2, X3)> {
75 typedef R (*NormalizedSig)(X1, X2, X3);
76 typedef false_type IsMethod;
77 };
78
79 // __stdcall Function: Arity 4.
80 template <typename R, typename X1, typename X2, typename X3, typename X4>
81 struct FunctionTraits<R(__stdcall *)(X1, X2, X3, X4)> {
82 typedef R (*NormalizedSig)(X1, X2, X3, X4);
83 typedef false_type IsMethod;
84 };
85
86 // __fastcall Function: Arity 4.
87 template <typename R, typename X1, typename X2, typename X3, typename X4>
88 struct FunctionTraits<R(__fastcall *)(X1, X2, X3, X4)> {
89 typedef R (*NormalizedSig)(X1, X2, X3, X4);
90 typedef false_type IsMethod;
91 };
92
93 // __stdcall Function: Arity 5.
94 template <typename R, typename X1, typename X2, typename X3, typename X4,
95 typename X5>
96 struct FunctionTraits<R(__stdcall *)(X1, X2, X3, X4, X5)> {
97 typedef R (*NormalizedSig)(X1, X2, X3, X4, X5);
98 typedef false_type IsMethod;
99 };
100
101 // __fastcall Function: Arity 5.
102 template <typename R, typename X1, typename X2, typename X3, typename X4,
103 typename X5>
104 struct FunctionTraits<R(__fastcall *)(X1, X2, X3, X4, X5)> {
105 typedef R (*NormalizedSig)(X1, X2, X3, X4, X5);
106 typedef false_type IsMethod;
107 };
108
109 // __stdcall Function: Arity 6.
110 template <typename R, typename X1, typename X2, typename X3, typename X4,
111 typename X5, typename X6>
112 struct FunctionTraits<R(__stdcall *)(X1, X2, X3, X4, X5, X6)> {
113 typedef R (*NormalizedSig)(X1, X2, X3, X4, X5, X6);
114 typedef false_type IsMethod;
115 };
116
117 // __fastcall Function: Arity 6.
118 template <typename R, typename X1, typename X2, typename X3, typename X4,
119 typename X5, typename X6>
120 struct FunctionTraits<R(__fastcall *)(X1, X2, X3, X4, X5, X6)> {
121 typedef R (*NormalizedSig)(X1, X2, X3, X4, X5, X6);
122 typedef false_type IsMethod;
123 };
124
125 } // namespace internal
126 } // namespace base
127
128 #endif // BASE_BIND_INTERNAL_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698