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

Side by Side Diff: testing/gmock_mutant.h

Issue 1680643002: Refactor gmock_mutant.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « testing/generate_gmock_mutant.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file automatically generated by testing/generate_gmock_mutant.py.
6 // DO NOT EDIT.
7
8 #ifndef TESTING_GMOCK_MUTANT_H_ 5 #ifndef TESTING_GMOCK_MUTANT_H_
9 #define TESTING_GMOCK_MUTANT_H_ 6 #define TESTING_GMOCK_MUTANT_H_
10 7
11 // The intention of this file is to make possible using GMock actions in 8 // The intention of this file is to make possible using GMock actions in
12 // all of its syntactic beauty. Classes and helper functions can be used as 9 // all of its syntactic beauty.
13 // more generic variants of Task and Callback classes (see base/task.h)
14 // Mutant supports both pre-bound arguments (like Task) and call-time
15 // arguments (like Callback) - hence the name. :-)
16 //
17 // DispatchToMethod/Function supports two sets of arguments: pre-bound (P) and
18 // call-time (C). The arguments as well as the return type are templatized.
19 // DispatchToMethod/Function will also try to call the selected method or
20 // function even if provided pre-bound arguments does not match exactly with
21 // the function signature hence the X1, X2 ... XN parameters in CreateFunctor.
22 // DispatchToMethod will try to invoke method that may not belong to the
23 // object's class itself but to the object's class base class.
24 //
25 // Additionally you can bind the object at calltime by binding a pointer to
26 // pointer to the object at creation time - before including this file you
27 // have to #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING.
28 //
29 // TODO(stoyan): It's yet not clear to me should we use T& and T&* instead
30 // of T* and T** when we invoke CreateFunctor to match the EXPECT_CALL style.
31 // 10 //
32 // 11 //
33 // Sample usage with gMock: 12 // Sample usage with gMock:
34 // 13 //
35 // struct Mock : public ObjectDelegate { 14 // struct Mock : public ObjectDelegate {
36 // MOCK_METHOD2(string, OnRequest(int n, const string& request)); 15 // MOCK_METHOD2(string, OnRequest(int n, const string& request));
37 // MOCK_METHOD1(void, OnQuit(int exit_code)); 16 // MOCK_METHOD1(void, OnQuit(int exit_code));
38 // MOCK_METHOD2(void, LogMessage(int level, const string& message)); 17 // MOCK_METHOD2(void, LogMessage(int level, const string& message));
39 // 18 //
40 // string HandleFlowers(const string& reply, int n, const string& request) { 19 // string HandleFlowers(const string& reply, int n, const string& request) {
(...skipping 12 matching lines...) Expand all
53 // 1000 * seconds); 32 // 1000 * seconds);
54 // } 33 // }
55 // }; 34 // };
56 // 35 //
57 // Mock mock; 36 // Mock mock;
58 // // Will invoke mock.HandleFlowers("orchids", n, request) 37 // // Will invoke mock.HandleFlowers("orchids", n, request)
59 // // "orchids" is a pre-bound argument, and <n> and <request> are call-time 38 // // "orchids" is a pre-bound argument, and <n> and <request> are call-time
60 // // arguments - they are not known until the OnRequest mock is invoked. 39 // // arguments - they are not known until the OnRequest mock is invoked.
61 // EXPECT_CALL(mock, OnRequest(Ge(5), base::StartsWith("flower")) 40 // EXPECT_CALL(mock, OnRequest(Ge(5), base::StartsWith("flower"))
62 // .Times(1) 41 // .Times(1)
63 // .WillOnce(Invoke(CreateFunctor(&mock, &Mock::HandleFlowers, 42 // .WillOnce(Invoke(CreateFunctor(
64 // string("orchids")))); 43 // &Mock::HandleFlowers, base::Unretained(&mock), string("orchids"))));
65 // 44 //
66 // 45 //
67 // // No pre-bound arguments, two call-time arguments passed 46 // // No pre-bound arguments, two call-time arguments passed
68 // // directly to DoLogMessage 47 // // directly to DoLogMessage
69 // EXPECT_CALL(mock, OnLogMessage(_, _)) 48 // EXPECT_CALL(mock, OnLogMessage(_, _))
70 // .Times(AnyNumber()) 49 // .Times(AnyNumber())
71 // .WillAlways(Invoke(CreateFunctor, &mock, &Mock::DoLogMessage)); 50 // .WillAlways(Invoke(CreateFunctor(
51 // &Mock::DoLogMessage, base::Unretained(&mock))));
72 // 52 //
73 // 53 //
74 // // In this case we have a single pre-bound argument - 3. We ignore 54 // // In this case we have a single pre-bound argument - 3. We ignore
75 // // all of the arguments of OnQuit. 55 // // all of the arguments of OnQuit.
76 // EXCEPT_CALL(mock, OnQuit(_)) 56 // EXCEPT_CALL(mock, OnQuit(_))
77 // .Times(1) 57 // .Times(1)
78 // .WillOnce(InvokeWithoutArgs(CreateFunctor( 58 // .WillOnce(InvokeWithoutArgs(CreateFunctor(
79 // &mock, &Mock::QuitMessageLoop, 3))); 59 // &Mock::QuitMessageLoop, base::Unretained(&mock), 3)));
80 // 60 //
81 // MessageLoop loop; 61 // MessageLoop loop;
82 // loop.Run(); 62 // loop.Run();
83 // 63 //
84 // 64 //
85 // // Here is another example of how we can set an action that invokes 65 // // Here is another example of how we can set an action that invokes
86 // // method of an object that is not yet created. 66 // // method of an object that is not yet created.
87 // struct Mock : public ObjectDelegate { 67 // struct Mock : public ObjectDelegate {
88 // MOCK_METHOD1(void, DemiurgeCreated(Demiurge*)); 68 // MOCK_METHOD1(void, DemiurgeCreated(Demiurge*));
89 // MOCK_METHOD2(void, OnRequest(int count, const string&)); 69 // MOCK_METHOD2(void, OnRequest(int count, const string&));
90 // 70 //
91 // void StoreDemiurge(Demiurge* w) { 71 // void StoreDemiurge(Demiurge* w) {
92 // demiurge_ = w; 72 // demiurge_ = w;
93 // } 73 // }
94 // 74 //
95 // Demiurge* demiurge; 75 // Demiurge* demiurge;
96 // } 76 // }
97 // 77 //
98 // EXPECT_CALL(mock, DemiurgeCreated(_)).Times(1) 78 // EXPECT_CALL(mock, DemiurgeCreated(_)).Times(1)
99 // .WillOnce(Invoke(CreateFunctor(&mock, &Mock::StoreDemiurge))); 79 // .WillOnce(Invoke(CreateFunctor(
80 // &Mock::StoreDemiurge, base::Unretained(&mock))));
100 // 81 //
101 // EXPECT_CALL(mock, OnRequest(_, StrEq("Moby Dick"))) 82 // EXPECT_CALL(mock, OnRequest(_, StrEq("Moby Dick")))
102 // .Times(AnyNumber()) 83 // .Times(AnyNumber())
103 // .WillAlways(WithArgs<0>(Invoke( 84 // .WillAlways(WithArgs<0>(Invoke(CreateFunctor(
104 // CreateFunctor(&mock->demiurge_, &Demiurge::DecreaseMonsters)))); 85 // &Demiurge::DecreaseMonsters, base::Unretained(&mock->demiurge_)))));
105 // 86 //
106 87
107 #include "base/memory/linked_ptr.h" 88 #include "base/bind.h"
108 #include "base/tuple.h"
109 89
110 namespace testing { 90 namespace testing {
111 91
112 // 0 - 0 92 template <typename Signature>
113 template <typename R, typename T, typename Method> 93 class CallbackToFunctorHelper;
114 inline R DispatchToMethod(T* obj, Method method,
115 const base::Tuple<>& p,
116 const base::Tuple<>& c) {
117 return (obj->*method)();
118 }
119 template <typename R, typename Function>
120 inline R DispatchToFunction(Function function,
121 const base::Tuple<>& p,
122 const base::Tuple<>& c) {
123 return (*function)();
124 }
125 94
126 // 0 - 1 95 template <typename R, typename... Args>
127 template <typename R, typename T, typename Method, typename C1> 96 class CallbackToFunctorHelper<R(Args...)> {
128 inline R DispatchToMethod(T* obj, Method method, 97 public:
129 const base::Tuple<>& p, 98 explicit CallbackToFunctorHelper(const base::Callback<R(Args...)>& cb)
130 const base::Tuple<C1>& c) { 99 : cb_(cb) {}
131 return (obj->*method)(base::get<0>(c));
132 }
133 template <typename R, typename Function, typename C1>
134 inline R DispatchToFunction(Function function,
135 const base::Tuple<>& p,
136 const base::Tuple<C1>& c) {
137 return (*function)(base::get<0>(c));
138 }
139 100
140 // 0 - 2 101 template <typename... RunArgs>
141 template <typename R, typename T, typename Method, typename C1, typename C2> 102 R operator()(RunArgs&&... args) {
142 inline R DispatchToMethod(T* obj, Method method, 103 return cb_.Run(std::forward<RunArgs>(args)...);
143 const base::Tuple<>& p,
144 const base::Tuple<C1, C2>& c) {
145 return (obj->*method)(base::get<0>(c), base::get<1>(c));
146 }
147 template <typename R, typename Function, typename C1, typename C2>
148 inline R DispatchToFunction(Function function,
149 const base::Tuple<>& p,
150 const base::Tuple<C1, C2>& c) {
151 return (*function)(base::get<0>(c), base::get<1>(c));
152 }
153
154 // 0 - 3
155 template <typename R, typename T, typename Method, typename C1, typename C2,
156 typename C3>
157 inline R DispatchToMethod(T* obj, Method method,
158 const base::Tuple<>& p,
159 const base::Tuple<C1, C2, C3>& c) {
160 return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c));
161 }
162 template <typename R, typename Function, typename C1, typename C2, typename C3>
163 inline R DispatchToFunction(Function function,
164 const base::Tuple<>& p,
165 const base::Tuple<C1, C2, C3>& c) {
166 return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c));
167 }
168
169 // 0 - 4
170 template <typename R, typename T, typename Method, typename C1, typename C2,
171 typename C3, typename C4>
172 inline R DispatchToMethod(T* obj, Method method,
173 const base::Tuple<>& p,
174 const base::Tuple<C1, C2, C3, C4>& c) {
175 return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
176 base::get<3>(c));
177 }
178 template <typename R, typename Function, typename C1, typename C2, typename C3,
179 typename C4>
180 inline R DispatchToFunction(Function function,
181 const base::Tuple<>& p,
182 const base::Tuple<C1, C2, C3, C4>& c) {
183 return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
184 base::get<3>(c));
185 }
186
187 // 0 - 5
188 template <typename R, typename T, typename Method, typename C1, typename C2,
189 typename C3, typename C4, typename C5>
190 inline R DispatchToMethod(T* obj, Method method,
191 const base::Tuple<>& p,
192 const base::Tuple<C1, C2, C3, C4, C5>& c) {
193 return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
194 base::get<3>(c), base::get<4>(c));
195 }
196 template <typename R, typename Function, typename C1, typename C2, typename C3,
197 typename C4, typename C5>
198 inline R DispatchToFunction(Function function,
199 const base::Tuple<>& p,
200 const base::Tuple<C1, C2, C3, C4, C5>& c) {
201 return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
202 base::get<3>(c), base::get<4>(c));
203 }
204
205 // 0 - 6
206 template <typename R, typename T, typename Method, typename C1, typename C2,
207 typename C3, typename C4, typename C5, typename C6>
208 inline R DispatchToMethod(T* obj, Method method,
209 const base::Tuple<>& p,
210 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
211 return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
212 base::get<3>(c), base::get<4>(c), base::get<5>(c));
213 }
214 template <typename R, typename Function, typename C1, typename C2, typename C3,
215 typename C4, typename C5, typename C6>
216 inline R DispatchToFunction(Function function,
217 const base::Tuple<>& p,
218 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
219 return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
220 base::get<3>(c), base::get<4>(c), base::get<5>(c));
221 }
222
223 // 1 - 0
224 template <typename R, typename T, typename Method, typename P1>
225 inline R DispatchToMethod(T* obj, Method method,
226 const base::Tuple<P1>& p,
227 const base::Tuple<>& c) {
228 return (obj->*method)(base::get<0>(p));
229 }
230 template <typename R, typename Function, typename P1>
231 inline R DispatchToFunction(Function function,
232 const base::Tuple<P1>& p,
233 const base::Tuple<>& c) {
234 return (*function)(base::get<0>(p));
235 }
236
237 // 1 - 1
238 template <typename R, typename T, typename Method, typename P1, typename C1>
239 inline R DispatchToMethod(T* obj, Method method,
240 const base::Tuple<P1>& p,
241 const base::Tuple<C1>& c) {
242 return (obj->*method)(base::get<0>(p), base::get<0>(c));
243 }
244 template <typename R, typename Function, typename P1, typename C1>
245 inline R DispatchToFunction(Function function,
246 const base::Tuple<P1>& p,
247 const base::Tuple<C1>& c) {
248 return (*function)(base::get<0>(p), base::get<0>(c));
249 }
250
251 // 1 - 2
252 template <typename R, typename T, typename Method, typename P1, typename C1,
253 typename C2>
254 inline R DispatchToMethod(T* obj, Method method,
255 const base::Tuple<P1>& p,
256 const base::Tuple<C1, C2>& c) {
257 return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c));
258 }
259 template <typename R, typename Function, typename P1, typename C1, typename C2>
260 inline R DispatchToFunction(Function function,
261 const base::Tuple<P1>& p,
262 const base::Tuple<C1, C2>& c) {
263 return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c));
264 }
265
266 // 1 - 3
267 template <typename R, typename T, typename Method, typename P1, typename C1,
268 typename C2, typename C3>
269 inline R DispatchToMethod(T* obj, Method method,
270 const base::Tuple<P1>& p,
271 const base::Tuple<C1, C2, C3>& c) {
272 return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
273 base::get<2>(c));
274 }
275 template <typename R, typename Function, typename P1, typename C1, typename C2,
276 typename C3>
277 inline R DispatchToFunction(Function function,
278 const base::Tuple<P1>& p,
279 const base::Tuple<C1, C2, C3>& c) {
280 return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
281 base::get<2>(c));
282 }
283
284 // 1 - 4
285 template <typename R, typename T, typename Method, typename P1, typename C1,
286 typename C2, typename C3, typename C4>
287 inline R DispatchToMethod(T* obj, Method method,
288 const base::Tuple<P1>& p,
289 const base::Tuple<C1, C2, C3, C4>& c) {
290 return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
291 base::get<2>(c), base::get<3>(c));
292 }
293 template <typename R, typename Function, typename P1, typename C1, typename C2,
294 typename C3, typename C4>
295 inline R DispatchToFunction(Function function,
296 const base::Tuple<P1>& p,
297 const base::Tuple<C1, C2, C3, C4>& c) {
298 return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
299 base::get<2>(c), base::get<3>(c));
300 }
301
302 // 1 - 5
303 template <typename R, typename T, typename Method, typename P1, typename C1,
304 typename C2, typename C3, typename C4, typename C5>
305 inline R DispatchToMethod(T* obj, Method method,
306 const base::Tuple<P1>& p,
307 const base::Tuple<C1, C2, C3, C4, C5>& c) {
308 return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
309 base::get<2>(c), base::get<3>(c), base::get<4>(c));
310 }
311 template <typename R, typename Function, typename P1, typename C1, typename C2,
312 typename C3, typename C4, typename C5>
313 inline R DispatchToFunction(Function function,
314 const base::Tuple<P1>& p,
315 const base::Tuple<C1, C2, C3, C4, C5>& c) {
316 return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
317 base::get<2>(c), base::get<3>(c), base::get<4>(c));
318 }
319
320 // 1 - 6
321 template <typename R, typename T, typename Method, typename P1, typename C1,
322 typename C2, typename C3, typename C4, typename C5, typename C6>
323 inline R DispatchToMethod(T* obj, Method method,
324 const base::Tuple<P1>& p,
325 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
326 return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
327 base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c));
328 }
329 template <typename R, typename Function, typename P1, typename C1, typename C2,
330 typename C3, typename C4, typename C5, typename C6>
331 inline R DispatchToFunction(Function function,
332 const base::Tuple<P1>& p,
333 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
334 return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
335 base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c));
336 }
337
338 // 2 - 0
339 template <typename R, typename T, typename Method, typename P1, typename P2>
340 inline R DispatchToMethod(T* obj, Method method,
341 const base::Tuple<P1, P2>& p,
342 const base::Tuple<>& c) {
343 return (obj->*method)(base::get<0>(p), base::get<1>(p));
344 }
345 template <typename R, typename Function, typename P1, typename P2>
346 inline R DispatchToFunction(Function function,
347 const base::Tuple<P1, P2>& p,
348 const base::Tuple<>& c) {
349 return (*function)(base::get<0>(p), base::get<1>(p));
350 }
351
352 // 2 - 1
353 template <typename R, typename T, typename Method, typename P1, typename P2,
354 typename C1>
355 inline R DispatchToMethod(T* obj, Method method,
356 const base::Tuple<P1, P2>& p,
357 const base::Tuple<C1>& c) {
358 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c));
359 }
360 template <typename R, typename Function, typename P1, typename P2, typename C1>
361 inline R DispatchToFunction(Function function,
362 const base::Tuple<P1, P2>& p,
363 const base::Tuple<C1>& c) {
364 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c));
365 }
366
367 // 2 - 2
368 template <typename R, typename T, typename Method, typename P1, typename P2,
369 typename C1, typename C2>
370 inline R DispatchToMethod(T* obj, Method method,
371 const base::Tuple<P1, P2>& p,
372 const base::Tuple<C1, C2>& c) {
373 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
374 base::get<1>(c));
375 }
376 template <typename R, typename Function, typename P1, typename P2, typename C1,
377 typename C2>
378 inline R DispatchToFunction(Function function,
379 const base::Tuple<P1, P2>& p,
380 const base::Tuple<C1, C2>& c) {
381 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
382 base::get<1>(c));
383 }
384
385 // 2 - 3
386 template <typename R, typename T, typename Method, typename P1, typename P2,
387 typename C1, typename C2, typename C3>
388 inline R DispatchToMethod(T* obj, Method method,
389 const base::Tuple<P1, P2>& p,
390 const base::Tuple<C1, C2, C3>& c) {
391 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
392 base::get<1>(c), base::get<2>(c));
393 }
394 template <typename R, typename Function, typename P1, typename P2, typename C1,
395 typename C2, typename C3>
396 inline R DispatchToFunction(Function function,
397 const base::Tuple<P1, P2>& p,
398 const base::Tuple<C1, C2, C3>& c) {
399 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
400 base::get<1>(c), base::get<2>(c));
401 }
402
403 // 2 - 4
404 template <typename R, typename T, typename Method, typename P1, typename P2,
405 typename C1, typename C2, typename C3, typename C4>
406 inline R DispatchToMethod(T* obj, Method method,
407 const base::Tuple<P1, P2>& p,
408 const base::Tuple<C1, C2, C3, C4>& c) {
409 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
410 base::get<1>(c), base::get<2>(c), base::get<3>(c));
411 }
412 template <typename R, typename Function, typename P1, typename P2, typename C1,
413 typename C2, typename C3, typename C4>
414 inline R DispatchToFunction(Function function,
415 const base::Tuple<P1, P2>& p,
416 const base::Tuple<C1, C2, C3, C4>& c) {
417 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
418 base::get<1>(c), base::get<2>(c), base::get<3>(c));
419 }
420
421 // 2 - 5
422 template <typename R, typename T, typename Method, typename P1, typename P2,
423 typename C1, typename C2, typename C3, typename C4, typename C5>
424 inline R DispatchToMethod(T* obj, Method method,
425 const base::Tuple<P1, P2>& p,
426 const base::Tuple<C1, C2, C3, C4, C5>& c) {
427 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
428 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c));
429 }
430 template <typename R, typename Function, typename P1, typename P2, typename C1,
431 typename C2, typename C3, typename C4, typename C5>
432 inline R DispatchToFunction(Function function,
433 const base::Tuple<P1, P2>& p,
434 const base::Tuple<C1, C2, C3, C4, C5>& c) {
435 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
436 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c));
437 }
438
439 // 2 - 6
440 template <typename R, typename T, typename Method, typename P1, typename P2,
441 typename C1, typename C2, typename C3, typename C4, typename C5,
442 typename C6>
443 inline R DispatchToMethod(T* obj, Method method,
444 const base::Tuple<P1, P2>& p,
445 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
446 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
447 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c),
448 base::get<5>(c));
449 }
450 template <typename R, typename Function, typename P1, typename P2, typename C1,
451 typename C2, typename C3, typename C4, typename C5, typename C6>
452 inline R DispatchToFunction(Function function,
453 const base::Tuple<P1, P2>& p,
454 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
455 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
456 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c),
457 base::get<5>(c));
458 }
459
460 // 3 - 0
461 template <typename R, typename T, typename Method, typename P1, typename P2,
462 typename P3>
463 inline R DispatchToMethod(T* obj, Method method,
464 const base::Tuple<P1, P2, P3>& p,
465 const base::Tuple<>& c) {
466 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p));
467 }
468 template <typename R, typename Function, typename P1, typename P2, typename P3>
469 inline R DispatchToFunction(Function function,
470 const base::Tuple<P1, P2, P3>& p,
471 const base::Tuple<>& c) {
472 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p));
473 }
474
475 // 3 - 1
476 template <typename R, typename T, typename Method, typename P1, typename P2,
477 typename P3, typename C1>
478 inline R DispatchToMethod(T* obj, Method method,
479 const base::Tuple<P1, P2, P3>& p,
480 const base::Tuple<C1>& c) {
481 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
482 base::get<0>(c));
483 }
484 template <typename R, typename Function, typename P1, typename P2, typename P3,
485 typename C1>
486 inline R DispatchToFunction(Function function,
487 const base::Tuple<P1, P2, P3>& p,
488 const base::Tuple<C1>& c) {
489 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
490 base::get<0>(c));
491 }
492
493 // 3 - 2
494 template <typename R, typename T, typename Method, typename P1, typename P2,
495 typename P3, typename C1, typename C2>
496 inline R DispatchToMethod(T* obj, Method method,
497 const base::Tuple<P1, P2, P3>& p,
498 const base::Tuple<C1, C2>& c) {
499 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
500 base::get<0>(c), base::get<1>(c));
501 }
502 template <typename R, typename Function, typename P1, typename P2, typename P3,
503 typename C1, typename C2>
504 inline R DispatchToFunction(Function function,
505 const base::Tuple<P1, P2, P3>& p,
506 const base::Tuple<C1, C2>& c) {
507 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
508 base::get<0>(c), base::get<1>(c));
509 }
510
511 // 3 - 3
512 template <typename R, typename T, typename Method, typename P1, typename P2,
513 typename P3, typename C1, typename C2, typename C3>
514 inline R DispatchToMethod(T* obj, Method method,
515 const base::Tuple<P1, P2, P3>& p,
516 const base::Tuple<C1, C2, C3>& c) {
517 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
518 base::get<0>(c), base::get<1>(c), base::get<2>(c));
519 }
520 template <typename R, typename Function, typename P1, typename P2, typename P3,
521 typename C1, typename C2, typename C3>
522 inline R DispatchToFunction(Function function,
523 const base::Tuple<P1, P2, P3>& p,
524 const base::Tuple<C1, C2, C3>& c) {
525 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
526 base::get<0>(c), base::get<1>(c), base::get<2>(c));
527 }
528
529 // 3 - 4
530 template <typename R, typename T, typename Method, typename P1, typename P2,
531 typename P3, typename C1, typename C2, typename C3, typename C4>
532 inline R DispatchToMethod(T* obj, Method method,
533 const base::Tuple<P1, P2, P3>& p,
534 const base::Tuple<C1, C2, C3, C4>& c) {
535 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
536 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c));
537 }
538 template <typename R, typename Function, typename P1, typename P2, typename P3,
539 typename C1, typename C2, typename C3, typename C4>
540 inline R DispatchToFunction(Function function,
541 const base::Tuple<P1, P2, P3>& p,
542 const base::Tuple<C1, C2, C3, C4>& c) {
543 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
544 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c));
545 }
546
547 // 3 - 5
548 template <typename R, typename T, typename Method, typename P1, typename P2,
549 typename P3, typename C1, typename C2, typename C3, typename C4,
550 typename C5>
551 inline R DispatchToMethod(T* obj, Method method,
552 const base::Tuple<P1, P2, P3>& p,
553 const base::Tuple<C1, C2, C3, C4, C5>& c) {
554 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
555 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c),
556 base::get<4>(c));
557 }
558 template <typename R, typename Function, typename P1, typename P2, typename P3,
559 typename C1, typename C2, typename C3, typename C4, typename C5>
560 inline R DispatchToFunction(Function function,
561 const base::Tuple<P1, P2, P3>& p,
562 const base::Tuple<C1, C2, C3, C4, C5>& c) {
563 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
564 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c),
565 base::get<4>(c));
566 }
567
568 // 3 - 6
569 template <typename R, typename T, typename Method, typename P1, typename P2,
570 typename P3, typename C1, typename C2, typename C3, typename C4,
571 typename C5, typename C6>
572 inline R DispatchToMethod(T* obj, Method method,
573 const base::Tuple<P1, P2, P3>& p,
574 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
575 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
576 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c),
577 base::get<4>(c), base::get<5>(c));
578 }
579 template <typename R, typename Function, typename P1, typename P2, typename P3,
580 typename C1, typename C2, typename C3, typename C4, typename C5,
581 typename C6>
582 inline R DispatchToFunction(Function function,
583 const base::Tuple<P1, P2, P3>& p,
584 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
585 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
586 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c),
587 base::get<4>(c), base::get<5>(c));
588 }
589
590 // 4 - 0
591 template <typename R, typename T, typename Method, typename P1, typename P2,
592 typename P3, typename P4>
593 inline R DispatchToMethod(T* obj, Method method,
594 const base::Tuple<P1, P2, P3, P4>& p,
595 const base::Tuple<>& c) {
596 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
597 base::get<3>(p));
598 }
599 template <typename R, typename Function, typename P1, typename P2, typename P3,
600 typename P4>
601 inline R DispatchToFunction(Function function,
602 const base::Tuple<P1, P2, P3, P4>& p,
603 const base::Tuple<>& c) {
604 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
605 base::get<3>(p));
606 }
607
608 // 4 - 1
609 template <typename R, typename T, typename Method, typename P1, typename P2,
610 typename P3, typename P4, typename C1>
611 inline R DispatchToMethod(T* obj, Method method,
612 const base::Tuple<P1, P2, P3, P4>& p,
613 const base::Tuple<C1>& c) {
614 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
615 base::get<3>(p), base::get<0>(c));
616 }
617 template <typename R, typename Function, typename P1, typename P2, typename P3,
618 typename P4, typename C1>
619 inline R DispatchToFunction(Function function,
620 const base::Tuple<P1, P2, P3, P4>& p,
621 const base::Tuple<C1>& c) {
622 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
623 base::get<3>(p), base::get<0>(c));
624 }
625
626 // 4 - 2
627 template <typename R, typename T, typename Method, typename P1, typename P2,
628 typename P3, typename P4, typename C1, typename C2>
629 inline R DispatchToMethod(T* obj, Method method,
630 const base::Tuple<P1, P2, P3, P4>& p,
631 const base::Tuple<C1, C2>& c) {
632 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
633 base::get<3>(p), base::get<0>(c), base::get<1>(c));
634 }
635 template <typename R, typename Function, typename P1, typename P2, typename P3,
636 typename P4, typename C1, typename C2>
637 inline R DispatchToFunction(Function function,
638 const base::Tuple<P1, P2, P3, P4>& p,
639 const base::Tuple<C1, C2>& c) {
640 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
641 base::get<3>(p), base::get<0>(c), base::get<1>(c));
642 }
643
644 // 4 - 3
645 template <typename R, typename T, typename Method, typename P1, typename P2,
646 typename P3, typename P4, typename C1, typename C2, typename C3>
647 inline R DispatchToMethod(T* obj, Method method,
648 const base::Tuple<P1, P2, P3, P4>& p,
649 const base::Tuple<C1, C2, C3>& c) {
650 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
651 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c));
652 }
653 template <typename R, typename Function, typename P1, typename P2, typename P3,
654 typename P4, typename C1, typename C2, typename C3>
655 inline R DispatchToFunction(Function function,
656 const base::Tuple<P1, P2, P3, P4>& p,
657 const base::Tuple<C1, C2, C3>& c) {
658 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
659 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c));
660 }
661
662 // 4 - 4
663 template <typename R, typename T, typename Method, typename P1, typename P2,
664 typename P3, typename P4, typename C1, typename C2, typename C3,
665 typename C4>
666 inline R DispatchToMethod(T* obj, Method method,
667 const base::Tuple<P1, P2, P3, P4>& p,
668 const base::Tuple<C1, C2, C3, C4>& c) {
669 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
670 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
671 base::get<3>(c));
672 }
673 template <typename R, typename Function, typename P1, typename P2, typename P3,
674 typename P4, typename C1, typename C2, typename C3, typename C4>
675 inline R DispatchToFunction(Function function,
676 const base::Tuple<P1, P2, P3, P4>& p,
677 const base::Tuple<C1, C2, C3, C4>& c) {
678 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
679 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
680 base::get<3>(c));
681 }
682
683 // 4 - 5
684 template <typename R, typename T, typename Method, typename P1, typename P2,
685 typename P3, typename P4, typename C1, typename C2, typename C3,
686 typename C4, typename C5>
687 inline R DispatchToMethod(T* obj, Method method,
688 const base::Tuple<P1, P2, P3, P4>& p,
689 const base::Tuple<C1, C2, C3, C4, C5>& c) {
690 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
691 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
692 base::get<3>(c), base::get<4>(c));
693 }
694 template <typename R, typename Function, typename P1, typename P2, typename P3,
695 typename P4, typename C1, typename C2, typename C3, typename C4,
696 typename C5>
697 inline R DispatchToFunction(Function function,
698 const base::Tuple<P1, P2, P3, P4>& p,
699 const base::Tuple<C1, C2, C3, C4, C5>& c) {
700 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
701 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
702 base::get<3>(c), base::get<4>(c));
703 }
704
705 // 4 - 6
706 template <typename R, typename T, typename Method, typename P1, typename P2,
707 typename P3, typename P4, typename C1, typename C2, typename C3,
708 typename C4, typename C5, typename C6>
709 inline R DispatchToMethod(T* obj, Method method,
710 const base::Tuple<P1, P2, P3, P4>& p,
711 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
712 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
713 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
714 base::get<3>(c), base::get<4>(c), base::get<5>(c));
715 }
716 template <typename R, typename Function, typename P1, typename P2, typename P3,
717 typename P4, typename C1, typename C2, typename C3, typename C4,
718 typename C5, typename C6>
719 inline R DispatchToFunction(Function function,
720 const base::Tuple<P1, P2, P3, P4>& p,
721 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
722 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
723 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
724 base::get<3>(c), base::get<4>(c), base::get<5>(c));
725 }
726
727 // 5 - 0
728 template <typename R, typename T, typename Method, typename P1, typename P2,
729 typename P3, typename P4, typename P5>
730 inline R DispatchToMethod(T* obj, Method method,
731 const base::Tuple<P1, P2, P3, P4, P5>& p,
732 const base::Tuple<>& c) {
733 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
734 base::get<3>(p), base::get<4>(p));
735 }
736 template <typename R, typename Function, typename P1, typename P2, typename P3,
737 typename P4, typename P5>
738 inline R DispatchToFunction(Function function,
739 const base::Tuple<P1, P2, P3, P4, P5>& p,
740 const base::Tuple<>& c) {
741 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
742 base::get<3>(p), base::get<4>(p));
743 }
744
745 // 5 - 1
746 template <typename R, typename T, typename Method, typename P1, typename P2,
747 typename P3, typename P4, typename P5, typename C1>
748 inline R DispatchToMethod(T* obj, Method method,
749 const base::Tuple<P1, P2, P3, P4, P5>& p,
750 const base::Tuple<C1>& c) {
751 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
752 base::get<3>(p), base::get<4>(p), base::get<0>(c));
753 }
754 template <typename R, typename Function, typename P1, typename P2, typename P3,
755 typename P4, typename P5, typename C1>
756 inline R DispatchToFunction(Function function,
757 const base::Tuple<P1, P2, P3, P4, P5>& p,
758 const base::Tuple<C1>& c) {
759 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
760 base::get<3>(p), base::get<4>(p), base::get<0>(c));
761 }
762
763 // 5 - 2
764 template <typename R, typename T, typename Method, typename P1, typename P2,
765 typename P3, typename P4, typename P5, typename C1, typename C2>
766 inline R DispatchToMethod(T* obj, Method method,
767 const base::Tuple<P1, P2, P3, P4, P5>& p,
768 const base::Tuple<C1, C2>& c) {
769 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
770 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c));
771 }
772 template <typename R, typename Function, typename P1, typename P2, typename P3,
773 typename P4, typename P5, typename C1, typename C2>
774 inline R DispatchToFunction(Function function,
775 const base::Tuple<P1, P2, P3, P4, P5>& p,
776 const base::Tuple<C1, C2>& c) {
777 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
778 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c));
779 }
780
781 // 5 - 3
782 template <typename R, typename T, typename Method, typename P1, typename P2,
783 typename P3, typename P4, typename P5, typename C1, typename C2,
784 typename C3>
785 inline R DispatchToMethod(T* obj, Method method,
786 const base::Tuple<P1, P2, P3, P4, P5>& p,
787 const base::Tuple<C1, C2, C3>& c) {
788 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
789 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
790 base::get<2>(c));
791 }
792 template <typename R, typename Function, typename P1, typename P2, typename P3,
793 typename P4, typename P5, typename C1, typename C2, typename C3>
794 inline R DispatchToFunction(Function function,
795 const base::Tuple<P1, P2, P3, P4, P5>& p,
796 const base::Tuple<C1, C2, C3>& c) {
797 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
798 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
799 base::get<2>(c));
800 }
801
802 // 5 - 4
803 template <typename R, typename T, typename Method, typename P1, typename P2,
804 typename P3, typename P4, typename P5, typename C1, typename C2,
805 typename C3, typename C4>
806 inline R DispatchToMethod(T* obj, Method method,
807 const base::Tuple<P1, P2, P3, P4, P5>& p,
808 const base::Tuple<C1, C2, C3, C4>& c) {
809 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
810 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
811 base::get<2>(c), base::get<3>(c));
812 }
813 template <typename R, typename Function, typename P1, typename P2, typename P3,
814 typename P4, typename P5, typename C1, typename C2, typename C3,
815 typename C4>
816 inline R DispatchToFunction(Function function,
817 const base::Tuple<P1, P2, P3, P4, P5>& p,
818 const base::Tuple<C1, C2, C3, C4>& c) {
819 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
820 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
821 base::get<2>(c), base::get<3>(c));
822 }
823
824 // 5 - 5
825 template <typename R, typename T, typename Method, typename P1, typename P2,
826 typename P3, typename P4, typename P5, typename C1, typename C2,
827 typename C3, typename C4, typename C5>
828 inline R DispatchToMethod(T* obj, Method method,
829 const base::Tuple<P1, P2, P3, P4, P5>& p,
830 const base::Tuple<C1, C2, C3, C4, C5>& c) {
831 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
832 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
833 base::get<2>(c), base::get<3>(c), base::get<4>(c));
834 }
835 template <typename R, typename Function, typename P1, typename P2, typename P3,
836 typename P4, typename P5, typename C1, typename C2, typename C3,
837 typename C4, typename C5>
838 inline R DispatchToFunction(Function function,
839 const base::Tuple<P1, P2, P3, P4, P5>& p,
840 const base::Tuple<C1, C2, C3, C4, C5>& c) {
841 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
842 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
843 base::get<2>(c), base::get<3>(c), base::get<4>(c));
844 }
845
846 // 5 - 6
847 template <typename R, typename T, typename Method, typename P1, typename P2,
848 typename P3, typename P4, typename P5, typename C1, typename C2,
849 typename C3, typename C4, typename C5, typename C6>
850 inline R DispatchToMethod(T* obj, Method method,
851 const base::Tuple<P1, P2, P3, P4, P5>& p,
852 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
853 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
854 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
855 base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c));
856 }
857 template <typename R, typename Function, typename P1, typename P2, typename P3,
858 typename P4, typename P5, typename C1, typename C2, typename C3,
859 typename C4, typename C5, typename C6>
860 inline R DispatchToFunction(Function function,
861 const base::Tuple<P1, P2, P3, P4, P5>& p,
862 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
863 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
864 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
865 base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c));
866 }
867
868 // 6 - 0
869 template <typename R, typename T, typename Method, typename P1, typename P2,
870 typename P3, typename P4, typename P5, typename P6>
871 inline R DispatchToMethod(T* obj, Method method,
872 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
873 const base::Tuple<>& c) {
874 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
875 base::get<3>(p), base::get<4>(p), base::get<5>(p));
876 }
877 template <typename R, typename Function, typename P1, typename P2, typename P3,
878 typename P4, typename P5, typename P6>
879 inline R DispatchToFunction(Function function,
880 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
881 const base::Tuple<>& c) {
882 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
883 base::get<3>(p), base::get<4>(p), base::get<5>(p));
884 }
885
886 // 6 - 1
887 template <typename R, typename T, typename Method, typename P1, typename P2,
888 typename P3, typename P4, typename P5, typename P6, typename C1>
889 inline R DispatchToMethod(T* obj, Method method,
890 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
891 const base::Tuple<C1>& c) {
892 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
893 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c));
894 }
895 template <typename R, typename Function, typename P1, typename P2, typename P3,
896 typename P4, typename P5, typename P6, typename C1>
897 inline R DispatchToFunction(Function function,
898 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
899 const base::Tuple<C1>& c) {
900 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
901 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c));
902 }
903
904 // 6 - 2
905 template <typename R, typename T, typename Method, typename P1, typename P2,
906 typename P3, typename P4, typename P5, typename P6, typename C1,
907 typename C2>
908 inline R DispatchToMethod(T* obj, Method method,
909 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
910 const base::Tuple<C1, C2>& c) {
911 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
912 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
913 base::get<1>(c));
914 }
915 template <typename R, typename Function, typename P1, typename P2, typename P3,
916 typename P4, typename P5, typename P6, typename C1, typename C2>
917 inline R DispatchToFunction(Function function,
918 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
919 const base::Tuple<C1, C2>& c) {
920 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
921 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
922 base::get<1>(c));
923 }
924
925 // 6 - 3
926 template <typename R, typename T, typename Method, typename P1, typename P2,
927 typename P3, typename P4, typename P5, typename P6, typename C1,
928 typename C2, typename C3>
929 inline R DispatchToMethod(T* obj, Method method,
930 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
931 const base::Tuple<C1, C2, C3>& c) {
932 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
933 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
934 base::get<1>(c), base::get<2>(c));
935 }
936 template <typename R, typename Function, typename P1, typename P2, typename P3,
937 typename P4, typename P5, typename P6, typename C1, typename C2,
938 typename C3>
939 inline R DispatchToFunction(Function function,
940 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
941 const base::Tuple<C1, C2, C3>& c) {
942 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
943 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
944 base::get<1>(c), base::get<2>(c));
945 }
946
947 // 6 - 4
948 template <typename R, typename T, typename Method, typename P1, typename P2,
949 typename P3, typename P4, typename P5, typename P6, typename C1,
950 typename C2, typename C3, typename C4>
951 inline R DispatchToMethod(T* obj, Method method,
952 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
953 const base::Tuple<C1, C2, C3, C4>& c) {
954 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
955 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
956 base::get<1>(c), base::get<2>(c), base::get<3>(c));
957 }
958 template <typename R, typename Function, typename P1, typename P2, typename P3,
959 typename P4, typename P5, typename P6, typename C1, typename C2,
960 typename C3, typename C4>
961 inline R DispatchToFunction(Function function,
962 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
963 const base::Tuple<C1, C2, C3, C4>& c) {
964 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
965 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
966 base::get<1>(c), base::get<2>(c), base::get<3>(c));
967 }
968
969 // 6 - 5
970 template <typename R, typename T, typename Method, typename P1, typename P2,
971 typename P3, typename P4, typename P5, typename P6, typename C1,
972 typename C2, typename C3, typename C4, typename C5>
973 inline R DispatchToMethod(T* obj, Method method,
974 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
975 const base::Tuple<C1, C2, C3, C4, C5>& c) {
976 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
977 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
978 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c));
979 }
980 template <typename R, typename Function, typename P1, typename P2, typename P3,
981 typename P4, typename P5, typename P6, typename C1, typename C2,
982 typename C3, typename C4, typename C5>
983 inline R DispatchToFunction(Function function,
984 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
985 const base::Tuple<C1, C2, C3, C4, C5>& c) {
986 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
987 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
988 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c));
989 }
990
991 // 6 - 6
992 template <typename R, typename T, typename Method, typename P1, typename P2,
993 typename P3, typename P4, typename P5, typename P6, typename C1,
994 typename C2, typename C3, typename C4, typename C5, typename C6>
995 inline R DispatchToMethod(T* obj, Method method,
996 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
997 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
998 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
999 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
1000 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c),
1001 base::get<5>(c));
1002 }
1003 template <typename R, typename Function, typename P1, typename P2, typename P3,
1004 typename P4, typename P5, typename P6, typename C1, typename C2,
1005 typename C3, typename C4, typename C5, typename C6>
1006 inline R DispatchToFunction(Function function,
1007 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
1008 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
1009 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
1010 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
1011 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c),
1012 base::get<5>(c));
1013 }
1014
1015 // Interface that is exposed to the consumer, that does the actual calling
1016 // of the method.
1017 template <typename R, typename Params>
1018 class MutantRunner {
1019 public:
1020 virtual R RunWithParams(const Params& params) = 0;
1021 virtual ~MutantRunner() {}
1022 };
1023
1024 // Mutant holds pre-bound arguments (like Task). Like Callback
1025 // allows call-time arguments. You bind a pointer to the object
1026 // at creation time.
1027 template <typename R, typename T, typename Method,
1028 typename PreBound, typename Params>
1029 class Mutant : public MutantRunner<R, Params> {
1030 public:
1031 Mutant(T* obj, Method method, const PreBound& pb)
1032 : obj_(obj), method_(method), pb_(pb) {
1033 }
1034
1035 // MutantRunner implementation
1036 virtual R RunWithParams(const Params& params) {
1037 return DispatchToMethod<R>(this->obj_, this->method_, pb_, params);
1038 }
1039
1040 T* obj_;
1041 Method method_;
1042 PreBound pb_;
1043 };
1044
1045 template <typename R, typename Function, typename PreBound, typename Params>
1046 class MutantFunction : public MutantRunner<R, Params> {
1047 public:
1048 MutantFunction(Function function, const PreBound& pb)
1049 : function_(function), pb_(pb) {
1050 }
1051
1052 // MutantRunner implementation
1053 virtual R RunWithParams(const Params& params) {
1054 return DispatchToFunction<R>(function_, pb_, params);
1055 }
1056
1057 Function function_;
1058 PreBound pb_;
1059 };
1060
1061 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1062 // MutantLateBind is like Mutant, but you bind a pointer to a pointer
1063 // to the object. This way you can create actions for an object
1064 // that is not yet created (has only storage for a pointer to it).
1065 template <typename R, typename T, typename Method,
1066 typename PreBound, typename Params>
1067 class MutantLateObjectBind : public MutantRunner<R, Params> {
1068 public:
1069 MutantLateObjectBind(T** obj, Method method, const PreBound& pb)
1070 : obj_(obj), method_(method), pb_(pb) {
1071 }
1072
1073 // MutantRunner implementation.
1074 virtual R RunWithParams(const Params& params) {
1075 EXPECT_THAT(*this->obj_, testing::NotNull());
1076 if (NULL == *this->obj_)
1077 return R();
1078 return DispatchToMethod<R>( *this->obj_, this->method_, pb_, params);
1079 }
1080
1081 T** obj_;
1082 Method method_;
1083 PreBound pb_;
1084 };
1085 #endif
1086
1087 // Simple MutantRunner<> wrapper acting as a functor.
1088 // Redirects operator() to MutantRunner<Params>::Run()
1089 template <typename R, typename Params>
1090 struct MutantFunctor {
1091 explicit MutantFunctor(MutantRunner<R, Params>* cb) : impl_(cb) {
1092 }
1093
1094 ~MutantFunctor() {
1095 }
1096
1097 inline R operator()() {
1098 return impl_->RunWithParams(base::Tuple<>());
1099 }
1100
1101 template <typename Arg1>
1102 inline R operator()(const Arg1& a) {
1103 return impl_->RunWithParams(Params(a));
1104 }
1105
1106 template <typename Arg1, typename Arg2>
1107 inline R operator()(const Arg1& a, const Arg2& b) {
1108 return impl_->RunWithParams(Params(a, b));
1109 }
1110
1111 template <typename Arg1, typename Arg2, typename Arg3>
1112 inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c) {
1113 return impl_->RunWithParams(Params(a, b, c));
1114 }
1115
1116 template <typename Arg1, typename Arg2, typename Arg3, typename Arg4>
1117 inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c,
1118 const Arg4& d) {
1119 return impl_->RunWithParams(Params(a, b, c, d));
1120 } 104 }
1121 105
1122 private: 106 private:
1123 // We need copy constructor since MutantFunctor is copied few times 107 base::Callback<R(Args...)> cb_;
1124 // inside GMock machinery, hence no DISALLOW_EVIL_CONTRUCTORS
1125 MutantFunctor();
1126 linked_ptr<MutantRunner<R, Params> > impl_;
1127 }; 108 };
1128 109
1129 // 0 - 0 110 template <typename Signature>
1130 template <typename R, typename T, typename U> 111 CallbackToFunctorHelper<Signature>
1131 inline MutantFunctor<R, base::Tuple<>> 112 CallbackToFunctor(const base::Callback<Signature>& cb) {
1132 CreateFunctor(T* obj, R (U::*method)()) { 113 return CallbackToFunctorHelper<Signature>(cb);
1133 MutantRunner<R, base::Tuple<>>* t =
1134 new Mutant<R, T, R (U::*)(),
1135 base::Tuple<>, base::Tuple<>>
1136 (obj, method, base::MakeTuple());
1137 return MutantFunctor<R, base::Tuple<>>(t);
1138 } 114 }
1139 115
1140 template <typename R> 116 template <typename Functor, typename... BoundArgs>
1141 inline MutantFunctor<R, base::Tuple<>> 117 CallbackToFunctorHelper<base::MakeUnboundRunType<Functor, BoundArgs...>>
1142 CreateFunctor(R (*function)()) { 118 CreateFunctor(Functor functor, const BoundArgs&... args) {
1143 MutantRunner<R, base::Tuple<>>* t = 119 return CallbackToFunctor(base::Bind(functor, args...));
1144 new MutantFunction<R, R (*)(),
1145 base::Tuple<>, base::Tuple<>>
1146 (function, base::MakeTuple());
1147 return MutantFunctor<R, base::Tuple<>>(t);
1148 } 120 }
1149 121
1150 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1151 template <typename R, typename T, typename U>
1152 inline MutantFunctor<R, base::Tuple<>>
1153 CreateFunctor(T** obj, R (U::*method)()) {
1154 MutantRunner<R, base::Tuple<>>* t =
1155 new MutantLateObjectBind<R, T, R (U::*)(),
1156 base::Tuple<>, base::Tuple<>>
1157 (obj, method, base::MakeTuple());
1158 return MutantFunctor<R, base::Tuple<>>(t);
1159 }
1160 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1161
1162 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1163 template <typename R, typename T, typename U>
1164 inline MutantFunctor<R, base::Tuple<>>
1165 CreateFunctor(T* obj, R (__stdcall U::*method)()) {
1166 MutantRunner<R, base::Tuple<>>* t =
1167 new Mutant<R, T, R (__stdcall U::*)(),
1168 base::Tuple<>, base::Tuple<>>
1169 (obj, method, base::MakeTuple());
1170 return MutantFunctor<R, base::Tuple<>>(t);
1171 }
1172
1173 template <typename R>
1174 inline MutantFunctor<R, base::Tuple<>>
1175 CreateFunctor(R (__stdcall *function)()) {
1176 MutantRunner<R, base::Tuple<>>* t =
1177 new MutantFunction<R, R (__stdcall *)(),
1178 base::Tuple<>, base::Tuple<>>
1179 (function, base::MakeTuple());
1180 return MutantFunctor<R, base::Tuple<>>(t);
1181 }
1182 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1183 template <typename R, typename T, typename U>
1184 inline MutantFunctor<R, base::Tuple<>>
1185 CreateFunctor(T** obj, R (__stdcall U::*method)()) {
1186 MutantRunner<R, base::Tuple<>>* t =
1187 new MutantLateObjectBind<R, T, R (__stdcall U::*)(),
1188 base::Tuple<>, base::Tuple<>>
1189 (obj, method, base::MakeTuple());
1190 return MutantFunctor<R, base::Tuple<>>(t);
1191 }
1192 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1193 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1194
1195 // 0 - 1
1196 template <typename R, typename T, typename U, typename A1>
1197 inline MutantFunctor<R, base::Tuple<A1>>
1198 CreateFunctor(T* obj, R (U::*method)(A1)) {
1199 MutantRunner<R, base::Tuple<A1>>* t =
1200 new Mutant<R, T, R (U::*)(A1),
1201 base::Tuple<>, base::Tuple<A1>>
1202 (obj, method, base::MakeTuple());
1203 return MutantFunctor<R, base::Tuple<A1>>(t);
1204 }
1205
1206 template <typename R, typename A1>
1207 inline MutantFunctor<R, base::Tuple<A1>>
1208 CreateFunctor(R (*function)(A1)) {
1209 MutantRunner<R, base::Tuple<A1>>* t =
1210 new MutantFunction<R, R (*)(A1),
1211 base::Tuple<>, base::Tuple<A1>>
1212 (function, base::MakeTuple());
1213 return MutantFunctor<R, base::Tuple<A1>>(t);
1214 }
1215
1216 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1217 template <typename R, typename T, typename U, typename A1>
1218 inline MutantFunctor<R, base::Tuple<A1>>
1219 CreateFunctor(T** obj, R (U::*method)(A1)) {
1220 MutantRunner<R, base::Tuple<A1>>* t =
1221 new MutantLateObjectBind<R, T, R (U::*)(A1),
1222 base::Tuple<>, base::Tuple<A1>>
1223 (obj, method, base::MakeTuple());
1224 return MutantFunctor<R, base::Tuple<A1>>(t);
1225 }
1226 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1227
1228 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1229 template <typename R, typename T, typename U, typename A1>
1230 inline MutantFunctor<R, base::Tuple<A1>>
1231 CreateFunctor(T* obj, R (__stdcall U::*method)(A1)) {
1232 MutantRunner<R, base::Tuple<A1>>* t =
1233 new Mutant<R, T, R (__stdcall U::*)(A1),
1234 base::Tuple<>, base::Tuple<A1>>
1235 (obj, method, base::MakeTuple());
1236 return MutantFunctor<R, base::Tuple<A1>>(t);
1237 }
1238
1239 template <typename R, typename A1>
1240 inline MutantFunctor<R, base::Tuple<A1>>
1241 CreateFunctor(R (__stdcall *function)(A1)) {
1242 MutantRunner<R, base::Tuple<A1>>* t =
1243 new MutantFunction<R, R (__stdcall *)(A1),
1244 base::Tuple<>, base::Tuple<A1>>
1245 (function, base::MakeTuple());
1246 return MutantFunctor<R, base::Tuple<A1>>(t);
1247 }
1248 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1249 template <typename R, typename T, typename U, typename A1>
1250 inline MutantFunctor<R, base::Tuple<A1>>
1251 CreateFunctor(T** obj, R (__stdcall U::*method)(A1)) {
1252 MutantRunner<R, base::Tuple<A1>>* t =
1253 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1),
1254 base::Tuple<>, base::Tuple<A1>>
1255 (obj, method, base::MakeTuple());
1256 return MutantFunctor<R, base::Tuple<A1>>(t);
1257 }
1258 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1259 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1260
1261 // 0 - 2
1262 template <typename R, typename T, typename U, typename A1, typename A2>
1263 inline MutantFunctor<R, base::Tuple<A1, A2>>
1264 CreateFunctor(T* obj, R (U::*method)(A1, A2)) {
1265 MutantRunner<R, base::Tuple<A1, A2>>* t =
1266 new Mutant<R, T, R (U::*)(A1, A2),
1267 base::Tuple<>, base::Tuple<A1, A2>>
1268 (obj, method, base::MakeTuple());
1269 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1270 }
1271
1272 template <typename R, typename A1, typename A2>
1273 inline MutantFunctor<R, base::Tuple<A1, A2>>
1274 CreateFunctor(R (*function)(A1, A2)) {
1275 MutantRunner<R, base::Tuple<A1, A2>>* t =
1276 new MutantFunction<R, R (*)(A1, A2),
1277 base::Tuple<>, base::Tuple<A1, A2>>
1278 (function, base::MakeTuple());
1279 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1280 }
1281
1282 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1283 template <typename R, typename T, typename U, typename A1, typename A2>
1284 inline MutantFunctor<R, base::Tuple<A1, A2>>
1285 CreateFunctor(T** obj, R (U::*method)(A1, A2)) {
1286 MutantRunner<R, base::Tuple<A1, A2>>* t =
1287 new MutantLateObjectBind<R, T, R (U::*)(A1, A2),
1288 base::Tuple<>, base::Tuple<A1, A2>>
1289 (obj, method, base::MakeTuple());
1290 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1291 }
1292 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1293
1294 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1295 template <typename R, typename T, typename U, typename A1, typename A2>
1296 inline MutantFunctor<R, base::Tuple<A1, A2>>
1297 CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2)) {
1298 MutantRunner<R, base::Tuple<A1, A2>>* t =
1299 new Mutant<R, T, R (__stdcall U::*)(A1, A2),
1300 base::Tuple<>, base::Tuple<A1, A2>>
1301 (obj, method, base::MakeTuple());
1302 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1303 }
1304
1305 template <typename R, typename A1, typename A2>
1306 inline MutantFunctor<R, base::Tuple<A1, A2>>
1307 CreateFunctor(R (__stdcall *function)(A1, A2)) {
1308 MutantRunner<R, base::Tuple<A1, A2>>* t =
1309 new MutantFunction<R, R (__stdcall *)(A1, A2),
1310 base::Tuple<>, base::Tuple<A1, A2>>
1311 (function, base::MakeTuple());
1312 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1313 }
1314 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1315 template <typename R, typename T, typename U, typename A1, typename A2>
1316 inline MutantFunctor<R, base::Tuple<A1, A2>>
1317 CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2)) {
1318 MutantRunner<R, base::Tuple<A1, A2>>* t =
1319 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2),
1320 base::Tuple<>, base::Tuple<A1, A2>>
1321 (obj, method, base::MakeTuple());
1322 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1323 }
1324 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1325 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1326
1327 // 0 - 3
1328 template <typename R, typename T, typename U, typename A1, typename A2,
1329 typename A3>
1330 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1331 CreateFunctor(T* obj, R (U::*method)(A1, A2, A3)) {
1332 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1333 new Mutant<R, T, R (U::*)(A1, A2, A3),
1334 base::Tuple<>, base::Tuple<A1, A2, A3>>
1335 (obj, method, base::MakeTuple());
1336 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1337 }
1338
1339 template <typename R, typename A1, typename A2, typename A3>
1340 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1341 CreateFunctor(R (*function)(A1, A2, A3)) {
1342 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1343 new MutantFunction<R, R (*)(A1, A2, A3),
1344 base::Tuple<>, base::Tuple<A1, A2, A3>>
1345 (function, base::MakeTuple());
1346 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1347 }
1348
1349 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1350 template <typename R, typename T, typename U, typename A1, typename A2,
1351 typename A3>
1352 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1353 CreateFunctor(T** obj, R (U::*method)(A1, A2, A3)) {
1354 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1355 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3),
1356 base::Tuple<>, base::Tuple<A1, A2, A3>>
1357 (obj, method, base::MakeTuple());
1358 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1359 }
1360 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1361
1362 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1363 template <typename R, typename T, typename U, typename A1, typename A2,
1364 typename A3>
1365 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1366 CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3)) {
1367 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1368 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3),
1369 base::Tuple<>, base::Tuple<A1, A2, A3>>
1370 (obj, method, base::MakeTuple());
1371 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1372 }
1373
1374 template <typename R, typename A1, typename A2, typename A3>
1375 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1376 CreateFunctor(R (__stdcall *function)(A1, A2, A3)) {
1377 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1378 new MutantFunction<R, R (__stdcall *)(A1, A2, A3),
1379 base::Tuple<>, base::Tuple<A1, A2, A3>>
1380 (function, base::MakeTuple());
1381 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1382 }
1383 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1384 template <typename R, typename T, typename U, typename A1, typename A2,
1385 typename A3>
1386 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1387 CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3)) {
1388 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1389 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3),
1390 base::Tuple<>, base::Tuple<A1, A2, A3>>
1391 (obj, method, base::MakeTuple());
1392 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1393 }
1394 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1395 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1396
1397 // 0 - 4
1398 template <typename R, typename T, typename U, typename A1, typename A2,
1399 typename A3, typename A4>
1400 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1401 CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4)) {
1402 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1403 new Mutant<R, T, R (U::*)(A1, A2, A3, A4),
1404 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1405 (obj, method, base::MakeTuple());
1406 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1407 }
1408
1409 template <typename R, typename A1, typename A2, typename A3, typename A4>
1410 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1411 CreateFunctor(R (*function)(A1, A2, A3, A4)) {
1412 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1413 new MutantFunction<R, R (*)(A1, A2, A3, A4),
1414 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1415 (function, base::MakeTuple());
1416 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1417 }
1418
1419 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1420 template <typename R, typename T, typename U, typename A1, typename A2,
1421 typename A3, typename A4>
1422 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1423 CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4)) {
1424 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1425 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3, A4),
1426 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1427 (obj, method, base::MakeTuple());
1428 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1429 }
1430 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1431
1432 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1433 template <typename R, typename T, typename U, typename A1, typename A2,
1434 typename A3, typename A4>
1435 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1436 CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4)) {
1437 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1438 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3, A4),
1439 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1440 (obj, method, base::MakeTuple());
1441 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1442 }
1443
1444 template <typename R, typename A1, typename A2, typename A3, typename A4>
1445 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1446 CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4)) {
1447 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1448 new MutantFunction<R, R (__stdcall *)(A1, A2, A3, A4),
1449 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1450 (function, base::MakeTuple());
1451 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1452 }
1453 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1454 template <typename R, typename T, typename U, typename A1, typename A2,
1455 typename A3, typename A4>
1456 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1457 CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4)) {
1458 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1459 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3, A4),
1460 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1461 (obj, method, base::MakeTuple());
1462 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1463 }
1464 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1465 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1466
1467 // 0 - 5
1468 template <typename R, typename T, typename U, typename A1, typename A2,
1469 typename A3, typename A4, typename A5>
1470 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
1471 CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4, A5)) {
1472 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
1473 new Mutant<R, T, R (U::*)(A1, A2, A3, A4, A5),
1474 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1475 (obj, method, base::MakeTuple());
1476 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
1477 }
1478
1479 template <typename R, typename A1, typename A2, typename A3, typename A4,
1480 typename A5>
1481 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
1482 CreateFunctor(R (*function)(A1, A2, A3, A4, A5)) {
1483 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
1484 new MutantFunction<R, R (*)(A1, A2, A3, A4, A5),
1485 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1486 (function, base::MakeTuple());
1487 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
1488 }
1489
1490 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1491 template <typename R, typename T, typename U, typename A1, typename A2,
1492 typename A3, typename A4, typename A5>
1493 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
1494 CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4, A5)) {
1495 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
1496 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3, A4, A5),
1497 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1498 (obj, method, base::MakeTuple());
1499 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
1500 }
1501 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1502
1503 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1504 template <typename R, typename T, typename U, typename A1, typename A2,
1505 typename A3, typename A4, typename A5>
1506 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
1507 CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5)) {
1508 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
1509 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5),
1510 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1511 (obj, method, base::MakeTuple());
1512 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
1513 }
1514
1515 template <typename R, typename A1, typename A2, typename A3, typename A4,
1516 typename A5>
1517 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
1518 CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4, A5)) {
1519 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
1520 new MutantFunction<R, R (__stdcall *)(A1, A2, A3, A4, A5),
1521 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1522 (function, base::MakeTuple());
1523 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
1524 }
1525 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1526 template <typename R, typename T, typename U, typename A1, typename A2,
1527 typename A3, typename A4, typename A5>
1528 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
1529 CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5)) {
1530 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
1531 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5),
1532 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1533 (obj, method, base::MakeTuple());
1534 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
1535 }
1536 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1537 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1538
1539 // 0 - 6
1540 template <typename R, typename T, typename U, typename A1, typename A2,
1541 typename A3, typename A4, typename A5, typename A6>
1542 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
1543 CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4, A5, A6)) {
1544 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
1545 new Mutant<R, T, R (U::*)(A1, A2, A3, A4, A5, A6),
1546 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1547 (obj, method, base::MakeTuple());
1548 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
1549 }
1550
1551 template <typename R, typename A1, typename A2, typename A3, typename A4,
1552 typename A5, typename A6>
1553 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
1554 CreateFunctor(R (*function)(A1, A2, A3, A4, A5, A6)) {
1555 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
1556 new MutantFunction<R, R (*)(A1, A2, A3, A4, A5, A6),
1557 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1558 (function, base::MakeTuple());
1559 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
1560 }
1561
1562 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1563 template <typename R, typename T, typename U, typename A1, typename A2,
1564 typename A3, typename A4, typename A5, typename A6>
1565 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
1566 CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4, A5, A6)) {
1567 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
1568 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3, A4, A5, A6),
1569 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1570 (obj, method, base::MakeTuple());
1571 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
1572 }
1573 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1574
1575 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1576 template <typename R, typename T, typename U, typename A1, typename A2,
1577 typename A3, typename A4, typename A5, typename A6>
1578 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
1579 CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5, A6)) {
1580 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
1581 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5, A6),
1582 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1583 (obj, method, base::MakeTuple());
1584 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
1585 }
1586
1587 template <typename R, typename A1, typename A2, typename A3, typename A4,
1588 typename A5, typename A6>
1589 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
1590 CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4, A5, A6)) {
1591 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
1592 new MutantFunction<R, R (__stdcall *)(A1, A2, A3, A4, A5, A6),
1593 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1594 (function, base::MakeTuple());
1595 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
1596 }
1597 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1598 template <typename R, typename T, typename U, typename A1, typename A2,
1599 typename A3, typename A4, typename A5, typename A6>
1600 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
1601 CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5, A6)) {
1602 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
1603 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5, A6),
1604 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1605 (obj, method, base::MakeTuple());
1606 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
1607 }
1608 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1609 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1610
1611 // 1 - 0
1612 template <typename R, typename T, typename U, typename P1, typename X1>
1613 inline MutantFunctor<R, base::Tuple<>>
1614 CreateFunctor(T* obj, R (U::*method)(X1), const P1& p1) {
1615 MutantRunner<R, base::Tuple<>>* t =
1616 new Mutant<R, T, R (U::*)(X1),
1617 base::Tuple<P1>, base::Tuple<>>
1618 (obj, method, base::MakeTuple(p1));
1619 return MutantFunctor<R, base::Tuple<>>(t);
1620 }
1621
1622 template <typename R, typename P1, typename X1>
1623 inline MutantFunctor<R, base::Tuple<>>
1624 CreateFunctor(R (*function)(X1), const P1& p1) {
1625 MutantRunner<R, base::Tuple<>>* t =
1626 new MutantFunction<R, R (*)(X1),
1627 base::Tuple<P1>, base::Tuple<>>
1628 (function, base::MakeTuple(p1));
1629 return MutantFunctor<R, base::Tuple<>>(t);
1630 }
1631
1632 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1633 template <typename R, typename T, typename U, typename P1, typename X1>
1634 inline MutantFunctor<R, base::Tuple<>>
1635 CreateFunctor(T** obj, R (U::*method)(X1), const P1& p1) {
1636 MutantRunner<R, base::Tuple<>>* t =
1637 new MutantLateObjectBind<R, T, R (U::*)(X1),
1638 base::Tuple<P1>, base::Tuple<>>
1639 (obj, method, base::MakeTuple(p1));
1640 return MutantFunctor<R, base::Tuple<>>(t);
1641 }
1642 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1643
1644 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1645 template <typename R, typename T, typename U, typename P1, typename X1>
1646 inline MutantFunctor<R, base::Tuple<>>
1647 CreateFunctor(T* obj, R (__stdcall U::*method)(X1), const P1& p1) {
1648 MutantRunner<R, base::Tuple<>>* t =
1649 new Mutant<R, T, R (__stdcall U::*)(X1),
1650 base::Tuple<P1>, base::Tuple<>>
1651 (obj, method, base::MakeTuple(p1));
1652 return MutantFunctor<R, base::Tuple<>>(t);
1653 }
1654
1655 template <typename R, typename P1, typename X1>
1656 inline MutantFunctor<R, base::Tuple<>>
1657 CreateFunctor(R (__stdcall *function)(X1), const P1& p1) {
1658 MutantRunner<R, base::Tuple<>>* t =
1659 new MutantFunction<R, R (__stdcall *)(X1),
1660 base::Tuple<P1>, base::Tuple<>>
1661 (function, base::MakeTuple(p1));
1662 return MutantFunctor<R, base::Tuple<>>(t);
1663 }
1664 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1665 template <typename R, typename T, typename U, typename P1, typename X1>
1666 inline MutantFunctor<R, base::Tuple<>>
1667 CreateFunctor(T** obj, R (__stdcall U::*method)(X1), const P1& p1) {
1668 MutantRunner<R, base::Tuple<>>* t =
1669 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1),
1670 base::Tuple<P1>, base::Tuple<>>
1671 (obj, method, base::MakeTuple(p1));
1672 return MutantFunctor<R, base::Tuple<>>(t);
1673 }
1674 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1675 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1676
1677 // 1 - 1
1678 template <typename R, typename T, typename U, typename P1, typename A1,
1679 typename X1>
1680 inline MutantFunctor<R, base::Tuple<A1>>
1681 CreateFunctor(T* obj, R (U::*method)(X1, A1), const P1& p1) {
1682 MutantRunner<R, base::Tuple<A1>>* t =
1683 new Mutant<R, T, R (U::*)(X1, A1),
1684 base::Tuple<P1>, base::Tuple<A1>>
1685 (obj, method, base::MakeTuple(p1));
1686 return MutantFunctor<R, base::Tuple<A1>>(t);
1687 }
1688
1689 template <typename R, typename P1, typename A1, typename X1>
1690 inline MutantFunctor<R, base::Tuple<A1>>
1691 CreateFunctor(R (*function)(X1, A1), const P1& p1) {
1692 MutantRunner<R, base::Tuple<A1>>* t =
1693 new MutantFunction<R, R (*)(X1, A1),
1694 base::Tuple<P1>, base::Tuple<A1>>
1695 (function, base::MakeTuple(p1));
1696 return MutantFunctor<R, base::Tuple<A1>>(t);
1697 }
1698
1699 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1700 template <typename R, typename T, typename U, typename P1, typename A1,
1701 typename X1>
1702 inline MutantFunctor<R, base::Tuple<A1>>
1703 CreateFunctor(T** obj, R (U::*method)(X1, A1), const P1& p1) {
1704 MutantRunner<R, base::Tuple<A1>>* t =
1705 new MutantLateObjectBind<R, T, R (U::*)(X1, A1),
1706 base::Tuple<P1>, base::Tuple<A1>>
1707 (obj, method, base::MakeTuple(p1));
1708 return MutantFunctor<R, base::Tuple<A1>>(t);
1709 }
1710 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1711
1712 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1713 template <typename R, typename T, typename U, typename P1, typename A1,
1714 typename X1>
1715 inline MutantFunctor<R, base::Tuple<A1>>
1716 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1), const P1& p1) {
1717 MutantRunner<R, base::Tuple<A1>>* t =
1718 new Mutant<R, T, R (__stdcall U::*)(X1, A1),
1719 base::Tuple<P1>, base::Tuple<A1>>
1720 (obj, method, base::MakeTuple(p1));
1721 return MutantFunctor<R, base::Tuple<A1>>(t);
1722 }
1723
1724 template <typename R, typename P1, typename A1, typename X1>
1725 inline MutantFunctor<R, base::Tuple<A1>>
1726 CreateFunctor(R (__stdcall *function)(X1, A1), const P1& p1) {
1727 MutantRunner<R, base::Tuple<A1>>* t =
1728 new MutantFunction<R, R (__stdcall *)(X1, A1),
1729 base::Tuple<P1>, base::Tuple<A1>>
1730 (function, base::MakeTuple(p1));
1731 return MutantFunctor<R, base::Tuple<A1>>(t);
1732 }
1733 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1734 template <typename R, typename T, typename U, typename P1, typename A1,
1735 typename X1>
1736 inline MutantFunctor<R, base::Tuple<A1>>
1737 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1), const P1& p1) {
1738 MutantRunner<R, base::Tuple<A1>>* t =
1739 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1),
1740 base::Tuple<P1>, base::Tuple<A1>>
1741 (obj, method, base::MakeTuple(p1));
1742 return MutantFunctor<R, base::Tuple<A1>>(t);
1743 }
1744 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1745 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1746
1747 // 1 - 2
1748 template <typename R, typename T, typename U, typename P1, typename A1,
1749 typename A2, typename X1>
1750 inline MutantFunctor<R, base::Tuple<A1, A2>>
1751 CreateFunctor(T* obj, R (U::*method)(X1, A1, A2), const P1& p1) {
1752 MutantRunner<R, base::Tuple<A1, A2>>* t =
1753 new Mutant<R, T, R (U::*)(X1, A1, A2),
1754 base::Tuple<P1>, base::Tuple<A1, A2>>
1755 (obj, method, base::MakeTuple(p1));
1756 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1757 }
1758
1759 template <typename R, typename P1, typename A1, typename A2, typename X1>
1760 inline MutantFunctor<R, base::Tuple<A1, A2>>
1761 CreateFunctor(R (*function)(X1, A1, A2), const P1& p1) {
1762 MutantRunner<R, base::Tuple<A1, A2>>* t =
1763 new MutantFunction<R, R (*)(X1, A1, A2),
1764 base::Tuple<P1>, base::Tuple<A1, A2>>
1765 (function, base::MakeTuple(p1));
1766 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1767 }
1768
1769 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1770 template <typename R, typename T, typename U, typename P1, typename A1,
1771 typename A2, typename X1>
1772 inline MutantFunctor<R, base::Tuple<A1, A2>>
1773 CreateFunctor(T** obj, R (U::*method)(X1, A1, A2), const P1& p1) {
1774 MutantRunner<R, base::Tuple<A1, A2>>* t =
1775 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2),
1776 base::Tuple<P1>, base::Tuple<A1, A2>>
1777 (obj, method, base::MakeTuple(p1));
1778 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1779 }
1780 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1781
1782 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1783 template <typename R, typename T, typename U, typename P1, typename A1,
1784 typename A2, typename X1>
1785 inline MutantFunctor<R, base::Tuple<A1, A2>>
1786 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) {
1787 MutantRunner<R, base::Tuple<A1, A2>>* t =
1788 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2),
1789 base::Tuple<P1>, base::Tuple<A1, A2>>
1790 (obj, method, base::MakeTuple(p1));
1791 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1792 }
1793
1794 template <typename R, typename P1, typename A1, typename A2, typename X1>
1795 inline MutantFunctor<R, base::Tuple<A1, A2>>
1796 CreateFunctor(R (__stdcall *function)(X1, A1, A2), const P1& p1) {
1797 MutantRunner<R, base::Tuple<A1, A2>>* t =
1798 new MutantFunction<R, R (__stdcall *)(X1, A1, A2),
1799 base::Tuple<P1>, base::Tuple<A1, A2>>
1800 (function, base::MakeTuple(p1));
1801 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1802 }
1803 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1804 template <typename R, typename T, typename U, typename P1, typename A1,
1805 typename A2, typename X1>
1806 inline MutantFunctor<R, base::Tuple<A1, A2>>
1807 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) {
1808 MutantRunner<R, base::Tuple<A1, A2>>* t =
1809 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2),
1810 base::Tuple<P1>, base::Tuple<A1, A2>>
1811 (obj, method, base::MakeTuple(p1));
1812 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
1813 }
1814 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1815 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1816
1817 // 1 - 3
1818 template <typename R, typename T, typename U, typename P1, typename A1,
1819 typename A2, typename A3, typename X1>
1820 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1821 CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) {
1822 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1823 new Mutant<R, T, R (U::*)(X1, A1, A2, A3),
1824 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1825 (obj, method, base::MakeTuple(p1));
1826 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1827 }
1828
1829 template <typename R, typename P1, typename A1, typename A2, typename A3,
1830 typename X1>
1831 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1832 CreateFunctor(R (*function)(X1, A1, A2, A3), const P1& p1) {
1833 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1834 new MutantFunction<R, R (*)(X1, A1, A2, A3),
1835 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1836 (function, base::MakeTuple(p1));
1837 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1838 }
1839
1840 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1841 template <typename R, typename T, typename U, typename P1, typename A1,
1842 typename A2, typename A3, typename X1>
1843 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1844 CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) {
1845 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1846 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3),
1847 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1848 (obj, method, base::MakeTuple(p1));
1849 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1850 }
1851 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1852
1853 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1854 template <typename R, typename T, typename U, typename P1, typename A1,
1855 typename A2, typename A3, typename X1>
1856 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1857 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) {
1858 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1859 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3),
1860 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1861 (obj, method, base::MakeTuple(p1));
1862 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1863 }
1864
1865 template <typename R, typename P1, typename A1, typename A2, typename A3,
1866 typename X1>
1867 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1868 CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3), const P1& p1) {
1869 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1870 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3),
1871 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1872 (function, base::MakeTuple(p1));
1873 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1874 }
1875 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1876 template <typename R, typename T, typename U, typename P1, typename A1,
1877 typename A2, typename A3, typename X1>
1878 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
1879 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) {
1880 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
1881 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3),
1882 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1883 (obj, method, base::MakeTuple(p1));
1884 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
1885 }
1886 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1887 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1888
1889 // 1 - 4
1890 template <typename R, typename T, typename U, typename P1, typename A1,
1891 typename A2, typename A3, typename A4, typename X1>
1892 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1893 CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) {
1894 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1895 new Mutant<R, T, R (U::*)(X1, A1, A2, A3, A4),
1896 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1897 (obj, method, base::MakeTuple(p1));
1898 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1899 }
1900
1901 template <typename R, typename P1, typename A1, typename A2, typename A3,
1902 typename A4, typename X1>
1903 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1904 CreateFunctor(R (*function)(X1, A1, A2, A3, A4), const P1& p1) {
1905 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1906 new MutantFunction<R, R (*)(X1, A1, A2, A3, A4),
1907 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1908 (function, base::MakeTuple(p1));
1909 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1910 }
1911
1912 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1913 template <typename R, typename T, typename U, typename P1, typename A1,
1914 typename A2, typename A3, typename A4, typename X1>
1915 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1916 CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) {
1917 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1918 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3, A4),
1919 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1920 (obj, method, base::MakeTuple(p1));
1921 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1922 }
1923 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1924
1925 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1926 template <typename R, typename T, typename U, typename P1, typename A1,
1927 typename A2, typename A3, typename A4, typename X1>
1928 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1929 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4),
1930 const P1& p1) {
1931 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1932 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4),
1933 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1934 (obj, method, base::MakeTuple(p1));
1935 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1936 }
1937
1938 template <typename R, typename P1, typename A1, typename A2, typename A3,
1939 typename A4, typename X1>
1940 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1941 CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4), const P1& p1) {
1942 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1943 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3, A4),
1944 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1945 (function, base::MakeTuple(p1));
1946 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1947 }
1948 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1949 template <typename R, typename T, typename U, typename P1, typename A1,
1950 typename A2, typename A3, typename A4, typename X1>
1951 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
1952 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4),
1953 const P1& p1) {
1954 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
1955 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4),
1956 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1957 (obj, method, base::MakeTuple(p1));
1958 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
1959 }
1960 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1961 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1962
1963 // 1 - 5
1964 template <typename R, typename T, typename U, typename P1, typename A1,
1965 typename A2, typename A3, typename A4, typename A5, typename X1>
1966 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
1967 CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4, A5), const P1& p1) {
1968 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
1969 new Mutant<R, T, R (U::*)(X1, A1, A2, A3, A4, A5),
1970 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
1971 (obj, method, base::MakeTuple(p1));
1972 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
1973 }
1974
1975 template <typename R, typename P1, typename A1, typename A2, typename A3,
1976 typename A4, typename A5, typename X1>
1977 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
1978 CreateFunctor(R (*function)(X1, A1, A2, A3, A4, A5), const P1& p1) {
1979 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
1980 new MutantFunction<R, R (*)(X1, A1, A2, A3, A4, A5),
1981 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
1982 (function, base::MakeTuple(p1));
1983 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
1984 }
1985
1986 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1987 template <typename R, typename T, typename U, typename P1, typename A1,
1988 typename A2, typename A3, typename A4, typename A5, typename X1>
1989 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
1990 CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4, A5), const P1& p1) {
1991 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
1992 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3, A4, A5),
1993 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
1994 (obj, method, base::MakeTuple(p1));
1995 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
1996 }
1997 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1998
1999 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2000 template <typename R, typename T, typename U, typename P1, typename A1,
2001 typename A2, typename A3, typename A4, typename A5, typename X1>
2002 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
2003 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5),
2004 const P1& p1) {
2005 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
2006 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5),
2007 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
2008 (obj, method, base::MakeTuple(p1));
2009 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
2010 }
2011
2012 template <typename R, typename P1, typename A1, typename A2, typename A3,
2013 typename A4, typename A5, typename X1>
2014 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
2015 CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4, A5), const P1& p1) {
2016 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
2017 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3, A4, A5),
2018 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
2019 (function, base::MakeTuple(p1));
2020 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
2021 }
2022 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2023 template <typename R, typename T, typename U, typename P1, typename A1,
2024 typename A2, typename A3, typename A4, typename A5, typename X1>
2025 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
2026 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5),
2027 const P1& p1) {
2028 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
2029 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5),
2030 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
2031 (obj, method, base::MakeTuple(p1));
2032 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
2033 }
2034 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2035 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2036
2037 // 1 - 6
2038 template <typename R, typename T, typename U, typename P1, typename A1,
2039 typename A2, typename A3, typename A4, typename A5, typename A6,
2040 typename X1>
2041 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2042 CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4, A5, A6),
2043 const P1& p1) {
2044 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2045 new Mutant<R, T, R (U::*)(X1, A1, A2, A3, A4, A5, A6),
2046 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2047 (obj, method, base::MakeTuple(p1));
2048 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2049 }
2050
2051 template <typename R, typename P1, typename A1, typename A2, typename A3,
2052 typename A4, typename A5, typename A6, typename X1>
2053 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2054 CreateFunctor(R (*function)(X1, A1, A2, A3, A4, A5, A6), const P1& p1) {
2055 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2056 new MutantFunction<R, R (*)(X1, A1, A2, A3, A4, A5, A6),
2057 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2058 (function, base::MakeTuple(p1));
2059 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2060 }
2061
2062 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2063 template <typename R, typename T, typename U, typename P1, typename A1,
2064 typename A2, typename A3, typename A4, typename A5, typename A6,
2065 typename X1>
2066 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2067 CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4, A5, A6),
2068 const P1& p1) {
2069 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2070 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3, A4, A5, A6),
2071 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2072 (obj, method, base::MakeTuple(p1));
2073 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2074 }
2075 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2076
2077 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2078 template <typename R, typename T, typename U, typename P1, typename A1,
2079 typename A2, typename A3, typename A4, typename A5, typename A6,
2080 typename X1>
2081 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2082 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5, A6),
2083 const P1& p1) {
2084 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2085 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5, A6),
2086 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2087 (obj, method, base::MakeTuple(p1));
2088 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2089 }
2090
2091 template <typename R, typename P1, typename A1, typename A2, typename A3,
2092 typename A4, typename A5, typename A6, typename X1>
2093 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2094 CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4, A5, A6),
2095 const P1& p1) {
2096 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2097 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3, A4, A5, A6),
2098 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2099 (function, base::MakeTuple(p1));
2100 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2101 }
2102 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2103 template <typename R, typename T, typename U, typename P1, typename A1,
2104 typename A2, typename A3, typename A4, typename A5, typename A6,
2105 typename X1>
2106 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2107 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5, A6),
2108 const P1& p1) {
2109 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2110 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5, A6),
2111 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2112 (obj, method, base::MakeTuple(p1));
2113 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2114 }
2115 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2116 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2117
2118 // 2 - 0
2119 template <typename R, typename T, typename U, typename P1, typename P2,
2120 typename X1, typename X2>
2121 inline MutantFunctor<R, base::Tuple<>>
2122 CreateFunctor(T* obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) {
2123 MutantRunner<R, base::Tuple<>>* t =
2124 new Mutant<R, T, R (U::*)(X1, X2),
2125 base::Tuple<P1, P2>, base::Tuple<>>
2126 (obj, method, base::MakeTuple(p1, p2));
2127 return MutantFunctor<R, base::Tuple<>>(t);
2128 }
2129
2130 template <typename R, typename P1, typename P2, typename X1, typename X2>
2131 inline MutantFunctor<R, base::Tuple<>>
2132 CreateFunctor(R (*function)(X1, X2), const P1& p1, const P2& p2) {
2133 MutantRunner<R, base::Tuple<>>* t =
2134 new MutantFunction<R, R (*)(X1, X2),
2135 base::Tuple<P1, P2>, base::Tuple<>>
2136 (function, base::MakeTuple(p1, p2));
2137 return MutantFunctor<R, base::Tuple<>>(t);
2138 }
2139
2140 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2141 template <typename R, typename T, typename U, typename P1, typename P2,
2142 typename X1, typename X2>
2143 inline MutantFunctor<R, base::Tuple<>>
2144 CreateFunctor(T** obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) {
2145 MutantRunner<R, base::Tuple<>>* t =
2146 new MutantLateObjectBind<R, T, R (U::*)(X1, X2),
2147 base::Tuple<P1, P2>, base::Tuple<>>
2148 (obj, method, base::MakeTuple(p1, p2));
2149 return MutantFunctor<R, base::Tuple<>>(t);
2150 }
2151 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2152
2153 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2154 template <typename R, typename T, typename U, typename P1, typename P2,
2155 typename X1, typename X2>
2156 inline MutantFunctor<R, base::Tuple<>>
2157 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2), const P1& p1,
2158 const P2& p2) {
2159 MutantRunner<R, base::Tuple<>>* t =
2160 new Mutant<R, T, R (__stdcall U::*)(X1, X2),
2161 base::Tuple<P1, P2>, base::Tuple<>>
2162 (obj, method, base::MakeTuple(p1, p2));
2163 return MutantFunctor<R, base::Tuple<>>(t);
2164 }
2165
2166 template <typename R, typename P1, typename P2, typename X1, typename X2>
2167 inline MutantFunctor<R, base::Tuple<>>
2168 CreateFunctor(R (__stdcall *function)(X1, X2), const P1& p1, const P2& p2) {
2169 MutantRunner<R, base::Tuple<>>* t =
2170 new MutantFunction<R, R (__stdcall *)(X1, X2),
2171 base::Tuple<P1, P2>, base::Tuple<>>
2172 (function, base::MakeTuple(p1, p2));
2173 return MutantFunctor<R, base::Tuple<>>(t);
2174 }
2175 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2176 template <typename R, typename T, typename U, typename P1, typename P2,
2177 typename X1, typename X2>
2178 inline MutantFunctor<R, base::Tuple<>>
2179 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2), const P1& p1,
2180 const P2& p2) {
2181 MutantRunner<R, base::Tuple<>>* t =
2182 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2),
2183 base::Tuple<P1, P2>, base::Tuple<>>
2184 (obj, method, base::MakeTuple(p1, p2));
2185 return MutantFunctor<R, base::Tuple<>>(t);
2186 }
2187 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2188 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2189
2190 // 2 - 1
2191 template <typename R, typename T, typename U, typename P1, typename P2,
2192 typename A1, typename X1, typename X2>
2193 inline MutantFunctor<R, base::Tuple<A1>>
2194 CreateFunctor(T* obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) {
2195 MutantRunner<R, base::Tuple<A1>>* t =
2196 new Mutant<R, T, R (U::*)(X1, X2, A1),
2197 base::Tuple<P1, P2>, base::Tuple<A1>>
2198 (obj, method, base::MakeTuple(p1, p2));
2199 return MutantFunctor<R, base::Tuple<A1>>(t);
2200 }
2201
2202 template <typename R, typename P1, typename P2, typename A1, typename X1,
2203 typename X2>
2204 inline MutantFunctor<R, base::Tuple<A1>>
2205 CreateFunctor(R (*function)(X1, X2, A1), const P1& p1, const P2& p2) {
2206 MutantRunner<R, base::Tuple<A1>>* t =
2207 new MutantFunction<R, R (*)(X1, X2, A1),
2208 base::Tuple<P1, P2>, base::Tuple<A1>>
2209 (function, base::MakeTuple(p1, p2));
2210 return MutantFunctor<R, base::Tuple<A1>>(t);
2211 }
2212
2213 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2214 template <typename R, typename T, typename U, typename P1, typename P2,
2215 typename A1, typename X1, typename X2>
2216 inline MutantFunctor<R, base::Tuple<A1>>
2217 CreateFunctor(T** obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) {
2218 MutantRunner<R, base::Tuple<A1>>* t =
2219 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1),
2220 base::Tuple<P1, P2>, base::Tuple<A1>>
2221 (obj, method, base::MakeTuple(p1, p2));
2222 return MutantFunctor<R, base::Tuple<A1>>(t);
2223 }
2224 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2225
2226 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2227 template <typename R, typename T, typename U, typename P1, typename P2,
2228 typename A1, typename X1, typename X2>
2229 inline MutantFunctor<R, base::Tuple<A1>>
2230 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1,
2231 const P2& p2) {
2232 MutantRunner<R, base::Tuple<A1>>* t =
2233 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1),
2234 base::Tuple<P1, P2>, base::Tuple<A1>>
2235 (obj, method, base::MakeTuple(p1, p2));
2236 return MutantFunctor<R, base::Tuple<A1>>(t);
2237 }
2238
2239 template <typename R, typename P1, typename P2, typename A1, typename X1,
2240 typename X2>
2241 inline MutantFunctor<R, base::Tuple<A1>>
2242 CreateFunctor(R (__stdcall *function)(X1, X2, A1), const P1& p1, const P2& p2) {
2243 MutantRunner<R, base::Tuple<A1>>* t =
2244 new MutantFunction<R, R (__stdcall *)(X1, X2, A1),
2245 base::Tuple<P1, P2>, base::Tuple<A1>>
2246 (function, base::MakeTuple(p1, p2));
2247 return MutantFunctor<R, base::Tuple<A1>>(t);
2248 }
2249 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2250 template <typename R, typename T, typename U, typename P1, typename P2,
2251 typename A1, typename X1, typename X2>
2252 inline MutantFunctor<R, base::Tuple<A1>>
2253 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1,
2254 const P2& p2) {
2255 MutantRunner<R, base::Tuple<A1>>* t =
2256 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1),
2257 base::Tuple<P1, P2>, base::Tuple<A1>>
2258 (obj, method, base::MakeTuple(p1, p2));
2259 return MutantFunctor<R, base::Tuple<A1>>(t);
2260 }
2261 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2262 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2263
2264 // 2 - 2
2265 template <typename R, typename T, typename U, typename P1, typename P2,
2266 typename A1, typename A2, typename X1, typename X2>
2267 inline MutantFunctor<R, base::Tuple<A1, A2>>
2268 CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2), const P1& p1,
2269 const P2& p2) {
2270 MutantRunner<R, base::Tuple<A1, A2>>* t =
2271 new Mutant<R, T, R (U::*)(X1, X2, A1, A2),
2272 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2273 (obj, method, base::MakeTuple(p1, p2));
2274 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2275 }
2276
2277 template <typename R, typename P1, typename P2, typename A1, typename A2,
2278 typename X1, typename X2>
2279 inline MutantFunctor<R, base::Tuple<A1, A2>>
2280 CreateFunctor(R (*function)(X1, X2, A1, A2), const P1& p1, const P2& p2) {
2281 MutantRunner<R, base::Tuple<A1, A2>>* t =
2282 new MutantFunction<R, R (*)(X1, X2, A1, A2),
2283 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2284 (function, base::MakeTuple(p1, p2));
2285 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2286 }
2287
2288 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2289 template <typename R, typename T, typename U, typename P1, typename P2,
2290 typename A1, typename A2, typename X1, typename X2>
2291 inline MutantFunctor<R, base::Tuple<A1, A2>>
2292 CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2), const P1& p1,
2293 const P2& p2) {
2294 MutantRunner<R, base::Tuple<A1, A2>>* t =
2295 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2),
2296 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2297 (obj, method, base::MakeTuple(p1, p2));
2298 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2299 }
2300 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2301
2302 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2303 template <typename R, typename T, typename U, typename P1, typename P2,
2304 typename A1, typename A2, typename X1, typename X2>
2305 inline MutantFunctor<R, base::Tuple<A1, A2>>
2306 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1,
2307 const P2& p2) {
2308 MutantRunner<R, base::Tuple<A1, A2>>* t =
2309 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2),
2310 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2311 (obj, method, base::MakeTuple(p1, p2));
2312 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2313 }
2314
2315 template <typename R, typename P1, typename P2, typename A1, typename A2,
2316 typename X1, typename X2>
2317 inline MutantFunctor<R, base::Tuple<A1, A2>>
2318 CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2), const P1& p1,
2319 const P2& p2) {
2320 MutantRunner<R, base::Tuple<A1, A2>>* t =
2321 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2),
2322 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2323 (function, base::MakeTuple(p1, p2));
2324 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2325 }
2326 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2327 template <typename R, typename T, typename U, typename P1, typename P2,
2328 typename A1, typename A2, typename X1, typename X2>
2329 inline MutantFunctor<R, base::Tuple<A1, A2>>
2330 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1,
2331 const P2& p2) {
2332 MutantRunner<R, base::Tuple<A1, A2>>* t =
2333 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2),
2334 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2335 (obj, method, base::MakeTuple(p1, p2));
2336 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2337 }
2338 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2339 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2340
2341 // 2 - 3
2342 template <typename R, typename T, typename U, typename P1, typename P2,
2343 typename A1, typename A2, typename A3, typename X1, typename X2>
2344 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2345 CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1,
2346 const P2& p2) {
2347 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2348 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3),
2349 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2350 (obj, method, base::MakeTuple(p1, p2));
2351 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2352 }
2353
2354 template <typename R, typename P1, typename P2, typename A1, typename A2,
2355 typename A3, typename X1, typename X2>
2356 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2357 CreateFunctor(R (*function)(X1, X2, A1, A2, A3), const P1& p1, const P2& p2) {
2358 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2359 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3),
2360 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2361 (function, base::MakeTuple(p1, p2));
2362 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2363 }
2364
2365 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2366 template <typename R, typename T, typename U, typename P1, typename P2,
2367 typename A1, typename A2, typename A3, typename X1, typename X2>
2368 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2369 CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1,
2370 const P2& p2) {
2371 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2372 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3),
2373 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2374 (obj, method, base::MakeTuple(p1, p2));
2375 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2376 }
2377 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2378
2379 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2380 template <typename R, typename T, typename U, typename P1, typename P2,
2381 typename A1, typename A2, typename A3, typename X1, typename X2>
2382 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2383 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3),
2384 const P1& p1, const P2& p2) {
2385 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2386 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3),
2387 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2388 (obj, method, base::MakeTuple(p1, p2));
2389 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2390 }
2391
2392 template <typename R, typename P1, typename P2, typename A1, typename A2,
2393 typename A3, typename X1, typename X2>
2394 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2395 CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3), const P1& p1,
2396 const P2& p2) {
2397 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2398 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3),
2399 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2400 (function, base::MakeTuple(p1, p2));
2401 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2402 }
2403 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2404 template <typename R, typename T, typename U, typename P1, typename P2,
2405 typename A1, typename A2, typename A3, typename X1, typename X2>
2406 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2407 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3),
2408 const P1& p1, const P2& p2) {
2409 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2410 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3),
2411 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2412 (obj, method, base::MakeTuple(p1, p2));
2413 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2414 }
2415 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2416 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2417
2418 // 2 - 4
2419 template <typename R, typename T, typename U, typename P1, typename P2,
2420 typename A1, typename A2, typename A3, typename A4, typename X1,
2421 typename X2>
2422 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
2423 CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1,
2424 const P2& p2) {
2425 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
2426 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3, A4),
2427 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2428 (obj, method, base::MakeTuple(p1, p2));
2429 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
2430 }
2431
2432 template <typename R, typename P1, typename P2, typename A1, typename A2,
2433 typename A3, typename A4, typename X1, typename X2>
2434 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
2435 CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4), const P1& p1,
2436 const P2& p2) {
2437 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
2438 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3, A4),
2439 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2440 (function, base::MakeTuple(p1, p2));
2441 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
2442 }
2443
2444 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2445 template <typename R, typename T, typename U, typename P1, typename P2,
2446 typename A1, typename A2, typename A3, typename A4, typename X1,
2447 typename X2>
2448 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
2449 CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1,
2450 const P2& p2) {
2451 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
2452 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3, A4),
2453 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2454 (obj, method, base::MakeTuple(p1, p2));
2455 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
2456 }
2457 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2458
2459 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2460 template <typename R, typename T, typename U, typename P1, typename P2,
2461 typename A1, typename A2, typename A3, typename A4, typename X1,
2462 typename X2>
2463 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
2464 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4),
2465 const P1& p1, const P2& p2) {
2466 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
2467 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4),
2468 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2469 (obj, method, base::MakeTuple(p1, p2));
2470 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
2471 }
2472
2473 template <typename R, typename P1, typename P2, typename A1, typename A2,
2474 typename A3, typename A4, typename X1, typename X2>
2475 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
2476 CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4), const P1& p1,
2477 const P2& p2) {
2478 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
2479 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3, A4),
2480 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2481 (function, base::MakeTuple(p1, p2));
2482 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
2483 }
2484 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2485 template <typename R, typename T, typename U, typename P1, typename P2,
2486 typename A1, typename A2, typename A3, typename A4, typename X1,
2487 typename X2>
2488 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
2489 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4),
2490 const P1& p1, const P2& p2) {
2491 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
2492 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4),
2493 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2494 (obj, method, base::MakeTuple(p1, p2));
2495 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
2496 }
2497 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2498 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2499
2500 // 2 - 5
2501 template <typename R, typename T, typename U, typename P1, typename P2,
2502 typename A1, typename A2, typename A3, typename A4, typename A5,
2503 typename X1, typename X2>
2504 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
2505 CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
2506 const P2& p2) {
2507 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
2508 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5),
2509 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2510 (obj, method, base::MakeTuple(p1, p2));
2511 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
2512 }
2513
2514 template <typename R, typename P1, typename P2, typename A1, typename A2,
2515 typename A3, typename A4, typename A5, typename X1, typename X2>
2516 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
2517 CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
2518 const P2& p2) {
2519 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
2520 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3, A4, A5),
2521 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2522 (function, base::MakeTuple(p1, p2));
2523 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
2524 }
2525
2526 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2527 template <typename R, typename T, typename U, typename P1, typename P2,
2528 typename A1, typename A2, typename A3, typename A4, typename A5,
2529 typename X1, typename X2>
2530 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
2531 CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
2532 const P2& p2) {
2533 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
2534 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5),
2535 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2536 (obj, method, base::MakeTuple(p1, p2));
2537 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
2538 }
2539 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2540
2541 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2542 template <typename R, typename T, typename U, typename P1, typename P2,
2543 typename A1, typename A2, typename A3, typename A4, typename A5,
2544 typename X1, typename X2>
2545 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
2546 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5),
2547 const P1& p1, const P2& p2) {
2548 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
2549 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5),
2550 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2551 (obj, method, base::MakeTuple(p1, p2));
2552 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
2553 }
2554
2555 template <typename R, typename P1, typename P2, typename A1, typename A2,
2556 typename A3, typename A4, typename A5, typename X1, typename X2>
2557 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
2558 CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
2559 const P2& p2) {
2560 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
2561 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3, A4, A5),
2562 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2563 (function, base::MakeTuple(p1, p2));
2564 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
2565 }
2566 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2567 template <typename R, typename T, typename U, typename P1, typename P2,
2568 typename A1, typename A2, typename A3, typename A4, typename A5,
2569 typename X1, typename X2>
2570 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
2571 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5),
2572 const P1& p1, const P2& p2) {
2573 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
2574 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5),
2575 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2576 (obj, method, base::MakeTuple(p1, p2));
2577 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
2578 }
2579 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2580 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2581
2582 // 2 - 6
2583 template <typename R, typename T, typename U, typename P1, typename P2,
2584 typename A1, typename A2, typename A3, typename A4, typename A5,
2585 typename A6, typename X1, typename X2>
2586 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2587 CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
2588 const P1& p1, const P2& p2) {
2589 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2590 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
2591 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2592 (obj, method, base::MakeTuple(p1, p2));
2593 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2594 }
2595
2596 template <typename R, typename P1, typename P2, typename A1, typename A2,
2597 typename A3, typename A4, typename A5, typename A6, typename X1,
2598 typename X2>
2599 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2600 CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4, A5, A6), const P1& p1,
2601 const P2& p2) {
2602 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2603 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3, A4, A5, A6),
2604 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5,
2605 A6>>
2606 (function, base::MakeTuple(p1, p2));
2607 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2608 }
2609
2610 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2611 template <typename R, typename T, typename U, typename P1, typename P2,
2612 typename A1, typename A2, typename A3, typename A4, typename A5,
2613 typename A6, typename X1, typename X2>
2614 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2615 CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
2616 const P1& p1, const P2& p2) {
2617 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2618 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
2619 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2620 (obj, method, base::MakeTuple(p1, p2));
2621 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2622 }
2623 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2624
2625 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2626 template <typename R, typename T, typename U, typename P1, typename P2,
2627 typename A1, typename A2, typename A3, typename A4, typename A5,
2628 typename A6, typename X1, typename X2>
2629 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2630 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
2631 const P1& p1, const P2& p2) {
2632 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2633 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
2634 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2635 (obj, method, base::MakeTuple(p1, p2));
2636 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2637 }
2638
2639 template <typename R, typename P1, typename P2, typename A1, typename A2,
2640 typename A3, typename A4, typename A5, typename A6, typename X1,
2641 typename X2>
2642 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2643 CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4, A5, A6),
2644 const P1& p1, const P2& p2) {
2645 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2646 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3, A4, A5, A6),
2647 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5,
2648 A6>>
2649 (function, base::MakeTuple(p1, p2));
2650 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2651 }
2652 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2653 template <typename R, typename T, typename U, typename P1, typename P2,
2654 typename A1, typename A2, typename A3, typename A4, typename A5,
2655 typename A6, typename X1, typename X2>
2656 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
2657 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
2658 const P1& p1, const P2& p2) {
2659 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
2660 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
2661 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2662 (obj, method, base::MakeTuple(p1, p2));
2663 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
2664 }
2665 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2666 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2667
2668 // 3 - 0
2669 template <typename R, typename T, typename U, typename P1, typename P2,
2670 typename P3, typename X1, typename X2, typename X3>
2671 inline MutantFunctor<R, base::Tuple<>>
2672 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2,
2673 const P3& p3) {
2674 MutantRunner<R, base::Tuple<>>* t =
2675 new Mutant<R, T, R (U::*)(X1, X2, X3),
2676 base::Tuple<P1, P2, P3>, base::Tuple<>>
2677 (obj, method, base::MakeTuple(p1, p2, p3));
2678 return MutantFunctor<R, base::Tuple<>>(t);
2679 }
2680
2681 template <typename R, typename P1, typename P2, typename P3, typename X1,
2682 typename X2, typename X3>
2683 inline MutantFunctor<R, base::Tuple<>>
2684 CreateFunctor(R (*function)(X1, X2, X3), const P1& p1, const P2& p2,
2685 const P3& p3) {
2686 MutantRunner<R, base::Tuple<>>* t =
2687 new MutantFunction<R, R (*)(X1, X2, X3),
2688 base::Tuple<P1, P2, P3>, base::Tuple<>>
2689 (function, base::MakeTuple(p1, p2, p3));
2690 return MutantFunctor<R, base::Tuple<>>(t);
2691 }
2692
2693 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2694 template <typename R, typename T, typename U, typename P1, typename P2,
2695 typename P3, typename X1, typename X2, typename X3>
2696 inline MutantFunctor<R, base::Tuple<>>
2697 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2,
2698 const P3& p3) {
2699 MutantRunner<R, base::Tuple<>>* t =
2700 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3),
2701 base::Tuple<P1, P2, P3>, base::Tuple<>>
2702 (obj, method, base::MakeTuple(p1, p2, p3));
2703 return MutantFunctor<R, base::Tuple<>>(t);
2704 }
2705 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2706
2707 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2708 template <typename R, typename T, typename U, typename P1, typename P2,
2709 typename P3, typename X1, typename X2, typename X3>
2710 inline MutantFunctor<R, base::Tuple<>>
2711 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1,
2712 const P2& p2, const P3& p3) {
2713 MutantRunner<R, base::Tuple<>>* t =
2714 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3),
2715 base::Tuple<P1, P2, P3>, base::Tuple<>>
2716 (obj, method, base::MakeTuple(p1, p2, p3));
2717 return MutantFunctor<R, base::Tuple<>>(t);
2718 }
2719
2720 template <typename R, typename P1, typename P2, typename P3, typename X1,
2721 typename X2, typename X3>
2722 inline MutantFunctor<R, base::Tuple<>>
2723 CreateFunctor(R (__stdcall *function)(X1, X2, X3), const P1& p1, const P2& p2,
2724 const P3& p3) {
2725 MutantRunner<R, base::Tuple<>>* t =
2726 new MutantFunction<R, R (__stdcall *)(X1, X2, X3),
2727 base::Tuple<P1, P2, P3>, base::Tuple<>>
2728 (function, base::MakeTuple(p1, p2, p3));
2729 return MutantFunctor<R, base::Tuple<>>(t);
2730 }
2731 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2732 template <typename R, typename T, typename U, typename P1, typename P2,
2733 typename P3, typename X1, typename X2, typename X3>
2734 inline MutantFunctor<R, base::Tuple<>>
2735 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1,
2736 const P2& p2, const P3& p3) {
2737 MutantRunner<R, base::Tuple<>>* t =
2738 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3),
2739 base::Tuple<P1, P2, P3>, base::Tuple<>>
2740 (obj, method, base::MakeTuple(p1, p2, p3));
2741 return MutantFunctor<R, base::Tuple<>>(t);
2742 }
2743 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2744 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2745
2746 // 3 - 1
2747 template <typename R, typename T, typename U, typename P1, typename P2,
2748 typename P3, typename A1, typename X1, typename X2, typename X3>
2749 inline MutantFunctor<R, base::Tuple<A1>>
2750 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1), const P1& p1,
2751 const P2& p2, const P3& p3) {
2752 MutantRunner<R, base::Tuple<A1>>* t =
2753 new Mutant<R, T, R (U::*)(X1, X2, X3, A1),
2754 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2755 (obj, method, base::MakeTuple(p1, p2, p3));
2756 return MutantFunctor<R, base::Tuple<A1>>(t);
2757 }
2758
2759 template <typename R, typename P1, typename P2, typename P3, typename A1,
2760 typename X1, typename X2, typename X3>
2761 inline MutantFunctor<R, base::Tuple<A1>>
2762 CreateFunctor(R (*function)(X1, X2, X3, A1), const P1& p1, const P2& p2,
2763 const P3& p3) {
2764 MutantRunner<R, base::Tuple<A1>>* t =
2765 new MutantFunction<R, R (*)(X1, X2, X3, A1),
2766 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2767 (function, base::MakeTuple(p1, p2, p3));
2768 return MutantFunctor<R, base::Tuple<A1>>(t);
2769 }
2770
2771 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2772 template <typename R, typename T, typename U, typename P1, typename P2,
2773 typename P3, typename A1, typename X1, typename X2, typename X3>
2774 inline MutantFunctor<R, base::Tuple<A1>>
2775 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1), const P1& p1,
2776 const P2& p2, const P3& p3) {
2777 MutantRunner<R, base::Tuple<A1>>* t =
2778 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1),
2779 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2780 (obj, method, base::MakeTuple(p1, p2, p3));
2781 return MutantFunctor<R, base::Tuple<A1>>(t);
2782 }
2783 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2784
2785 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2786 template <typename R, typename T, typename U, typename P1, typename P2,
2787 typename P3, typename A1, typename X1, typename X2, typename X3>
2788 inline MutantFunctor<R, base::Tuple<A1>>
2789 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1,
2790 const P2& p2, const P3& p3) {
2791 MutantRunner<R, base::Tuple<A1>>* t =
2792 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1),
2793 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2794 (obj, method, base::MakeTuple(p1, p2, p3));
2795 return MutantFunctor<R, base::Tuple<A1>>(t);
2796 }
2797
2798 template <typename R, typename P1, typename P2, typename P3, typename A1,
2799 typename X1, typename X2, typename X3>
2800 inline MutantFunctor<R, base::Tuple<A1>>
2801 CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1), const P1& p1,
2802 const P2& p2, const P3& p3) {
2803 MutantRunner<R, base::Tuple<A1>>* t =
2804 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1),
2805 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2806 (function, base::MakeTuple(p1, p2, p3));
2807 return MutantFunctor<R, base::Tuple<A1>>(t);
2808 }
2809 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2810 template <typename R, typename T, typename U, typename P1, typename P2,
2811 typename P3, typename A1, typename X1, typename X2, typename X3>
2812 inline MutantFunctor<R, base::Tuple<A1>>
2813 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1,
2814 const P2& p2, const P3& p3) {
2815 MutantRunner<R, base::Tuple<A1>>* t =
2816 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1),
2817 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2818 (obj, method, base::MakeTuple(p1, p2, p3));
2819 return MutantFunctor<R, base::Tuple<A1>>(t);
2820 }
2821 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2822 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2823
2824 // 3 - 2
2825 template <typename R, typename T, typename U, typename P1, typename P2,
2826 typename P3, typename A1, typename A2, typename X1, typename X2,
2827 typename X3>
2828 inline MutantFunctor<R, base::Tuple<A1, A2>>
2829 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1,
2830 const P2& p2, const P3& p3) {
2831 MutantRunner<R, base::Tuple<A1, A2>>* t =
2832 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2),
2833 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2834 (obj, method, base::MakeTuple(p1, p2, p3));
2835 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2836 }
2837
2838 template <typename R, typename P1, typename P2, typename P3, typename A1,
2839 typename A2, typename X1, typename X2, typename X3>
2840 inline MutantFunctor<R, base::Tuple<A1, A2>>
2841 CreateFunctor(R (*function)(X1, X2, X3, A1, A2), const P1& p1, const P2& p2,
2842 const P3& p3) {
2843 MutantRunner<R, base::Tuple<A1, A2>>* t =
2844 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2),
2845 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2846 (function, base::MakeTuple(p1, p2, p3));
2847 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2848 }
2849
2850 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2851 template <typename R, typename T, typename U, typename P1, typename P2,
2852 typename P3, typename A1, typename A2, typename X1, typename X2,
2853 typename X3>
2854 inline MutantFunctor<R, base::Tuple<A1, A2>>
2855 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1,
2856 const P2& p2, const P3& p3) {
2857 MutantRunner<R, base::Tuple<A1, A2>>* t =
2858 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2),
2859 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2860 (obj, method, base::MakeTuple(p1, p2, p3));
2861 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2862 }
2863 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2864
2865 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2866 template <typename R, typename T, typename U, typename P1, typename P2,
2867 typename P3, typename A1, typename A2, typename X1, typename X2,
2868 typename X3>
2869 inline MutantFunctor<R, base::Tuple<A1, A2>>
2870 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2),
2871 const P1& p1, const P2& p2, const P3& p3) {
2872 MutantRunner<R, base::Tuple<A1, A2>>* t =
2873 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2),
2874 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2875 (obj, method, base::MakeTuple(p1, p2, p3));
2876 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2877 }
2878
2879 template <typename R, typename P1, typename P2, typename P3, typename A1,
2880 typename A2, typename X1, typename X2, typename X3>
2881 inline MutantFunctor<R, base::Tuple<A1, A2>>
2882 CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2), const P1& p1,
2883 const P2& p2, const P3& p3) {
2884 MutantRunner<R, base::Tuple<A1, A2>>* t =
2885 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2),
2886 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2887 (function, base::MakeTuple(p1, p2, p3));
2888 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2889 }
2890 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2891 template <typename R, typename T, typename U, typename P1, typename P2,
2892 typename P3, typename A1, typename A2, typename X1, typename X2,
2893 typename X3>
2894 inline MutantFunctor<R, base::Tuple<A1, A2>>
2895 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2),
2896 const P1& p1, const P2& p2, const P3& p3) {
2897 MutantRunner<R, base::Tuple<A1, A2>>* t =
2898 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2),
2899 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2900 (obj, method, base::MakeTuple(p1, p2, p3));
2901 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
2902 }
2903 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2904 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2905
2906 // 3 - 3
2907 template <typename R, typename T, typename U, typename P1, typename P2,
2908 typename P3, typename A1, typename A2, typename A3, typename X1,
2909 typename X2, typename X3>
2910 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2911 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1,
2912 const P2& p2, const P3& p3) {
2913 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2914 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3),
2915 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2916 (obj, method, base::MakeTuple(p1, p2, p3));
2917 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2918 }
2919
2920 template <typename R, typename P1, typename P2, typename P3, typename A1,
2921 typename A2, typename A3, typename X1, typename X2, typename X3>
2922 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2923 CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3), const P1& p1, const P2& p2,
2924 const P3& p3) {
2925 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2926 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3),
2927 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2928 (function, base::MakeTuple(p1, p2, p3));
2929 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2930 }
2931
2932 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2933 template <typename R, typename T, typename U, typename P1, typename P2,
2934 typename P3, typename A1, typename A2, typename A3, typename X1,
2935 typename X2, typename X3>
2936 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2937 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1,
2938 const P2& p2, const P3& p3) {
2939 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2940 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3),
2941 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2942 (obj, method, base::MakeTuple(p1, p2, p3));
2943 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2944 }
2945 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2946
2947 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2948 template <typename R, typename T, typename U, typename P1, typename P2,
2949 typename P3, typename A1, typename A2, typename A3, typename X1,
2950 typename X2, typename X3>
2951 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2952 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3),
2953 const P1& p1, const P2& p2, const P3& p3) {
2954 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2955 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3),
2956 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2957 (obj, method, base::MakeTuple(p1, p2, p3));
2958 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2959 }
2960
2961 template <typename R, typename P1, typename P2, typename P3, typename A1,
2962 typename A2, typename A3, typename X1, typename X2, typename X3>
2963 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2964 CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3), const P1& p1,
2965 const P2& p2, const P3& p3) {
2966 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2967 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3),
2968 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2969 (function, base::MakeTuple(p1, p2, p3));
2970 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2971 }
2972 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2973 template <typename R, typename T, typename U, typename P1, typename P2,
2974 typename P3, typename A1, typename A2, typename A3, typename X1,
2975 typename X2, typename X3>
2976 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
2977 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3),
2978 const P1& p1, const P2& p2, const P3& p3) {
2979 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
2980 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3),
2981 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2982 (obj, method, base::MakeTuple(p1, p2, p3));
2983 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
2984 }
2985 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2986 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2987
2988 // 3 - 4
2989 template <typename R, typename T, typename U, typename P1, typename P2,
2990 typename P3, typename A1, typename A2, typename A3, typename A4,
2991 typename X1, typename X2, typename X3>
2992 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
2993 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
2994 const P2& p2, const P3& p3) {
2995 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
2996 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4),
2997 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
2998 (obj, method, base::MakeTuple(p1, p2, p3));
2999 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3000 }
3001
3002 template <typename R, typename P1, typename P2, typename P3, typename A1,
3003 typename A2, typename A3, typename A4, typename X1, typename X2,
3004 typename X3>
3005 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
3006 CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
3007 const P2& p2, const P3& p3) {
3008 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
3009 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3, A4),
3010 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
3011 (function, base::MakeTuple(p1, p2, p3));
3012 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3013 }
3014
3015 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3016 template <typename R, typename T, typename U, typename P1, typename P2,
3017 typename P3, typename A1, typename A2, typename A3, typename A4,
3018 typename X1, typename X2, typename X3>
3019 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
3020 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
3021 const P2& p2, const P3& p3) {
3022 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
3023 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4),
3024 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
3025 (obj, method, base::MakeTuple(p1, p2, p3));
3026 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3027 }
3028 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3029
3030 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3031 template <typename R, typename T, typename U, typename P1, typename P2,
3032 typename P3, typename A1, typename A2, typename A3, typename A4,
3033 typename X1, typename X2, typename X3>
3034 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
3035 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4),
3036 const P1& p1, const P2& p2, const P3& p3) {
3037 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
3038 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4),
3039 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
3040 (obj, method, base::MakeTuple(p1, p2, p3));
3041 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3042 }
3043
3044 template <typename R, typename P1, typename P2, typename P3, typename A1,
3045 typename A2, typename A3, typename A4, typename X1, typename X2,
3046 typename X3>
3047 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
3048 CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
3049 const P2& p2, const P3& p3) {
3050 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
3051 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3, A4),
3052 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
3053 (function, base::MakeTuple(p1, p2, p3));
3054 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3055 }
3056 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3057 template <typename R, typename T, typename U, typename P1, typename P2,
3058 typename P3, typename A1, typename A2, typename A3, typename A4,
3059 typename X1, typename X2, typename X3>
3060 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
3061 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4),
3062 const P1& p1, const P2& p2, const P3& p3) {
3063 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
3064 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4),
3065 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
3066 (obj, method, base::MakeTuple(p1, p2, p3));
3067 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3068 }
3069 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3070 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3071
3072 // 3 - 5
3073 template <typename R, typename T, typename U, typename P1, typename P2,
3074 typename P3, typename A1, typename A2, typename A3, typename A4,
3075 typename A5, typename X1, typename X2, typename X3>
3076 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3077 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
3078 const P1& p1, const P2& p2, const P3& p3) {
3079 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3080 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
3081 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5>>
3082 (obj, method, base::MakeTuple(p1, p2, p3));
3083 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3084 }
3085
3086 template <typename R, typename P1, typename P2, typename P3, typename A1,
3087 typename A2, typename A3, typename A4, typename A5, typename X1,
3088 typename X2, typename X3>
3089 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3090 CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4, A5), const P1& p1,
3091 const P2& p2, const P3& p3) {
3092 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3093 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3, A4, A5),
3094 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4,
3095 A5>>
3096 (function, base::MakeTuple(p1, p2, p3));
3097 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3098 }
3099
3100 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3101 template <typename R, typename T, typename U, typename P1, typename P2,
3102 typename P3, typename A1, typename A2, typename A3, typename A4,
3103 typename A5, typename X1, typename X2, typename X3>
3104 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3105 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
3106 const P1& p1, const P2& p2, const P3& p3) {
3107 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3108 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
3109 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5>>
3110 (obj, method, base::MakeTuple(p1, p2, p3));
3111 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3112 }
3113 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3114
3115 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3116 template <typename R, typename T, typename U, typename P1, typename P2,
3117 typename P3, typename A1, typename A2, typename A3, typename A4,
3118 typename A5, typename X1, typename X2, typename X3>
3119 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3120 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
3121 const P1& p1, const P2& p2, const P3& p3) {
3122 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3123 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
3124 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5>>
3125 (obj, method, base::MakeTuple(p1, p2, p3));
3126 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3127 }
3128
3129 template <typename R, typename P1, typename P2, typename P3, typename A1,
3130 typename A2, typename A3, typename A4, typename A5, typename X1,
3131 typename X2, typename X3>
3132 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3133 CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4, A5),
3134 const P1& p1, const P2& p2, const P3& p3) {
3135 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3136 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3, A4, A5),
3137 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4,
3138 A5>>
3139 (function, base::MakeTuple(p1, p2, p3));
3140 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3141 }
3142 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3143 template <typename R, typename T, typename U, typename P1, typename P2,
3144 typename P3, typename A1, typename A2, typename A3, typename A4,
3145 typename A5, typename X1, typename X2, typename X3>
3146 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3147 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
3148 const P1& p1, const P2& p2, const P3& p3) {
3149 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3150 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
3151 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5>>
3152 (obj, method, base::MakeTuple(p1, p2, p3));
3153 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3154 }
3155 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3156 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3157
3158 // 3 - 6
3159 template <typename R, typename T, typename U, typename P1, typename P2,
3160 typename P3, typename A1, typename A2, typename A3, typename A4,
3161 typename A5, typename A6, typename X1, typename X2, typename X3>
3162 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3163 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3164 const P1& p1, const P2& p2, const P3& p3) {
3165 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3166 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3167 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5, A6>>
3168 (obj, method, base::MakeTuple(p1, p2, p3));
3169 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3170 }
3171
3172 template <typename R, typename P1, typename P2, typename P3, typename A1,
3173 typename A2, typename A3, typename A4, typename A5, typename A6,
3174 typename X1, typename X2, typename X3>
3175 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3176 CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4, A5, A6), const P1& p1,
3177 const P2& p2, const P3& p3) {
3178 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3179 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3180 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4,
3181 A5, A6>>
3182 (function, base::MakeTuple(p1, p2, p3));
3183 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3184 }
3185
3186 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3187 template <typename R, typename T, typename U, typename P1, typename P2,
3188 typename P3, typename A1, typename A2, typename A3, typename A4,
3189 typename A5, typename A6, typename X1, typename X2, typename X3>
3190 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3191 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3192 const P1& p1, const P2& p2, const P3& p3) {
3193 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3194 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6 ),
3195 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5, A6>>
3196 (obj, method, base::MakeTuple(p1, p2, p3));
3197 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3198 }
3199 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3200
3201 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3202 template <typename R, typename T, typename U, typename P1, typename P2,
3203 typename P3, typename A1, typename A2, typename A3, typename A4,
3204 typename A5, typename A6, typename X1, typename X2, typename X3>
3205 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3206 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5,
3207 A6), const P1& p1, const P2& p2, const P3& p3) {
3208 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3209 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3210 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5, A6>>
3211 (obj, method, base::MakeTuple(p1, p2, p3));
3212 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3213 }
3214
3215 template <typename R, typename P1, typename P2, typename P3, typename A1,
3216 typename A2, typename A3, typename A4, typename A5, typename A6,
3217 typename X1, typename X2, typename X3>
3218 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3219 CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3220 const P1& p1, const P2& p2, const P3& p3) {
3221 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3222 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3223 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4,
3224 A5, A6>>
3225 (function, base::MakeTuple(p1, p2, p3));
3226 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3227 }
3228 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3229 template <typename R, typename T, typename U, typename P1, typename P2,
3230 typename P3, typename A1, typename A2, typename A3, typename A4,
3231 typename A5, typename A6, typename X1, typename X2, typename X3>
3232 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3233 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5,
3234 A6), const P1& p1, const P2& p2, const P3& p3) {
3235 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3236 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3237 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5, A6>>
3238 (obj, method, base::MakeTuple(p1, p2, p3));
3239 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3240 }
3241 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3242 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3243
3244 // 4 - 0
3245 template <typename R, typename T, typename U, typename P1, typename P2,
3246 typename P3, typename P4, typename X1, typename X2, typename X3,
3247 typename X4>
3248 inline MutantFunctor<R, base::Tuple<>>
3249 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4), const P1& p1,
3250 const P2& p2, const P3& p3, const P4& p4) {
3251 MutantRunner<R, base::Tuple<>>* t =
3252 new Mutant<R, T, R (U::*)(X1, X2, X3, X4),
3253 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3254 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3255 return MutantFunctor<R, base::Tuple<>>(t);
3256 }
3257
3258 template <typename R, typename P1, typename P2, typename P3, typename P4,
3259 typename X1, typename X2, typename X3, typename X4>
3260 inline MutantFunctor<R, base::Tuple<>>
3261 CreateFunctor(R (*function)(X1, X2, X3, X4), const P1& p1, const P2& p2,
3262 const P3& p3, const P4& p4) {
3263 MutantRunner<R, base::Tuple<>>* t =
3264 new MutantFunction<R, R (*)(X1, X2, X3, X4),
3265 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3266 (function, base::MakeTuple(p1, p2, p3, p4));
3267 return MutantFunctor<R, base::Tuple<>>(t);
3268 }
3269
3270 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3271 template <typename R, typename T, typename U, typename P1, typename P2,
3272 typename P3, typename P4, typename X1, typename X2, typename X3,
3273 typename X4>
3274 inline MutantFunctor<R, base::Tuple<>>
3275 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4), const P1& p1,
3276 const P2& p2, const P3& p3, const P4& p4) {
3277 MutantRunner<R, base::Tuple<>>* t =
3278 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4),
3279 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3280 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3281 return MutantFunctor<R, base::Tuple<>>(t);
3282 }
3283 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3284
3285 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3286 template <typename R, typename T, typename U, typename P1, typename P2,
3287 typename P3, typename P4, typename X1, typename X2, typename X3,
3288 typename X4>
3289 inline MutantFunctor<R, base::Tuple<>>
3290 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1,
3291 const P2& p2, const P3& p3, const P4& p4) {
3292 MutantRunner<R, base::Tuple<>>* t =
3293 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4),
3294 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3295 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3296 return MutantFunctor<R, base::Tuple<>>(t);
3297 }
3298
3299 template <typename R, typename P1, typename P2, typename P3, typename P4,
3300 typename X1, typename X2, typename X3, typename X4>
3301 inline MutantFunctor<R, base::Tuple<>>
3302 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4), const P1& p1,
3303 const P2& p2, const P3& p3, const P4& p4) {
3304 MutantRunner<R, base::Tuple<>>* t =
3305 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4),
3306 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3307 (function, base::MakeTuple(p1, p2, p3, p4));
3308 return MutantFunctor<R, base::Tuple<>>(t);
3309 }
3310 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3311 template <typename R, typename T, typename U, typename P1, typename P2,
3312 typename P3, typename P4, typename X1, typename X2, typename X3,
3313 typename X4>
3314 inline MutantFunctor<R, base::Tuple<>>
3315 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1,
3316 const P2& p2, const P3& p3, const P4& p4) {
3317 MutantRunner<R, base::Tuple<>>* t =
3318 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4),
3319 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3320 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3321 return MutantFunctor<R, base::Tuple<>>(t);
3322 }
3323 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3324 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3325
3326 // 4 - 1
3327 template <typename R, typename T, typename U, typename P1, typename P2,
3328 typename P3, typename P4, typename A1, typename X1, typename X2,
3329 typename X3, typename X4>
3330 inline MutantFunctor<R, base::Tuple<A1>>
3331 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1,
3332 const P2& p2, const P3& p3, const P4& p4) {
3333 MutantRunner<R, base::Tuple<A1>>* t =
3334 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1),
3335 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3336 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3337 return MutantFunctor<R, base::Tuple<A1>>(t);
3338 }
3339
3340 template <typename R, typename P1, typename P2, typename P3, typename P4,
3341 typename A1, typename X1, typename X2, typename X3, typename X4>
3342 inline MutantFunctor<R, base::Tuple<A1>>
3343 CreateFunctor(R (*function)(X1, X2, X3, X4, A1), const P1& p1, const P2& p2,
3344 const P3& p3, const P4& p4) {
3345 MutantRunner<R, base::Tuple<A1>>* t =
3346 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1),
3347 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3348 (function, base::MakeTuple(p1, p2, p3, p4));
3349 return MutantFunctor<R, base::Tuple<A1>>(t);
3350 }
3351
3352 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3353 template <typename R, typename T, typename U, typename P1, typename P2,
3354 typename P3, typename P4, typename A1, typename X1, typename X2,
3355 typename X3, typename X4>
3356 inline MutantFunctor<R, base::Tuple<A1>>
3357 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1,
3358 const P2& p2, const P3& p3, const P4& p4) {
3359 MutantRunner<R, base::Tuple<A1>>* t =
3360 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1),
3361 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3362 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3363 return MutantFunctor<R, base::Tuple<A1>>(t);
3364 }
3365 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3366
3367 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3368 template <typename R, typename T, typename U, typename P1, typename P2,
3369 typename P3, typename P4, typename A1, typename X1, typename X2,
3370 typename X3, typename X4>
3371 inline MutantFunctor<R, base::Tuple<A1>>
3372 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1),
3373 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3374 MutantRunner<R, base::Tuple<A1>>* t =
3375 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1),
3376 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3377 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3378 return MutantFunctor<R, base::Tuple<A1>>(t);
3379 }
3380
3381 template <typename R, typename P1, typename P2, typename P3, typename P4,
3382 typename A1, typename X1, typename X2, typename X3, typename X4>
3383 inline MutantFunctor<R, base::Tuple<A1>>
3384 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1), const P1& p1,
3385 const P2& p2, const P3& p3, const P4& p4) {
3386 MutantRunner<R, base::Tuple<A1>>* t =
3387 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1),
3388 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3389 (function, base::MakeTuple(p1, p2, p3, p4));
3390 return MutantFunctor<R, base::Tuple<A1>>(t);
3391 }
3392 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3393 template <typename R, typename T, typename U, typename P1, typename P2,
3394 typename P3, typename P4, typename A1, typename X1, typename X2,
3395 typename X3, typename X4>
3396 inline MutantFunctor<R, base::Tuple<A1>>
3397 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1),
3398 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3399 MutantRunner<R, base::Tuple<A1>>* t =
3400 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1),
3401 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3402 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3403 return MutantFunctor<R, base::Tuple<A1>>(t);
3404 }
3405 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3406 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3407
3408 // 4 - 2
3409 template <typename R, typename T, typename U, typename P1, typename P2,
3410 typename P3, typename P4, typename A1, typename A2, typename X1,
3411 typename X2, typename X3, typename X4>
3412 inline MutantFunctor<R, base::Tuple<A1, A2>>
3413 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1,
3414 const P2& p2, const P3& p3, const P4& p4) {
3415 MutantRunner<R, base::Tuple<A1, A2>>* t =
3416 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2),
3417 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3418 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3419 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
3420 }
3421
3422 template <typename R, typename P1, typename P2, typename P3, typename P4,
3423 typename A1, typename A2, typename X1, typename X2, typename X3,
3424 typename X4>
3425 inline MutantFunctor<R, base::Tuple<A1, A2>>
3426 CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2), const P1& p1, const P2& p2,
3427 const P3& p3, const P4& p4) {
3428 MutantRunner<R, base::Tuple<A1, A2>>* t =
3429 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2),
3430 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3431 (function, base::MakeTuple(p1, p2, p3, p4));
3432 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
3433 }
3434
3435 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3436 template <typename R, typename T, typename U, typename P1, typename P2,
3437 typename P3, typename P4, typename A1, typename A2, typename X1,
3438 typename X2, typename X3, typename X4>
3439 inline MutantFunctor<R, base::Tuple<A1, A2>>
3440 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1,
3441 const P2& p2, const P3& p3, const P4& p4) {
3442 MutantRunner<R, base::Tuple<A1, A2>>* t =
3443 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2),
3444 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3445 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3446 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
3447 }
3448 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3449
3450 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3451 template <typename R, typename T, typename U, typename P1, typename P2,
3452 typename P3, typename P4, typename A1, typename A2, typename X1,
3453 typename X2, typename X3, typename X4>
3454 inline MutantFunctor<R, base::Tuple<A1, A2>>
3455 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2),
3456 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3457 MutantRunner<R, base::Tuple<A1, A2>>* t =
3458 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2),
3459 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3460 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3461 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
3462 }
3463
3464 template <typename R, typename P1, typename P2, typename P3, typename P4,
3465 typename A1, typename A2, typename X1, typename X2, typename X3,
3466 typename X4>
3467 inline MutantFunctor<R, base::Tuple<A1, A2>>
3468 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2), const P1& p1,
3469 const P2& p2, const P3& p3, const P4& p4) {
3470 MutantRunner<R, base::Tuple<A1, A2>>* t =
3471 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2),
3472 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3473 (function, base::MakeTuple(p1, p2, p3, p4));
3474 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
3475 }
3476 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3477 template <typename R, typename T, typename U, typename P1, typename P2,
3478 typename P3, typename P4, typename A1, typename A2, typename X1,
3479 typename X2, typename X3, typename X4>
3480 inline MutantFunctor<R, base::Tuple<A1, A2>>
3481 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2),
3482 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3483 MutantRunner<R, base::Tuple<A1, A2>>* t =
3484 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2),
3485 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3486 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3487 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
3488 }
3489 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3490 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3491
3492 // 4 - 3
3493 template <typename R, typename T, typename U, typename P1, typename P2,
3494 typename P3, typename P4, typename A1, typename A2, typename A3,
3495 typename X1, typename X2, typename X3, typename X4>
3496 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
3497 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
3498 const P2& p2, const P3& p3, const P4& p4) {
3499 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
3500 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3),
3501 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3502 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3503 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
3504 }
3505
3506 template <typename R, typename P1, typename P2, typename P3, typename P4,
3507 typename A1, typename A2, typename A3, typename X1, typename X2,
3508 typename X3, typename X4>
3509 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
3510 CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
3511 const P2& p2, const P3& p3, const P4& p4) {
3512 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
3513 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3),
3514 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3515 (function, base::MakeTuple(p1, p2, p3, p4));
3516 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
3517 }
3518
3519 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3520 template <typename R, typename T, typename U, typename P1, typename P2,
3521 typename P3, typename P4, typename A1, typename A2, typename A3,
3522 typename X1, typename X2, typename X3, typename X4>
3523 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
3524 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
3525 const P2& p2, const P3& p3, const P4& p4) {
3526 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
3527 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3),
3528 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3529 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3530 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
3531 }
3532 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3533
3534 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3535 template <typename R, typename T, typename U, typename P1, typename P2,
3536 typename P3, typename P4, typename A1, typename A2, typename A3,
3537 typename X1, typename X2, typename X3, typename X4>
3538 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
3539 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3),
3540 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3541 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
3542 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3),
3543 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3544 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3545 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
3546 }
3547
3548 template <typename R, typename P1, typename P2, typename P3, typename P4,
3549 typename A1, typename A2, typename A3, typename X1, typename X2,
3550 typename X3, typename X4>
3551 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
3552 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
3553 const P2& p2, const P3& p3, const P4& p4) {
3554 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
3555 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3),
3556 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3557 (function, base::MakeTuple(p1, p2, p3, p4));
3558 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
3559 }
3560 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3561 template <typename R, typename T, typename U, typename P1, typename P2,
3562 typename P3, typename P4, typename A1, typename A2, typename A3,
3563 typename X1, typename X2, typename X3, typename X4>
3564 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
3565 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3),
3566 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3567 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
3568 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3),
3569 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3570 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3571 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
3572 }
3573 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3574 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3575
3576 // 4 - 4
3577 template <typename R, typename T, typename U, typename P1, typename P2,
3578 typename P3, typename P4, typename A1, typename A2, typename A3,
3579 typename A4, typename X1, typename X2, typename X3, typename X4>
3580 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
3581 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
3582 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3583 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
3584 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
3585 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4>>
3586 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3587 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3588 }
3589
3590 template <typename R, typename P1, typename P2, typename P3, typename P4,
3591 typename A1, typename A2, typename A3, typename A4, typename X1,
3592 typename X2, typename X3, typename X4>
3593 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
3594 CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4), const P1& p1,
3595 const P2& p2, const P3& p3, const P4& p4) {
3596 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
3597 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3, A4),
3598 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3599 A4>>
3600 (function, base::MakeTuple(p1, p2, p3, p4));
3601 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3602 }
3603
3604 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3605 template <typename R, typename T, typename U, typename P1, typename P2,
3606 typename P3, typename P4, typename A1, typename A2, typename A3,
3607 typename A4, typename X1, typename X2, typename X3, typename X4>
3608 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
3609 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
3610 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3611 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
3612 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
3613 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4>>
3614 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3615 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3616 }
3617 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3618
3619 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3620 template <typename R, typename T, typename U, typename P1, typename P2,
3621 typename P3, typename P4, typename A1, typename A2, typename A3,
3622 typename A4, typename X1, typename X2, typename X3, typename X4>
3623 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
3624 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
3625 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3626 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
3627 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
3628 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4>>
3629 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3630 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3631 }
3632
3633 template <typename R, typename P1, typename P2, typename P3, typename P4,
3634 typename A1, typename A2, typename A3, typename A4, typename X1,
3635 typename X2, typename X3, typename X4>
3636 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
3637 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4),
3638 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3639 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
3640 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3, A4),
3641 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3642 A4>>
3643 (function, base::MakeTuple(p1, p2, p3, p4));
3644 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3645 }
3646 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3647 template <typename R, typename T, typename U, typename P1, typename P2,
3648 typename P3, typename P4, typename A1, typename A2, typename A3,
3649 typename A4, typename X1, typename X2, typename X3, typename X4>
3650 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
3651 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
3652 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3653 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
3654 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
3655 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4>>
3656 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3657 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
3658 }
3659 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3660 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3661
3662 // 4 - 5
3663 template <typename R, typename T, typename U, typename P1, typename P2,
3664 typename P3, typename P4, typename A1, typename A2, typename A3,
3665 typename A4, typename A5, typename X1, typename X2, typename X3,
3666 typename X4>
3667 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3668 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3669 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3670 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3671 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3672 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5>>
3673 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3674 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3675 }
3676
3677 template <typename R, typename P1, typename P2, typename P3, typename P4,
3678 typename A1, typename A2, typename A3, typename A4, typename A5,
3679 typename X1, typename X2, typename X3, typename X4>
3680 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3681 CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4, A5), const P1& p1,
3682 const P2& p2, const P3& p3, const P4& p4) {
3683 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3684 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3685 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3686 A4, A5>>
3687 (function, base::MakeTuple(p1, p2, p3, p4));
3688 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3689 }
3690
3691 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3692 template <typename R, typename T, typename U, typename P1, typename P2,
3693 typename P3, typename P4, typename A1, typename A2, typename A3,
3694 typename A4, typename A5, typename X1, typename X2, typename X3,
3695 typename X4>
3696 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3697 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3698 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3699 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3700 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5 ),
3701 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5>>
3702 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3703 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3704 }
3705 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3706
3707 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3708 template <typename R, typename T, typename U, typename P1, typename P2,
3709 typename P3, typename P4, typename A1, typename A2, typename A3,
3710 typename A4, typename A5, typename X1, typename X2, typename X3,
3711 typename X4>
3712 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3713 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
3714 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3715 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3716 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3717 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5>>
3718 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3719 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3720 }
3721
3722 template <typename R, typename P1, typename P2, typename P3, typename P4,
3723 typename A1, typename A2, typename A3, typename A4, typename A5,
3724 typename X1, typename X2, typename X3, typename X4>
3725 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3726 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3727 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3728 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3729 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3730 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3731 A4, A5>>
3732 (function, base::MakeTuple(p1, p2, p3, p4));
3733 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3734 }
3735 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3736 template <typename R, typename T, typename U, typename P1, typename P2,
3737 typename P3, typename P4, typename A1, typename A2, typename A3,
3738 typename A4, typename A5, typename X1, typename X2, typename X3,
3739 typename X4>
3740 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
3741 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
3742 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3743 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
3744 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3745 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5>>
3746 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3747 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
3748 }
3749 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3750 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3751
3752 // 4 - 6
3753 template <typename R, typename T, typename U, typename P1, typename P2,
3754 typename P3, typename P4, typename A1, typename A2, typename A3,
3755 typename A4, typename A5, typename A6, typename X1, typename X2,
3756 typename X3, typename X4>
3757 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3758 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3759 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3760 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3761 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3762 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5,
3763 A6>>
3764 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3765 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3766 }
3767
3768 template <typename R, typename P1, typename P2, typename P3, typename P4,
3769 typename A1, typename A2, typename A3, typename A4, typename A5,
3770 typename A6, typename X1, typename X2, typename X3, typename X4>
3771 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3772 CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3773 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3774 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3775 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3776 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3777 A4, A5, A6>>
3778 (function, base::MakeTuple(p1, p2, p3, p4));
3779 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3780 }
3781
3782 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3783 template <typename R, typename T, typename U, typename P1, typename P2,
3784 typename P3, typename P4, typename A1, typename A2, typename A3,
3785 typename A4, typename A5, typename A6, typename X1, typename X2,
3786 typename X3, typename X4>
3787 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3788 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3789 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3790 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3791 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5 , A6),
3792 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5,
3793 A6>>
3794 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3795 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3796 }
3797 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3798
3799 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3800 template <typename R, typename T, typename U, typename P1, typename P2,
3801 typename P3, typename P4, typename A1, typename A2, typename A3,
3802 typename A4, typename A5, typename A6, typename X1, typename X2,
3803 typename X3, typename X4>
3804 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3805 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
3806 A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3807 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3808 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5,
3809 A6),
3810 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5,
3811 A6>>
3812 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3813 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3814 }
3815
3816 template <typename R, typename P1, typename P2, typename P3, typename P4,
3817 typename A1, typename A2, typename A3, typename A4, typename A5,
3818 typename A6, typename X1, typename X2, typename X3, typename X4>
3819 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3820 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3821 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3822 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3823 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3, A4, A5,
3824 A6),
3825 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3826 A4, A5, A6>>
3827 (function, base::MakeTuple(p1, p2, p3, p4));
3828 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3829 }
3830 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3831 template <typename R, typename T, typename U, typename P1, typename P2,
3832 typename P3, typename P4, typename A1, typename A2, typename A3,
3833 typename A4, typename A5, typename A6, typename X1, typename X2,
3834 typename X3, typename X4>
3835 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
3836 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
3837 A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3838 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3839 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5,
3840 A6),
3841 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5,
3842 A6>>
3843 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3844 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
3845 }
3846 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3847 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3848
3849 // 5 - 0
3850 template <typename R, typename T, typename U, typename P1, typename P2,
3851 typename P3, typename P4, typename P5, typename X1, typename X2,
3852 typename X3, typename X4, typename X5>
3853 inline MutantFunctor<R, base::Tuple<>>
3854 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5), const P1& p1,
3855 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3856 MutantRunner<R, base::Tuple<>>* t =
3857 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5),
3858 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3859 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3860 return MutantFunctor<R, base::Tuple<>>(t);
3861 }
3862
3863 template <typename R, typename P1, typename P2, typename P3, typename P4,
3864 typename P5, typename X1, typename X2, typename X3, typename X4,
3865 typename X5>
3866 inline MutantFunctor<R, base::Tuple<>>
3867 CreateFunctor(R (*function)(X1, X2, X3, X4, X5), const P1& p1, const P2& p2,
3868 const P3& p3, const P4& p4, const P5& p5) {
3869 MutantRunner<R, base::Tuple<>>* t =
3870 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5),
3871 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3872 (function, base::MakeTuple(p1, p2, p3, p4, p5));
3873 return MutantFunctor<R, base::Tuple<>>(t);
3874 }
3875
3876 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3877 template <typename R, typename T, typename U, typename P1, typename P2,
3878 typename P3, typename P4, typename P5, typename X1, typename X2,
3879 typename X3, typename X4, typename X5>
3880 inline MutantFunctor<R, base::Tuple<>>
3881 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5), const P1& p1,
3882 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3883 MutantRunner<R, base::Tuple<>>* t =
3884 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5),
3885 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3886 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3887 return MutantFunctor<R, base::Tuple<>>(t);
3888 }
3889 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3890
3891 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3892 template <typename R, typename T, typename U, typename P1, typename P2,
3893 typename P3, typename P4, typename P5, typename X1, typename X2,
3894 typename X3, typename X4, typename X5>
3895 inline MutantFunctor<R, base::Tuple<>>
3896 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5),
3897 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3898 MutantRunner<R, base::Tuple<>>* t =
3899 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5),
3900 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3901 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3902 return MutantFunctor<R, base::Tuple<>>(t);
3903 }
3904
3905 template <typename R, typename P1, typename P2, typename P3, typename P4,
3906 typename P5, typename X1, typename X2, typename X3, typename X4,
3907 typename X5>
3908 inline MutantFunctor<R, base::Tuple<>>
3909 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5), const P1& p1,
3910 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3911 MutantRunner<R, base::Tuple<>>* t =
3912 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5),
3913 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3914 (function, base::MakeTuple(p1, p2, p3, p4, p5));
3915 return MutantFunctor<R, base::Tuple<>>(t);
3916 }
3917 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3918 template <typename R, typename T, typename U, typename P1, typename P2,
3919 typename P3, typename P4, typename P5, typename X1, typename X2,
3920 typename X3, typename X4, typename X5>
3921 inline MutantFunctor<R, base::Tuple<>>
3922 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5),
3923 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3924 MutantRunner<R, base::Tuple<>>* t =
3925 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5),
3926 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3927 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3928 return MutantFunctor<R, base::Tuple<>>(t);
3929 }
3930 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3931 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3932
3933 // 5 - 1
3934 template <typename R, typename T, typename U, typename P1, typename P2,
3935 typename P3, typename P4, typename P5, typename A1, typename X1,
3936 typename X2, typename X3, typename X4, typename X5>
3937 inline MutantFunctor<R, base::Tuple<A1>>
3938 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1), const P1& p1,
3939 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3940 MutantRunner<R, base::Tuple<A1>>* t =
3941 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1),
3942 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
3943 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3944 return MutantFunctor<R, base::Tuple<A1>>(t);
3945 }
3946
3947 template <typename R, typename P1, typename P2, typename P3, typename P4,
3948 typename P5, typename A1, typename X1, typename X2, typename X3,
3949 typename X4, typename X5>
3950 inline MutantFunctor<R, base::Tuple<A1>>
3951 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1), const P1& p1, const P2& p2,
3952 const P3& p3, const P4& p4, const P5& p5) {
3953 MutantRunner<R, base::Tuple<A1>>* t =
3954 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1),
3955 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
3956 (function, base::MakeTuple(p1, p2, p3, p4, p5));
3957 return MutantFunctor<R, base::Tuple<A1>>(t);
3958 }
3959
3960 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3961 template <typename R, typename T, typename U, typename P1, typename P2,
3962 typename P3, typename P4, typename P5, typename A1, typename X1,
3963 typename X2, typename X3, typename X4, typename X5>
3964 inline MutantFunctor<R, base::Tuple<A1>>
3965 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1), const P1& p1,
3966 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3967 MutantRunner<R, base::Tuple<A1>>* t =
3968 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1),
3969 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
3970 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3971 return MutantFunctor<R, base::Tuple<A1>>(t);
3972 }
3973 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3974
3975 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3976 template <typename R, typename T, typename U, typename P1, typename P2,
3977 typename P3, typename P4, typename P5, typename A1, typename X1,
3978 typename X2, typename X3, typename X4, typename X5>
3979 inline MutantFunctor<R, base::Tuple<A1>>
3980 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1),
3981 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3982 MutantRunner<R, base::Tuple<A1>>* t =
3983 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1),
3984 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
3985 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3986 return MutantFunctor<R, base::Tuple<A1>>(t);
3987 }
3988
3989 template <typename R, typename P1, typename P2, typename P3, typename P4,
3990 typename P5, typename A1, typename X1, typename X2, typename X3,
3991 typename X4, typename X5>
3992 inline MutantFunctor<R, base::Tuple<A1>>
3993 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1), const P1& p1,
3994 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3995 MutantRunner<R, base::Tuple<A1>>* t =
3996 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1),
3997 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
3998 (function, base::MakeTuple(p1, p2, p3, p4, p5));
3999 return MutantFunctor<R, base::Tuple<A1>>(t);
4000 }
4001 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4002 template <typename R, typename T, typename U, typename P1, typename P2,
4003 typename P3, typename P4, typename P5, typename A1, typename X1,
4004 typename X2, typename X3, typename X4, typename X5>
4005 inline MutantFunctor<R, base::Tuple<A1>>
4006 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1),
4007 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4008 MutantRunner<R, base::Tuple<A1>>* t =
4009 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1),
4010 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
4011 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4012 return MutantFunctor<R, base::Tuple<A1>>(t);
4013 }
4014 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4015 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4016
4017 // 5 - 2
4018 template <typename R, typename T, typename U, typename P1, typename P2,
4019 typename P3, typename P4, typename P5, typename A1, typename A2,
4020 typename X1, typename X2, typename X3, typename X4, typename X5>
4021 inline MutantFunctor<R, base::Tuple<A1, A2>>
4022 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
4023 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4024 MutantRunner<R, base::Tuple<A1, A2>>* t =
4025 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2),
4026 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4027 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4028 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4029 }
4030
4031 template <typename R, typename P1, typename P2, typename P3, typename P4,
4032 typename P5, typename A1, typename A2, typename X1, typename X2,
4033 typename X3, typename X4, typename X5>
4034 inline MutantFunctor<R, base::Tuple<A1, A2>>
4035 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
4036 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4037 MutantRunner<R, base::Tuple<A1, A2>>* t =
4038 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2),
4039 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4040 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4041 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4042 }
4043
4044 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4045 template <typename R, typename T, typename U, typename P1, typename P2,
4046 typename P3, typename P4, typename P5, typename A1, typename A2,
4047 typename X1, typename X2, typename X3, typename X4, typename X5>
4048 inline MutantFunctor<R, base::Tuple<A1, A2>>
4049 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
4050 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4051 MutantRunner<R, base::Tuple<A1, A2>>* t =
4052 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2),
4053 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4054 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4055 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4056 }
4057 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4058
4059 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4060 template <typename R, typename T, typename U, typename P1, typename P2,
4061 typename P3, typename P4, typename P5, typename A1, typename A2,
4062 typename X1, typename X2, typename X3, typename X4, typename X5>
4063 inline MutantFunctor<R, base::Tuple<A1, A2>>
4064 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2),
4065 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4066 MutantRunner<R, base::Tuple<A1, A2>>* t =
4067 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2),
4068 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4069 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4070 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4071 }
4072
4073 template <typename R, typename P1, typename P2, typename P3, typename P4,
4074 typename P5, typename A1, typename A2, typename X1, typename X2,
4075 typename X3, typename X4, typename X5>
4076 inline MutantFunctor<R, base::Tuple<A1, A2>>
4077 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
4078 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4079 MutantRunner<R, base::Tuple<A1, A2>>* t =
4080 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2),
4081 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4082 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4083 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4084 }
4085 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4086 template <typename R, typename T, typename U, typename P1, typename P2,
4087 typename P3, typename P4, typename P5, typename A1, typename A2,
4088 typename X1, typename X2, typename X3, typename X4, typename X5>
4089 inline MutantFunctor<R, base::Tuple<A1, A2>>
4090 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2),
4091 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4092 MutantRunner<R, base::Tuple<A1, A2>>* t =
4093 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2),
4094 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4095 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4096 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4097 }
4098 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4099 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4100
4101 // 5 - 3
4102 template <typename R, typename T, typename U, typename P1, typename P2,
4103 typename P3, typename P4, typename P5, typename A1, typename A2,
4104 typename A3, typename X1, typename X2, typename X3, typename X4,
4105 typename X5>
4106 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4107 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
4108 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4109 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4110 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
4111 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3>>
4112 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4113 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4114 }
4115
4116 template <typename R, typename P1, typename P2, typename P3, typename P4,
4117 typename P5, typename A1, typename A2, typename A3, typename X1,
4118 typename X2, typename X3, typename X4, typename X5>
4119 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4120 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3), const P1& p1,
4121 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4122 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4123 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3),
4124 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4125 A3>>
4126 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4127 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4128 }
4129
4130 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4131 template <typename R, typename T, typename U, typename P1, typename P2,
4132 typename P3, typename P4, typename P5, typename A1, typename A2,
4133 typename A3, typename X1, typename X2, typename X3, typename X4,
4134 typename X5>
4135 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4136 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
4137 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4138 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4139 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
4140 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3>>
4141 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4142 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4143 }
4144 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4145
4146 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4147 template <typename R, typename T, typename U, typename P1, typename P2,
4148 typename P3, typename P4, typename P5, typename A1, typename A2,
4149 typename A3, typename X1, typename X2, typename X3, typename X4,
4150 typename X5>
4151 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4152 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
4153 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4154 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4155 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
4156 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3>>
4157 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4158 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4159 }
4160
4161 template <typename R, typename P1, typename P2, typename P3, typename P4,
4162 typename P5, typename A1, typename A2, typename A3, typename X1,
4163 typename X2, typename X3, typename X4, typename X5>
4164 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4165 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3),
4166 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4167 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4168 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3),
4169 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4170 A3>>
4171 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4172 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4173 }
4174 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4175 template <typename R, typename T, typename U, typename P1, typename P2,
4176 typename P3, typename P4, typename P5, typename A1, typename A2,
4177 typename A3, typename X1, typename X2, typename X3, typename X4,
4178 typename X5>
4179 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4180 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
4181 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4182 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4183 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
4184 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3>>
4185 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4186 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4187 }
4188 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4189 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4190
4191 // 5 - 4
4192 template <typename R, typename T, typename U, typename P1, typename P2,
4193 typename P3, typename P4, typename P5, typename A1, typename A2,
4194 typename A3, typename A4, typename X1, typename X2, typename X3,
4195 typename X4, typename X5>
4196 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4197 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4198 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4199 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4200 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4201 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4>>
4202 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4203 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4204 }
4205
4206 template <typename R, typename P1, typename P2, typename P3, typename P4,
4207 typename P5, typename A1, typename A2, typename A3, typename A4,
4208 typename X1, typename X2, typename X3, typename X4, typename X5>
4209 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4210 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4), const P1& p1,
4211 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4212 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4213 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4214 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4215 A3, A4>>
4216 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4217 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4218 }
4219
4220 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4221 template <typename R, typename T, typename U, typename P1, typename P2,
4222 typename P3, typename P4, typename P5, typename A1, typename A2,
4223 typename A3, typename A4, typename X1, typename X2, typename X3,
4224 typename X4, typename X5>
4225 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4226 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4227 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4228 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4229 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4 ),
4230 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4>>
4231 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4232 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4233 }
4234 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4235
4236 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4237 template <typename R, typename T, typename U, typename P1, typename P2,
4238 typename P3, typename P4, typename P5, typename A1, typename A2,
4239 typename A3, typename A4, typename X1, typename X2, typename X3,
4240 typename X4, typename X5>
4241 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4242 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4243 A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4244 const P5& p5) {
4245 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4246 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4247 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4>>
4248 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4249 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4250 }
4251
4252 template <typename R, typename P1, typename P2, typename P3, typename P4,
4253 typename P5, typename A1, typename A2, typename A3, typename A4,
4254 typename X1, typename X2, typename X3, typename X4, typename X5>
4255 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4256 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4257 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4258 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4259 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4260 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4261 A3, A4>>
4262 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4263 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4264 }
4265 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4266 template <typename R, typename T, typename U, typename P1, typename P2,
4267 typename P3, typename P4, typename P5, typename A1, typename A2,
4268 typename A3, typename A4, typename X1, typename X2, typename X3,
4269 typename X4, typename X5>
4270 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4271 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4272 A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4273 const P5& p5) {
4274 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4275 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4276 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4>>
4277 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4278 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4279 }
4280 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4281 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4282
4283 // 5 - 5
4284 template <typename R, typename T, typename U, typename P1, typename P2,
4285 typename P3, typename P4, typename P5, typename A1, typename A2,
4286 typename A3, typename A4, typename A5, typename X1, typename X2,
4287 typename X3, typename X4, typename X5>
4288 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
4289 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4290 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4291 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
4292 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4293 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4294 A5>>
4295 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4296 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
4297 }
4298
4299 template <typename R, typename P1, typename P2, typename P3, typename P4,
4300 typename P5, typename A1, typename A2, typename A3, typename A4,
4301 typename A5, typename X1, typename X2, typename X3, typename X4,
4302 typename X5>
4303 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
4304 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4305 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4306 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
4307 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4308 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4309 A3, A4, A5>>
4310 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4311 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
4312 }
4313
4314 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4315 template <typename R, typename T, typename U, typename P1, typename P2,
4316 typename P3, typename P4, typename P5, typename A1, typename A2,
4317 typename A3, typename A4, typename A5, typename X1, typename X2,
4318 typename X3, typename X4, typename X5>
4319 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
4320 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4321 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4322 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
4323 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4 , A5),
4324 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4325 A5>>
4326 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4327 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
4328 }
4329 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4330
4331 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4332 template <typename R, typename T, typename U, typename P1, typename P2,
4333 typename P3, typename P4, typename P5, typename A1, typename A2,
4334 typename A3, typename A4, typename A5, typename X1, typename X2,
4335 typename X3, typename X4, typename X5>
4336 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
4337 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4338 A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4339 const P5& p5) {
4340 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
4341 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4342 A5),
4343 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4344 A5>>
4345 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4346 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
4347 }
4348
4349 template <typename R, typename P1, typename P2, typename P3, typename P4,
4350 typename P5, typename A1, typename A2, typename A3, typename A4,
4351 typename A5, typename X1, typename X2, typename X3, typename X4,
4352 typename X5>
4353 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
4354 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4355 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4356 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
4357 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4358 A5),
4359 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4360 A3, A4, A5>>
4361 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4362 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
4363 }
4364 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4365 template <typename R, typename T, typename U, typename P1, typename P2,
4366 typename P3, typename P4, typename P5, typename A1, typename A2,
4367 typename A3, typename A4, typename A5, typename X1, typename X2,
4368 typename X3, typename X4, typename X5>
4369 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
4370 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4371 A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4372 const P5& p5) {
4373 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
4374 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4375 A5),
4376 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4377 A5>>
4378 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4379 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
4380 }
4381 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4382 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4383
4384 // 5 - 6
4385 template <typename R, typename T, typename U, typename P1, typename P2,
4386 typename P3, typename P4, typename P5, typename A1, typename A2,
4387 typename A3, typename A4, typename A5, typename A6, typename X1,
4388 typename X2, typename X3, typename X4, typename X5>
4389 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
4390 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5,
4391 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4392 const P5& p5) {
4393 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
4394 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
4395 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4396 A5, A6>>
4397 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4398 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
4399 }
4400
4401 template <typename R, typename P1, typename P2, typename P3, typename P4,
4402 typename P5, typename A1, typename A2, typename A3, typename A4,
4403 typename A5, typename A6, typename X1, typename X2, typename X3,
4404 typename X4, typename X5>
4405 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
4406 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
4407 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4408 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
4409 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
4410 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4411 A3, A4, A5, A6>>
4412 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4413 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
4414 }
4415
4416 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4417 template <typename R, typename T, typename U, typename P1, typename P2,
4418 typename P3, typename P4, typename P5, typename A1, typename A2,
4419 typename A3, typename A4, typename A5, typename A6, typename X1,
4420 typename X2, typename X3, typename X4, typename X5>
4421 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
4422 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5,
4423 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4424 const P5& p5) {
4425 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
4426 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4 , A5, A6),
4427 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4428 A5, A6>>
4429 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4430 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
4431 }
4432 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4433
4434 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4435 template <typename R, typename T, typename U, typename P1, typename P2,
4436 typename P3, typename P4, typename P5, typename A1, typename A2,
4437 typename A3, typename A4, typename A5, typename A6, typename X1,
4438 typename X2, typename X3, typename X4, typename X5>
4439 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
4440 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4441 A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4442 const P5& p5) {
4443 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
4444 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4445 A5, A6),
4446 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4447 A5, A6>>
4448 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4449 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
4450 }
4451
4452 template <typename R, typename P1, typename P2, typename P3, typename P4,
4453 typename P5, typename A1, typename A2, typename A3, typename A4,
4454 typename A5, typename A6, typename X1, typename X2, typename X3,
4455 typename X4, typename X5>
4456 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
4457 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5,
4458 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4459 const P5& p5) {
4460 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
4461 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4462 A5, A6),
4463 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4464 A3, A4, A5, A6>>
4465 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4466 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
4467 }
4468 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4469 template <typename R, typename T, typename U, typename P1, typename P2,
4470 typename P3, typename P4, typename P5, typename A1, typename A2,
4471 typename A3, typename A4, typename A5, typename A6, typename X1,
4472 typename X2, typename X3, typename X4, typename X5>
4473 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
4474 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4475 A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4476 const P5& p5) {
4477 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
4478 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4479 A5, A6),
4480 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4481 A5, A6>>
4482 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4483 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
4484 }
4485 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4486 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4487
4488 // 6 - 0
4489 template <typename R, typename T, typename U, typename P1, typename P2,
4490 typename P3, typename P4, typename P5, typename P6, typename X1,
4491 typename X2, typename X3, typename X4, typename X5, typename X6>
4492 inline MutantFunctor<R, base::Tuple<>>
4493 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6), const P1& p1,
4494 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4495 MutantRunner<R, base::Tuple<>>* t =
4496 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6),
4497 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4498 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4499 return MutantFunctor<R, base::Tuple<>>(t);
4500 }
4501
4502 template <typename R, typename P1, typename P2, typename P3, typename P4,
4503 typename P5, typename P6, typename X1, typename X2, typename X3,
4504 typename X4, typename X5, typename X6>
4505 inline MutantFunctor<R, base::Tuple<>>
4506 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6), const P1& p1, const P2& p2,
4507 const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4508 MutantRunner<R, base::Tuple<>>* t =
4509 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6),
4510 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4511 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4512 return MutantFunctor<R, base::Tuple<>>(t);
4513 }
4514
4515 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4516 template <typename R, typename T, typename U, typename P1, typename P2,
4517 typename P3, typename P4, typename P5, typename P6, typename X1,
4518 typename X2, typename X3, typename X4, typename X5, typename X6>
4519 inline MutantFunctor<R, base::Tuple<>>
4520 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6), const P1& p1,
4521 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4522 MutantRunner<R, base::Tuple<>>* t =
4523 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6),
4524 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4525 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4526 return MutantFunctor<R, base::Tuple<>>(t);
4527 }
4528 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4529
4530 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4531 template <typename R, typename T, typename U, typename P1, typename P2,
4532 typename P3, typename P4, typename P5, typename P6, typename X1,
4533 typename X2, typename X3, typename X4, typename X5, typename X6>
4534 inline MutantFunctor<R, base::Tuple<>>
4535 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6),
4536 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4537 const P6& p6) {
4538 MutantRunner<R, base::Tuple<>>* t =
4539 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6),
4540 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4541 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4542 return MutantFunctor<R, base::Tuple<>>(t);
4543 }
4544
4545 template <typename R, typename P1, typename P2, typename P3, typename P4,
4546 typename P5, typename P6, typename X1, typename X2, typename X3,
4547 typename X4, typename X5, typename X6>
4548 inline MutantFunctor<R, base::Tuple<>>
4549 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6), const P1& p1,
4550 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4551 MutantRunner<R, base::Tuple<>>* t =
4552 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6),
4553 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4554 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4555 return MutantFunctor<R, base::Tuple<>>(t);
4556 }
4557 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4558 template <typename R, typename T, typename U, typename P1, typename P2,
4559 typename P3, typename P4, typename P5, typename P6, typename X1,
4560 typename X2, typename X3, typename X4, typename X5, typename X6>
4561 inline MutantFunctor<R, base::Tuple<>>
4562 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6),
4563 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4564 const P6& p6) {
4565 MutantRunner<R, base::Tuple<>>* t =
4566 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6),
4567 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4568 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4569 return MutantFunctor<R, base::Tuple<>>(t);
4570 }
4571 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4572 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4573
4574 // 6 - 1
4575 template <typename R, typename T, typename U, typename P1, typename P2,
4576 typename P3, typename P4, typename P5, typename P6, typename A1,
4577 typename X1, typename X2, typename X3, typename X4, typename X5,
4578 typename X6>
4579 inline MutantFunctor<R, base::Tuple<A1>>
4580 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
4581 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4582 MutantRunner<R, base::Tuple<A1>>* t =
4583 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1),
4584 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4585 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4586 return MutantFunctor<R, base::Tuple<A1>>(t);
4587 }
4588
4589 template <typename R, typename P1, typename P2, typename P3, typename P4,
4590 typename P5, typename P6, typename A1, typename X1, typename X2,
4591 typename X3, typename X4, typename X5, typename X6>
4592 inline MutantFunctor<R, base::Tuple<A1>>
4593 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
4594 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4595 MutantRunner<R, base::Tuple<A1>>* t =
4596 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1),
4597 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4598 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4599 return MutantFunctor<R, base::Tuple<A1>>(t);
4600 }
4601
4602 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4603 template <typename R, typename T, typename U, typename P1, typename P2,
4604 typename P3, typename P4, typename P5, typename P6, typename A1,
4605 typename X1, typename X2, typename X3, typename X4, typename X5,
4606 typename X6>
4607 inline MutantFunctor<R, base::Tuple<A1>>
4608 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
4609 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4610 MutantRunner<R, base::Tuple<A1>>* t =
4611 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1),
4612 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4613 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4614 return MutantFunctor<R, base::Tuple<A1>>(t);
4615 }
4616 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4617
4618 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4619 template <typename R, typename T, typename U, typename P1, typename P2,
4620 typename P3, typename P4, typename P5, typename P6, typename A1,
4621 typename X1, typename X2, typename X3, typename X4, typename X5,
4622 typename X6>
4623 inline MutantFunctor<R, base::Tuple<A1>>
4624 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1),
4625 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4626 const P6& p6) {
4627 MutantRunner<R, base::Tuple<A1>>* t =
4628 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1),
4629 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4630 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4631 return MutantFunctor<R, base::Tuple<A1>>(t);
4632 }
4633
4634 template <typename R, typename P1, typename P2, typename P3, typename P4,
4635 typename P5, typename P6, typename A1, typename X1, typename X2,
4636 typename X3, typename X4, typename X5, typename X6>
4637 inline MutantFunctor<R, base::Tuple<A1>>
4638 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
4639 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4640 MutantRunner<R, base::Tuple<A1>>* t =
4641 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1),
4642 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4643 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4644 return MutantFunctor<R, base::Tuple<A1>>(t);
4645 }
4646 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4647 template <typename R, typename T, typename U, typename P1, typename P2,
4648 typename P3, typename P4, typename P5, typename P6, typename A1,
4649 typename X1, typename X2, typename X3, typename X4, typename X5,
4650 typename X6>
4651 inline MutantFunctor<R, base::Tuple<A1>>
4652 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1),
4653 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4654 const P6& p6) {
4655 MutantRunner<R, base::Tuple<A1>>* t =
4656 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1),
4657 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4658 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4659 return MutantFunctor<R, base::Tuple<A1>>(t);
4660 }
4661 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4662 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4663
4664 // 6 - 2
4665 template <typename R, typename T, typename U, typename P1, typename P2,
4666 typename P3, typename P4, typename P5, typename P6, typename A1,
4667 typename A2, typename X1, typename X2, typename X3, typename X4,
4668 typename X5, typename X6>
4669 inline MutantFunctor<R, base::Tuple<A1, A2>>
4670 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
4671 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4672 const P6& p6) {
4673 MutantRunner<R, base::Tuple<A1, A2>>* t =
4674 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
4675 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2>>
4676 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4677 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4678 }
4679
4680 template <typename R, typename P1, typename P2, typename P3, typename P4,
4681 typename P5, typename P6, typename A1, typename A2, typename X1,
4682 typename X2, typename X3, typename X4, typename X5, typename X6>
4683 inline MutantFunctor<R, base::Tuple<A1, A2>>
4684 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2), const P1& p1,
4685 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4686 MutantRunner<R, base::Tuple<A1, A2>>* t =
4687 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2),
4688 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4689 A2>>
4690 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4691 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4692 }
4693
4694 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4695 template <typename R, typename T, typename U, typename P1, typename P2,
4696 typename P3, typename P4, typename P5, typename P6, typename A1,
4697 typename A2, typename X1, typename X2, typename X3, typename X4,
4698 typename X5, typename X6>
4699 inline MutantFunctor<R, base::Tuple<A1, A2>>
4700 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
4701 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4702 const P6& p6) {
4703 MutantRunner<R, base::Tuple<A1, A2>>* t =
4704 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
4705 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2>>
4706 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4707 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4708 }
4709 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4710
4711 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4712 template <typename R, typename T, typename U, typename P1, typename P2,
4713 typename P3, typename P4, typename P5, typename P6, typename A1,
4714 typename A2, typename X1, typename X2, typename X3, typename X4,
4715 typename X5, typename X6>
4716 inline MutantFunctor<R, base::Tuple<A1, A2>>
4717 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
4718 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4719 const P6& p6) {
4720 MutantRunner<R, base::Tuple<A1, A2>>* t =
4721 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
4722 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2>>
4723 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4724 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4725 }
4726
4727 template <typename R, typename P1, typename P2, typename P3, typename P4,
4728 typename P5, typename P6, typename A1, typename A2, typename X1,
4729 typename X2, typename X3, typename X4, typename X5, typename X6>
4730 inline MutantFunctor<R, base::Tuple<A1, A2>>
4731 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2),
4732 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4733 const P6& p6) {
4734 MutantRunner<R, base::Tuple<A1, A2>>* t =
4735 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2),
4736 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4737 A2>>
4738 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4739 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4740 }
4741 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4742 template <typename R, typename T, typename U, typename P1, typename P2,
4743 typename P3, typename P4, typename P5, typename P6, typename A1,
4744 typename A2, typename X1, typename X2, typename X3, typename X4,
4745 typename X5, typename X6>
4746 inline MutantFunctor<R, base::Tuple<A1, A2>>
4747 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
4748 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4749 const P6& p6) {
4750 MutantRunner<R, base::Tuple<A1, A2>>* t =
4751 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
4752 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2>>
4753 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4754 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
4755 }
4756 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4757 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4758
4759 // 6 - 3
4760 template <typename R, typename T, typename U, typename P1, typename P2,
4761 typename P3, typename P4, typename P5, typename P6, typename A1,
4762 typename A2, typename A3, typename X1, typename X2, typename X3,
4763 typename X4, typename X5, typename X6>
4764 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4765 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4766 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4767 const P6& p6) {
4768 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4769 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4770 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3>>
4771 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4772 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4773 }
4774
4775 template <typename R, typename P1, typename P2, typename P3, typename P4,
4776 typename P5, typename P6, typename A1, typename A2, typename A3,
4777 typename X1, typename X2, typename X3, typename X4, typename X5,
4778 typename X6>
4779 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4780 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3), const P1& p1,
4781 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4782 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4783 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4784 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4785 A2, A3>>
4786 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4787 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4788 }
4789
4790 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4791 template <typename R, typename T, typename U, typename P1, typename P2,
4792 typename P3, typename P4, typename P5, typename P6, typename A1,
4793 typename A2, typename A3, typename X1, typename X2, typename X3,
4794 typename X4, typename X5, typename X6>
4795 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4796 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4797 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4798 const P6& p6) {
4799 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4800 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3 ),
4801 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3>>
4802 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4803 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4804 }
4805 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4806
4807 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4808 template <typename R, typename T, typename U, typename P1, typename P2,
4809 typename P3, typename P4, typename P5, typename P6, typename A1,
4810 typename A2, typename A3, typename X1, typename X2, typename X3,
4811 typename X4, typename X5, typename X6>
4812 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4813 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4814 A3), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4815 const P6& p6) {
4816 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4817 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4818 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3>>
4819 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4820 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4821 }
4822
4823 template <typename R, typename P1, typename P2, typename P3, typename P4,
4824 typename P5, typename P6, typename A1, typename A2, typename A3,
4825 typename X1, typename X2, typename X3, typename X4, typename X5,
4826 typename X6>
4827 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4828 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4829 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4830 const P6& p6) {
4831 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4832 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4833 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4834 A2, A3>>
4835 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4836 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4837 }
4838 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4839 template <typename R, typename T, typename U, typename P1, typename P2,
4840 typename P3, typename P4, typename P5, typename P6, typename A1,
4841 typename A2, typename A3, typename X1, typename X2, typename X3,
4842 typename X4, typename X5, typename X6>
4843 inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
4844 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4845 A3), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4846 const P6& p6) {
4847 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
4848 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4849 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3>>
4850 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4851 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
4852 }
4853 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4854 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4855
4856 // 6 - 4
4857 template <typename R, typename T, typename U, typename P1, typename P2,
4858 typename P3, typename P4, typename P5, typename P6, typename A1,
4859 typename A2, typename A3, typename A4, typename X1, typename X2,
4860 typename X3, typename X4, typename X5, typename X6>
4861 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4862 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4863 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4864 const P6& p6) {
4865 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4866 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4867 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
4868 A4>>
4869 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4870 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4871 }
4872
4873 template <typename R, typename P1, typename P2, typename P3, typename P4,
4874 typename P5, typename P6, typename A1, typename A2, typename A3,
4875 typename A4, typename X1, typename X2, typename X3, typename X4,
4876 typename X5, typename X6>
4877 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4878 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4879 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4880 const P6& p6) {
4881 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4882 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4883 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4884 A2, A3, A4>>
4885 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4886 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4887 }
4888
4889 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4890 template <typename R, typename T, typename U, typename P1, typename P2,
4891 typename P3, typename P4, typename P5, typename P6, typename A1,
4892 typename A2, typename A3, typename A4, typename X1, typename X2,
4893 typename X3, typename X4, typename X5, typename X6>
4894 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4895 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4896 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4897 const P6& p6) {
4898 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4899 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3 , A4),
4900 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
4901 A4>>
4902 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4903 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4904 }
4905 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4906
4907 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4908 template <typename R, typename T, typename U, typename P1, typename P2,
4909 typename P3, typename P4, typename P5, typename P6, typename A1,
4910 typename A2, typename A3, typename A4, typename X1, typename X2,
4911 typename X3, typename X4, typename X5, typename X6>
4912 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4913 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4914 A3, A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4915 const P5& p5, const P6& p6) {
4916 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4917 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
4918 A4),
4919 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
4920 A4>>
4921 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4922 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4923 }
4924
4925 template <typename R, typename P1, typename P2, typename P3, typename P4,
4926 typename P5, typename P6, typename A1, typename A2, typename A3,
4927 typename A4, typename X1, typename X2, typename X3, typename X4,
4928 typename X5, typename X6>
4929 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4930 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4931 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4932 const P6& p6) {
4933 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4934 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
4935 A4),
4936 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4937 A2, A3, A4>>
4938 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4939 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4940 }
4941 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4942 template <typename R, typename T, typename U, typename P1, typename P2,
4943 typename P3, typename P4, typename P5, typename P6, typename A1,
4944 typename A2, typename A3, typename A4, typename X1, typename X2,
4945 typename X3, typename X4, typename X5, typename X6>
4946 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
4947 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4948 A3, A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4949 const P5& p5, const P6& p6) {
4950 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4951 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
4952 A4),
4953 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
4954 A4>>
4955 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4956 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
4957 }
4958 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4959 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4960
4961 // 6 - 5
4962 template <typename R, typename T, typename U, typename P1, typename P2,
4963 typename P3, typename P4, typename P5, typename P6, typename A1,
4964 typename A2, typename A3, typename A4, typename A5, typename X1,
4965 typename X2, typename X3, typename X4, typename X5, typename X6>
4966 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
4967 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
4968 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4969 const P6& p6) {
4970 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
4971 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
4972 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
4973 A4, A5>>
4974 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4975 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
4976 }
4977
4978 template <typename R, typename P1, typename P2, typename P3, typename P4,
4979 typename P5, typename P6, typename A1, typename A2, typename A3,
4980 typename A4, typename A5, typename X1, typename X2, typename X3,
4981 typename X4, typename X5, typename X6>
4982 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
4983 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
4984 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4985 const P6& p6) {
4986 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
4987 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
4988 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4989 A2, A3, A4, A5>>
4990 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4991 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
4992 }
4993
4994 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4995 template <typename R, typename T, typename U, typename P1, typename P2,
4996 typename P3, typename P4, typename P5, typename P6, typename A1,
4997 typename A2, typename A3, typename A4, typename A5, typename X1,
4998 typename X2, typename X3, typename X4, typename X5, typename X6>
4999 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
5000 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
5001 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
5002 const P6& p6) {
5003 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
5004 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3 , A4, A5),
5005 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5006 A4, A5>>
5007 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5008 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
5009 }
5010 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5011
5012 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
5013 template <typename R, typename T, typename U, typename P1, typename P2,
5014 typename P3, typename P4, typename P5, typename P6, typename A1,
5015 typename A2, typename A3, typename A4, typename A5, typename X1,
5016 typename X2, typename X3, typename X4, typename X5, typename X6>
5017 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
5018 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
5019 A3, A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
5020 const P5& p5, const P6& p6) {
5021 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
5022 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5023 A4, A5),
5024 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5025 A4, A5>>
5026 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5027 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
5028 }
5029
5030 template <typename R, typename P1, typename P2, typename P3, typename P4,
5031 typename P5, typename P6, typename A1, typename A2, typename A3,
5032 typename A4, typename A5, typename X1, typename X2, typename X3,
5033 typename X4, typename X5, typename X6>
5034 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
5035 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
5036 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
5037 const P6& p6) {
5038 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
5039 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5040 A4, A5),
5041 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
5042 A2, A3, A4, A5>>
5043 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5044 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
5045 }
5046 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5047 template <typename R, typename T, typename U, typename P1, typename P2,
5048 typename P3, typename P4, typename P5, typename P6, typename A1,
5049 typename A2, typename A3, typename A4, typename A5, typename X1,
5050 typename X2, typename X3, typename X4, typename X5, typename X6>
5051 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
5052 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
5053 A3, A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
5054 const P5& p5, const P6& p6) {
5055 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
5056 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5057 A4, A5),
5058 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5059 A4, A5>>
5060 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5061 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
5062 }
5063 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5064 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
5065
5066 // 6 - 6
5067 template <typename R, typename T, typename U, typename P1, typename P2,
5068 typename P3, typename P4, typename P5, typename P6, typename A1,
5069 typename A2, typename A3, typename A4, typename A5, typename A6,
5070 typename X1, typename X2, typename X3, typename X4, typename X5,
5071 typename X6>
5072 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
5073 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5,
5074 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
5075 const P6& p6) {
5076 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
5077 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
5078 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5079 A4, A5, A6>>
5080 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5081 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
5082 }
5083
5084 template <typename R, typename P1, typename P2, typename P3, typename P4,
5085 typename P5, typename P6, typename A1, typename A2, typename A3,
5086 typename A4, typename A5, typename A6, typename X1, typename X2,
5087 typename X3, typename X4, typename X5, typename X6>
5088 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
5089 CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
5090 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
5091 const P6& p6) {
5092 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
5093 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5,
5094 A6),
5095 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
5096 A2, A3, A4, A5, A6>>
5097 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5098 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
5099 }
5100
5101 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5102 template <typename R, typename T, typename U, typename P1, typename P2,
5103 typename P3, typename P4, typename P5, typename P6, typename A1,
5104 typename A2, typename A3, typename A4, typename A5, typename A6,
5105 typename X1, typename X2, typename X3, typename X4, typename X5,
5106 typename X6>
5107 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
5108 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5 ,
5109 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
5110 const P6& p6) {
5111 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
5112 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3 , A4, A5, A6),
5113 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5114 A4, A5, A6>>
5115 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5116 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
5117 }
5118 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5119
5120 #if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
5121 template <typename R, typename T, typename U, typename P1, typename P2,
5122 typename P3, typename P4, typename P5, typename P6, typename A1,
5123 typename A2, typename A3, typename A4, typename A5, typename A6,
5124 typename X1, typename X2, typename X3, typename X4, typename X5,
5125 typename X6>
5126 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
5127 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
5128 A3, A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
5129 const P5& p5, const P6& p6) {
5130 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
5131 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5132 A4, A5, A6),
5133 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5134 A4, A5, A6>>
5135 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5136 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
5137 }
5138
5139 template <typename R, typename P1, typename P2, typename P3, typename P4,
5140 typename P5, typename P6, typename A1, typename A2, typename A3,
5141 typename A4, typename A5, typename A6, typename X1, typename X2,
5142 typename X3, typename X4, typename X5, typename X6>
5143 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
5144 CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
5145 A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
5146 const P5& p5, const P6& p6) {
5147 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
5148 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5149 A4, A5, A6),
5150 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
5151 A2, A3, A4, A5, A6>>
5152 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5153 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
5154 }
5155 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5156 template <typename R, typename T, typename U, typename P1, typename P2,
5157 typename P3, typename P4, typename P5, typename P6, typename A1,
5158 typename A2, typename A3, typename A4, typename A5, typename A6,
5159 typename X1, typename X2, typename X3, typename X4, typename X5,
5160 typename X6>
5161 inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
5162 CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
5163 A3, A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
5164 const P5& p5, const P6& p6) {
5165 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
5166 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5167 A4, A5, A6),
5168 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5169 A4, A5, A6>>
5170 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5171 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
5172 }
5173 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5174 #endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
5175
5176 } // namespace testing 122 } // namespace testing
5177 123
5178 #endif // TESTING_GMOCK_MUTANT_H_ 124 #endif // TESTING_GMOCK_MUTANT_H_
OLDNEW
« no previous file with comments | « testing/generate_gmock_mutant.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698