blob: 90d303efec3b583c00ba29259ae7e03b2169c6eb [file] [log] [blame]
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001// Copyright (c) 2013 The Chromium Authors. All rights reserved.
stoyan@google.comce161d82009-10-27 09:05:00 +09002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09005// This file automatically generated by testing/generate_gmock_mutant.py.
6// DO NOT EDIT.
7
stoyan@google.comce161d82009-10-27 09:05:00 +09008#ifndef TESTING_GMOCK_MUTANT_H_
9#define TESTING_GMOCK_MUTANT_H_
10
11// 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
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//
stoyan@chromium.org81758fe2009-11-13 08:10:11 +090017// DispatchToMethod/Function supports two sets of arguments: pre-bound (P) and
stoyan@google.comce161d82009-10-27 09:05:00 +090018// call-time (C). The arguments as well as the return type are templatized.
stoyan@chromium.org81758fe2009-11-13 08:10:11 +090019// 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.
stoyan@google.comce161d82009-10-27 09:05:00 +090024//
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//
32//
33// Sample usage with gMock:
34//
35// struct Mock : public ObjectDelegate {
36// MOCK_METHOD2(string, OnRequest(int n, const string& request));
37// MOCK_METHOD1(void, OnQuit(int exit_code));
38// MOCK_METHOD2(void, LogMessage(int level, const string& message));
39//
40// string HandleFlowers(const string& reply, int n, const string& request) {
41// string result = SStringPrintf("In request of %d %s ", n, request);
42// for (int i = 0; i < n; ++i) result.append(reply)
43// return result;
44// }
45//
46// void DoLogMessage(int level, const string& message) {
47// }
48//
49// void QuitMessageLoop(int seconds) {
xhwang@chromium.org347194c2013-05-02 01:11:03 +090050// base::MessageLoop* loop = base::MessageLoop::current();
51// loop->PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(),
stoyan@google.comce161d82009-10-27 09:05:00 +090052// 1000 * seconds);
53// }
54// };
55//
56// Mock mock;
57// // Will invoke mock.HandleFlowers("orchids", n, request)
58// // "orchids" is a pre-bound argument, and <n> and <request> are call-time
59// // arguments - they are not known until the OnRequest mock is invoked.
60// EXPECT_CALL(mock, OnRequest(Ge(5), StartsWith("flower"))
61// .Times(1)
62// .WillOnce(Invoke(CreateFunctor(&mock, &Mock::HandleFlowers,
63// string("orchids"))));
64//
65//
66// // No pre-bound arguments, two call-time arguments passed
67// // directly to DoLogMessage
68// EXPECT_CALL(mock, OnLogMessage(_, _))
69// .Times(AnyNumber())
70// .WillAlways(Invoke(CreateFunctor, &mock, &Mock::DoLogMessage));
71//
72//
73// // In this case we have a single pre-bound argument - 3. We ignore
74// // all of the arguments of OnQuit.
75// EXCEPT_CALL(mock, OnQuit(_))
76// .Times(1)
77// .WillOnce(InvokeWithoutArgs(CreateFunctor(
78// &mock, &Mock::QuitMessageLoop, 3)));
79//
80// MessageLoop loop;
81// loop.Run();
82//
83//
84// // Here is another example of how we can set an action that invokes
85// // method of an object that is not yet created.
86// struct Mock : public ObjectDelegate {
87// MOCK_METHOD1(void, DemiurgeCreated(Demiurge*));
88// MOCK_METHOD2(void, OnRequest(int count, const string&));
89//
90// void StoreDemiurge(Demiurge* w) {
91// demiurge_ = w;
92// }
93//
94// Demiurge* demiurge;
95// }
96//
97// EXPECT_CALL(mock, DemiurgeCreated(_)).Times(1)
98// .WillOnce(Invoke(CreateFunctor(&mock, &Mock::StoreDemiurge)));
99//
100// EXPECT_CALL(mock, OnRequest(_, StrEq("Moby Dick")))
101// .Times(AnyNumber())
102// .WillAlways(WithArgs<0>(Invoke(
103// CreateFunctor(&mock->demiurge_, &Demiurge::DecreaseMonsters))));
104//
105
levin@chromium.org5c528682011-03-28 10:54:15 +0900106#include "base/memory/linked_ptr.h"
stoyan@google.comce161d82009-10-27 09:05:00 +0900107#include "base/tuple.h" // for Tuple
108
109namespace testing {
110
111// 0 - 0
112template <typename R, typename T, typename Method>
113inline R DispatchToMethod(T* obj, Method method,
114 const Tuple0& p,
115 const Tuple0& c) {
116 return (obj->*method)();
117}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900118template <typename R, typename Function>
119inline R DispatchToFunction(Function function,
120 const Tuple0& p,
121 const Tuple0& c) {
122 return (*function)();
123}
stoyan@google.comce161d82009-10-27 09:05:00 +0900124
125// 0 - 1
126template <typename R, typename T, typename Method, typename C1>
127inline R DispatchToMethod(T* obj, Method method,
128 const Tuple0& p,
129 const Tuple1<C1>& c) {
130 return (obj->*method)(c.a);
131}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900132template <typename R, typename Function, typename C1>
133inline R DispatchToFunction(Function function,
134 const Tuple0& p,
135 const Tuple1<C1>& c) {
136 return (*function)(c.a);
137}
stoyan@google.comce161d82009-10-27 09:05:00 +0900138
139// 0 - 2
140template <typename R, typename T, typename Method, typename C1, typename C2>
141inline R DispatchToMethod(T* obj, Method method,
142 const Tuple0& p,
143 const Tuple2<C1, C2>& c) {
144 return (obj->*method)(c.a, c.b);
145}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900146template <typename R, typename Function, typename C1, typename C2>
147inline R DispatchToFunction(Function function,
148 const Tuple0& p,
149 const Tuple2<C1, C2>& c) {
150 return (*function)(c.a, c.b);
151}
stoyan@google.comce161d82009-10-27 09:05:00 +0900152
153// 0 - 3
154template <typename R, typename T, typename Method, typename C1, typename C2,
155 typename C3>
156inline R DispatchToMethod(T* obj, Method method,
157 const Tuple0& p,
158 const Tuple3<C1, C2, C3>& c) {
159 return (obj->*method)(c.a, c.b, c.c);
160}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900161template <typename R, typename Function, typename C1, typename C2, typename C3>
162inline R DispatchToFunction(Function function,
163 const Tuple0& p,
164 const Tuple3<C1, C2, C3>& c) {
165 return (*function)(c.a, c.b, c.c);
166}
stoyan@google.comce161d82009-10-27 09:05:00 +0900167
168// 0 - 4
169template <typename R, typename T, typename Method, typename C1, typename C2,
170 typename C3, typename C4>
171inline R DispatchToMethod(T* obj, Method method,
172 const Tuple0& p,
173 const Tuple4<C1, C2, C3, C4>& c) {
174 return (obj->*method)(c.a, c.b, c.c, c.d);
175}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900176template <typename R, typename Function, typename C1, typename C2, typename C3,
177 typename C4>
178inline R DispatchToFunction(Function function,
179 const Tuple0& p,
180 const Tuple4<C1, C2, C3, C4>& c) {
181 return (*function)(c.a, c.b, c.c, c.d);
182}
stoyan@google.comce161d82009-10-27 09:05:00 +0900183
amit@chromium.orge025b842010-02-13 03:19:07 +0900184// 0 - 5
185template <typename R, typename T, typename Method, typename C1, typename C2,
186 typename C3, typename C4, typename C5>
187inline R DispatchToMethod(T* obj, Method method,
188 const Tuple0& p,
189 const Tuple5<C1, C2, C3, C4, C5>& c) {
190 return (obj->*method)(c.a, c.b, c.c, c.d, c.e);
191}
192template <typename R, typename Function, typename C1, typename C2, typename C3,
193 typename C4, typename C5>
194inline R DispatchToFunction(Function function,
195 const Tuple0& p,
196 const Tuple5<C1, C2, C3, C4, C5>& c) {
197 return (*function)(c.a, c.b, c.c, c.d, c.e);
198}
199
200// 0 - 6
201template <typename R, typename T, typename Method, typename C1, typename C2,
202 typename C3, typename C4, typename C5, typename C6>
203inline R DispatchToMethod(T* obj, Method method,
204 const Tuple0& p,
205 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
206 return (obj->*method)(c.a, c.b, c.c, c.d, c.e, c.f);
207}
208template <typename R, typename Function, typename C1, typename C2, typename C3,
209 typename C4, typename C5, typename C6>
210inline R DispatchToFunction(Function function,
211 const Tuple0& p,
212 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
213 return (*function)(c.a, c.b, c.c, c.d, c.e, c.f);
214}
215
stoyan@google.comce161d82009-10-27 09:05:00 +0900216// 1 - 0
217template <typename R, typename T, typename Method, typename P1>
218inline R DispatchToMethod(T* obj, Method method,
219 const Tuple1<P1>& p,
220 const Tuple0& c) {
221 return (obj->*method)(p.a);
222}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900223template <typename R, typename Function, typename P1>
224inline R DispatchToFunction(Function function,
225 const Tuple1<P1>& p,
226 const Tuple0& c) {
227 return (*function)(p.a);
228}
stoyan@google.comce161d82009-10-27 09:05:00 +0900229
230// 1 - 1
231template <typename R, typename T, typename Method, typename P1, typename C1>
232inline R DispatchToMethod(T* obj, Method method,
233 const Tuple1<P1>& p,
234 const Tuple1<C1>& c) {
235 return (obj->*method)(p.a, c.a);
236}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900237template <typename R, typename Function, typename P1, typename C1>
238inline R DispatchToFunction(Function function,
239 const Tuple1<P1>& p,
240 const Tuple1<C1>& c) {
241 return (*function)(p.a, c.a);
242}
stoyan@google.comce161d82009-10-27 09:05:00 +0900243
244// 1 - 2
245template <typename R, typename T, typename Method, typename P1, typename C1,
246 typename C2>
247inline R DispatchToMethod(T* obj, Method method,
248 const Tuple1<P1>& p,
249 const Tuple2<C1, C2>& c) {
250 return (obj->*method)(p.a, c.a, c.b);
251}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900252template <typename R, typename Function, typename P1, typename C1, typename C2>
253inline R DispatchToFunction(Function function,
254 const Tuple1<P1>& p,
255 const Tuple2<C1, C2>& c) {
256 return (*function)(p.a, c.a, c.b);
257}
stoyan@google.comce161d82009-10-27 09:05:00 +0900258
259// 1 - 3
260template <typename R, typename T, typename Method, typename P1, typename C1,
261 typename C2, typename C3>
262inline R DispatchToMethod(T* obj, Method method,
263 const Tuple1<P1>& p,
264 const Tuple3<C1, C2, C3>& c) {
265 return (obj->*method)(p.a, c.a, c.b, c.c);
266}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900267template <typename R, typename Function, typename P1, typename C1, typename C2,
268 typename C3>
269inline R DispatchToFunction(Function function,
270 const Tuple1<P1>& p,
271 const Tuple3<C1, C2, C3>& c) {
272 return (*function)(p.a, c.a, c.b, c.c);
273}
stoyan@google.comce161d82009-10-27 09:05:00 +0900274
275// 1 - 4
276template <typename R, typename T, typename Method, typename P1, typename C1,
277 typename C2, typename C3, typename C4>
278inline R DispatchToMethod(T* obj, Method method,
279 const Tuple1<P1>& p,
280 const Tuple4<C1, C2, C3, C4>& c) {
281 return (obj->*method)(p.a, c.a, c.b, c.c, c.d);
282}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900283template <typename R, typename Function, typename P1, typename C1, typename C2,
284 typename C3, typename C4>
285inline R DispatchToFunction(Function function,
286 const Tuple1<P1>& p,
287 const Tuple4<C1, C2, C3, C4>& c) {
288 return (*function)(p.a, c.a, c.b, c.c, c.d);
289}
stoyan@google.comce161d82009-10-27 09:05:00 +0900290
amit@chromium.orge025b842010-02-13 03:19:07 +0900291// 1 - 5
292template <typename R, typename T, typename Method, typename P1, typename C1,
293 typename C2, typename C3, typename C4, typename C5>
294inline R DispatchToMethod(T* obj, Method method,
295 const Tuple1<P1>& p,
296 const Tuple5<C1, C2, C3, C4, C5>& c) {
297 return (obj->*method)(p.a, c.a, c.b, c.c, c.d, c.e);
298}
299template <typename R, typename Function, typename P1, typename C1, typename C2,
300 typename C3, typename C4, typename C5>
301inline R DispatchToFunction(Function function,
302 const Tuple1<P1>& p,
303 const Tuple5<C1, C2, C3, C4, C5>& c) {
304 return (*function)(p.a, c.a, c.b, c.c, c.d, c.e);
305}
306
307// 1 - 6
308template <typename R, typename T, typename Method, typename P1, typename C1,
309 typename C2, typename C3, typename C4, typename C5, typename C6>
310inline R DispatchToMethod(T* obj, Method method,
311 const Tuple1<P1>& p,
312 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
313 return (obj->*method)(p.a, c.a, c.b, c.c, c.d, c.e, c.f);
314}
315template <typename R, typename Function, typename P1, typename C1, typename C2,
316 typename C3, typename C4, typename C5, typename C6>
317inline R DispatchToFunction(Function function,
318 const Tuple1<P1>& p,
319 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
320 return (*function)(p.a, c.a, c.b, c.c, c.d, c.e, c.f);
321}
322
stoyan@google.comce161d82009-10-27 09:05:00 +0900323// 2 - 0
324template <typename R, typename T, typename Method, typename P1, typename P2>
325inline R DispatchToMethod(T* obj, Method method,
326 const Tuple2<P1, P2>& p,
327 const Tuple0& c) {
328 return (obj->*method)(p.a, p.b);
329}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900330template <typename R, typename Function, typename P1, typename P2>
331inline R DispatchToFunction(Function function,
332 const Tuple2<P1, P2>& p,
333 const Tuple0& c) {
334 return (*function)(p.a, p.b);
335}
stoyan@google.comce161d82009-10-27 09:05:00 +0900336
337// 2 - 1
338template <typename R, typename T, typename Method, typename P1, typename P2,
339 typename C1>
340inline R DispatchToMethod(T* obj, Method method,
341 const Tuple2<P1, P2>& p,
342 const Tuple1<C1>& c) {
343 return (obj->*method)(p.a, p.b, c.a);
344}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900345template <typename R, typename Function, typename P1, typename P2, typename C1>
346inline R DispatchToFunction(Function function,
347 const Tuple2<P1, P2>& p,
348 const Tuple1<C1>& c) {
349 return (*function)(p.a, p.b, c.a);
350}
stoyan@google.comce161d82009-10-27 09:05:00 +0900351
352// 2 - 2
353template <typename R, typename T, typename Method, typename P1, typename P2,
354 typename C1, typename C2>
355inline R DispatchToMethod(T* obj, Method method,
356 const Tuple2<P1, P2>& p,
357 const Tuple2<C1, C2>& c) {
358 return (obj->*method)(p.a, p.b, c.a, c.b);
359}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900360template <typename R, typename Function, typename P1, typename P2, typename C1,
361 typename C2>
362inline R DispatchToFunction(Function function,
363 const Tuple2<P1, P2>& p,
364 const Tuple2<C1, C2>& c) {
365 return (*function)(p.a, p.b, c.a, c.b);
366}
stoyan@google.comce161d82009-10-27 09:05:00 +0900367
368// 2 - 3
369template <typename R, typename T, typename Method, typename P1, typename P2,
370 typename C1, typename C2, typename C3>
371inline R DispatchToMethod(T* obj, Method method,
372 const Tuple2<P1, P2>& p,
373 const Tuple3<C1, C2, C3>& c) {
374 return (obj->*method)(p.a, p.b, c.a, c.b, c.c);
375}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900376template <typename R, typename Function, typename P1, typename P2, typename C1,
377 typename C2, typename C3>
378inline R DispatchToFunction(Function function,
379 const Tuple2<P1, P2>& p,
380 const Tuple3<C1, C2, C3>& c) {
381 return (*function)(p.a, p.b, c.a, c.b, c.c);
382}
stoyan@google.comce161d82009-10-27 09:05:00 +0900383
384// 2 - 4
385template <typename R, typename T, typename Method, typename P1, typename P2,
386 typename C1, typename C2, typename C3, typename C4>
387inline R DispatchToMethod(T* obj, Method method,
388 const Tuple2<P1, P2>& p,
389 const Tuple4<C1, C2, C3, C4>& c) {
390 return (obj->*method)(p.a, p.b, c.a, c.b, c.c, c.d);
391}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900392template <typename R, typename Function, typename P1, typename P2, typename C1,
393 typename C2, typename C3, typename C4>
394inline R DispatchToFunction(Function function,
395 const Tuple2<P1, P2>& p,
396 const Tuple4<C1, C2, C3, C4>& c) {
397 return (*function)(p.a, p.b, c.a, c.b, c.c, c.d);
398}
stoyan@google.comce161d82009-10-27 09:05:00 +0900399
amit@chromium.orge025b842010-02-13 03:19:07 +0900400// 2 - 5
401template <typename R, typename T, typename Method, typename P1, typename P2,
402 typename C1, typename C2, typename C3, typename C4, typename C5>
403inline R DispatchToMethod(T* obj, Method method,
404 const Tuple2<P1, P2>& p,
405 const Tuple5<C1, C2, C3, C4, C5>& c) {
406 return (obj->*method)(p.a, p.b, c.a, c.b, c.c, c.d, c.e);
407}
408template <typename R, typename Function, typename P1, typename P2, typename C1,
409 typename C2, typename C3, typename C4, typename C5>
410inline R DispatchToFunction(Function function,
411 const Tuple2<P1, P2>& p,
412 const Tuple5<C1, C2, C3, C4, C5>& c) {
413 return (*function)(p.a, p.b, c.a, c.b, c.c, c.d, c.e);
414}
415
416// 2 - 6
417template <typename R, typename T, typename Method, typename P1, typename P2,
418 typename C1, typename C2, typename C3, typename C4, typename C5,
419 typename C6>
420inline R DispatchToMethod(T* obj, Method method,
421 const Tuple2<P1, P2>& p,
422 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
423 return (obj->*method)(p.a, p.b, c.a, c.b, c.c, c.d, c.e, c.f);
424}
425template <typename R, typename Function, typename P1, typename P2, typename C1,
426 typename C2, typename C3, typename C4, typename C5, typename C6>
427inline R DispatchToFunction(Function function,
428 const Tuple2<P1, P2>& p,
429 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
430 return (*function)(p.a, p.b, c.a, c.b, c.c, c.d, c.e, c.f);
431}
432
stoyan@google.comce161d82009-10-27 09:05:00 +0900433// 3 - 0
434template <typename R, typename T, typename Method, typename P1, typename P2,
435 typename P3>
436inline R DispatchToMethod(T* obj, Method method,
437 const Tuple3<P1, P2, P3>& p,
438 const Tuple0& c) {
439 return (obj->*method)(p.a, p.b, p.c);
440}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900441template <typename R, typename Function, typename P1, typename P2, typename P3>
442inline R DispatchToFunction(Function function,
443 const Tuple3<P1, P2, P3>& p,
444 const Tuple0& c) {
445 return (*function)(p.a, p.b, p.c);
446}
stoyan@google.comce161d82009-10-27 09:05:00 +0900447
448// 3 - 1
449template <typename R, typename T, typename Method, typename P1, typename P2,
450 typename P3, typename C1>
451inline R DispatchToMethod(T* obj, Method method,
452 const Tuple3<P1, P2, P3>& p,
453 const Tuple1<C1>& c) {
454 return (obj->*method)(p.a, p.b, p.c, c.a);
455}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900456template <typename R, typename Function, typename P1, typename P2, typename P3,
457 typename C1>
458inline R DispatchToFunction(Function function,
459 const Tuple3<P1, P2, P3>& p,
460 const Tuple1<C1>& c) {
461 return (*function)(p.a, p.b, p.c, c.a);
462}
stoyan@google.comce161d82009-10-27 09:05:00 +0900463
464// 3 - 2
465template <typename R, typename T, typename Method, typename P1, typename P2,
466 typename P3, typename C1, typename C2>
467inline R DispatchToMethod(T* obj, Method method,
468 const Tuple3<P1, P2, P3>& p,
469 const Tuple2<C1, C2>& c) {
470 return (obj->*method)(p.a, p.b, p.c, c.a, c.b);
471}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900472template <typename R, typename Function, typename P1, typename P2, typename P3,
473 typename C1, typename C2>
474inline R DispatchToFunction(Function function,
475 const Tuple3<P1, P2, P3>& p,
476 const Tuple2<C1, C2>& c) {
477 return (*function)(p.a, p.b, p.c, c.a, c.b);
478}
stoyan@google.comce161d82009-10-27 09:05:00 +0900479
480// 3 - 3
481template <typename R, typename T, typename Method, typename P1, typename P2,
482 typename P3, typename C1, typename C2, typename C3>
483inline R DispatchToMethod(T* obj, Method method,
484 const Tuple3<P1, P2, P3>& p,
485 const Tuple3<C1, C2, C3>& c) {
486 return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c);
487}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900488template <typename R, typename Function, typename P1, typename P2, typename P3,
489 typename C1, typename C2, typename C3>
490inline R DispatchToFunction(Function function,
491 const Tuple3<P1, P2, P3>& p,
492 const Tuple3<C1, C2, C3>& c) {
493 return (*function)(p.a, p.b, p.c, c.a, c.b, c.c);
494}
stoyan@google.comce161d82009-10-27 09:05:00 +0900495
496// 3 - 4
497template <typename R, typename T, typename Method, typename P1, typename P2,
498 typename P3, typename C1, typename C2, typename C3, typename C4>
499inline R DispatchToMethod(T* obj, Method method,
500 const Tuple3<P1, P2, P3>& p,
501 const Tuple4<C1, C2, C3, C4>& c) {
502 return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c, c.d);
503}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900504template <typename R, typename Function, typename P1, typename P2, typename P3,
505 typename C1, typename C2, typename C3, typename C4>
506inline R DispatchToFunction(Function function,
507 const Tuple3<P1, P2, P3>& p,
508 const Tuple4<C1, C2, C3, C4>& c) {
509 return (*function)(p.a, p.b, p.c, c.a, c.b, c.c, c.d);
510}
stoyan@google.comce161d82009-10-27 09:05:00 +0900511
amit@chromium.orge025b842010-02-13 03:19:07 +0900512// 3 - 5
513template <typename R, typename T, typename Method, typename P1, typename P2,
514 typename P3, typename C1, typename C2, typename C3, typename C4,
515 typename C5>
516inline R DispatchToMethod(T* obj, Method method,
517 const Tuple3<P1, P2, P3>& p,
518 const Tuple5<C1, C2, C3, C4, C5>& c) {
519 return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c, c.d, c.e);
520}
521template <typename R, typename Function, typename P1, typename P2, typename P3,
522 typename C1, typename C2, typename C3, typename C4, typename C5>
523inline R DispatchToFunction(Function function,
524 const Tuple3<P1, P2, P3>& p,
525 const Tuple5<C1, C2, C3, C4, C5>& c) {
526 return (*function)(p.a, p.b, p.c, c.a, c.b, c.c, c.d, c.e);
527}
528
529// 3 - 6
530template <typename R, typename T, typename Method, typename P1, typename P2,
531 typename P3, typename C1, typename C2, typename C3, typename C4,
532 typename C5, typename C6>
533inline R DispatchToMethod(T* obj, Method method,
534 const Tuple3<P1, P2, P3>& p,
535 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
536 return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c, c.d, c.e, c.f);
537}
538template <typename R, typename Function, typename P1, typename P2, typename P3,
539 typename C1, typename C2, typename C3, typename C4, typename C5,
540 typename C6>
541inline R DispatchToFunction(Function function,
542 const Tuple3<P1, P2, P3>& p,
543 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
544 return (*function)(p.a, p.b, p.c, c.a, c.b, c.c, c.d, c.e, c.f);
545}
546
stoyan@google.comce161d82009-10-27 09:05:00 +0900547// 4 - 0
548template <typename R, typename T, typename Method, typename P1, typename P2,
549 typename P3, typename P4>
550inline R DispatchToMethod(T* obj, Method method,
551 const Tuple4<P1, P2, P3, P4>& p,
552 const Tuple0& c) {
553 return (obj->*method)(p.a, p.b, p.c, p.d);
554}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900555template <typename R, typename Function, typename P1, typename P2, typename P3,
556 typename P4>
557inline R DispatchToFunction(Function function,
558 const Tuple4<P1, P2, P3, P4>& p,
559 const Tuple0& c) {
560 return (*function)(p.a, p.b, p.c, p.d);
561}
stoyan@google.comce161d82009-10-27 09:05:00 +0900562
563// 4 - 1
564template <typename R, typename T, typename Method, typename P1, typename P2,
565 typename P3, typename P4, typename C1>
566inline R DispatchToMethod(T* obj, Method method,
567 const Tuple4<P1, P2, P3, P4>& p,
568 const Tuple1<C1>& c) {
569 return (obj->*method)(p.a, p.b, p.c, p.d, c.a);
570}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900571template <typename R, typename Function, typename P1, typename P2, typename P3,
572 typename P4, typename C1>
573inline R DispatchToFunction(Function function,
574 const Tuple4<P1, P2, P3, P4>& p,
575 const Tuple1<C1>& c) {
576 return (*function)(p.a, p.b, p.c, p.d, c.a);
577}
stoyan@google.comce161d82009-10-27 09:05:00 +0900578
579// 4 - 2
580template <typename R, typename T, typename Method, typename P1, typename P2,
581 typename P3, typename P4, typename C1, typename C2>
582inline R DispatchToMethod(T* obj, Method method,
583 const Tuple4<P1, P2, P3, P4>& p,
584 const Tuple2<C1, C2>& c) {
585 return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b);
586}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900587template <typename R, typename Function, typename P1, typename P2, typename P3,
588 typename P4, typename C1, typename C2>
589inline R DispatchToFunction(Function function,
590 const Tuple4<P1, P2, P3, P4>& p,
591 const Tuple2<C1, C2>& c) {
592 return (*function)(p.a, p.b, p.c, p.d, c.a, c.b);
593}
stoyan@google.comce161d82009-10-27 09:05:00 +0900594
595// 4 - 3
596template <typename R, typename T, typename Method, typename P1, typename P2,
597 typename P3, typename P4, typename C1, typename C2, typename C3>
598inline R DispatchToMethod(T* obj, Method method,
599 const Tuple4<P1, P2, P3, P4>& p,
600 const Tuple3<C1, C2, C3>& c) {
601 return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c);
602}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900603template <typename R, typename Function, typename P1, typename P2, typename P3,
604 typename P4, typename C1, typename C2, typename C3>
605inline R DispatchToFunction(Function function,
606 const Tuple4<P1, P2, P3, P4>& p,
607 const Tuple3<C1, C2, C3>& c) {
608 return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c);
609}
stoyan@google.comce161d82009-10-27 09:05:00 +0900610
611// 4 - 4
612template <typename R, typename T, typename Method, typename P1, typename P2,
613 typename P3, typename P4, typename C1, typename C2, typename C3,
614 typename C4>
615inline R DispatchToMethod(T* obj, Method method,
616 const Tuple4<P1, P2, P3, P4>& p,
617 const Tuple4<C1, C2, C3, C4>& c) {
618 return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d);
619}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900620template <typename R, typename Function, typename P1, typename P2, typename P3,
621 typename P4, typename C1, typename C2, typename C3, typename C4>
622inline R DispatchToFunction(Function function,
623 const Tuple4<P1, P2, P3, P4>& p,
624 const Tuple4<C1, C2, C3, C4>& c) {
625 return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d);
626}
stoyan@google.comce161d82009-10-27 09:05:00 +0900627
amit@chromium.orge025b842010-02-13 03:19:07 +0900628// 4 - 5
629template <typename R, typename T, typename Method, typename P1, typename P2,
630 typename P3, typename P4, typename C1, typename C2, typename C3,
631 typename C4, typename C5>
632inline R DispatchToMethod(T* obj, Method method,
633 const Tuple4<P1, P2, P3, P4>& p,
634 const Tuple5<C1, C2, C3, C4, C5>& c) {
635 return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d, c.e);
636}
637template <typename R, typename Function, typename P1, typename P2, typename P3,
638 typename P4, typename C1, typename C2, typename C3, typename C4,
639 typename C5>
640inline R DispatchToFunction(Function function,
641 const Tuple4<P1, P2, P3, P4>& p,
642 const Tuple5<C1, C2, C3, C4, C5>& c) {
643 return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d, c.e);
644}
645
646// 4 - 6
647template <typename R, typename T, typename Method, typename P1, typename P2,
648 typename P3, typename P4, typename C1, typename C2, typename C3,
649 typename C4, typename C5, typename C6>
650inline R DispatchToMethod(T* obj, Method method,
651 const Tuple4<P1, P2, P3, P4>& p,
652 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
653 return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d, c.e, c.f);
654}
655template <typename R, typename Function, typename P1, typename P2, typename P3,
656 typename P4, typename C1, typename C2, typename C3, typename C4,
657 typename C5, typename C6>
658inline R DispatchToFunction(Function function,
659 const Tuple4<P1, P2, P3, P4>& p,
660 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
661 return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d, c.e, c.f);
662}
663
664// 5 - 0
665template <typename R, typename T, typename Method, typename P1, typename P2,
666 typename P3, typename P4, typename P5>
667inline R DispatchToMethod(T* obj, Method method,
668 const Tuple5<P1, P2, P3, P4, P5>& p,
669 const Tuple0& c) {
670 return (obj->*method)(p.a, p.b, p.c, p.d, p.e);
671}
672template <typename R, typename Function, typename P1, typename P2, typename P3,
673 typename P4, typename P5>
674inline R DispatchToFunction(Function function,
675 const Tuple5<P1, P2, P3, P4, P5>& p,
676 const Tuple0& c) {
677 return (*function)(p.a, p.b, p.c, p.d, p.e);
678}
679
680// 5 - 1
681template <typename R, typename T, typename Method, typename P1, typename P2,
682 typename P3, typename P4, typename P5, typename C1>
683inline R DispatchToMethod(T* obj, Method method,
684 const Tuple5<P1, P2, P3, P4, P5>& p,
685 const Tuple1<C1>& c) {
686 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a);
687}
688template <typename R, typename Function, typename P1, typename P2, typename P3,
689 typename P4, typename P5, typename C1>
690inline R DispatchToFunction(Function function,
691 const Tuple5<P1, P2, P3, P4, P5>& p,
692 const Tuple1<C1>& c) {
693 return (*function)(p.a, p.b, p.c, p.d, p.e, c.a);
694}
695
696// 5 - 2
697template <typename R, typename T, typename Method, typename P1, typename P2,
698 typename P3, typename P4, typename P5, typename C1, typename C2>
699inline R DispatchToMethod(T* obj, Method method,
700 const Tuple5<P1, P2, P3, P4, P5>& p,
701 const Tuple2<C1, C2>& c) {
702 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a, c.b);
703}
704template <typename R, typename Function, typename P1, typename P2, typename P3,
705 typename P4, typename P5, typename C1, typename C2>
706inline R DispatchToFunction(Function function,
707 const Tuple5<P1, P2, P3, P4, P5>& p,
708 const Tuple2<C1, C2>& c) {
709 return (*function)(p.a, p.b, p.c, p.d, p.e, c.a, c.b);
710}
711
712// 5 - 3
713template <typename R, typename T, typename Method, typename P1, typename P2,
714 typename P3, typename P4, typename P5, typename C1, typename C2,
715 typename C3>
716inline R DispatchToMethod(T* obj, Method method,
717 const Tuple5<P1, P2, P3, P4, P5>& p,
718 const Tuple3<C1, C2, C3>& c) {
719 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c);
720}
721template <typename R, typename Function, typename P1, typename P2, typename P3,
722 typename P4, typename P5, typename C1, typename C2, typename C3>
723inline R DispatchToFunction(Function function,
724 const Tuple5<P1, P2, P3, P4, P5>& p,
725 const Tuple3<C1, C2, C3>& c) {
726 return (*function)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c);
727}
728
729// 5 - 4
730template <typename R, typename T, typename Method, typename P1, typename P2,
731 typename P3, typename P4, typename P5, typename C1, typename C2,
732 typename C3, typename C4>
733inline R DispatchToMethod(T* obj, Method method,
734 const Tuple5<P1, P2, P3, P4, P5>& p,
735 const Tuple4<C1, C2, C3, C4>& c) {
736 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d);
737}
738template <typename R, typename Function, typename P1, typename P2, typename P3,
739 typename P4, typename P5, typename C1, typename C2, typename C3,
740 typename C4>
741inline R DispatchToFunction(Function function,
742 const Tuple5<P1, P2, P3, P4, P5>& p,
743 const Tuple4<C1, C2, C3, C4>& c) {
744 return (*function)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d);
745}
746
747// 5 - 5
748template <typename R, typename T, typename Method, typename P1, typename P2,
749 typename P3, typename P4, typename P5, typename C1, typename C2,
750 typename C3, typename C4, typename C5>
751inline R DispatchToMethod(T* obj, Method method,
752 const Tuple5<P1, P2, P3, P4, P5>& p,
753 const Tuple5<C1, C2, C3, C4, C5>& c) {
754 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d, c.e);
755}
756template <typename R, typename Function, typename P1, typename P2, typename P3,
757 typename P4, typename P5, typename C1, typename C2, typename C3,
758 typename C4, typename C5>
759inline R DispatchToFunction(Function function,
760 const Tuple5<P1, P2, P3, P4, P5>& p,
761 const Tuple5<C1, C2, C3, C4, C5>& c) {
762 return (*function)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d, c.e);
763}
764
765// 5 - 6
766template <typename R, typename T, typename Method, typename P1, typename P2,
767 typename P3, typename P4, typename P5, typename C1, typename C2,
768 typename C3, typename C4, typename C5, typename C6>
769inline R DispatchToMethod(T* obj, Method method,
770 const Tuple5<P1, P2, P3, P4, P5>& p,
771 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
772 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d, c.e, c.f);
773}
774template <typename R, typename Function, typename P1, typename P2, typename P3,
775 typename P4, typename P5, typename C1, typename C2, typename C3,
776 typename C4, typename C5, typename C6>
777inline R DispatchToFunction(Function function,
778 const Tuple5<P1, P2, P3, P4, P5>& p,
779 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
780 return (*function)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d, c.e, c.f);
781}
782
783// 6 - 0
784template <typename R, typename T, typename Method, typename P1, typename P2,
785 typename P3, typename P4, typename P5, typename P6>
786inline R DispatchToMethod(T* obj, Method method,
787 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
788 const Tuple0& c) {
789 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f);
790}
791template <typename R, typename Function, typename P1, typename P2, typename P3,
792 typename P4, typename P5, typename P6>
793inline R DispatchToFunction(Function function,
794 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
795 const Tuple0& c) {
796 return (*function)(p.a, p.b, p.c, p.d, p.e, p.f);
797}
798
799// 6 - 1
800template <typename R, typename T, typename Method, typename P1, typename P2,
801 typename P3, typename P4, typename P5, typename P6, typename C1>
802inline R DispatchToMethod(T* obj, Method method,
803 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
804 const Tuple1<C1>& c) {
805 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a);
806}
807template <typename R, typename Function, typename P1, typename P2, typename P3,
808 typename P4, typename P5, typename P6, typename C1>
809inline R DispatchToFunction(Function function,
810 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
811 const Tuple1<C1>& c) {
812 return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a);
813}
814
815// 6 - 2
816template <typename R, typename T, typename Method, typename P1, typename P2,
817 typename P3, typename P4, typename P5, typename P6, typename C1,
818 typename C2>
819inline R DispatchToMethod(T* obj, Method method,
820 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
821 const Tuple2<C1, C2>& c) {
822 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b);
823}
824template <typename R, typename Function, typename P1, typename P2, typename P3,
825 typename P4, typename P5, typename P6, typename C1, typename C2>
826inline R DispatchToFunction(Function function,
827 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
828 const Tuple2<C1, C2>& c) {
829 return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b);
830}
831
832// 6 - 3
833template <typename R, typename T, typename Method, typename P1, typename P2,
834 typename P3, typename P4, typename P5, typename P6, typename C1,
835 typename C2, typename C3>
836inline R DispatchToMethod(T* obj, Method method,
837 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
838 const Tuple3<C1, C2, C3>& c) {
839 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c);
840}
841template <typename R, typename Function, typename P1, typename P2, typename P3,
842 typename P4, typename P5, typename P6, typename C1, typename C2,
843 typename C3>
844inline R DispatchToFunction(Function function,
845 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
846 const Tuple3<C1, C2, C3>& c) {
847 return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c);
848}
849
850// 6 - 4
851template <typename R, typename T, typename Method, typename P1, typename P2,
852 typename P3, typename P4, typename P5, typename P6, typename C1,
853 typename C2, typename C3, typename C4>
854inline R DispatchToMethod(T* obj, Method method,
855 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
856 const Tuple4<C1, C2, C3, C4>& c) {
857 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d);
858}
859template <typename R, typename Function, typename P1, typename P2, typename P3,
860 typename P4, typename P5, typename P6, typename C1, typename C2,
861 typename C3, typename C4>
862inline R DispatchToFunction(Function function,
863 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
864 const Tuple4<C1, C2, C3, C4>& c) {
865 return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d);
866}
867
868// 6 - 5
869template <typename R, typename T, typename Method, typename P1, typename P2,
870 typename P3, typename P4, typename P5, typename P6, typename C1,
871 typename C2, typename C3, typename C4, typename C5>
872inline R DispatchToMethod(T* obj, Method method,
873 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
874 const Tuple5<C1, C2, C3, C4, C5>& c) {
875 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d, c.e);
876}
877template <typename R, typename Function, typename P1, typename P2, typename P3,
878 typename P4, typename P5, typename P6, typename C1, typename C2,
879 typename C3, typename C4, typename C5>
880inline R DispatchToFunction(Function function,
881 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
882 const Tuple5<C1, C2, C3, C4, C5>& c) {
883 return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d, c.e);
884}
885
886// 6 - 6
887template <typename R, typename T, typename Method, typename P1, typename P2,
888 typename P3, typename P4, typename P5, typename P6, typename C1,
889 typename C2, typename C3, typename C4, typename C5, typename C6>
890inline R DispatchToMethod(T* obj, Method method,
891 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
892 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
893 return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d, c.e, c.f);
894}
895template <typename R, typename Function, typename P1, typename P2, typename P3,
896 typename P4, typename P5, typename P6, typename C1, typename C2,
897 typename C3, typename C4, typename C5, typename C6>
898inline R DispatchToFunction(Function function,
899 const Tuple6<P1, P2, P3, P4, P5, P6>& p,
900 const Tuple6<C1, C2, C3, C4, C5, C6>& c) {
901 return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d, c.e, c.f);
902}
903
stoyan@google.comce161d82009-10-27 09:05:00 +0900904// Interface that is exposed to the consumer, that does the actual calling
905// of the method.
906template <typename R, typename Params>
907class MutantRunner {
908 public:
909 virtual R RunWithParams(const Params& params) = 0;
910 virtual ~MutantRunner() {}
911};
912
913// Mutant holds pre-bound arguments (like Task). Like Callback
914// allows call-time arguments. You bind a pointer to the object
915// at creation time.
916template <typename R, typename T, typename Method,
917 typename PreBound, typename Params>
918class Mutant : public MutantRunner<R, Params> {
919 public:
920 Mutant(T* obj, Method method, const PreBound& pb)
921 : obj_(obj), method_(method), pb_(pb) {
922 }
923
924 // MutantRunner implementation
925 virtual R RunWithParams(const Params& params) {
926 return DispatchToMethod<R>(this->obj_, this->method_, pb_, params);
927 }
928
929 T* obj_;
930 Method method_;
931 PreBound pb_;
932};
933
stoyan@chromium.org81758fe2009-11-13 08:10:11 +0900934template <typename R, typename Function, typename PreBound, typename Params>
935class MutantFunction : public MutantRunner<R, Params> {
936 public:
937 MutantFunction(Function function, const PreBound& pb)
938 : function_(function), pb_(pb) {
939 }
940
941 // MutantRunner implementation
942 virtual R RunWithParams(const Params& params) {
943 return DispatchToFunction<R>(function_, pb_, params);
944 }
945
946 Function function_;
947 PreBound pb_;
948};
949
stoyan@google.comce161d82009-10-27 09:05:00 +0900950#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
951// MutantLateBind is like Mutant, but you bind a pointer to a pointer
952// to the object. This way you can create actions for an object
953// that is not yet created (has only storage for a pointer to it).
954template <typename R, typename T, typename Method,
955 typename PreBound, typename Params>
956class MutantLateObjectBind : public MutantRunner<R, Params> {
957 public:
958 MutantLateObjectBind(T** obj, Method method, const PreBound& pb)
959 : obj_(obj), method_(method), pb_(pb) {
960 }
961
962 // MutantRunner implementation.
963 virtual R RunWithParams(const Params& params) {
964 EXPECT_THAT(*this->obj_, testing::NotNull());
965 if (NULL == *this->obj_)
966 return R();
967 return DispatchToMethod<R>( *this->obj_, this->method_, pb_, params);
968 }
969
970 T** obj_;
971 Method method_;
972 PreBound pb_;
973};
974#endif
975
976// Simple MutantRunner<> wrapper acting as a functor.
977// Redirects operator() to MutantRunner<Params>::Run()
978template <typename R, typename Params>
979struct MutantFunctor {
980 explicit MutantFunctor(MutantRunner<R, Params>* cb) : impl_(cb) {
981 }
982
983 ~MutantFunctor() {
984 }
985
986 inline R operator()() {
987 return impl_->RunWithParams(Tuple0());
988 }
989
990 template <typename Arg1>
991 inline R operator()(const Arg1& a) {
992 return impl_->RunWithParams(Params(a));
993 }
994
995 template <typename Arg1, typename Arg2>
996 inline R operator()(const Arg1& a, const Arg2& b) {
997 return impl_->RunWithParams(Params(a, b));
998 }
999
1000 template <typename Arg1, typename Arg2, typename Arg3>
1001 inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c) {
1002 return impl_->RunWithParams(Params(a, b, c));
1003 }
1004
1005 template <typename Arg1, typename Arg2, typename Arg3, typename Arg4>
1006 inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c,
1007 const Arg4& d) {
1008 return impl_->RunWithParams(Params(a, b, c, d));
1009 }
1010
1011 private:
1012 // We need copy constructor since MutantFunctor is copied few times
1013 // inside GMock machinery, hence no DISALLOW_EVIL_CONTRUCTORS
1014 MutantFunctor();
1015 linked_ptr<MutantRunner<R, Params> > impl_;
1016};
1017
stoyan@google.comce161d82009-10-27 09:05:00 +09001018// 0 - 0
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001019template <typename R, typename T, typename U>
stoyan@google.comce161d82009-10-27 09:05:00 +09001020inline MutantFunctor<R, Tuple0>
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001021CreateFunctor(T* obj, R (U::*method)()) {
1022 MutantRunner<R, Tuple0>* t =
1023 new Mutant<R, T, R (U::*)(),
stoyan@google.comce161d82009-10-27 09:05:00 +09001024 Tuple0, Tuple0>
1025 (obj, method, MakeTuple());
1026 return MutantFunctor<R, Tuple0>(t);
1027}
1028
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001029template <typename R>
stoyan@google.comce161d82009-10-27 09:05:00 +09001030inline MutantFunctor<R, Tuple0>
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001031CreateFunctor(R (*function)()) {
1032 MutantRunner<R, Tuple0>* t =
1033 new MutantFunction<R, R (*)(),
1034 Tuple0, Tuple0>
1035 (function, MakeTuple());
1036 return MutantFunctor<R, Tuple0>(t);
1037}
1038
1039#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1040template <typename R, typename T, typename U>
1041inline MutantFunctor<R, Tuple0>
1042CreateFunctor(T** obj, R (U::*method)()) {
1043 MutantRunner<R, Tuple0>* t =
1044 new MutantLateObjectBind<R, T, R (U::*)(),
stoyan@google.comce161d82009-10-27 09:05:00 +09001045 Tuple0, Tuple0>
1046 (obj, method, MakeTuple());
1047 return MutantFunctor<R, Tuple0>(t);
1048}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001049#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1050
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001051#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001052template <typename R, typename T, typename U>
1053inline MutantFunctor<R, Tuple0>
1054CreateFunctor(T* obj, R (__stdcall U::*method)()) {
1055 MutantRunner<R, Tuple0>* t =
1056 new Mutant<R, T, R (__stdcall U::*)(),
1057 Tuple0, Tuple0>
1058 (obj, method, MakeTuple());
1059 return MutantFunctor<R, Tuple0>(t);
1060}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09001061
1062template <typename R>
1063inline MutantFunctor<R, Tuple0>
1064CreateFunctor(R (__stdcall *function)()) {
1065 MutantRunner<R, Tuple0>* t =
1066 new MutantFunction<R, R (__stdcall *)(),
1067 Tuple0, Tuple0>
1068 (function, MakeTuple());
1069 return MutantFunctor<R, Tuple0>(t);
1070}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09001071#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1072template <typename R, typename T, typename U>
1073inline MutantFunctor<R, Tuple0>
1074CreateFunctor(T** obj, R (__stdcall U::*method)()) {
1075 MutantRunner<R, Tuple0>* t =
1076 new MutantLateObjectBind<R, T, R (__stdcall U::*)(),
1077 Tuple0, Tuple0>
1078 (obj, method, MakeTuple());
1079 return MutantFunctor<R, Tuple0>(t);
1080}
1081#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001082#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09001083
1084// 0 - 1
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001085template <typename R, typename T, typename U, typename A1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001086inline MutantFunctor<R, Tuple1<A1> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001087CreateFunctor(T* obj, R (U::*method)(A1)) {
1088 MutantRunner<R, Tuple1<A1> >* t =
1089 new Mutant<R, T, R (U::*)(A1),
stoyan@google.comce161d82009-10-27 09:05:00 +09001090 Tuple0, Tuple1<A1> >
1091 (obj, method, MakeTuple());
1092 return MutantFunctor<R, Tuple1<A1> >(t);
1093}
1094
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001095template <typename R, typename A1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001096inline MutantFunctor<R, Tuple1<A1> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001097CreateFunctor(R (*function)(A1)) {
1098 MutantRunner<R, Tuple1<A1> >* t =
1099 new MutantFunction<R, R (*)(A1),
1100 Tuple0, Tuple1<A1> >
1101 (function, MakeTuple());
1102 return MutantFunctor<R, Tuple1<A1> >(t);
1103}
1104
1105#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1106template <typename R, typename T, typename U, typename A1>
1107inline MutantFunctor<R, Tuple1<A1> >
1108CreateFunctor(T** obj, R (U::*method)(A1)) {
1109 MutantRunner<R, Tuple1<A1> >* t =
1110 new MutantLateObjectBind<R, T, R (U::*)(A1),
stoyan@google.comce161d82009-10-27 09:05:00 +09001111 Tuple0, Tuple1<A1> >
1112 (obj, method, MakeTuple());
1113 return MutantFunctor<R, Tuple1<A1> >(t);
1114}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001115#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1116
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001117#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001118template <typename R, typename T, typename U, typename A1>
1119inline MutantFunctor<R, Tuple1<A1> >
1120CreateFunctor(T* obj, R (__stdcall U::*method)(A1)) {
1121 MutantRunner<R, Tuple1<A1> >* t =
1122 new Mutant<R, T, R (__stdcall U::*)(A1),
1123 Tuple0, Tuple1<A1> >
1124 (obj, method, MakeTuple());
1125 return MutantFunctor<R, Tuple1<A1> >(t);
1126}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09001127
1128template <typename R, typename A1>
1129inline MutantFunctor<R, Tuple1<A1> >
1130CreateFunctor(R (__stdcall *function)(A1)) {
1131 MutantRunner<R, Tuple1<A1> >* t =
1132 new MutantFunction<R, R (__stdcall *)(A1),
1133 Tuple0, Tuple1<A1> >
1134 (function, MakeTuple());
1135 return MutantFunctor<R, Tuple1<A1> >(t);
1136}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09001137#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1138template <typename R, typename T, typename U, typename A1>
1139inline MutantFunctor<R, Tuple1<A1> >
1140CreateFunctor(T** obj, R (__stdcall U::*method)(A1)) {
1141 MutantRunner<R, Tuple1<A1> >* t =
1142 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1),
1143 Tuple0, Tuple1<A1> >
1144 (obj, method, MakeTuple());
1145 return MutantFunctor<R, Tuple1<A1> >(t);
1146}
1147#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001148#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09001149
1150// 0 - 2
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001151template <typename R, typename T, typename U, typename A1, typename A2>
stoyan@google.comce161d82009-10-27 09:05:00 +09001152inline MutantFunctor<R, Tuple2<A1, A2> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001153CreateFunctor(T* obj, R (U::*method)(A1, A2)) {
1154 MutantRunner<R, Tuple2<A1, A2> >* t =
1155 new Mutant<R, T, R (U::*)(A1, A2),
stoyan@google.comce161d82009-10-27 09:05:00 +09001156 Tuple0, Tuple2<A1, A2> >
1157 (obj, method, MakeTuple());
1158 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1159}
1160
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001161template <typename R, typename A1, typename A2>
stoyan@google.comce161d82009-10-27 09:05:00 +09001162inline MutantFunctor<R, Tuple2<A1, A2> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001163CreateFunctor(R (*function)(A1, A2)) {
1164 MutantRunner<R, Tuple2<A1, A2> >* t =
1165 new MutantFunction<R, R (*)(A1, A2),
1166 Tuple0, Tuple2<A1, A2> >
1167 (function, MakeTuple());
1168 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1169}
1170
1171#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1172template <typename R, typename T, typename U, typename A1, typename A2>
1173inline MutantFunctor<R, Tuple2<A1, A2> >
1174CreateFunctor(T** obj, R (U::*method)(A1, A2)) {
1175 MutantRunner<R, Tuple2<A1, A2> >* t =
1176 new MutantLateObjectBind<R, T, R (U::*)(A1, A2),
stoyan@google.comce161d82009-10-27 09:05:00 +09001177 Tuple0, Tuple2<A1, A2> >
1178 (obj, method, MakeTuple());
1179 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1180}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001181#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1182
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001183#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001184template <typename R, typename T, typename U, typename A1, typename A2>
1185inline MutantFunctor<R, Tuple2<A1, A2> >
1186CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2)) {
1187 MutantRunner<R, Tuple2<A1, A2> >* t =
1188 new Mutant<R, T, R (__stdcall U::*)(A1, A2),
1189 Tuple0, Tuple2<A1, A2> >
1190 (obj, method, MakeTuple());
1191 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1192}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09001193
1194template <typename R, typename A1, typename A2>
1195inline MutantFunctor<R, Tuple2<A1, A2> >
1196CreateFunctor(R (__stdcall *function)(A1, A2)) {
1197 MutantRunner<R, Tuple2<A1, A2> >* t =
1198 new MutantFunction<R, R (__stdcall *)(A1, A2),
1199 Tuple0, Tuple2<A1, A2> >
1200 (function, MakeTuple());
1201 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1202}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09001203#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1204template <typename R, typename T, typename U, typename A1, typename A2>
1205inline MutantFunctor<R, Tuple2<A1, A2> >
1206CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2)) {
1207 MutantRunner<R, Tuple2<A1, A2> >* t =
1208 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2),
1209 Tuple0, Tuple2<A1, A2> >
1210 (obj, method, MakeTuple());
1211 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1212}
1213#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001214#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09001215
1216// 0 - 3
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001217template <typename R, typename T, typename U, typename A1, typename A2,
1218 typename A3>
stoyan@google.comce161d82009-10-27 09:05:00 +09001219inline MutantFunctor<R, Tuple3<A1, A2, A3> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001220CreateFunctor(T* obj, R (U::*method)(A1, A2, A3)) {
1221 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1222 new Mutant<R, T, R (U::*)(A1, A2, A3),
stoyan@google.comce161d82009-10-27 09:05:00 +09001223 Tuple0, Tuple3<A1, A2, A3> >
1224 (obj, method, MakeTuple());
1225 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1226}
1227
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001228template <typename R, typename A1, typename A2, typename A3>
stoyan@google.comce161d82009-10-27 09:05:00 +09001229inline MutantFunctor<R, Tuple3<A1, A2, A3> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001230CreateFunctor(R (*function)(A1, A2, A3)) {
1231 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1232 new MutantFunction<R, R (*)(A1, A2, A3),
1233 Tuple0, Tuple3<A1, A2, A3> >
1234 (function, MakeTuple());
1235 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1236}
1237
1238#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1239template <typename R, typename T, typename U, typename A1, typename A2,
1240 typename A3>
1241inline MutantFunctor<R, Tuple3<A1, A2, A3> >
1242CreateFunctor(T** obj, R (U::*method)(A1, A2, A3)) {
1243 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1244 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3),
stoyan@google.comce161d82009-10-27 09:05:00 +09001245 Tuple0, Tuple3<A1, A2, A3> >
1246 (obj, method, MakeTuple());
1247 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1248}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001249#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1250
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001251#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001252template <typename R, typename T, typename U, typename A1, typename A2,
1253 typename A3>
1254inline MutantFunctor<R, Tuple3<A1, A2, A3> >
1255CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3)) {
1256 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1257 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3),
1258 Tuple0, Tuple3<A1, A2, A3> >
1259 (obj, method, MakeTuple());
1260 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1261}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09001262
1263template <typename R, typename A1, typename A2, typename A3>
1264inline MutantFunctor<R, Tuple3<A1, A2, A3> >
1265CreateFunctor(R (__stdcall *function)(A1, A2, A3)) {
1266 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1267 new MutantFunction<R, R (__stdcall *)(A1, A2, A3),
1268 Tuple0, Tuple3<A1, A2, A3> >
1269 (function, MakeTuple());
1270 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1271}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09001272#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1273template <typename R, typename T, typename U, typename A1, typename A2,
1274 typename A3>
1275inline MutantFunctor<R, Tuple3<A1, A2, A3> >
1276CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3)) {
1277 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1278 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3),
1279 Tuple0, Tuple3<A1, A2, A3> >
1280 (obj, method, MakeTuple());
1281 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1282}
1283#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001284#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09001285
1286// 0 - 4
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001287template <typename R, typename T, typename U, typename A1, typename A2,
1288 typename A3, typename A4>
stoyan@google.comce161d82009-10-27 09:05:00 +09001289inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001290CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4)) {
1291 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1292 new Mutant<R, T, R (U::*)(A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09001293 Tuple0, Tuple4<A1, A2, A3, A4> >
1294 (obj, method, MakeTuple());
1295 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1296}
1297
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001298template <typename R, typename A1, typename A2, typename A3, typename A4>
stoyan@google.comce161d82009-10-27 09:05:00 +09001299inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001300CreateFunctor(R (*function)(A1, A2, A3, A4)) {
1301 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1302 new MutantFunction<R, R (*)(A1, A2, A3, A4),
1303 Tuple0, Tuple4<A1, A2, A3, A4> >
1304 (function, MakeTuple());
1305 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1306}
1307
1308#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1309template <typename R, typename T, typename U, typename A1, typename A2,
1310 typename A3, typename A4>
1311inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
1312CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4)) {
1313 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1314 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09001315 Tuple0, Tuple4<A1, A2, A3, A4> >
1316 (obj, method, MakeTuple());
1317 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1318}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001319#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1320
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001321#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001322template <typename R, typename T, typename U, typename A1, typename A2,
1323 typename A3, typename A4>
1324inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
1325CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4)) {
1326 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1327 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3, A4),
1328 Tuple0, Tuple4<A1, A2, A3, A4> >
1329 (obj, method, MakeTuple());
1330 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1331}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09001332
1333template <typename R, typename A1, typename A2, typename A3, typename A4>
1334inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
1335CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4)) {
1336 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1337 new MutantFunction<R, R (__stdcall *)(A1, A2, A3, A4),
1338 Tuple0, Tuple4<A1, A2, A3, A4> >
1339 (function, MakeTuple());
1340 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1341}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09001342#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1343template <typename R, typename T, typename U, typename A1, typename A2,
1344 typename A3, typename A4>
1345inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
1346CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4)) {
1347 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1348 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3, A4),
1349 Tuple0, Tuple4<A1, A2, A3, A4> >
1350 (obj, method, MakeTuple());
1351 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1352}
1353#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001354#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09001355
amit@chromium.orge025b842010-02-13 03:19:07 +09001356// 0 - 5
1357template <typename R, typename T, typename U, typename A1, typename A2,
1358 typename A3, typename A4, typename A5>
1359inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1360CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4, A5)) {
1361 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1362 new Mutant<R, T, R (U::*)(A1, A2, A3, A4, A5),
1363 Tuple0, Tuple5<A1, A2, A3, A4, A5> >
1364 (obj, method, MakeTuple());
1365 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1366}
1367
1368template <typename R, typename A1, typename A2, typename A3, typename A4,
1369 typename A5>
1370inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1371CreateFunctor(R (*function)(A1, A2, A3, A4, A5)) {
1372 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1373 new MutantFunction<R, R (*)(A1, A2, A3, A4, A5),
1374 Tuple0, Tuple5<A1, A2, A3, A4, A5> >
1375 (function, MakeTuple());
1376 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1377}
1378
1379#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1380template <typename R, typename T, typename U, typename A1, typename A2,
1381 typename A3, typename A4, typename A5>
1382inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1383CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4, A5)) {
1384 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1385 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3, A4, A5),
1386 Tuple0, Tuple5<A1, A2, A3, A4, A5> >
1387 (obj, method, MakeTuple());
1388 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1389}
1390#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1391
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001392#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09001393template <typename R, typename T, typename U, typename A1, typename A2,
1394 typename A3, typename A4, typename A5>
1395inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1396CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5)) {
1397 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1398 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5),
1399 Tuple0, Tuple5<A1, A2, A3, A4, A5> >
1400 (obj, method, MakeTuple());
1401 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1402}
1403
1404template <typename R, typename A1, typename A2, typename A3, typename A4,
1405 typename A5>
1406inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1407CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4, A5)) {
1408 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1409 new MutantFunction<R, R (__stdcall *)(A1, A2, A3, A4, A5),
1410 Tuple0, Tuple5<A1, A2, A3, A4, A5> >
1411 (function, MakeTuple());
1412 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1413}
1414#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1415template <typename R, typename T, typename U, typename A1, typename A2,
1416 typename A3, typename A4, typename A5>
1417inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1418CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5)) {
1419 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1420 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5),
1421 Tuple0, Tuple5<A1, A2, A3, A4, A5> >
1422 (obj, method, MakeTuple());
1423 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1424}
1425#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001426#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09001427
1428// 0 - 6
1429template <typename R, typename T, typename U, typename A1, typename A2,
1430 typename A3, typename A4, typename A5, typename A6>
1431inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1432CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4, A5, A6)) {
1433 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1434 new Mutant<R, T, R (U::*)(A1, A2, A3, A4, A5, A6),
1435 Tuple0, Tuple6<A1, A2, A3, A4, A5, A6> >
1436 (obj, method, MakeTuple());
1437 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
1438}
1439
1440template <typename R, typename A1, typename A2, typename A3, typename A4,
1441 typename A5, typename A6>
1442inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1443CreateFunctor(R (*function)(A1, A2, A3, A4, A5, A6)) {
1444 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1445 new MutantFunction<R, R (*)(A1, A2, A3, A4, A5, A6),
1446 Tuple0, Tuple6<A1, A2, A3, A4, A5, A6> >
1447 (function, MakeTuple());
1448 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
1449}
1450
1451#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1452template <typename R, typename T, typename U, typename A1, typename A2,
1453 typename A3, typename A4, typename A5, typename A6>
1454inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1455CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4, A5, A6)) {
1456 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1457 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3, A4, A5, A6),
1458 Tuple0, Tuple6<A1, A2, A3, A4, A5, A6> >
1459 (obj, method, MakeTuple());
1460 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
1461}
1462#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1463
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001464#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09001465template <typename R, typename T, typename U, typename A1, typename A2,
1466 typename A3, typename A4, typename A5, typename A6>
1467inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1468CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5, A6)) {
1469 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1470 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5, A6),
1471 Tuple0, Tuple6<A1, A2, A3, A4, A5, A6> >
1472 (obj, method, MakeTuple());
1473 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
1474}
1475
1476template <typename R, typename A1, typename A2, typename A3, typename A4,
1477 typename A5, typename A6>
1478inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1479CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4, A5, A6)) {
1480 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1481 new MutantFunction<R, R (__stdcall *)(A1, A2, A3, A4, A5, A6),
1482 Tuple0, Tuple6<A1, A2, A3, A4, A5, A6> >
1483 (function, MakeTuple());
1484 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
1485}
1486#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1487template <typename R, typename T, typename U, typename A1, typename A2,
1488 typename A3, typename A4, typename A5, typename A6>
1489inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1490CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5, A6)) {
1491 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1492 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5, A6),
1493 Tuple0, Tuple6<A1, A2, A3, A4, A5, A6> >
1494 (obj, method, MakeTuple());
1495 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
1496}
1497#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001498#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09001499
stoyan@google.comce161d82009-10-27 09:05:00 +09001500// 1 - 0
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001501template <typename R, typename T, typename U, typename P1, typename X1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001502inline MutantFunctor<R, Tuple0>
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001503CreateFunctor(T* obj, R (U::*method)(X1), const P1& p1) {
1504 MutantRunner<R, Tuple0>* t =
1505 new Mutant<R, T, R (U::*)(X1),
stoyan@google.comce161d82009-10-27 09:05:00 +09001506 Tuple1<P1>, Tuple0>
1507 (obj, method, MakeTuple(p1));
1508 return MutantFunctor<R, Tuple0>(t);
1509}
1510
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001511template <typename R, typename P1, typename X1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001512inline MutantFunctor<R, Tuple0>
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001513CreateFunctor(R (*function)(X1), const P1& p1) {
1514 MutantRunner<R, Tuple0>* t =
1515 new MutantFunction<R, R (*)(X1),
1516 Tuple1<P1>, Tuple0>
1517 (function, MakeTuple(p1));
1518 return MutantFunctor<R, Tuple0>(t);
1519}
1520
1521#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1522template <typename R, typename T, typename U, typename P1, typename X1>
1523inline MutantFunctor<R, Tuple0>
1524CreateFunctor(T** obj, R (U::*method)(X1), const P1& p1) {
1525 MutantRunner<R, Tuple0>* t =
1526 new MutantLateObjectBind<R, T, R (U::*)(X1),
stoyan@google.comce161d82009-10-27 09:05:00 +09001527 Tuple1<P1>, Tuple0>
1528 (obj, method, MakeTuple(p1));
1529 return MutantFunctor<R, Tuple0>(t);
1530}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001531#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1532
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001533#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001534template <typename R, typename T, typename U, typename P1, typename X1>
1535inline MutantFunctor<R, Tuple0>
1536CreateFunctor(T* obj, R (__stdcall U::*method)(X1), const P1& p1) {
1537 MutantRunner<R, Tuple0>* t =
1538 new Mutant<R, T, R (__stdcall U::*)(X1),
1539 Tuple1<P1>, Tuple0>
1540 (obj, method, MakeTuple(p1));
1541 return MutantFunctor<R, Tuple0>(t);
1542}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09001543
1544template <typename R, typename P1, typename X1>
1545inline MutantFunctor<R, Tuple0>
1546CreateFunctor(R (__stdcall *function)(X1), const P1& p1) {
1547 MutantRunner<R, Tuple0>* t =
1548 new MutantFunction<R, R (__stdcall *)(X1),
1549 Tuple1<P1>, Tuple0>
1550 (function, MakeTuple(p1));
1551 return MutantFunctor<R, Tuple0>(t);
1552}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09001553#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1554template <typename R, typename T, typename U, typename P1, typename X1>
1555inline MutantFunctor<R, Tuple0>
1556CreateFunctor(T** obj, R (__stdcall U::*method)(X1), const P1& p1) {
1557 MutantRunner<R, Tuple0>* t =
1558 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1),
1559 Tuple1<P1>, Tuple0>
1560 (obj, method, MakeTuple(p1));
1561 return MutantFunctor<R, Tuple0>(t);
1562}
1563#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001564#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09001565
1566// 1 - 1
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001567template <typename R, typename T, typename U, typename P1, typename A1,
1568 typename X1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001569inline MutantFunctor<R, Tuple1<A1> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001570CreateFunctor(T* obj, R (U::*method)(X1, A1), const P1& p1) {
1571 MutantRunner<R, Tuple1<A1> >* t =
1572 new Mutant<R, T, R (U::*)(X1, A1),
stoyan@google.comce161d82009-10-27 09:05:00 +09001573 Tuple1<P1>, Tuple1<A1> >
1574 (obj, method, MakeTuple(p1));
1575 return MutantFunctor<R, Tuple1<A1> >(t);
1576}
1577
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001578template <typename R, typename P1, typename A1, typename X1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001579inline MutantFunctor<R, Tuple1<A1> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001580CreateFunctor(R (*function)(X1, A1), const P1& p1) {
1581 MutantRunner<R, Tuple1<A1> >* t =
1582 new MutantFunction<R, R (*)(X1, A1),
1583 Tuple1<P1>, Tuple1<A1> >
1584 (function, MakeTuple(p1));
1585 return MutantFunctor<R, Tuple1<A1> >(t);
1586}
1587
1588#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1589template <typename R, typename T, typename U, typename P1, typename A1,
1590 typename X1>
1591inline MutantFunctor<R, Tuple1<A1> >
1592CreateFunctor(T** obj, R (U::*method)(X1, A1), const P1& p1) {
1593 MutantRunner<R, Tuple1<A1> >* t =
1594 new MutantLateObjectBind<R, T, R (U::*)(X1, A1),
stoyan@google.comce161d82009-10-27 09:05:00 +09001595 Tuple1<P1>, Tuple1<A1> >
1596 (obj, method, MakeTuple(p1));
1597 return MutantFunctor<R, Tuple1<A1> >(t);
1598}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001599#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1600
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001601#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001602template <typename R, typename T, typename U, typename P1, typename A1,
1603 typename X1>
1604inline MutantFunctor<R, Tuple1<A1> >
1605CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1), const P1& p1) {
1606 MutantRunner<R, Tuple1<A1> >* t =
1607 new Mutant<R, T, R (__stdcall U::*)(X1, A1),
1608 Tuple1<P1>, Tuple1<A1> >
1609 (obj, method, MakeTuple(p1));
1610 return MutantFunctor<R, Tuple1<A1> >(t);
1611}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09001612
1613template <typename R, typename P1, typename A1, typename X1>
1614inline MutantFunctor<R, Tuple1<A1> >
1615CreateFunctor(R (__stdcall *function)(X1, A1), const P1& p1) {
1616 MutantRunner<R, Tuple1<A1> >* t =
1617 new MutantFunction<R, R (__stdcall *)(X1, A1),
1618 Tuple1<P1>, Tuple1<A1> >
1619 (function, MakeTuple(p1));
1620 return MutantFunctor<R, Tuple1<A1> >(t);
1621}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09001622#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1623template <typename R, typename T, typename U, typename P1, typename A1,
1624 typename X1>
1625inline MutantFunctor<R, Tuple1<A1> >
1626CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1), const P1& p1) {
1627 MutantRunner<R, Tuple1<A1> >* t =
1628 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1),
1629 Tuple1<P1>, Tuple1<A1> >
1630 (obj, method, MakeTuple(p1));
1631 return MutantFunctor<R, Tuple1<A1> >(t);
1632}
1633#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001634#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09001635
1636// 1 - 2
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001637template <typename R, typename T, typename U, typename P1, typename A1,
1638 typename A2, typename X1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001639inline MutantFunctor<R, Tuple2<A1, A2> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001640CreateFunctor(T* obj, R (U::*method)(X1, A1, A2), const P1& p1) {
1641 MutantRunner<R, Tuple2<A1, A2> >* t =
1642 new Mutant<R, T, R (U::*)(X1, A1, A2),
stoyan@google.comce161d82009-10-27 09:05:00 +09001643 Tuple1<P1>, Tuple2<A1, A2> >
1644 (obj, method, MakeTuple(p1));
1645 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1646}
1647
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001648template <typename R, typename P1, typename A1, typename A2, typename X1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001649inline MutantFunctor<R, Tuple2<A1, A2> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001650CreateFunctor(R (*function)(X1, A1, A2), const P1& p1) {
1651 MutantRunner<R, Tuple2<A1, A2> >* t =
1652 new MutantFunction<R, R (*)(X1, A1, A2),
1653 Tuple1<P1>, Tuple2<A1, A2> >
1654 (function, MakeTuple(p1));
1655 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1656}
1657
1658#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1659template <typename R, typename T, typename U, typename P1, typename A1,
1660 typename A2, typename X1>
1661inline MutantFunctor<R, Tuple2<A1, A2> >
1662CreateFunctor(T** obj, R (U::*method)(X1, A1, A2), const P1& p1) {
1663 MutantRunner<R, Tuple2<A1, A2> >* t =
1664 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2),
stoyan@google.comce161d82009-10-27 09:05:00 +09001665 Tuple1<P1>, Tuple2<A1, A2> >
1666 (obj, method, MakeTuple(p1));
1667 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1668}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001669#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1670
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001671#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001672template <typename R, typename T, typename U, typename P1, typename A1,
1673 typename A2, typename X1>
1674inline MutantFunctor<R, Tuple2<A1, A2> >
1675CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) {
1676 MutantRunner<R, Tuple2<A1, A2> >* t =
1677 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2),
1678 Tuple1<P1>, Tuple2<A1, A2> >
1679 (obj, method, MakeTuple(p1));
1680 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1681}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09001682
1683template <typename R, typename P1, typename A1, typename A2, typename X1>
1684inline MutantFunctor<R, Tuple2<A1, A2> >
1685CreateFunctor(R (__stdcall *function)(X1, A1, A2), const P1& p1) {
1686 MutantRunner<R, Tuple2<A1, A2> >* t =
1687 new MutantFunction<R, R (__stdcall *)(X1, A1, A2),
1688 Tuple1<P1>, Tuple2<A1, A2> >
1689 (function, MakeTuple(p1));
1690 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1691}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09001692#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1693template <typename R, typename T, typename U, typename P1, typename A1,
1694 typename A2, typename X1>
1695inline MutantFunctor<R, Tuple2<A1, A2> >
1696CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) {
1697 MutantRunner<R, Tuple2<A1, A2> >* t =
1698 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2),
1699 Tuple1<P1>, Tuple2<A1, A2> >
1700 (obj, method, MakeTuple(p1));
1701 return MutantFunctor<R, Tuple2<A1, A2> >(t);
1702}
1703#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001704#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09001705
1706// 1 - 3
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001707template <typename R, typename T, typename U, typename P1, typename A1,
1708 typename A2, typename A3, typename X1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001709inline MutantFunctor<R, Tuple3<A1, A2, A3> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001710CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) {
1711 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1712 new Mutant<R, T, R (U::*)(X1, A1, A2, A3),
stoyan@google.comce161d82009-10-27 09:05:00 +09001713 Tuple1<P1>, Tuple3<A1, A2, A3> >
1714 (obj, method, MakeTuple(p1));
1715 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1716}
1717
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001718template <typename R, typename P1, typename A1, typename A2, typename A3,
1719 typename X1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001720inline MutantFunctor<R, Tuple3<A1, A2, A3> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001721CreateFunctor(R (*function)(X1, A1, A2, A3), const P1& p1) {
1722 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1723 new MutantFunction<R, R (*)(X1, A1, A2, A3),
1724 Tuple1<P1>, Tuple3<A1, A2, A3> >
1725 (function, MakeTuple(p1));
1726 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1727}
1728
1729#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1730template <typename R, typename T, typename U, typename P1, typename A1,
1731 typename A2, typename A3, typename X1>
1732inline MutantFunctor<R, Tuple3<A1, A2, A3> >
1733CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) {
1734 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1735 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3),
stoyan@google.comce161d82009-10-27 09:05:00 +09001736 Tuple1<P1>, Tuple3<A1, A2, A3> >
1737 (obj, method, MakeTuple(p1));
1738 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1739}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001740#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1741
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001742#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001743template <typename R, typename T, typename U, typename P1, typename A1,
1744 typename A2, typename A3, typename X1>
1745inline MutantFunctor<R, Tuple3<A1, A2, A3> >
1746CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) {
1747 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1748 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3),
1749 Tuple1<P1>, Tuple3<A1, A2, A3> >
1750 (obj, method, MakeTuple(p1));
1751 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1752}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09001753
1754template <typename R, typename P1, typename A1, typename A2, typename A3,
1755 typename X1>
1756inline MutantFunctor<R, Tuple3<A1, A2, A3> >
1757CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3), const P1& p1) {
1758 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1759 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3),
1760 Tuple1<P1>, Tuple3<A1, A2, A3> >
1761 (function, MakeTuple(p1));
1762 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1763}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09001764#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1765template <typename R, typename T, typename U, typename P1, typename A1,
1766 typename A2, typename A3, typename X1>
1767inline MutantFunctor<R, Tuple3<A1, A2, A3> >
1768CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) {
1769 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
1770 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3),
1771 Tuple1<P1>, Tuple3<A1, A2, A3> >
1772 (obj, method, MakeTuple(p1));
1773 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
1774}
1775#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001776#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09001777
1778// 1 - 4
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001779template <typename R, typename T, typename U, typename P1, typename A1,
1780 typename A2, typename A3, typename A4, typename X1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001781inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001782CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) {
1783 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1784 new Mutant<R, T, R (U::*)(X1, A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09001785 Tuple1<P1>, Tuple4<A1, A2, A3, A4> >
1786 (obj, method, MakeTuple(p1));
1787 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1788}
1789
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001790template <typename R, typename P1, typename A1, typename A2, typename A3,
1791 typename A4, typename X1>
stoyan@google.comce161d82009-10-27 09:05:00 +09001792inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001793CreateFunctor(R (*function)(X1, A1, A2, A3, A4), const P1& p1) {
1794 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1795 new MutantFunction<R, R (*)(X1, A1, A2, A3, A4),
1796 Tuple1<P1>, Tuple4<A1, A2, A3, A4> >
1797 (function, MakeTuple(p1));
1798 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1799}
1800
1801#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1802template <typename R, typename T, typename U, typename P1, typename A1,
1803 typename A2, typename A3, typename A4, typename X1>
1804inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
1805CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) {
1806 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1807 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09001808 Tuple1<P1>, Tuple4<A1, A2, A3, A4> >
1809 (obj, method, MakeTuple(p1));
1810 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1811}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001812#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1813
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001814#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09001815template <typename R, typename T, typename U, typename P1, typename A1,
1816 typename A2, typename A3, typename A4, typename X1>
1817inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
1818CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4),
1819 const P1& p1) {
1820 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1821 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4),
1822 Tuple1<P1>, Tuple4<A1, A2, A3, A4> >
1823 (obj, method, MakeTuple(p1));
1824 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1825}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09001826
1827template <typename R, typename P1, typename A1, typename A2, typename A3,
1828 typename A4, typename X1>
1829inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
1830CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4), const P1& p1) {
1831 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1832 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3, A4),
1833 Tuple1<P1>, Tuple4<A1, A2, A3, A4> >
1834 (function, MakeTuple(p1));
1835 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1836}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09001837#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1838template <typename R, typename T, typename U, typename P1, typename A1,
1839 typename A2, typename A3, typename A4, typename X1>
1840inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
1841CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4),
1842 const P1& p1) {
1843 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
1844 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4),
1845 Tuple1<P1>, Tuple4<A1, A2, A3, A4> >
1846 (obj, method, MakeTuple(p1));
1847 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
1848}
1849#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001850#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09001851
amit@chromium.orge025b842010-02-13 03:19:07 +09001852// 1 - 5
1853template <typename R, typename T, typename U, typename P1, typename A1,
1854 typename A2, typename A3, typename A4, typename A5, typename X1>
1855inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1856CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4, A5), const P1& p1) {
1857 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1858 new Mutant<R, T, R (U::*)(X1, A1, A2, A3, A4, A5),
1859 Tuple1<P1>, Tuple5<A1, A2, A3, A4, A5> >
1860 (obj, method, MakeTuple(p1));
1861 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1862}
1863
1864template <typename R, typename P1, typename A1, typename A2, typename A3,
1865 typename A4, typename A5, typename X1>
1866inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1867CreateFunctor(R (*function)(X1, A1, A2, A3, A4, A5), const P1& p1) {
1868 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1869 new MutantFunction<R, R (*)(X1, A1, A2, A3, A4, A5),
1870 Tuple1<P1>, Tuple5<A1, A2, A3, A4, A5> >
1871 (function, MakeTuple(p1));
1872 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1873}
1874
1875#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1876template <typename R, typename T, typename U, typename P1, typename A1,
1877 typename A2, typename A3, typename A4, typename A5, typename X1>
1878inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1879CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4, A5), const P1& p1) {
1880 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1881 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3, A4, A5),
1882 Tuple1<P1>, Tuple5<A1, A2, A3, A4, A5> >
1883 (obj, method, MakeTuple(p1));
1884 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1885}
1886#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1887
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001888#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09001889template <typename R, typename T, typename U, typename P1, typename A1,
1890 typename A2, typename A3, typename A4, typename A5, typename X1>
1891inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1892CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5),
1893 const P1& p1) {
1894 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1895 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5),
1896 Tuple1<P1>, Tuple5<A1, A2, A3, A4, A5> >
1897 (obj, method, MakeTuple(p1));
1898 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1899}
1900
1901template <typename R, typename P1, typename A1, typename A2, typename A3,
1902 typename A4, typename A5, typename X1>
1903inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1904CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4, A5), const P1& p1) {
1905 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1906 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3, A4, A5),
1907 Tuple1<P1>, Tuple5<A1, A2, A3, A4, A5> >
1908 (function, MakeTuple(p1));
1909 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1910}
1911#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1912template <typename R, typename T, typename U, typename P1, typename A1,
1913 typename A2, typename A3, typename A4, typename A5, typename X1>
1914inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
1915CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5),
1916 const P1& p1) {
1917 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
1918 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5),
1919 Tuple1<P1>, Tuple5<A1, A2, A3, A4, A5> >
1920 (obj, method, MakeTuple(p1));
1921 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
1922}
1923#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001924#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09001925
1926// 1 - 6
1927template <typename R, typename T, typename U, typename P1, typename A1,
1928 typename A2, typename A3, typename A4, typename A5, typename A6,
1929 typename X1>
1930inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1931CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4, A5, A6),
1932 const P1& p1) {
1933 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1934 new Mutant<R, T, R (U::*)(X1, A1, A2, A3, A4, A5, A6),
1935 Tuple1<P1>, Tuple6<A1, A2, A3, A4, A5, A6> >
1936 (obj, method, MakeTuple(p1));
1937 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
1938}
1939
1940template <typename R, typename P1, typename A1, typename A2, typename A3,
1941 typename A4, typename A5, typename A6, typename X1>
1942inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1943CreateFunctor(R (*function)(X1, A1, A2, A3, A4, A5, A6), const P1& p1) {
1944 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1945 new MutantFunction<R, R (*)(X1, A1, A2, A3, A4, A5, A6),
1946 Tuple1<P1>, Tuple6<A1, A2, A3, A4, A5, A6> >
1947 (function, MakeTuple(p1));
1948 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
1949}
1950
1951#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1952template <typename R, typename T, typename U, typename P1, typename A1,
1953 typename A2, typename A3, typename A4, typename A5, typename A6,
1954 typename X1>
1955inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1956CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4, A5, A6),
1957 const P1& p1) {
1958 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1959 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3, A4, A5, A6),
1960 Tuple1<P1>, Tuple6<A1, A2, A3, A4, A5, A6> >
1961 (obj, method, MakeTuple(p1));
1962 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
1963}
1964#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1965
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09001966#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09001967template <typename R, typename T, typename U, typename P1, typename A1,
1968 typename A2, typename A3, typename A4, typename A5, typename A6,
1969 typename X1>
1970inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1971CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5, A6),
1972 const P1& p1) {
1973 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1974 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5, A6),
1975 Tuple1<P1>, Tuple6<A1, A2, A3, A4, A5, A6> >
1976 (obj, method, MakeTuple(p1));
1977 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
1978}
1979
1980template <typename R, typename P1, typename A1, typename A2, typename A3,
1981 typename A4, typename A5, typename A6, typename X1>
1982inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1983CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4, A5, A6),
1984 const P1& p1) {
1985 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1986 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3, A4, A5, A6),
1987 Tuple1<P1>, Tuple6<A1, A2, A3, A4, A5, A6> >
1988 (function, MakeTuple(p1));
1989 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
1990}
1991#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1992template <typename R, typename T, typename U, typename P1, typename A1,
1993 typename A2, typename A3, typename A4, typename A5, typename A6,
1994 typename X1>
1995inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
1996CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5, A6),
1997 const P1& p1) {
1998 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
1999 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5, A6),
2000 Tuple1<P1>, Tuple6<A1, A2, A3, A4, A5, A6> >
2001 (obj, method, MakeTuple(p1));
2002 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
2003}
2004#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002005#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09002006
stoyan@google.comce161d82009-10-27 09:05:00 +09002007// 2 - 0
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002008template <typename R, typename T, typename U, typename P1, typename P2,
2009 typename X1, typename X2>
stoyan@google.comce161d82009-10-27 09:05:00 +09002010inline MutantFunctor<R, Tuple0>
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002011CreateFunctor(T* obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) {
2012 MutantRunner<R, Tuple0>* t =
2013 new Mutant<R, T, R (U::*)(X1, X2),
stoyan@google.comce161d82009-10-27 09:05:00 +09002014 Tuple2<P1, P2>, Tuple0>
2015 (obj, method, MakeTuple(p1, p2));
2016 return MutantFunctor<R, Tuple0>(t);
2017}
2018
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002019template <typename R, typename P1, typename P2, typename X1, typename X2>
stoyan@google.comce161d82009-10-27 09:05:00 +09002020inline MutantFunctor<R, Tuple0>
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002021CreateFunctor(R (*function)(X1, X2), const P1& p1, const P2& p2) {
2022 MutantRunner<R, Tuple0>* t =
2023 new MutantFunction<R, R (*)(X1, X2),
2024 Tuple2<P1, P2>, Tuple0>
2025 (function, MakeTuple(p1, p2));
2026 return MutantFunctor<R, Tuple0>(t);
2027}
2028
2029#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2030template <typename R, typename T, typename U, typename P1, typename P2,
2031 typename X1, typename X2>
2032inline MutantFunctor<R, Tuple0>
2033CreateFunctor(T** obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) {
2034 MutantRunner<R, Tuple0>* t =
2035 new MutantLateObjectBind<R, T, R (U::*)(X1, X2),
stoyan@google.comce161d82009-10-27 09:05:00 +09002036 Tuple2<P1, P2>, Tuple0>
2037 (obj, method, MakeTuple(p1, p2));
2038 return MutantFunctor<R, Tuple0>(t);
2039}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002040#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2041
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002042#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002043template <typename R, typename T, typename U, typename P1, typename P2,
2044 typename X1, typename X2>
2045inline MutantFunctor<R, Tuple0>
2046CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2), const P1& p1,
2047 const P2& p2) {
2048 MutantRunner<R, Tuple0>* t =
2049 new Mutant<R, T, R (__stdcall U::*)(X1, X2),
2050 Tuple2<P1, P2>, Tuple0>
2051 (obj, method, MakeTuple(p1, p2));
2052 return MutantFunctor<R, Tuple0>(t);
2053}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09002054
2055template <typename R, typename P1, typename P2, typename X1, typename X2>
2056inline MutantFunctor<R, Tuple0>
2057CreateFunctor(R (__stdcall *function)(X1, X2), const P1& p1, const P2& p2) {
2058 MutantRunner<R, Tuple0>* t =
2059 new MutantFunction<R, R (__stdcall *)(X1, X2),
2060 Tuple2<P1, P2>, Tuple0>
2061 (function, MakeTuple(p1, p2));
2062 return MutantFunctor<R, Tuple0>(t);
2063}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09002064#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2065template <typename R, typename T, typename U, typename P1, typename P2,
2066 typename X1, typename X2>
2067inline MutantFunctor<R, Tuple0>
2068CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2), const P1& p1,
2069 const P2& p2) {
2070 MutantRunner<R, Tuple0>* t =
2071 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2),
2072 Tuple2<P1, P2>, Tuple0>
2073 (obj, method, MakeTuple(p1, p2));
2074 return MutantFunctor<R, Tuple0>(t);
2075}
2076#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002077#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09002078
2079// 2 - 1
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002080template <typename R, typename T, typename U, typename P1, typename P2,
2081 typename A1, typename X1, typename X2>
stoyan@google.comce161d82009-10-27 09:05:00 +09002082inline MutantFunctor<R, Tuple1<A1> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002083CreateFunctor(T* obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) {
2084 MutantRunner<R, Tuple1<A1> >* t =
2085 new Mutant<R, T, R (U::*)(X1, X2, A1),
stoyan@google.comce161d82009-10-27 09:05:00 +09002086 Tuple2<P1, P2>, Tuple1<A1> >
2087 (obj, method, MakeTuple(p1, p2));
2088 return MutantFunctor<R, Tuple1<A1> >(t);
2089}
2090
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002091template <typename R, typename P1, typename P2, typename A1, typename X1,
2092 typename X2>
stoyan@google.comce161d82009-10-27 09:05:00 +09002093inline MutantFunctor<R, Tuple1<A1> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002094CreateFunctor(R (*function)(X1, X2, A1), const P1& p1, const P2& p2) {
2095 MutantRunner<R, Tuple1<A1> >* t =
2096 new MutantFunction<R, R (*)(X1, X2, A1),
2097 Tuple2<P1, P2>, Tuple1<A1> >
2098 (function, MakeTuple(p1, p2));
2099 return MutantFunctor<R, Tuple1<A1> >(t);
2100}
2101
2102#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2103template <typename R, typename T, typename U, typename P1, typename P2,
2104 typename A1, typename X1, typename X2>
2105inline MutantFunctor<R, Tuple1<A1> >
2106CreateFunctor(T** obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) {
2107 MutantRunner<R, Tuple1<A1> >* t =
2108 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1),
stoyan@google.comce161d82009-10-27 09:05:00 +09002109 Tuple2<P1, P2>, Tuple1<A1> >
2110 (obj, method, MakeTuple(p1, p2));
2111 return MutantFunctor<R, Tuple1<A1> >(t);
2112}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002113#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2114
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002115#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002116template <typename R, typename T, typename U, typename P1, typename P2,
2117 typename A1, typename X1, typename X2>
2118inline MutantFunctor<R, Tuple1<A1> >
2119CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1,
2120 const P2& p2) {
2121 MutantRunner<R, Tuple1<A1> >* t =
2122 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1),
2123 Tuple2<P1, P2>, Tuple1<A1> >
2124 (obj, method, MakeTuple(p1, p2));
2125 return MutantFunctor<R, Tuple1<A1> >(t);
2126}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09002127
2128template <typename R, typename P1, typename P2, typename A1, typename X1,
2129 typename X2>
2130inline MutantFunctor<R, Tuple1<A1> >
2131CreateFunctor(R (__stdcall *function)(X1, X2, A1), const P1& p1,
2132 const P2& p2) {
2133 MutantRunner<R, Tuple1<A1> >* t =
2134 new MutantFunction<R, R (__stdcall *)(X1, X2, A1),
2135 Tuple2<P1, P2>, Tuple1<A1> >
2136 (function, MakeTuple(p1, p2));
2137 return MutantFunctor<R, Tuple1<A1> >(t);
2138}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09002139#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2140template <typename R, typename T, typename U, typename P1, typename P2,
2141 typename A1, typename X1, typename X2>
2142inline MutantFunctor<R, Tuple1<A1> >
2143CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1,
2144 const P2& p2) {
2145 MutantRunner<R, Tuple1<A1> >* t =
2146 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1),
2147 Tuple2<P1, P2>, Tuple1<A1> >
2148 (obj, method, MakeTuple(p1, p2));
2149 return MutantFunctor<R, Tuple1<A1> >(t);
2150}
2151#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002152#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09002153
2154// 2 - 2
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002155template <typename R, typename T, typename U, typename P1, typename P2,
2156 typename A1, typename A2, typename X1, typename X2>
stoyan@google.comce161d82009-10-27 09:05:00 +09002157inline MutantFunctor<R, Tuple2<A1, A2> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002158CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002159 const P2& p2) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002160 MutantRunner<R, Tuple2<A1, A2> >* t =
2161 new Mutant<R, T, R (U::*)(X1, X2, A1, A2),
stoyan@google.comce161d82009-10-27 09:05:00 +09002162 Tuple2<P1, P2>, Tuple2<A1, A2> >
2163 (obj, method, MakeTuple(p1, p2));
2164 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2165}
2166
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002167template <typename R, typename P1, typename P2, typename A1, typename A2,
2168 typename X1, typename X2>
stoyan@google.comce161d82009-10-27 09:05:00 +09002169inline MutantFunctor<R, Tuple2<A1, A2> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002170CreateFunctor(R (*function)(X1, X2, A1, A2), const P1& p1, const P2& p2) {
2171 MutantRunner<R, Tuple2<A1, A2> >* t =
2172 new MutantFunction<R, R (*)(X1, X2, A1, A2),
2173 Tuple2<P1, P2>, Tuple2<A1, A2> >
2174 (function, MakeTuple(p1, p2));
2175 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2176}
2177
2178#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2179template <typename R, typename T, typename U, typename P1, typename P2,
2180 typename A1, typename A2, typename X1, typename X2>
2181inline MutantFunctor<R, Tuple2<A1, A2> >
2182CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002183 const P2& p2) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002184 MutantRunner<R, Tuple2<A1, A2> >* t =
2185 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2),
stoyan@google.comce161d82009-10-27 09:05:00 +09002186 Tuple2<P1, P2>, Tuple2<A1, A2> >
2187 (obj, method, MakeTuple(p1, p2));
2188 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2189}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002190#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2191
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002192#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002193template <typename R, typename T, typename U, typename P1, typename P2,
2194 typename A1, typename A2, typename X1, typename X2>
2195inline MutantFunctor<R, Tuple2<A1, A2> >
2196CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1,
2197 const P2& p2) {
2198 MutantRunner<R, Tuple2<A1, A2> >* t =
2199 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2),
2200 Tuple2<P1, P2>, Tuple2<A1, A2> >
2201 (obj, method, MakeTuple(p1, p2));
2202 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2203}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09002204
2205template <typename R, typename P1, typename P2, typename A1, typename A2,
2206 typename X1, typename X2>
2207inline MutantFunctor<R, Tuple2<A1, A2> >
2208CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2), const P1& p1,
2209 const P2& p2) {
2210 MutantRunner<R, Tuple2<A1, A2> >* t =
2211 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2),
2212 Tuple2<P1, P2>, Tuple2<A1, A2> >
2213 (function, MakeTuple(p1, p2));
2214 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2215}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09002216#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2217template <typename R, typename T, typename U, typename P1, typename P2,
2218 typename A1, typename A2, typename X1, typename X2>
2219inline MutantFunctor<R, Tuple2<A1, A2> >
2220CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1,
2221 const P2& p2) {
2222 MutantRunner<R, Tuple2<A1, A2> >* t =
2223 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2),
2224 Tuple2<P1, P2>, Tuple2<A1, A2> >
2225 (obj, method, MakeTuple(p1, p2));
2226 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2227}
2228#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002229#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09002230
2231// 2 - 3
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002232template <typename R, typename T, typename U, typename P1, typename P2,
2233 typename A1, typename A2, typename A3, typename X1, typename X2>
stoyan@google.comce161d82009-10-27 09:05:00 +09002234inline MutantFunctor<R, Tuple3<A1, A2, A3> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002235CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002236 const P2& p2) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002237 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2238 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3),
stoyan@google.comce161d82009-10-27 09:05:00 +09002239 Tuple2<P1, P2>, Tuple3<A1, A2, A3> >
2240 (obj, method, MakeTuple(p1, p2));
2241 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2242}
2243
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002244template <typename R, typename P1, typename P2, typename A1, typename A2,
2245 typename A3, typename X1, typename X2>
stoyan@google.comce161d82009-10-27 09:05:00 +09002246inline MutantFunctor<R, Tuple3<A1, A2, A3> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002247CreateFunctor(R (*function)(X1, X2, A1, A2, A3), const P1& p1, const P2& p2) {
2248 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2249 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3),
2250 Tuple2<P1, P2>, Tuple3<A1, A2, A3> >
2251 (function, MakeTuple(p1, p2));
2252 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2253}
2254
2255#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2256template <typename R, typename T, typename U, typename P1, typename P2,
2257 typename A1, typename A2, typename A3, typename X1, typename X2>
2258inline MutantFunctor<R, Tuple3<A1, A2, A3> >
2259CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002260 const P2& p2) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002261 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2262 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3),
stoyan@google.comce161d82009-10-27 09:05:00 +09002263 Tuple2<P1, P2>, Tuple3<A1, A2, A3> >
2264 (obj, method, MakeTuple(p1, p2));
2265 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2266}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002267#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2268
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002269#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002270template <typename R, typename T, typename U, typename P1, typename P2,
2271 typename A1, typename A2, typename A3, typename X1, typename X2>
2272inline MutantFunctor<R, Tuple3<A1, A2, A3> >
2273CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3),
2274 const P1& p1, const P2& p2) {
2275 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2276 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3),
2277 Tuple2<P1, P2>, Tuple3<A1, A2, A3> >
2278 (obj, method, MakeTuple(p1, p2));
2279 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2280}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09002281
2282template <typename R, typename P1, typename P2, typename A1, typename A2,
2283 typename A3, typename X1, typename X2>
2284inline MutantFunctor<R, Tuple3<A1, A2, A3> >
2285CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3), const P1& p1,
2286 const P2& p2) {
2287 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2288 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3),
2289 Tuple2<P1, P2>, Tuple3<A1, A2, A3> >
2290 (function, MakeTuple(p1, p2));
2291 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2292}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09002293#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2294template <typename R, typename T, typename U, typename P1, typename P2,
2295 typename A1, typename A2, typename A3, typename X1, typename X2>
2296inline MutantFunctor<R, Tuple3<A1, A2, A3> >
2297CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3),
2298 const P1& p1, const P2& p2) {
2299 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2300 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3),
2301 Tuple2<P1, P2>, Tuple3<A1, A2, A3> >
2302 (obj, method, MakeTuple(p1, p2));
2303 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2304}
2305#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002306#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09002307
2308// 2 - 4
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002309template <typename R, typename T, typename U, typename P1, typename P2,
2310 typename A1, typename A2, typename A3, typename A4, typename X1,
2311 typename X2>
stoyan@google.comce161d82009-10-27 09:05:00 +09002312inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002313CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002314 const P2& p2) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002315 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2316 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09002317 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> >
2318 (obj, method, MakeTuple(p1, p2));
2319 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2320}
2321
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002322template <typename R, typename P1, typename P2, typename A1, typename A2,
2323 typename A3, typename A4, typename X1, typename X2>
stoyan@google.comce161d82009-10-27 09:05:00 +09002324inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002325CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002326 const P2& p2) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002327 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2328 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3, A4),
2329 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> >
2330 (function, MakeTuple(p1, p2));
2331 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2332}
2333
2334#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2335template <typename R, typename T, typename U, typename P1, typename P2,
2336 typename A1, typename A2, typename A3, typename A4, typename X1,
2337 typename X2>
2338inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
2339CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1,
2340 const P2& p2) {
2341 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2342 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09002343 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> >
2344 (obj, method, MakeTuple(p1, p2));
2345 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2346}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002347#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2348
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002349#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002350template <typename R, typename T, typename U, typename P1, typename P2,
2351 typename A1, typename A2, typename A3, typename A4, typename X1,
2352 typename X2>
2353inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
2354CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4),
2355 const P1& p1, const P2& p2) {
2356 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2357 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4),
2358 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> >
2359 (obj, method, MakeTuple(p1, p2));
2360 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2361}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09002362
2363template <typename R, typename P1, typename P2, typename A1, typename A2,
2364 typename A3, typename A4, typename X1, typename X2>
2365inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
2366CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4), const P1& p1,
2367 const P2& p2) {
2368 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2369 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3, A4),
2370 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> >
2371 (function, MakeTuple(p1, p2));
2372 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2373}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09002374#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2375template <typename R, typename T, typename U, typename P1, typename P2,
2376 typename A1, typename A2, typename A3, typename A4, typename X1,
2377 typename X2>
2378inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
2379CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4),
2380 const P1& p1, const P2& p2) {
2381 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2382 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4),
2383 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> >
2384 (obj, method, MakeTuple(p1, p2));
2385 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2386}
2387#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002388#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09002389
amit@chromium.orge025b842010-02-13 03:19:07 +09002390// 2 - 5
2391template <typename R, typename T, typename U, typename P1, typename P2,
2392 typename A1, typename A2, typename A3, typename A4, typename A5,
2393 typename X1, typename X2>
2394inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
2395CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
2396 const P2& p2) {
2397 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
2398 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5),
2399 Tuple2<P1, P2>, Tuple5<A1, A2, A3, A4, A5> >
2400 (obj, method, MakeTuple(p1, p2));
2401 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
2402}
2403
2404template <typename R, typename P1, typename P2, typename A1, typename A2,
2405 typename A3, typename A4, typename A5, typename X1, typename X2>
2406inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
2407CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
2408 const P2& p2) {
2409 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
2410 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3, A4, A5),
2411 Tuple2<P1, P2>, Tuple5<A1, A2, A3, A4, A5> >
2412 (function, MakeTuple(p1, p2));
2413 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
2414}
2415
2416#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2417template <typename R, typename T, typename U, typename P1, typename P2,
2418 typename A1, typename A2, typename A3, typename A4, typename A5,
2419 typename X1, typename X2>
2420inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
2421CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
2422 const P2& p2) {
2423 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
2424 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5),
2425 Tuple2<P1, P2>, Tuple5<A1, A2, A3, A4, A5> >
2426 (obj, method, MakeTuple(p1, p2));
2427 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
2428}
2429#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2430
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002431#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09002432template <typename R, typename T, typename U, typename P1, typename P2,
2433 typename A1, typename A2, typename A3, typename A4, typename A5,
2434 typename X1, typename X2>
2435inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
2436CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5),
2437 const P1& p1, const P2& p2) {
2438 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
2439 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5),
2440 Tuple2<P1, P2>, Tuple5<A1, A2, A3, A4, A5> >
2441 (obj, method, MakeTuple(p1, p2));
2442 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
2443}
2444
2445template <typename R, typename P1, typename P2, typename A1, typename A2,
2446 typename A3, typename A4, typename A5, typename X1, typename X2>
2447inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
2448CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
2449 const P2& p2) {
2450 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
2451 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3, A4, A5),
2452 Tuple2<P1, P2>, Tuple5<A1, A2, A3, A4, A5> >
2453 (function, MakeTuple(p1, p2));
2454 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
2455}
2456#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2457template <typename R, typename T, typename U, typename P1, typename P2,
2458 typename A1, typename A2, typename A3, typename A4, typename A5,
2459 typename X1, typename X2>
2460inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
2461CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5),
2462 const P1& p1, const P2& p2) {
2463 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
2464 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5),
2465 Tuple2<P1, P2>, Tuple5<A1, A2, A3, A4, A5> >
2466 (obj, method, MakeTuple(p1, p2));
2467 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
2468}
2469#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002470#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09002471
2472// 2 - 6
2473template <typename R, typename T, typename U, typename P1, typename P2,
2474 typename A1, typename A2, typename A3, typename A4, typename A5,
2475 typename A6, typename X1, typename X2>
2476inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
2477CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
2478 const P1& p1, const P2& p2) {
2479 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
2480 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
2481 Tuple2<P1, P2>, Tuple6<A1, A2, A3, A4, A5, A6> >
2482 (obj, method, MakeTuple(p1, p2));
2483 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
2484}
2485
2486template <typename R, typename P1, typename P2, typename A1, typename A2,
2487 typename A3, typename A4, typename A5, typename A6, typename X1,
2488 typename X2>
2489inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
2490CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4, A5, A6), const P1& p1,
2491 const P2& p2) {
2492 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
2493 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3, A4, A5, A6),
2494 Tuple2<P1, P2>, Tuple6<A1, A2, A3, A4, A5, A6> >
2495 (function, MakeTuple(p1, p2));
2496 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
2497}
2498
2499#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2500template <typename R, typename T, typename U, typename P1, typename P2,
2501 typename A1, typename A2, typename A3, typename A4, typename A5,
2502 typename A6, typename X1, typename X2>
2503inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
2504CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
2505 const P1& p1, const P2& p2) {
2506 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
2507 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
2508 Tuple2<P1, P2>, Tuple6<A1, A2, A3, A4, A5, A6> >
2509 (obj, method, MakeTuple(p1, p2));
2510 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
2511}
2512#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2513
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002514#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09002515template <typename R, typename T, typename U, typename P1, typename P2,
2516 typename A1, typename A2, typename A3, typename A4, typename A5,
2517 typename A6, typename X1, typename X2>
2518inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
2519CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
2520 const P1& p1, const P2& p2) {
2521 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
2522 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
2523 Tuple2<P1, P2>, Tuple6<A1, A2, A3, A4, A5, A6> >
2524 (obj, method, MakeTuple(p1, p2));
2525 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
2526}
2527
2528template <typename R, typename P1, typename P2, typename A1, typename A2,
2529 typename A3, typename A4, typename A5, typename A6, typename X1,
2530 typename X2>
2531inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
2532CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4, A5, A6),
2533 const P1& p1, const P2& p2) {
2534 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
2535 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3, A4, A5, A6),
2536 Tuple2<P1, P2>, Tuple6<A1, A2, A3, A4, A5, A6> >
2537 (function, MakeTuple(p1, p2));
2538 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
2539}
2540#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2541template <typename R, typename T, typename U, typename P1, typename P2,
2542 typename A1, typename A2, typename A3, typename A4, typename A5,
2543 typename A6, typename X1, typename X2>
2544inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
2545CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
2546 const P1& p1, const P2& p2) {
2547 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
2548 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
2549 Tuple2<P1, P2>, Tuple6<A1, A2, A3, A4, A5, A6> >
2550 (obj, method, MakeTuple(p1, p2));
2551 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
2552}
2553#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002554#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09002555
stoyan@google.comce161d82009-10-27 09:05:00 +09002556// 3 - 0
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002557template <typename R, typename T, typename U, typename P1, typename P2,
2558 typename P3, typename X1, typename X2, typename X3>
stoyan@google.comce161d82009-10-27 09:05:00 +09002559inline MutantFunctor<R, Tuple0>
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002560CreateFunctor(T* obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2,
stoyan@google.comce161d82009-10-27 09:05:00 +09002561 const P3& p3) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002562 MutantRunner<R, Tuple0>* t =
2563 new Mutant<R, T, R (U::*)(X1, X2, X3),
stoyan@google.comce161d82009-10-27 09:05:00 +09002564 Tuple3<P1, P2, P3>, Tuple0>
2565 (obj, method, MakeTuple(p1, p2, p3));
2566 return MutantFunctor<R, Tuple0>(t);
2567}
2568
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002569template <typename R, typename P1, typename P2, typename P3, typename X1,
2570 typename X2, typename X3>
stoyan@google.comce161d82009-10-27 09:05:00 +09002571inline MutantFunctor<R, Tuple0>
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002572CreateFunctor(R (*function)(X1, X2, X3), const P1& p1, const P2& p2,
stoyan@google.comce161d82009-10-27 09:05:00 +09002573 const P3& p3) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002574 MutantRunner<R, Tuple0>* t =
2575 new MutantFunction<R, R (*)(X1, X2, X3),
2576 Tuple3<P1, P2, P3>, Tuple0>
2577 (function, MakeTuple(p1, p2, p3));
2578 return MutantFunctor<R, Tuple0>(t);
2579}
2580
2581#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2582template <typename R, typename T, typename U, typename P1, typename P2,
2583 typename P3, typename X1, typename X2, typename X3>
2584inline MutantFunctor<R, Tuple0>
2585CreateFunctor(T** obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2,
2586 const P3& p3) {
2587 MutantRunner<R, Tuple0>* t =
2588 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3),
stoyan@google.comce161d82009-10-27 09:05:00 +09002589 Tuple3<P1, P2, P3>, Tuple0>
2590 (obj, method, MakeTuple(p1, p2, p3));
2591 return MutantFunctor<R, Tuple0>(t);
2592}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002593#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2594
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002595#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002596template <typename R, typename T, typename U, typename P1, typename P2,
2597 typename P3, typename X1, typename X2, typename X3>
2598inline MutantFunctor<R, Tuple0>
2599CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1,
2600 const P2& p2, const P3& p3) {
2601 MutantRunner<R, Tuple0>* t =
2602 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3),
2603 Tuple3<P1, P2, P3>, Tuple0>
2604 (obj, method, MakeTuple(p1, p2, p3));
2605 return MutantFunctor<R, Tuple0>(t);
2606}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09002607
2608template <typename R, typename P1, typename P2, typename P3, typename X1,
2609 typename X2, typename X3>
2610inline MutantFunctor<R, Tuple0>
2611CreateFunctor(R (__stdcall *function)(X1, X2, X3), const P1& p1, const P2& p2,
2612 const P3& p3) {
2613 MutantRunner<R, Tuple0>* t =
2614 new MutantFunction<R, R (__stdcall *)(X1, X2, X3),
2615 Tuple3<P1, P2, P3>, Tuple0>
2616 (function, MakeTuple(p1, p2, p3));
2617 return MutantFunctor<R, Tuple0>(t);
2618}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09002619#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2620template <typename R, typename T, typename U, typename P1, typename P2,
2621 typename P3, typename X1, typename X2, typename X3>
2622inline MutantFunctor<R, Tuple0>
2623CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1,
2624 const P2& p2, const P3& p3) {
2625 MutantRunner<R, Tuple0>* t =
2626 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3),
2627 Tuple3<P1, P2, P3>, Tuple0>
2628 (obj, method, MakeTuple(p1, p2, p3));
2629 return MutantFunctor<R, Tuple0>(t);
2630}
2631#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002632#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09002633
2634// 3 - 1
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002635template <typename R, typename T, typename U, typename P1, typename P2,
2636 typename P3, typename A1, typename X1, typename X2, typename X3>
stoyan@google.comce161d82009-10-27 09:05:00 +09002637inline MutantFunctor<R, Tuple1<A1> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002638CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002639 const P2& p2, const P3& p3) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002640 MutantRunner<R, Tuple1<A1> >* t =
2641 new Mutant<R, T, R (U::*)(X1, X2, X3, A1),
stoyan@google.comce161d82009-10-27 09:05:00 +09002642 Tuple3<P1, P2, P3>, Tuple1<A1> >
2643 (obj, method, MakeTuple(p1, p2, p3));
2644 return MutantFunctor<R, Tuple1<A1> >(t);
2645}
2646
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002647template <typename R, typename P1, typename P2, typename P3, typename A1,
2648 typename X1, typename X2, typename X3>
stoyan@google.comce161d82009-10-27 09:05:00 +09002649inline MutantFunctor<R, Tuple1<A1> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002650CreateFunctor(R (*function)(X1, X2, X3, A1), const P1& p1, const P2& p2,
2651 const P3& p3) {
2652 MutantRunner<R, Tuple1<A1> >* t =
2653 new MutantFunction<R, R (*)(X1, X2, X3, A1),
2654 Tuple3<P1, P2, P3>, Tuple1<A1> >
2655 (function, MakeTuple(p1, p2, p3));
2656 return MutantFunctor<R, Tuple1<A1> >(t);
2657}
2658
2659#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2660template <typename R, typename T, typename U, typename P1, typename P2,
2661 typename P3, typename A1, typename X1, typename X2, typename X3>
2662inline MutantFunctor<R, Tuple1<A1> >
2663CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002664 const P2& p2, const P3& p3) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002665 MutantRunner<R, Tuple1<A1> >* t =
2666 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1),
stoyan@google.comce161d82009-10-27 09:05:00 +09002667 Tuple3<P1, P2, P3>, Tuple1<A1> >
2668 (obj, method, MakeTuple(p1, p2, p3));
2669 return MutantFunctor<R, Tuple1<A1> >(t);
2670}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002671#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2672
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002673#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002674template <typename R, typename T, typename U, typename P1, typename P2,
2675 typename P3, typename A1, typename X1, typename X2, typename X3>
2676inline MutantFunctor<R, Tuple1<A1> >
2677CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1,
2678 const P2& p2, const P3& p3) {
2679 MutantRunner<R, Tuple1<A1> >* t =
2680 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1),
2681 Tuple3<P1, P2, P3>, Tuple1<A1> >
2682 (obj, method, MakeTuple(p1, p2, p3));
2683 return MutantFunctor<R, Tuple1<A1> >(t);
2684}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09002685
2686template <typename R, typename P1, typename P2, typename P3, typename A1,
2687 typename X1, typename X2, typename X3>
2688inline MutantFunctor<R, Tuple1<A1> >
2689CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1), const P1& p1,
2690 const P2& p2, const P3& p3) {
2691 MutantRunner<R, Tuple1<A1> >* t =
2692 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1),
2693 Tuple3<P1, P2, P3>, Tuple1<A1> >
2694 (function, MakeTuple(p1, p2, p3));
2695 return MutantFunctor<R, Tuple1<A1> >(t);
2696}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09002697#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2698template <typename R, typename T, typename U, typename P1, typename P2,
2699 typename P3, typename A1, typename X1, typename X2, typename X3>
2700inline MutantFunctor<R, Tuple1<A1> >
2701CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1,
2702 const P2& p2, const P3& p3) {
2703 MutantRunner<R, Tuple1<A1> >* t =
2704 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1),
2705 Tuple3<P1, P2, P3>, Tuple1<A1> >
2706 (obj, method, MakeTuple(p1, p2, p3));
2707 return MutantFunctor<R, Tuple1<A1> >(t);
2708}
2709#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002710#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09002711
2712// 3 - 2
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002713template <typename R, typename T, typename U, typename P1, typename P2,
2714 typename P3, typename A1, typename A2, typename X1, typename X2,
2715 typename X3>
stoyan@google.comce161d82009-10-27 09:05:00 +09002716inline MutantFunctor<R, Tuple2<A1, A2> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002717CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002718 const P2& p2, const P3& p3) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002719 MutantRunner<R, Tuple2<A1, A2> >* t =
2720 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2),
stoyan@google.comce161d82009-10-27 09:05:00 +09002721 Tuple3<P1, P2, P3>, Tuple2<A1, A2> >
2722 (obj, method, MakeTuple(p1, p2, p3));
2723 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2724}
2725
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002726template <typename R, typename P1, typename P2, typename P3, typename A1,
2727 typename A2, typename X1, typename X2, typename X3>
stoyan@google.comce161d82009-10-27 09:05:00 +09002728inline MutantFunctor<R, Tuple2<A1, A2> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002729CreateFunctor(R (*function)(X1, X2, X3, A1, A2), const P1& p1, const P2& p2,
2730 const P3& p3) {
2731 MutantRunner<R, Tuple2<A1, A2> >* t =
2732 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2),
2733 Tuple3<P1, P2, P3>, Tuple2<A1, A2> >
2734 (function, MakeTuple(p1, p2, p3));
2735 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2736}
2737
2738#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2739template <typename R, typename T, typename U, typename P1, typename P2,
2740 typename P3, typename A1, typename A2, typename X1, typename X2,
2741 typename X3>
2742inline MutantFunctor<R, Tuple2<A1, A2> >
2743CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002744 const P2& p2, const P3& p3) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002745 MutantRunner<R, Tuple2<A1, A2> >* t =
2746 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2),
stoyan@google.comce161d82009-10-27 09:05:00 +09002747 Tuple3<P1, P2, P3>, Tuple2<A1, A2> >
2748 (obj, method, MakeTuple(p1, p2, p3));
2749 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2750}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002751#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2752
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002753#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002754template <typename R, typename T, typename U, typename P1, typename P2,
2755 typename P3, typename A1, typename A2, typename X1, typename X2,
2756 typename X3>
2757inline MutantFunctor<R, Tuple2<A1, A2> >
2758CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2),
2759 const P1& p1, const P2& p2, const P3& p3) {
2760 MutantRunner<R, Tuple2<A1, A2> >* t =
2761 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2),
2762 Tuple3<P1, P2, P3>, Tuple2<A1, A2> >
2763 (obj, method, MakeTuple(p1, p2, p3));
2764 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2765}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09002766
2767template <typename R, typename P1, typename P2, typename P3, typename A1,
2768 typename A2, typename X1, typename X2, typename X3>
2769inline MutantFunctor<R, Tuple2<A1, A2> >
2770CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2), const P1& p1,
2771 const P2& p2, const P3& p3) {
2772 MutantRunner<R, Tuple2<A1, A2> >* t =
2773 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2),
2774 Tuple3<P1, P2, P3>, Tuple2<A1, A2> >
2775 (function, MakeTuple(p1, p2, p3));
2776 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2777}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09002778#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2779template <typename R, typename T, typename U, typename P1, typename P2,
2780 typename P3, typename A1, typename A2, typename X1, typename X2,
2781 typename X3>
2782inline MutantFunctor<R, Tuple2<A1, A2> >
2783CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2),
2784 const P1& p1, const P2& p2, const P3& p3) {
2785 MutantRunner<R, Tuple2<A1, A2> >* t =
2786 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2),
2787 Tuple3<P1, P2, P3>, Tuple2<A1, A2> >
2788 (obj, method, MakeTuple(p1, p2, p3));
2789 return MutantFunctor<R, Tuple2<A1, A2> >(t);
2790}
2791#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002792#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09002793
2794// 3 - 3
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002795template <typename R, typename T, typename U, typename P1, typename P2,
2796 typename P3, typename A1, typename A2, typename A3, typename X1,
2797 typename X2, typename X3>
stoyan@google.comce161d82009-10-27 09:05:00 +09002798inline MutantFunctor<R, Tuple3<A1, A2, A3> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002799CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002800 const P2& p2, const P3& p3) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002801 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2802 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3),
stoyan@google.comce161d82009-10-27 09:05:00 +09002803 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> >
2804 (obj, method, MakeTuple(p1, p2, p3));
2805 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2806}
2807
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002808template <typename R, typename P1, typename P2, typename P3, typename A1,
2809 typename A2, typename A3, typename X1, typename X2, typename X3>
stoyan@google.comce161d82009-10-27 09:05:00 +09002810inline MutantFunctor<R, Tuple3<A1, A2, A3> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002811CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3), const P1& p1, const P2& p2,
2812 const P3& p3) {
2813 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2814 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3),
2815 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> >
2816 (function, MakeTuple(p1, p2, p3));
2817 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2818}
2819
2820#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2821template <typename R, typename T, typename U, typename P1, typename P2,
2822 typename P3, typename A1, typename A2, typename A3, typename X1,
2823 typename X2, typename X3>
2824inline MutantFunctor<R, Tuple3<A1, A2, A3> >
2825CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002826 const P2& p2, const P3& p3) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002827 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2828 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3),
stoyan@google.comce161d82009-10-27 09:05:00 +09002829 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> >
2830 (obj, method, MakeTuple(p1, p2, p3));
2831 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2832}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002833#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2834
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002835#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002836template <typename R, typename T, typename U, typename P1, typename P2,
2837 typename P3, typename A1, typename A2, typename A3, typename X1,
2838 typename X2, typename X3>
2839inline MutantFunctor<R, Tuple3<A1, A2, A3> >
2840CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3),
2841 const P1& p1, const P2& p2, const P3& p3) {
2842 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2843 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3),
2844 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> >
2845 (obj, method, MakeTuple(p1, p2, p3));
2846 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2847}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09002848
2849template <typename R, typename P1, typename P2, typename P3, typename A1,
2850 typename A2, typename A3, typename X1, typename X2, typename X3>
2851inline MutantFunctor<R, Tuple3<A1, A2, A3> >
2852CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3), const P1& p1,
2853 const P2& p2, const P3& p3) {
2854 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2855 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3),
2856 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> >
2857 (function, MakeTuple(p1, p2, p3));
2858 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2859}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09002860#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2861template <typename R, typename T, typename U, typename P1, typename P2,
2862 typename P3, typename A1, typename A2, typename A3, typename X1,
2863 typename X2, typename X3>
2864inline MutantFunctor<R, Tuple3<A1, A2, A3> >
2865CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3),
2866 const P1& p1, const P2& p2, const P3& p3) {
2867 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
2868 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3),
2869 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> >
2870 (obj, method, MakeTuple(p1, p2, p3));
2871 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
2872}
2873#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002874#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09002875
2876// 3 - 4
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002877template <typename R, typename T, typename U, typename P1, typename P2,
2878 typename P3, typename A1, typename A2, typename A3, typename A4,
2879 typename X1, typename X2, typename X3>
stoyan@google.comce161d82009-10-27 09:05:00 +09002880inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002881CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002882 const P2& p2, const P3& p3) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002883 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2884 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09002885 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> >
2886 (obj, method, MakeTuple(p1, p2, p3));
2887 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2888}
2889
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002890template <typename R, typename P1, typename P2, typename P3, typename A1,
2891 typename A2, typename A3, typename A4, typename X1, typename X2,
2892 typename X3>
stoyan@google.comce161d82009-10-27 09:05:00 +09002893inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002894CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09002895 const P2& p2, const P3& p3) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002896 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2897 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3, A4),
2898 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> >
2899 (function, MakeTuple(p1, p2, p3));
2900 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2901}
2902
2903#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2904template <typename R, typename T, typename U, typename P1, typename P2,
2905 typename P3, typename A1, typename A2, typename A3, typename A4,
2906 typename X1, typename X2, typename X3>
2907inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
2908CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
2909 const P2& p2, const P3& p3) {
2910 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2911 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09002912 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> >
2913 (obj, method, MakeTuple(p1, p2, p3));
2914 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2915}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002916#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2917
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002918#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09002919template <typename R, typename T, typename U, typename P1, typename P2,
2920 typename P3, typename A1, typename A2, typename A3, typename A4,
2921 typename X1, typename X2, typename X3>
2922inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
2923CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4),
2924 const P1& p1, const P2& p2, const P3& p3) {
2925 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2926 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4),
2927 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> >
2928 (obj, method, MakeTuple(p1, p2, p3));
2929 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2930}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09002931
2932template <typename R, typename P1, typename P2, typename P3, typename A1,
2933 typename A2, typename A3, typename A4, typename X1, typename X2,
2934 typename X3>
2935inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
2936CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
2937 const P2& p2, const P3& p3) {
2938 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2939 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3, A4),
2940 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> >
2941 (function, MakeTuple(p1, p2, p3));
2942 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2943}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09002944#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2945template <typename R, typename T, typename U, typename P1, typename P2,
2946 typename P3, typename A1, typename A2, typename A3, typename A4,
2947 typename X1, typename X2, typename X3>
2948inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
2949CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4),
2950 const P1& p1, const P2& p2, const P3& p3) {
2951 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
2952 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4),
2953 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> >
2954 (obj, method, MakeTuple(p1, p2, p3));
2955 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
2956}
2957#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09002958#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09002959
amit@chromium.orge025b842010-02-13 03:19:07 +09002960// 3 - 5
2961template <typename R, typename T, typename U, typename P1, typename P2,
2962 typename P3, typename A1, typename A2, typename A3, typename A4,
2963 typename A5, typename X1, typename X2, typename X3>
2964inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
2965CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
2966 const P1& p1, const P2& p2, const P3& p3) {
2967 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
2968 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
2969 Tuple3<P1, P2, P3>, Tuple5<A1, A2, A3, A4, A5> >
2970 (obj, method, MakeTuple(p1, p2, p3));
2971 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
2972}
2973
2974template <typename R, typename P1, typename P2, typename P3, typename A1,
2975 typename A2, typename A3, typename A4, typename A5, typename X1,
2976 typename X2, typename X3>
2977inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
2978CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4, A5), const P1& p1,
2979 const P2& p2, const P3& p3) {
2980 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
2981 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3, A4, A5),
2982 Tuple3<P1, P2, P3>, Tuple5<A1, A2, A3, A4, A5> >
2983 (function, MakeTuple(p1, p2, p3));
2984 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
2985}
2986
2987#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2988template <typename R, typename T, typename U, typename P1, typename P2,
2989 typename P3, typename A1, typename A2, typename A3, typename A4,
2990 typename A5, typename X1, typename X2, typename X3>
2991inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
2992CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
2993 const P1& p1, const P2& p2, const P3& p3) {
2994 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
2995 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
2996 Tuple3<P1, P2, P3>, Tuple5<A1, A2, A3, A4, A5> >
2997 (obj, method, MakeTuple(p1, p2, p3));
2998 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
2999}
3000#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3001
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003002#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003003template <typename R, typename T, typename U, typename P1, typename P2,
3004 typename P3, typename A1, typename A2, typename A3, typename A4,
3005 typename A5, typename X1, typename X2, typename X3>
3006inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
3007CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
3008 const P1& p1, const P2& p2, const P3& p3) {
3009 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
3010 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
3011 Tuple3<P1, P2, P3>, Tuple5<A1, A2, A3, A4, A5> >
3012 (obj, method, MakeTuple(p1, p2, p3));
3013 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
3014}
3015
3016template <typename R, typename P1, typename P2, typename P3, typename A1,
3017 typename A2, typename A3, typename A4, typename A5, typename X1,
3018 typename X2, typename X3>
3019inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
3020CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4, A5),
3021 const P1& p1, const P2& p2, const P3& p3) {
3022 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
3023 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3, A4, A5),
3024 Tuple3<P1, P2, P3>, Tuple5<A1, A2, A3, A4, A5> >
3025 (function, MakeTuple(p1, p2, p3));
3026 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
3027}
3028#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3029template <typename R, typename T, typename U, typename P1, typename P2,
3030 typename P3, typename A1, typename A2, typename A3, typename A4,
3031 typename A5, typename X1, typename X2, typename X3>
3032inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
3033CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
3034 const P1& p1, const P2& p2, const P3& p3) {
3035 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
3036 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
3037 Tuple3<P1, P2, P3>, Tuple5<A1, A2, A3, A4, A5> >
3038 (obj, method, MakeTuple(p1, p2, p3));
3039 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
3040}
3041#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003042#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003043
3044// 3 - 6
3045template <typename R, typename T, typename U, typename P1, typename P2,
3046 typename P3, typename A1, typename A2, typename A3, typename A4,
3047 typename A5, typename A6, typename X1, typename X2, typename X3>
3048inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3049CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3050 const P1& p1, const P2& p2, const P3& p3) {
3051 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3052 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3053 Tuple3<P1, P2, P3>, Tuple6<A1, A2, A3, A4, A5, A6> >
3054 (obj, method, MakeTuple(p1, p2, p3));
3055 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3056}
3057
3058template <typename R, typename P1, typename P2, typename P3, typename A1,
3059 typename A2, typename A3, typename A4, typename A5, typename A6,
3060 typename X1, typename X2, typename X3>
3061inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3062CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4, A5, A6), const P1& p1,
3063 const P2& p2, const P3& p3) {
3064 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3065 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3066 Tuple3<P1, P2, P3>, Tuple6<A1, A2, A3, A4, A5, A6> >
3067 (function, MakeTuple(p1, p2, p3));
3068 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3069}
3070
3071#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3072template <typename R, typename T, typename U, typename P1, typename P2,
3073 typename P3, typename A1, typename A2, typename A3, typename A4,
3074 typename A5, typename A6, typename X1, typename X2, typename X3>
3075inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3076CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3077 const P1& p1, const P2& p2, const P3& p3) {
3078 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3079 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3080 Tuple3<P1, P2, P3>, Tuple6<A1, A2, A3, A4, A5, A6> >
3081 (obj, method, MakeTuple(p1, p2, p3));
3082 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3083}
3084#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3085
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003086#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003087template <typename R, typename T, typename U, typename P1, typename P2,
3088 typename P3, typename A1, typename A2, typename A3, typename A4,
3089 typename A5, typename A6, typename X1, typename X2, typename X3>
3090inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3091CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5,
3092 A6), const P1& p1, const P2& p2, const P3& p3) {
3093 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3094 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3095 Tuple3<P1, P2, P3>, Tuple6<A1, A2, A3, A4, A5, A6> >
3096 (obj, method, MakeTuple(p1, p2, p3));
3097 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3098}
3099
3100template <typename R, typename P1, typename P2, typename P3, typename A1,
3101 typename A2, typename A3, typename A4, typename A5, typename A6,
3102 typename X1, typename X2, typename X3>
3103inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3104CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3105 const P1& p1, const P2& p2, const P3& p3) {
3106 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3107 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3108 Tuple3<P1, P2, P3>, Tuple6<A1, A2, A3, A4, A5, A6> >
3109 (function, MakeTuple(p1, p2, p3));
3110 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3111}
3112#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3113template <typename R, typename T, typename U, typename P1, typename P2,
3114 typename P3, typename A1, typename A2, typename A3, typename A4,
3115 typename A5, typename A6, typename X1, typename X2, typename X3>
3116inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3117CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5,
3118 A6), const P1& p1, const P2& p2, const P3& p3) {
3119 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3120 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
3121 Tuple3<P1, P2, P3>, Tuple6<A1, A2, A3, A4, A5, A6> >
3122 (obj, method, MakeTuple(p1, p2, p3));
3123 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3124}
3125#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003126#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003127
stoyan@google.comce161d82009-10-27 09:05:00 +09003128// 4 - 0
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003129template <typename R, typename T, typename U, typename P1, typename P2,
3130 typename P3, typename P4, typename X1, typename X2, typename X3,
3131 typename X4>
stoyan@google.comce161d82009-10-27 09:05:00 +09003132inline MutantFunctor<R, Tuple0>
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003133CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09003134 const P2& p2, const P3& p3, const P4& p4) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003135 MutantRunner<R, Tuple0>* t =
3136 new Mutant<R, T, R (U::*)(X1, X2, X3, X4),
stoyan@google.comce161d82009-10-27 09:05:00 +09003137 Tuple4<P1, P2, P3, P4>, Tuple0>
3138 (obj, method, MakeTuple(p1, p2, p3, p4));
3139 return MutantFunctor<R, Tuple0>(t);
3140}
3141
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003142template <typename R, typename P1, typename P2, typename P3, typename P4,
3143 typename X1, typename X2, typename X3, typename X4>
stoyan@google.comce161d82009-10-27 09:05:00 +09003144inline MutantFunctor<R, Tuple0>
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003145CreateFunctor(R (*function)(X1, X2, X3, X4), const P1& p1, const P2& p2,
3146 const P3& p3, const P4& p4) {
3147 MutantRunner<R, Tuple0>* t =
3148 new MutantFunction<R, R (*)(X1, X2, X3, X4),
3149 Tuple4<P1, P2, P3, P4>, Tuple0>
3150 (function, MakeTuple(p1, p2, p3, p4));
3151 return MutantFunctor<R, Tuple0>(t);
3152}
3153
3154#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3155template <typename R, typename T, typename U, typename P1, typename P2,
3156 typename P3, typename P4, typename X1, typename X2, typename X3,
3157 typename X4>
3158inline MutantFunctor<R, Tuple0>
3159CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09003160 const P2& p2, const P3& p3, const P4& p4) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003161 MutantRunner<R, Tuple0>* t =
3162 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4),
stoyan@google.comce161d82009-10-27 09:05:00 +09003163 Tuple4<P1, P2, P3, P4>, Tuple0>
3164 (obj, method, MakeTuple(p1, p2, p3, p4));
3165 return MutantFunctor<R, Tuple0>(t);
3166}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003167#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3168
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003169#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003170template <typename R, typename T, typename U, typename P1, typename P2,
3171 typename P3, typename P4, typename X1, typename X2, typename X3,
3172 typename X4>
3173inline MutantFunctor<R, Tuple0>
3174CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1,
3175 const P2& p2, const P3& p3, const P4& p4) {
3176 MutantRunner<R, Tuple0>* t =
3177 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4),
3178 Tuple4<P1, P2, P3, P4>, Tuple0>
3179 (obj, method, MakeTuple(p1, p2, p3, p4));
3180 return MutantFunctor<R, Tuple0>(t);
3181}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09003182
3183template <typename R, typename P1, typename P2, typename P3, typename P4,
3184 typename X1, typename X2, typename X3, typename X4>
3185inline MutantFunctor<R, Tuple0>
3186CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4), const P1& p1,
3187 const P2& p2, const P3& p3, const P4& p4) {
3188 MutantRunner<R, Tuple0>* t =
3189 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4),
3190 Tuple4<P1, P2, P3, P4>, Tuple0>
3191 (function, MakeTuple(p1, p2, p3, p4));
3192 return MutantFunctor<R, Tuple0>(t);
3193}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09003194#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3195template <typename R, typename T, typename U, typename P1, typename P2,
3196 typename P3, typename P4, typename X1, typename X2, typename X3,
3197 typename X4>
3198inline MutantFunctor<R, Tuple0>
3199CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1,
3200 const P2& p2, const P3& p3, const P4& p4) {
3201 MutantRunner<R, Tuple0>* t =
3202 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4),
3203 Tuple4<P1, P2, P3, P4>, Tuple0>
3204 (obj, method, MakeTuple(p1, p2, p3, p4));
3205 return MutantFunctor<R, Tuple0>(t);
3206}
3207#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003208#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09003209
3210// 4 - 1
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003211template <typename R, typename T, typename U, typename P1, typename P2,
3212 typename P3, typename P4, typename A1, typename X1, typename X2,
3213 typename X3, typename X4>
stoyan@google.comce161d82009-10-27 09:05:00 +09003214inline MutantFunctor<R, Tuple1<A1> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003215CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09003216 const P2& p2, const P3& p3, const P4& p4) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003217 MutantRunner<R, Tuple1<A1> >* t =
3218 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1),
stoyan@google.comce161d82009-10-27 09:05:00 +09003219 Tuple4<P1, P2, P3, P4>, Tuple1<A1> >
3220 (obj, method, MakeTuple(p1, p2, p3, p4));
3221 return MutantFunctor<R, Tuple1<A1> >(t);
3222}
3223
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003224template <typename R, typename P1, typename P2, typename P3, typename P4,
3225 typename A1, typename X1, typename X2, typename X3, typename X4>
stoyan@google.comce161d82009-10-27 09:05:00 +09003226inline MutantFunctor<R, Tuple1<A1> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003227CreateFunctor(R (*function)(X1, X2, X3, X4, A1), const P1& p1, const P2& p2,
3228 const P3& p3, const P4& p4) {
3229 MutantRunner<R, Tuple1<A1> >* t =
3230 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1),
3231 Tuple4<P1, P2, P3, P4>, Tuple1<A1> >
3232 (function, MakeTuple(p1, p2, p3, p4));
3233 return MutantFunctor<R, Tuple1<A1> >(t);
3234}
3235
3236#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3237template <typename R, typename T, typename U, typename P1, typename P2,
3238 typename P3, typename P4, typename A1, typename X1, typename X2,
3239 typename X3, typename X4>
3240inline MutantFunctor<R, Tuple1<A1> >
3241CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09003242 const P2& p2, const P3& p3, const P4& p4) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003243 MutantRunner<R, Tuple1<A1> >* t =
3244 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1),
stoyan@google.comce161d82009-10-27 09:05:00 +09003245 Tuple4<P1, P2, P3, P4>, Tuple1<A1> >
3246 (obj, method, MakeTuple(p1, p2, p3, p4));
3247 return MutantFunctor<R, Tuple1<A1> >(t);
3248}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003249#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3250
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003251#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003252template <typename R, typename T, typename U, typename P1, typename P2,
3253 typename P3, typename P4, typename A1, typename X1, typename X2,
3254 typename X3, typename X4>
3255inline MutantFunctor<R, Tuple1<A1> >
3256CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1),
3257 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3258 MutantRunner<R, Tuple1<A1> >* t =
3259 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1),
3260 Tuple4<P1, P2, P3, P4>, Tuple1<A1> >
3261 (obj, method, MakeTuple(p1, p2, p3, p4));
3262 return MutantFunctor<R, Tuple1<A1> >(t);
3263}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09003264
3265template <typename R, typename P1, typename P2, typename P3, typename P4,
3266 typename A1, typename X1, typename X2, typename X3, typename X4>
3267inline MutantFunctor<R, Tuple1<A1> >
3268CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1), const P1& p1,
3269 const P2& p2, const P3& p3, const P4& p4) {
3270 MutantRunner<R, Tuple1<A1> >* t =
3271 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1),
3272 Tuple4<P1, P2, P3, P4>, Tuple1<A1> >
3273 (function, MakeTuple(p1, p2, p3, p4));
3274 return MutantFunctor<R, Tuple1<A1> >(t);
3275}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09003276#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3277template <typename R, typename T, typename U, typename P1, typename P2,
3278 typename P3, typename P4, typename A1, typename X1, typename X2,
3279 typename X3, typename X4>
3280inline MutantFunctor<R, Tuple1<A1> >
3281CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1),
3282 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3283 MutantRunner<R, Tuple1<A1> >* t =
3284 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1),
3285 Tuple4<P1, P2, P3, P4>, Tuple1<A1> >
3286 (obj, method, MakeTuple(p1, p2, p3, p4));
3287 return MutantFunctor<R, Tuple1<A1> >(t);
3288}
3289#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003290#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09003291
3292// 4 - 2
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003293template <typename R, typename T, typename U, typename P1, typename P2,
3294 typename P3, typename P4, typename A1, typename A2, typename X1,
3295 typename X2, typename X3, typename X4>
stoyan@google.comce161d82009-10-27 09:05:00 +09003296inline MutantFunctor<R, Tuple2<A1, A2> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003297CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09003298 const P2& p2, const P3& p3, const P4& p4) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003299 MutantRunner<R, Tuple2<A1, A2> >* t =
3300 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2),
stoyan@google.comce161d82009-10-27 09:05:00 +09003301 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> >
3302 (obj, method, MakeTuple(p1, p2, p3, p4));
3303 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3304}
3305
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003306template <typename R, typename P1, typename P2, typename P3, typename P4,
3307 typename A1, typename A2, typename X1, typename X2, typename X3,
3308 typename X4>
stoyan@google.comce161d82009-10-27 09:05:00 +09003309inline MutantFunctor<R, Tuple2<A1, A2> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003310CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2), const P1& p1, const P2& p2,
3311 const P3& p3, const P4& p4) {
3312 MutantRunner<R, Tuple2<A1, A2> >* t =
3313 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2),
3314 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> >
3315 (function, MakeTuple(p1, p2, p3, p4));
3316 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3317}
3318
3319#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3320template <typename R, typename T, typename U, typename P1, typename P2,
3321 typename P3, typename P4, typename A1, typename A2, typename X1,
3322 typename X2, typename X3, typename X4>
3323inline MutantFunctor<R, Tuple2<A1, A2> >
3324CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09003325 const P2& p2, const P3& p3, const P4& p4) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003326 MutantRunner<R, Tuple2<A1, A2> >* t =
3327 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2),
stoyan@google.comce161d82009-10-27 09:05:00 +09003328 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> >
3329 (obj, method, MakeTuple(p1, p2, p3, p4));
3330 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3331}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003332#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3333
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003334#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003335template <typename R, typename T, typename U, typename P1, typename P2,
3336 typename P3, typename P4, typename A1, typename A2, typename X1,
3337 typename X2, typename X3, typename X4>
3338inline MutantFunctor<R, Tuple2<A1, A2> >
3339CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2),
3340 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3341 MutantRunner<R, Tuple2<A1, A2> >* t =
3342 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2),
3343 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> >
3344 (obj, method, MakeTuple(p1, p2, p3, p4));
3345 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3346}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09003347
3348template <typename R, typename P1, typename P2, typename P3, typename P4,
3349 typename A1, typename A2, typename X1, typename X2, typename X3,
3350 typename X4>
3351inline MutantFunctor<R, Tuple2<A1, A2> >
3352CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2), const P1& p1,
3353 const P2& p2, const P3& p3, const P4& p4) {
3354 MutantRunner<R, Tuple2<A1, A2> >* t =
3355 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2),
3356 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> >
3357 (function, MakeTuple(p1, p2, p3, p4));
3358 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3359}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09003360#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3361template <typename R, typename T, typename U, typename P1, typename P2,
3362 typename P3, typename P4, typename A1, typename A2, typename X1,
3363 typename X2, typename X3, typename X4>
3364inline MutantFunctor<R, Tuple2<A1, A2> >
3365CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2),
3366 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3367 MutantRunner<R, Tuple2<A1, A2> >* t =
3368 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2),
3369 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> >
3370 (obj, method, MakeTuple(p1, p2, p3, p4));
3371 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3372}
3373#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003374#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09003375
3376// 4 - 3
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003377template <typename R, typename T, typename U, typename P1, typename P2,
3378 typename P3, typename P4, typename A1, typename A2, typename A3,
3379 typename X1, typename X2, typename X3, typename X4>
stoyan@google.comce161d82009-10-27 09:05:00 +09003380inline MutantFunctor<R, Tuple3<A1, A2, A3> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003381CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09003382 const P2& p2, const P3& p3, const P4& p4) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003383 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
3384 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3),
stoyan@google.comce161d82009-10-27 09:05:00 +09003385 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> >
3386 (obj, method, MakeTuple(p1, p2, p3, p4));
3387 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
3388}
3389
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003390template <typename R, typename P1, typename P2, typename P3, typename P4,
3391 typename A1, typename A2, typename A3, typename X1, typename X2,
3392 typename X3, typename X4>
stoyan@google.comce161d82009-10-27 09:05:00 +09003393inline MutantFunctor<R, Tuple3<A1, A2, A3> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003394CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
stoyan@google.comce161d82009-10-27 09:05:00 +09003395 const P2& p2, const P3& p3, const P4& p4) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003396 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
3397 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3),
3398 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> >
3399 (function, MakeTuple(p1, p2, p3, p4));
3400 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
3401}
3402
3403#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3404template <typename R, typename T, typename U, typename P1, typename P2,
3405 typename P3, typename P4, typename A1, typename A2, typename A3,
3406 typename X1, typename X2, typename X3, typename X4>
3407inline MutantFunctor<R, Tuple3<A1, A2, A3> >
3408CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
3409 const P2& p2, const P3& p3, const P4& p4) {
3410 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
3411 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3),
stoyan@google.comce161d82009-10-27 09:05:00 +09003412 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> >
3413 (obj, method, MakeTuple(p1, p2, p3, p4));
3414 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
3415}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003416#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3417
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003418#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003419template <typename R, typename T, typename U, typename P1, typename P2,
3420 typename P3, typename P4, typename A1, typename A2, typename A3,
3421 typename X1, typename X2, typename X3, typename X4>
3422inline MutantFunctor<R, Tuple3<A1, A2, A3> >
3423CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3),
3424 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3425 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
3426 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3),
3427 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> >
3428 (obj, method, MakeTuple(p1, p2, p3, p4));
3429 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
3430}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09003431
3432template <typename R, typename P1, typename P2, typename P3, typename P4,
3433 typename A1, typename A2, typename A3, typename X1, typename X2,
3434 typename X3, typename X4>
3435inline MutantFunctor<R, Tuple3<A1, A2, A3> >
3436CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
3437 const P2& p2, const P3& p3, const P4& p4) {
3438 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
3439 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3),
3440 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> >
3441 (function, MakeTuple(p1, p2, p3, p4));
3442 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
3443}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09003444#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3445template <typename R, typename T, typename U, typename P1, typename P2,
3446 typename P3, typename P4, typename A1, typename A2, typename A3,
3447 typename X1, typename X2, typename X3, typename X4>
3448inline MutantFunctor<R, Tuple3<A1, A2, A3> >
3449CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3),
3450 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3451 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
3452 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3),
3453 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> >
3454 (obj, method, MakeTuple(p1, p2, p3, p4));
3455 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
3456}
3457#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003458#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09003459
3460// 4 - 4
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003461template <typename R, typename T, typename U, typename P1, typename P2,
3462 typename P3, typename P4, typename A1, typename A2, typename A3,
3463 typename A4, typename X1, typename X2, typename X3, typename X4>
stoyan@google.comce161d82009-10-27 09:05:00 +09003464inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003465CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09003466 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003467 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
3468 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09003469 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> >
3470 (obj, method, MakeTuple(p1, p2, p3, p4));
3471 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
3472}
3473
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003474template <typename R, typename P1, typename P2, typename P3, typename P4,
3475 typename A1, typename A2, typename A3, typename A4, typename X1,
3476 typename X2, typename X3, typename X4>
stoyan@google.comce161d82009-10-27 09:05:00 +09003477inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003478CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4), const P1& p1,
3479 const P2& p2, const P3& p3, const P4& p4) {
3480 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
3481 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3, A4),
3482 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> >
3483 (function, MakeTuple(p1, p2, p3, p4));
3484 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
3485}
3486
3487#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3488template <typename R, typename T, typename U, typename P1, typename P2,
3489 typename P3, typename P4, typename A1, typename A2, typename A3,
3490 typename A4, typename X1, typename X2, typename X3, typename X4>
3491inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
3492CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09003493 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003494 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
3495 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
stoyan@google.comce161d82009-10-27 09:05:00 +09003496 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> >
3497 (obj, method, MakeTuple(p1, p2, p3, p4));
3498 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
3499}
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003500#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3501
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003502#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@chromium.org81758fe2009-11-13 08:10:11 +09003503template <typename R, typename T, typename U, typename P1, typename P2,
3504 typename P3, typename P4, typename A1, typename A2, typename A3,
3505 typename A4, typename X1, typename X2, typename X3, typename X4>
3506inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
3507CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
3508 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3509 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
3510 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
3511 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> >
3512 (obj, method, MakeTuple(p1, p2, p3, p4));
3513 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
3514}
stoyan@chromium.orgfec229c2009-11-21 01:36:13 +09003515
3516template <typename R, typename P1, typename P2, typename P3, typename P4,
3517 typename A1, typename A2, typename A3, typename A4, typename X1,
3518 typename X2, typename X3, typename X4>
3519inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
3520CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4),
3521 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3522 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
3523 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3, A4),
3524 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> >
3525 (function, MakeTuple(p1, p2, p3, p4));
3526 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
3527}
stoyan@chromium.org1d240ae2009-11-17 07:07:04 +09003528#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3529template <typename R, typename T, typename U, typename P1, typename P2,
3530 typename P3, typename P4, typename A1, typename A2, typename A3,
3531 typename A4, typename X1, typename X2, typename X3, typename X4>
3532inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
3533CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
3534 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3535 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
3536 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
3537 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> >
3538 (obj, method, MakeTuple(p1, p2, p3, p4));
3539 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
3540}
3541#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003542#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
stoyan@google.comce161d82009-10-27 09:05:00 +09003543
amit@chromium.orge025b842010-02-13 03:19:07 +09003544// 4 - 5
3545template <typename R, typename T, typename U, typename P1, typename P2,
3546 typename P3, typename P4, typename A1, typename A2, typename A3,
3547 typename A4, typename A5, typename X1, typename X2, typename X3,
3548 typename X4>
3549inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
3550CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3551 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3552 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
3553 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3554 Tuple4<P1, P2, P3, P4>, Tuple5<A1, A2, A3, A4, A5> >
3555 (obj, method, MakeTuple(p1, p2, p3, p4));
3556 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
3557}
3558
3559template <typename R, typename P1, typename P2, typename P3, typename P4,
3560 typename A1, typename A2, typename A3, typename A4, typename A5,
3561 typename X1, typename X2, typename X3, typename X4>
3562inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
3563CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4, A5), const P1& p1,
3564 const P2& p2, const P3& p3, const P4& p4) {
3565 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
3566 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3567 Tuple4<P1, P2, P3, P4>, Tuple5<A1, A2, A3, A4, A5> >
3568 (function, MakeTuple(p1, p2, p3, p4));
3569 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
3570}
3571
3572#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3573template <typename R, typename T, typename U, typename P1, typename P2,
3574 typename P3, typename P4, typename A1, typename A2, typename A3,
3575 typename A4, typename A5, typename X1, typename X2, typename X3,
3576 typename X4>
3577inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
3578CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3579 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3580 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
3581 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3582 Tuple4<P1, P2, P3, P4>, Tuple5<A1, A2, A3, A4, A5> >
3583 (obj, method, MakeTuple(p1, p2, p3, p4));
3584 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
3585}
3586#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3587
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003588#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003589template <typename R, typename T, typename U, typename P1, typename P2,
3590 typename P3, typename P4, typename A1, typename A2, typename A3,
3591 typename A4, typename A5, typename X1, typename X2, typename X3,
3592 typename X4>
3593inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
3594CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
3595 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3596 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
3597 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3598 Tuple4<P1, P2, P3, P4>, Tuple5<A1, A2, A3, A4, A5> >
3599 (obj, method, MakeTuple(p1, p2, p3, p4));
3600 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
3601}
3602
3603template <typename R, typename P1, typename P2, typename P3, typename P4,
3604 typename A1, typename A2, typename A3, typename A4, typename A5,
3605 typename X1, typename X2, typename X3, typename X4>
3606inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
3607CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3608 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3609 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
3610 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3611 Tuple4<P1, P2, P3, P4>, Tuple5<A1, A2, A3, A4, A5> >
3612 (function, MakeTuple(p1, p2, p3, p4));
3613 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
3614}
3615#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3616template <typename R, typename T, typename U, typename P1, typename P2,
3617 typename P3, typename P4, typename A1, typename A2, typename A3,
3618 typename A4, typename A5, typename X1, typename X2, typename X3,
3619 typename X4>
3620inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
3621CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
3622 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3623 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
3624 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
3625 Tuple4<P1, P2, P3, P4>, Tuple5<A1, A2, A3, A4, A5> >
3626 (obj, method, MakeTuple(p1, p2, p3, p4));
3627 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
3628}
3629#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003630#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003631
3632// 4 - 6
3633template <typename R, typename T, typename U, typename P1, typename P2,
3634 typename P3, typename P4, typename A1, typename A2, typename A3,
3635 typename A4, typename A5, typename A6, typename X1, typename X2,
3636 typename X3, typename X4>
3637inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3638CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3639 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3640 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3641 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3642 Tuple4<P1, P2, P3, P4>, Tuple6<A1, A2, A3, A4, A5, A6> >
3643 (obj, method, MakeTuple(p1, p2, p3, p4));
3644 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3645}
3646
3647template <typename R, typename P1, typename P2, typename P3, typename P4,
3648 typename A1, typename A2, typename A3, typename A4, typename A5,
3649 typename A6, typename X1, typename X2, typename X3, typename X4>
3650inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3651CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3652 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3653 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3654 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3655 Tuple4<P1, P2, P3, P4>, Tuple6<A1, A2, A3, A4, A5, A6> >
3656 (function, MakeTuple(p1, p2, p3, p4));
3657 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3658}
3659
3660#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3661template <typename R, typename T, typename U, typename P1, typename P2,
3662 typename P3, typename P4, typename A1, typename A2, typename A3,
3663 typename A4, typename A5, typename A6, typename X1, typename X2,
3664 typename X3, typename X4>
3665inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3666CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3667 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3668 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3669 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3670 Tuple4<P1, P2, P3, P4>, Tuple6<A1, A2, A3, A4, A5, A6> >
3671 (obj, method, MakeTuple(p1, p2, p3, p4));
3672 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3673}
3674#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3675
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003676#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003677template <typename R, typename T, typename U, typename P1, typename P2,
3678 typename P3, typename P4, typename A1, typename A2, typename A3,
3679 typename A4, typename A5, typename A6, typename X1, typename X2,
3680 typename X3, typename X4>
3681inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3682CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
3683 A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3684 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3685 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3686 Tuple4<P1, P2, P3, P4>, Tuple6<A1, A2, A3, A4, A5, A6> >
3687 (obj, method, MakeTuple(p1, p2, p3, p4));
3688 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3689}
3690
3691template <typename R, typename P1, typename P2, typename P3, typename P4,
3692 typename A1, typename A2, typename A3, typename A4, typename A5,
3693 typename A6, typename X1, typename X2, typename X3, typename X4>
3694inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3695CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3696 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3697 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3698 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3699 Tuple4<P1, P2, P3, P4>, Tuple6<A1, A2, A3, A4, A5, A6> >
3700 (function, MakeTuple(p1, p2, p3, p4));
3701 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3702}
3703#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3704template <typename R, typename T, typename U, typename P1, typename P2,
3705 typename P3, typename P4, typename A1, typename A2, typename A3,
3706 typename A4, typename A5, typename A6, typename X1, typename X2,
3707 typename X3, typename X4>
3708inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
3709CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
3710 A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3711 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
3712 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
3713 Tuple4<P1, P2, P3, P4>, Tuple6<A1, A2, A3, A4, A5, A6> >
3714 (obj, method, MakeTuple(p1, p2, p3, p4));
3715 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
3716}
3717#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003718#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003719
3720// 5 - 0
3721template <typename R, typename T, typename U, typename P1, typename P2,
3722 typename P3, typename P4, typename P5, typename X1, typename X2,
3723 typename X3, typename X4, typename X5>
3724inline MutantFunctor<R, Tuple0>
3725CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5), const P1& p1,
3726 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3727 MutantRunner<R, Tuple0>* t =
3728 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5),
3729 Tuple5<P1, P2, P3, P4, P5>, Tuple0>
3730 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3731 return MutantFunctor<R, Tuple0>(t);
3732}
3733
3734template <typename R, typename P1, typename P2, typename P3, typename P4,
3735 typename P5, typename X1, typename X2, typename X3, typename X4,
3736 typename X5>
3737inline MutantFunctor<R, Tuple0>
3738CreateFunctor(R (*function)(X1, X2, X3, X4, X5), const P1& p1, const P2& p2,
3739 const P3& p3, const P4& p4, const P5& p5) {
3740 MutantRunner<R, Tuple0>* t =
3741 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5),
3742 Tuple5<P1, P2, P3, P4, P5>, Tuple0>
3743 (function, MakeTuple(p1, p2, p3, p4, p5));
3744 return MutantFunctor<R, Tuple0>(t);
3745}
3746
3747#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3748template <typename R, typename T, typename U, typename P1, typename P2,
3749 typename P3, typename P4, typename P5, typename X1, typename X2,
3750 typename X3, typename X4, typename X5>
3751inline MutantFunctor<R, Tuple0>
3752CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5), const P1& p1,
3753 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3754 MutantRunner<R, Tuple0>* t =
3755 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5),
3756 Tuple5<P1, P2, P3, P4, P5>, Tuple0>
3757 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3758 return MutantFunctor<R, Tuple0>(t);
3759}
3760#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3761
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003762#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003763template <typename R, typename T, typename U, typename P1, typename P2,
3764 typename P3, typename P4, typename P5, typename X1, typename X2,
3765 typename X3, typename X4, typename X5>
3766inline MutantFunctor<R, Tuple0>
3767CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5),
3768 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3769 MutantRunner<R, Tuple0>* t =
3770 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5),
3771 Tuple5<P1, P2, P3, P4, P5>, Tuple0>
3772 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3773 return MutantFunctor<R, Tuple0>(t);
3774}
3775
3776template <typename R, typename P1, typename P2, typename P3, typename P4,
3777 typename P5, typename X1, typename X2, typename X3, typename X4,
3778 typename X5>
3779inline MutantFunctor<R, Tuple0>
3780CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5), const P1& p1,
3781 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3782 MutantRunner<R, Tuple0>* t =
3783 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5),
3784 Tuple5<P1, P2, P3, P4, P5>, Tuple0>
3785 (function, MakeTuple(p1, p2, p3, p4, p5));
3786 return MutantFunctor<R, Tuple0>(t);
3787}
3788#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3789template <typename R, typename T, typename U, typename P1, typename P2,
3790 typename P3, typename P4, typename P5, typename X1, typename X2,
3791 typename X3, typename X4, typename X5>
3792inline MutantFunctor<R, Tuple0>
3793CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5),
3794 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3795 MutantRunner<R, Tuple0>* t =
3796 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5),
3797 Tuple5<P1, P2, P3, P4, P5>, Tuple0>
3798 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3799 return MutantFunctor<R, Tuple0>(t);
3800}
3801#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003802#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003803
3804// 5 - 1
3805template <typename R, typename T, typename U, typename P1, typename P2,
3806 typename P3, typename P4, typename P5, typename A1, typename X1,
3807 typename X2, typename X3, typename X4, typename X5>
3808inline MutantFunctor<R, Tuple1<A1> >
3809CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1), const P1& p1,
3810 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3811 MutantRunner<R, Tuple1<A1> >* t =
3812 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1),
3813 Tuple5<P1, P2, P3, P4, P5>, Tuple1<A1> >
3814 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3815 return MutantFunctor<R, Tuple1<A1> >(t);
3816}
3817
3818template <typename R, typename P1, typename P2, typename P3, typename P4,
3819 typename P5, typename A1, typename X1, typename X2, typename X3,
3820 typename X4, typename X5>
3821inline MutantFunctor<R, Tuple1<A1> >
3822CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1), const P1& p1, const P2& p2,
3823 const P3& p3, const P4& p4, const P5& p5) {
3824 MutantRunner<R, Tuple1<A1> >* t =
3825 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1),
3826 Tuple5<P1, P2, P3, P4, P5>, Tuple1<A1> >
3827 (function, MakeTuple(p1, p2, p3, p4, p5));
3828 return MutantFunctor<R, Tuple1<A1> >(t);
3829}
3830
3831#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3832template <typename R, typename T, typename U, typename P1, typename P2,
3833 typename P3, typename P4, typename P5, typename A1, typename X1,
3834 typename X2, typename X3, typename X4, typename X5>
3835inline MutantFunctor<R, Tuple1<A1> >
3836CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1), const P1& p1,
3837 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3838 MutantRunner<R, Tuple1<A1> >* t =
3839 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1),
3840 Tuple5<P1, P2, P3, P4, P5>, Tuple1<A1> >
3841 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3842 return MutantFunctor<R, Tuple1<A1> >(t);
3843}
3844#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3845
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003846#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003847template <typename R, typename T, typename U, typename P1, typename P2,
3848 typename P3, typename P4, typename P5, typename A1, typename X1,
3849 typename X2, typename X3, typename X4, typename X5>
3850inline MutantFunctor<R, Tuple1<A1> >
3851CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1),
3852 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3853 MutantRunner<R, Tuple1<A1> >* t =
3854 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1),
3855 Tuple5<P1, P2, P3, P4, P5>, Tuple1<A1> >
3856 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3857 return MutantFunctor<R, Tuple1<A1> >(t);
3858}
3859
3860template <typename R, typename P1, typename P2, typename P3, typename P4,
3861 typename P5, typename A1, typename X1, typename X2, typename X3,
3862 typename X4, typename X5>
3863inline MutantFunctor<R, Tuple1<A1> >
3864CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1), const P1& p1,
3865 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3866 MutantRunner<R, Tuple1<A1> >* t =
3867 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1),
3868 Tuple5<P1, P2, P3, P4, P5>, Tuple1<A1> >
3869 (function, MakeTuple(p1, p2, p3, p4, p5));
3870 return MutantFunctor<R, Tuple1<A1> >(t);
3871}
3872#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3873template <typename R, typename T, typename U, typename P1, typename P2,
3874 typename P3, typename P4, typename P5, typename A1, typename X1,
3875 typename X2, typename X3, typename X4, typename X5>
3876inline MutantFunctor<R, Tuple1<A1> >
3877CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1),
3878 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3879 MutantRunner<R, Tuple1<A1> >* t =
3880 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1),
3881 Tuple5<P1, P2, P3, P4, P5>, Tuple1<A1> >
3882 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3883 return MutantFunctor<R, Tuple1<A1> >(t);
3884}
3885#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003886#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003887
3888// 5 - 2
3889template <typename R, typename T, typename U, typename P1, typename P2,
3890 typename P3, typename P4, typename P5, typename A1, typename A2,
3891 typename X1, typename X2, typename X3, typename X4, typename X5>
3892inline MutantFunctor<R, Tuple2<A1, A2> >
3893CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
3894 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3895 MutantRunner<R, Tuple2<A1, A2> >* t =
3896 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2),
3897 Tuple5<P1, P2, P3, P4, P5>, Tuple2<A1, A2> >
3898 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3899 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3900}
3901
3902template <typename R, typename P1, typename P2, typename P3, typename P4,
3903 typename P5, typename A1, typename A2, typename X1, typename X2,
3904 typename X3, typename X4, typename X5>
3905inline MutantFunctor<R, Tuple2<A1, A2> >
3906CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
3907 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3908 MutantRunner<R, Tuple2<A1, A2> >* t =
3909 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2),
3910 Tuple5<P1, P2, P3, P4, P5>, Tuple2<A1, A2> >
3911 (function, MakeTuple(p1, p2, p3, p4, p5));
3912 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3913}
3914
3915#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3916template <typename R, typename T, typename U, typename P1, typename P2,
3917 typename P3, typename P4, typename P5, typename A1, typename A2,
3918 typename X1, typename X2, typename X3, typename X4, typename X5>
3919inline MutantFunctor<R, Tuple2<A1, A2> >
3920CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
3921 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3922 MutantRunner<R, Tuple2<A1, A2> >* t =
3923 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2),
3924 Tuple5<P1, P2, P3, P4, P5>, Tuple2<A1, A2> >
3925 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3926 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3927}
3928#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3929
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003930#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003931template <typename R, typename T, typename U, typename P1, typename P2,
3932 typename P3, typename P4, typename P5, typename A1, typename A2,
3933 typename X1, typename X2, typename X3, typename X4, typename X5>
3934inline MutantFunctor<R, Tuple2<A1, A2> >
3935CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2),
3936 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3937 MutantRunner<R, Tuple2<A1, A2> >* t =
3938 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2),
3939 Tuple5<P1, P2, P3, P4, P5>, Tuple2<A1, A2> >
3940 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3941 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3942}
3943
3944template <typename R, typename P1, typename P2, typename P3, typename P4,
3945 typename P5, typename A1, typename A2, typename X1, typename X2,
3946 typename X3, typename X4, typename X5>
3947inline MutantFunctor<R, Tuple2<A1, A2> >
3948CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
3949 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3950 MutantRunner<R, Tuple2<A1, A2> >* t =
3951 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2),
3952 Tuple5<P1, P2, P3, P4, P5>, Tuple2<A1, A2> >
3953 (function, MakeTuple(p1, p2, p3, p4, p5));
3954 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3955}
3956#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3957template <typename R, typename T, typename U, typename P1, typename P2,
3958 typename P3, typename P4, typename P5, typename A1, typename A2,
3959 typename X1, typename X2, typename X3, typename X4, typename X5>
3960inline MutantFunctor<R, Tuple2<A1, A2> >
3961CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2),
3962 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3963 MutantRunner<R, Tuple2<A1, A2> >* t =
3964 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2),
3965 Tuple5<P1, P2, P3, P4, P5>, Tuple2<A1, A2> >
3966 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3967 return MutantFunctor<R, Tuple2<A1, A2> >(t);
3968}
3969#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09003970#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09003971
3972// 5 - 3
3973template <typename R, typename T, typename U, typename P1, typename P2,
3974 typename P3, typename P4, typename P5, typename A1, typename A2,
3975 typename A3, typename X1, typename X2, typename X3, typename X4,
3976 typename X5>
3977inline MutantFunctor<R, Tuple3<A1, A2, A3> >
3978CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
3979 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3980 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
3981 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
3982 Tuple5<P1, P2, P3, P4, P5>, Tuple3<A1, A2, A3> >
3983 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
3984 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
3985}
3986
3987template <typename R, typename P1, typename P2, typename P3, typename P4,
3988 typename P5, typename A1, typename A2, typename A3, typename X1,
3989 typename X2, typename X3, typename X4, typename X5>
3990inline MutantFunctor<R, Tuple3<A1, A2, A3> >
3991CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3), const P1& p1,
3992 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3993 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
3994 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3),
3995 Tuple5<P1, P2, P3, P4, P5>, Tuple3<A1, A2, A3> >
3996 (function, MakeTuple(p1, p2, p3, p4, p5));
3997 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
3998}
3999
4000#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4001template <typename R, typename T, typename U, typename P1, typename P2,
4002 typename P3, typename P4, typename P5, typename A1, typename A2,
4003 typename A3, typename X1, typename X2, typename X3, typename X4,
4004 typename X5>
4005inline MutantFunctor<R, Tuple3<A1, A2, A3> >
4006CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
4007 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4008 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
4009 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
4010 Tuple5<P1, P2, P3, P4, P5>, Tuple3<A1, A2, A3> >
4011 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4012 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
4013}
4014#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4015
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004016#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004017template <typename R, typename T, typename U, typename P1, typename P2,
4018 typename P3, typename P4, typename P5, typename A1, typename A2,
4019 typename A3, typename X1, typename X2, typename X3, typename X4,
4020 typename X5>
4021inline MutantFunctor<R, Tuple3<A1, A2, A3> >
4022CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
4023 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4024 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
4025 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
4026 Tuple5<P1, P2, P3, P4, P5>, Tuple3<A1, A2, A3> >
4027 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4028 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
4029}
4030
4031template <typename R, typename P1, typename P2, typename P3, typename P4,
4032 typename P5, typename A1, typename A2, typename A3, typename X1,
4033 typename X2, typename X3, typename X4, typename X5>
4034inline MutantFunctor<R, Tuple3<A1, A2, A3> >
4035CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3),
4036 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4037 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
4038 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3),
4039 Tuple5<P1, P2, P3, P4, P5>, Tuple3<A1, A2, A3> >
4040 (function, MakeTuple(p1, p2, p3, p4, p5));
4041 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
4042}
4043#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4044template <typename R, typename T, typename U, typename P1, typename P2,
4045 typename P3, typename P4, typename P5, typename A1, typename A2,
4046 typename A3, typename X1, typename X2, typename X3, typename X4,
4047 typename X5>
4048inline MutantFunctor<R, Tuple3<A1, A2, A3> >
4049CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
4050 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4051 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
4052 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
4053 Tuple5<P1, P2, P3, P4, P5>, Tuple3<A1, A2, A3> >
4054 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4055 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
4056}
4057#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004058#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004059
4060// 5 - 4
4061template <typename R, typename T, typename U, typename P1, typename P2,
4062 typename P3, typename P4, typename P5, typename A1, typename A2,
4063 typename A3, typename A4, typename X1, typename X2, typename X3,
4064 typename X4, typename X5>
4065inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4066CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4067 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4068 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4069 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4070 Tuple5<P1, P2, P3, P4, P5>, Tuple4<A1, A2, A3, A4> >
4071 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4072 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4073}
4074
4075template <typename R, typename P1, typename P2, typename P3, typename P4,
4076 typename P5, typename A1, typename A2, typename A3, typename A4,
4077 typename X1, typename X2, typename X3, typename X4, typename X5>
4078inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4079CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4), const P1& p1,
4080 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4081 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4082 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4083 Tuple5<P1, P2, P3, P4, P5>, Tuple4<A1, A2, A3, A4> >
4084 (function, MakeTuple(p1, p2, p3, p4, p5));
4085 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4086}
4087
4088#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4089template <typename R, typename T, typename U, typename P1, typename P2,
4090 typename P3, typename P4, typename P5, typename A1, typename A2,
4091 typename A3, typename A4, typename X1, typename X2, typename X3,
4092 typename X4, typename X5>
4093inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4094CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4095 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4096 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4097 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4098 Tuple5<P1, P2, P3, P4, P5>, Tuple4<A1, A2, A3, A4> >
4099 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4100 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4101}
4102#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4103
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004104#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004105template <typename R, typename T, typename U, typename P1, typename P2,
4106 typename P3, typename P4, typename P5, typename A1, typename A2,
4107 typename A3, typename A4, typename X1, typename X2, typename X3,
4108 typename X4, typename X5>
4109inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4110CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4111 A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4112 const P5& p5) {
4113 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4114 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4115 Tuple5<P1, P2, P3, P4, P5>, Tuple4<A1, A2, A3, A4> >
4116 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4117 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4118}
4119
4120template <typename R, typename P1, typename P2, typename P3, typename P4,
4121 typename P5, typename A1, typename A2, typename A3, typename A4,
4122 typename X1, typename X2, typename X3, typename X4, typename X5>
4123inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4124CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4125 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4126 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4127 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4128 Tuple5<P1, P2, P3, P4, P5>, Tuple4<A1, A2, A3, A4> >
4129 (function, MakeTuple(p1, p2, p3, p4, p5));
4130 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4131}
4132#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4133template <typename R, typename T, typename U, typename P1, typename P2,
4134 typename P3, typename P4, typename P5, typename A1, typename A2,
4135 typename A3, typename A4, typename X1, typename X2, typename X3,
4136 typename X4, typename X5>
4137inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4138CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4139 A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4140 const P5& p5) {
4141 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4142 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
4143 Tuple5<P1, P2, P3, P4, P5>, Tuple4<A1, A2, A3, A4> >
4144 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4145 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4146}
4147#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004148#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004149
4150// 5 - 5
4151template <typename R, typename T, typename U, typename P1, typename P2,
4152 typename P3, typename P4, typename P5, typename A1, typename A2,
4153 typename A3, typename A4, typename A5, typename X1, typename X2,
4154 typename X3, typename X4, typename X5>
4155inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4156CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4157 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4158 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4159 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4160 Tuple5<P1, P2, P3, P4, P5>, Tuple5<A1, A2, A3, A4, A5> >
4161 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4162 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4163}
4164
4165template <typename R, typename P1, typename P2, typename P3, typename P4,
4166 typename P5, typename A1, typename A2, typename A3, typename A4,
4167 typename A5, typename X1, typename X2, typename X3, typename X4,
4168 typename X5>
4169inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4170CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4171 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4172 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4173 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4174 Tuple5<P1, P2, P3, P4, P5>, Tuple5<A1, A2, A3, A4, A5> >
4175 (function, MakeTuple(p1, p2, p3, p4, p5));
4176 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4177}
4178
4179#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4180template <typename R, typename T, typename U, typename P1, typename P2,
4181 typename P3, typename P4, typename P5, typename A1, typename A2,
4182 typename A3, typename A4, typename A5, typename X1, typename X2,
4183 typename X3, typename X4, typename X5>
4184inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4185CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4186 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4187 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4188 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4189 Tuple5<P1, P2, P3, P4, P5>, Tuple5<A1, A2, A3, A4, A5> >
4190 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4191 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4192}
4193#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4194
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004195#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004196template <typename R, typename T, typename U, typename P1, typename P2,
4197 typename P3, typename P4, typename P5, typename A1, typename A2,
4198 typename A3, typename A4, typename A5, typename X1, typename X2,
4199 typename X3, typename X4, typename X5>
4200inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4201CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4202 A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4203 const P5& p5) {
4204 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4205 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4206 Tuple5<P1, P2, P3, P4, P5>, Tuple5<A1, A2, A3, A4, A5> >
4207 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4208 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4209}
4210
4211template <typename R, typename P1, typename P2, typename P3, typename P4,
4212 typename P5, typename A1, typename A2, typename A3, typename A4,
4213 typename A5, typename X1, typename X2, typename X3, typename X4,
4214 typename X5>
4215inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4216CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4217 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4218 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4219 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4220 Tuple5<P1, P2, P3, P4, P5>, Tuple5<A1, A2, A3, A4, A5> >
4221 (function, MakeTuple(p1, p2, p3, p4, p5));
4222 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4223}
4224#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4225template <typename R, typename T, typename U, typename P1, typename P2,
4226 typename P3, typename P4, typename P5, typename A1, typename A2,
4227 typename A3, typename A4, typename A5, typename X1, typename X2,
4228 typename X3, typename X4, typename X5>
4229inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4230CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4231 A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4232 const P5& p5) {
4233 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4234 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
4235 Tuple5<P1, P2, P3, P4, P5>, Tuple5<A1, A2, A3, A4, A5> >
4236 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4237 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4238}
4239#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004240#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004241
4242// 5 - 6
4243template <typename R, typename T, typename U, typename P1, typename P2,
4244 typename P3, typename P4, typename P5, typename A1, typename A2,
4245 typename A3, typename A4, typename A5, typename A6, typename X1,
4246 typename X2, typename X3, typename X4, typename X5>
4247inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4248CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5,
4249 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4250 const P5& p5) {
4251 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4252 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
4253 Tuple5<P1, P2, P3, P4, P5>, Tuple6<A1, A2, A3, A4, A5, A6> >
4254 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4255 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4256}
4257
4258template <typename R, typename P1, typename P2, typename P3, typename P4,
4259 typename P5, typename A1, typename A2, typename A3, typename A4,
4260 typename A5, typename A6, typename X1, typename X2, typename X3,
4261 typename X4, typename X5>
4262inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4263CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
4264 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4265 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4266 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
4267 Tuple5<P1, P2, P3, P4, P5>, Tuple6<A1, A2, A3, A4, A5, A6> >
4268 (function, MakeTuple(p1, p2, p3, p4, p5));
4269 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4270}
4271
4272#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4273template <typename R, typename T, typename U, typename P1, typename P2,
4274 typename P3, typename P4, typename P5, typename A1, typename A2,
4275 typename A3, typename A4, typename A5, typename A6, typename X1,
4276 typename X2, typename X3, typename X4, typename X5>
4277inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4278CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5,
4279 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4280 const P5& p5) {
4281 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4282 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
4283 Tuple5<P1, P2, P3, P4, P5>, Tuple6<A1, A2, A3, A4, A5, A6> >
4284 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4285 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4286}
4287#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4288
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004289#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004290template <typename R, typename T, typename U, typename P1, typename P2,
4291 typename P3, typename P4, typename P5, typename A1, typename A2,
4292 typename A3, typename A4, typename A5, typename A6, typename X1,
4293 typename X2, typename X3, typename X4, typename X5>
4294inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4295CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4296 A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4297 const P5& p5) {
4298 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4299 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
4300 Tuple5<P1, P2, P3, P4, P5>, Tuple6<A1, A2, A3, A4, A5, A6> >
4301 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4302 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4303}
4304
4305template <typename R, typename P1, typename P2, typename P3, typename P4,
4306 typename P5, typename A1, typename A2, typename A3, typename A4,
4307 typename A5, typename A6, typename X1, typename X2, typename X3,
4308 typename X4, typename X5>
4309inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4310CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5,
4311 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4312 const P5& p5) {
4313 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4314 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
4315 Tuple5<P1, P2, P3, P4, P5>, Tuple6<A1, A2, A3, A4, A5, A6> >
4316 (function, MakeTuple(p1, p2, p3, p4, p5));
4317 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4318}
4319#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4320template <typename R, typename T, typename U, typename P1, typename P2,
4321 typename P3, typename P4, typename P5, typename A1, typename A2,
4322 typename A3, typename A4, typename A5, typename A6, typename X1,
4323 typename X2, typename X3, typename X4, typename X5>
4324inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4325CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
4326 A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4327 const P5& p5) {
4328 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4329 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
4330 Tuple5<P1, P2, P3, P4, P5>, Tuple6<A1, A2, A3, A4, A5, A6> >
4331 (obj, method, MakeTuple(p1, p2, p3, p4, p5));
4332 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4333}
4334#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004335#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004336
4337// 6 - 0
4338template <typename R, typename T, typename U, typename P1, typename P2,
4339 typename P3, typename P4, typename P5, typename P6, typename X1,
4340 typename X2, typename X3, typename X4, typename X5, typename X6>
4341inline MutantFunctor<R, Tuple0>
4342CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6), const P1& p1,
4343 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4344 MutantRunner<R, Tuple0>* t =
4345 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6),
4346 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple0>
4347 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4348 return MutantFunctor<R, Tuple0>(t);
4349}
4350
4351template <typename R, typename P1, typename P2, typename P3, typename P4,
4352 typename P5, typename P6, typename X1, typename X2, typename X3,
4353 typename X4, typename X5, typename X6>
4354inline MutantFunctor<R, Tuple0>
4355CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6), const P1& p1, const P2& p2,
4356 const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4357 MutantRunner<R, Tuple0>* t =
4358 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6),
4359 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple0>
4360 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4361 return MutantFunctor<R, Tuple0>(t);
4362}
4363
4364#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4365template <typename R, typename T, typename U, typename P1, typename P2,
4366 typename P3, typename P4, typename P5, typename P6, typename X1,
4367 typename X2, typename X3, typename X4, typename X5, typename X6>
4368inline MutantFunctor<R, Tuple0>
4369CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6), const P1& p1,
4370 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4371 MutantRunner<R, Tuple0>* t =
4372 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6),
4373 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple0>
4374 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4375 return MutantFunctor<R, Tuple0>(t);
4376}
4377#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4378
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004379#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004380template <typename R, typename T, typename U, typename P1, typename P2,
4381 typename P3, typename P4, typename P5, typename P6, typename X1,
4382 typename X2, typename X3, typename X4, typename X5, typename X6>
4383inline MutantFunctor<R, Tuple0>
4384CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6),
4385 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4386 const P6& p6) {
4387 MutantRunner<R, Tuple0>* t =
4388 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6),
4389 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple0>
4390 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4391 return MutantFunctor<R, Tuple0>(t);
4392}
4393
4394template <typename R, typename P1, typename P2, typename P3, typename P4,
4395 typename P5, typename P6, typename X1, typename X2, typename X3,
4396 typename X4, typename X5, typename X6>
4397inline MutantFunctor<R, Tuple0>
4398CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6), const P1& p1,
4399 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4400 MutantRunner<R, Tuple0>* t =
4401 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6),
4402 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple0>
4403 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4404 return MutantFunctor<R, Tuple0>(t);
4405}
4406#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4407template <typename R, typename T, typename U, typename P1, typename P2,
4408 typename P3, typename P4, typename P5, typename P6, typename X1,
4409 typename X2, typename X3, typename X4, typename X5, typename X6>
4410inline MutantFunctor<R, Tuple0>
4411CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6),
4412 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4413 const P6& p6) {
4414 MutantRunner<R, Tuple0>* t =
4415 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6),
4416 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple0>
4417 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4418 return MutantFunctor<R, Tuple0>(t);
4419}
4420#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004421#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004422
4423// 6 - 1
4424template <typename R, typename T, typename U, typename P1, typename P2,
4425 typename P3, typename P4, typename P5, typename P6, typename A1,
4426 typename X1, typename X2, typename X3, typename X4, typename X5,
4427 typename X6>
4428inline MutantFunctor<R, Tuple1<A1> >
4429CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
4430 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4431 MutantRunner<R, Tuple1<A1> >* t =
4432 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1),
4433 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple1<A1> >
4434 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4435 return MutantFunctor<R, Tuple1<A1> >(t);
4436}
4437
4438template <typename R, typename P1, typename P2, typename P3, typename P4,
4439 typename P5, typename P6, typename A1, typename X1, typename X2,
4440 typename X3, typename X4, typename X5, typename X6>
4441inline MutantFunctor<R, Tuple1<A1> >
4442CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
4443 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4444 MutantRunner<R, Tuple1<A1> >* t =
4445 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1),
4446 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple1<A1> >
4447 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4448 return MutantFunctor<R, Tuple1<A1> >(t);
4449}
4450
4451#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4452template <typename R, typename T, typename U, typename P1, typename P2,
4453 typename P3, typename P4, typename P5, typename P6, typename A1,
4454 typename X1, typename X2, typename X3, typename X4, typename X5,
4455 typename X6>
4456inline MutantFunctor<R, Tuple1<A1> >
4457CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
4458 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4459 MutantRunner<R, Tuple1<A1> >* t =
4460 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1),
4461 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple1<A1> >
4462 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4463 return MutantFunctor<R, Tuple1<A1> >(t);
4464}
4465#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4466
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004467#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004468template <typename R, typename T, typename U, typename P1, typename P2,
4469 typename P3, typename P4, typename P5, typename P6, typename A1,
4470 typename X1, typename X2, typename X3, typename X4, typename X5,
4471 typename X6>
4472inline MutantFunctor<R, Tuple1<A1> >
4473CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1),
4474 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4475 const P6& p6) {
4476 MutantRunner<R, Tuple1<A1> >* t =
4477 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1),
4478 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple1<A1> >
4479 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4480 return MutantFunctor<R, Tuple1<A1> >(t);
4481}
4482
4483template <typename R, typename P1, typename P2, typename P3, typename P4,
4484 typename P5, typename P6, typename A1, typename X1, typename X2,
4485 typename X3, typename X4, typename X5, typename X6>
4486inline MutantFunctor<R, Tuple1<A1> >
4487CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
4488 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4489 MutantRunner<R, Tuple1<A1> >* t =
4490 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1),
4491 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple1<A1> >
4492 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4493 return MutantFunctor<R, Tuple1<A1> >(t);
4494}
4495#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4496template <typename R, typename T, typename U, typename P1, typename P2,
4497 typename P3, typename P4, typename P5, typename P6, typename A1,
4498 typename X1, typename X2, typename X3, typename X4, typename X5,
4499 typename X6>
4500inline MutantFunctor<R, Tuple1<A1> >
4501CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1),
4502 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4503 const P6& p6) {
4504 MutantRunner<R, Tuple1<A1> >* t =
4505 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1),
4506 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple1<A1> >
4507 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4508 return MutantFunctor<R, Tuple1<A1> >(t);
4509}
4510#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004511#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004512
4513// 6 - 2
4514template <typename R, typename T, typename U, typename P1, typename P2,
4515 typename P3, typename P4, typename P5, typename P6, typename A1,
4516 typename A2, typename X1, typename X2, typename X3, typename X4,
4517 typename X5, typename X6>
4518inline MutantFunctor<R, Tuple2<A1, A2> >
4519CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
4520 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4521 const P6& p6) {
4522 MutantRunner<R, Tuple2<A1, A2> >* t =
4523 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
4524 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple2<A1, A2> >
4525 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4526 return MutantFunctor<R, Tuple2<A1, A2> >(t);
4527}
4528
4529template <typename R, typename P1, typename P2, typename P3, typename P4,
4530 typename P5, typename P6, typename A1, typename A2, typename X1,
4531 typename X2, typename X3, typename X4, typename X5, typename X6>
4532inline MutantFunctor<R, Tuple2<A1, A2> >
4533CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2), const P1& p1,
4534 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4535 MutantRunner<R, Tuple2<A1, A2> >* t =
4536 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2),
4537 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple2<A1, A2> >
4538 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4539 return MutantFunctor<R, Tuple2<A1, A2> >(t);
4540}
4541
4542#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4543template <typename R, typename T, typename U, typename P1, typename P2,
4544 typename P3, typename P4, typename P5, typename P6, typename A1,
4545 typename A2, typename X1, typename X2, typename X3, typename X4,
4546 typename X5, typename X6>
4547inline MutantFunctor<R, Tuple2<A1, A2> >
4548CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
4549 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4550 const P6& p6) {
4551 MutantRunner<R, Tuple2<A1, A2> >* t =
4552 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
4553 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple2<A1, A2> >
4554 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4555 return MutantFunctor<R, Tuple2<A1, A2> >(t);
4556}
4557#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4558
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004559#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004560template <typename R, typename T, typename U, typename P1, typename P2,
4561 typename P3, typename P4, typename P5, typename P6, typename A1,
4562 typename A2, typename X1, typename X2, typename X3, typename X4,
4563 typename X5, typename X6>
4564inline MutantFunctor<R, Tuple2<A1, A2> >
4565CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
4566 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4567 const P6& p6) {
4568 MutantRunner<R, Tuple2<A1, A2> >* t =
4569 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
4570 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple2<A1, A2> >
4571 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4572 return MutantFunctor<R, Tuple2<A1, A2> >(t);
4573}
4574
4575template <typename R, typename P1, typename P2, typename P3, typename P4,
4576 typename P5, typename P6, typename A1, typename A2, typename X1,
4577 typename X2, typename X3, typename X4, typename X5, typename X6>
4578inline MutantFunctor<R, Tuple2<A1, A2> >
4579CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2),
4580 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4581 const P6& p6) {
4582 MutantRunner<R, Tuple2<A1, A2> >* t =
4583 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2),
4584 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple2<A1, A2> >
4585 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4586 return MutantFunctor<R, Tuple2<A1, A2> >(t);
4587}
4588#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4589template <typename R, typename T, typename U, typename P1, typename P2,
4590 typename P3, typename P4, typename P5, typename P6, typename A1,
4591 typename A2, typename X1, typename X2, typename X3, typename X4,
4592 typename X5, typename X6>
4593inline MutantFunctor<R, Tuple2<A1, A2> >
4594CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
4595 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4596 const P6& p6) {
4597 MutantRunner<R, Tuple2<A1, A2> >* t =
4598 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
4599 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple2<A1, A2> >
4600 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4601 return MutantFunctor<R, Tuple2<A1, A2> >(t);
4602}
4603#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004604#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004605
4606// 6 - 3
4607template <typename R, typename T, typename U, typename P1, typename P2,
4608 typename P3, typename P4, typename P5, typename P6, typename A1,
4609 typename A2, typename A3, typename X1, typename X2, typename X3,
4610 typename X4, typename X5, typename X6>
4611inline MutantFunctor<R, Tuple3<A1, A2, A3> >
4612CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4613 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4614 const P6& p6) {
4615 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
4616 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4617 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple3<A1, A2, A3> >
4618 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4619 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
4620}
4621
4622template <typename R, typename P1, typename P2, typename P3, typename P4,
4623 typename P5, typename P6, typename A1, typename A2, typename A3,
4624 typename X1, typename X2, typename X3, typename X4, typename X5,
4625 typename X6>
4626inline MutantFunctor<R, Tuple3<A1, A2, A3> >
4627CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3), const P1& p1,
4628 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4629 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
4630 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4631 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple3<A1, A2, A3> >
4632 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4633 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
4634}
4635
4636#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4637template <typename R, typename T, typename U, typename P1, typename P2,
4638 typename P3, typename P4, typename P5, typename P6, typename A1,
4639 typename A2, typename A3, typename X1, typename X2, typename X3,
4640 typename X4, typename X5, typename X6>
4641inline MutantFunctor<R, Tuple3<A1, A2, A3> >
4642CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4643 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4644 const P6& p6) {
4645 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
4646 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4647 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple3<A1, A2, A3> >
4648 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4649 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
4650}
4651#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4652
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004653#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004654template <typename R, typename T, typename U, typename P1, typename P2,
4655 typename P3, typename P4, typename P5, typename P6, typename A1,
4656 typename A2, typename A3, typename X1, typename X2, typename X3,
4657 typename X4, typename X5, typename X6>
4658inline MutantFunctor<R, Tuple3<A1, A2, A3> >
4659CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4660 A3), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4661 const P6& p6) {
4662 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
4663 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4664 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple3<A1, A2, A3> >
4665 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4666 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
4667}
4668
4669template <typename R, typename P1, typename P2, typename P3, typename P4,
4670 typename P5, typename P6, typename A1, typename A2, typename A3,
4671 typename X1, typename X2, typename X3, typename X4, typename X5,
4672 typename X6>
4673inline MutantFunctor<R, Tuple3<A1, A2, A3> >
4674CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4675 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4676 const P6& p6) {
4677 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
4678 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4679 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple3<A1, A2, A3> >
4680 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4681 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
4682}
4683#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4684template <typename R, typename T, typename U, typename P1, typename P2,
4685 typename P3, typename P4, typename P5, typename P6, typename A1,
4686 typename A2, typename A3, typename X1, typename X2, typename X3,
4687 typename X4, typename X5, typename X6>
4688inline MutantFunctor<R, Tuple3<A1, A2, A3> >
4689CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4690 A3), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4691 const P6& p6) {
4692 MutantRunner<R, Tuple3<A1, A2, A3> >* t =
4693 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
4694 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple3<A1, A2, A3> >
4695 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4696 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t);
4697}
4698#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004699#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004700
4701// 6 - 4
4702template <typename R, typename T, typename U, typename P1, typename P2,
4703 typename P3, typename P4, typename P5, typename P6, typename A1,
4704 typename A2, typename A3, typename A4, typename X1, typename X2,
4705 typename X3, typename X4, typename X5, typename X6>
4706inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4707CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4708 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4709 const P6& p6) {
4710 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4711 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4712 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple4<A1, A2, A3, A4> >
4713 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4714 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4715}
4716
4717template <typename R, typename P1, typename P2, typename P3, typename P4,
4718 typename P5, typename P6, typename A1, typename A2, typename A3,
4719 typename A4, typename X1, typename X2, typename X3, typename X4,
4720 typename X5, typename X6>
4721inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4722CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4723 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4724 const P6& p6) {
4725 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4726 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4727 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple4<A1, A2, A3, A4> >
4728 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4729 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4730}
4731
4732#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4733template <typename R, typename T, typename U, typename P1, typename P2,
4734 typename P3, typename P4, typename P5, typename P6, typename A1,
4735 typename A2, typename A3, typename A4, typename X1, typename X2,
4736 typename X3, typename X4, typename X5, typename X6>
4737inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4738CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4739 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4740 const P6& p6) {
4741 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4742 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4743 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple4<A1, A2, A3, A4> >
4744 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4745 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4746}
4747#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4748
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004749#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004750template <typename R, typename T, typename U, typename P1, typename P2,
4751 typename P3, typename P4, typename P5, typename P6, typename A1,
4752 typename A2, typename A3, typename A4, typename X1, typename X2,
4753 typename X3, typename X4, typename X5, typename X6>
4754inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4755CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4756 A3, A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4757 const P5& p5, const P6& p6) {
4758 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4759 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4760 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple4<A1, A2, A3, A4> >
4761 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4762 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4763}
4764
4765template <typename R, typename P1, typename P2, typename P3, typename P4,
4766 typename P5, typename P6, typename A1, typename A2, typename A3,
4767 typename A4, typename X1, typename X2, typename X3, typename X4,
4768 typename X5, typename X6>
4769inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4770CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4771 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4772 const P6& p6) {
4773 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4774 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4775 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple4<A1, A2, A3, A4> >
4776 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4777 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4778}
4779#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4780template <typename R, typename T, typename U, typename P1, typename P2,
4781 typename P3, typename P4, typename P5, typename P6, typename A1,
4782 typename A2, typename A3, typename A4, typename X1, typename X2,
4783 typename X3, typename X4, typename X5, typename X6>
4784inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> >
4785CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4786 A3, A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4787 const P5& p5, const P6& p6) {
4788 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t =
4789 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
4790 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple4<A1, A2, A3, A4> >
4791 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4792 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t);
4793}
4794#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004795#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004796
4797// 6 - 5
4798template <typename R, typename T, typename U, typename P1, typename P2,
4799 typename P3, typename P4, typename P5, typename P6, typename A1,
4800 typename A2, typename A3, typename A4, typename A5, typename X1,
4801 typename X2, typename X3, typename X4, typename X5, typename X6>
4802inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4803CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
4804 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4805 const P6& p6) {
4806 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4807 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
4808 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple5<A1, A2, A3, A4, A5> >
4809 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4810 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4811}
4812
4813template <typename R, typename P1, typename P2, typename P3, typename P4,
4814 typename P5, typename P6, typename A1, typename A2, typename A3,
4815 typename A4, typename A5, typename X1, typename X2, typename X3,
4816 typename X4, typename X5, typename X6>
4817inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4818CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
4819 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4820 const P6& p6) {
4821 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4822 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
4823 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple5<A1, A2, A3, A4, A5> >
4824 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4825 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4826}
4827
4828#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4829template <typename R, typename T, typename U, typename P1, typename P2,
4830 typename P3, typename P4, typename P5, typename P6, typename A1,
4831 typename A2, typename A3, typename A4, typename A5, typename X1,
4832 typename X2, typename X3, typename X4, typename X5, typename X6>
4833inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4834CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
4835 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4836 const P6& p6) {
4837 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4838 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
4839 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple5<A1, A2, A3, A4, A5> >
4840 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4841 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4842}
4843#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4844
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004845#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004846template <typename R, typename T, typename U, typename P1, typename P2,
4847 typename P3, typename P4, typename P5, typename P6, typename A1,
4848 typename A2, typename A3, typename A4, typename A5, typename X1,
4849 typename X2, typename X3, typename X4, typename X5, typename X6>
4850inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4851CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4852 A3, A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4853 const P5& p5, const P6& p6) {
4854 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4855 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
4856 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple5<A1, A2, A3, A4, A5> >
4857 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4858 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4859}
4860
4861template <typename R, typename P1, typename P2, typename P3, typename P4,
4862 typename P5, typename P6, typename A1, typename A2, typename A3,
4863 typename A4, typename A5, typename X1, typename X2, typename X3,
4864 typename X4, typename X5, typename X6>
4865inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4866CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
4867 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4868 const P6& p6) {
4869 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4870 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
4871 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple5<A1, A2, A3, A4, A5> >
4872 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4873 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4874}
4875#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4876template <typename R, typename T, typename U, typename P1, typename P2,
4877 typename P3, typename P4, typename P5, typename P6, typename A1,
4878 typename A2, typename A3, typename A4, typename A5, typename X1,
4879 typename X2, typename X3, typename X4, typename X5, typename X6>
4880inline MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >
4881CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4882 A3, A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4883 const P5& p5, const P6& p6) {
4884 MutantRunner<R, Tuple5<A1, A2, A3, A4, A5> >* t =
4885 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
4886 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple5<A1, A2, A3, A4, A5> >
4887 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4888 return MutantFunctor<R, Tuple5<A1, A2, A3, A4, A5> >(t);
4889}
4890#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004891#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004892
4893// 6 - 6
4894template <typename R, typename T, typename U, typename P1, typename P2,
4895 typename P3, typename P4, typename P5, typename P6, typename A1,
4896 typename A2, typename A3, typename A4, typename A5, typename A6,
4897 typename X1, typename X2, typename X3, typename X4, typename X5,
4898 typename X6>
4899inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4900CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5,
4901 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4902 const P6& p6) {
4903 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4904 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
4905 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple6<A1, A2, A3, A4, A5, A6> >
4906 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4907 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4908}
4909
4910template <typename R, typename P1, typename P2, typename P3, typename P4,
4911 typename P5, typename P6, typename A1, typename A2, typename A3,
4912 typename A4, typename A5, typename A6, typename X1, typename X2,
4913 typename X3, typename X4, typename X5, typename X6>
4914inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4915CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
4916 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4917 const P6& p6) {
4918 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4919 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
4920 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple6<A1, A2, A3, A4, A5, A6> >
4921 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4922 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4923}
4924
4925#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4926template <typename R, typename T, typename U, typename P1, typename P2,
4927 typename P3, typename P4, typename P5, typename P6, typename A1,
4928 typename A2, typename A3, typename A4, typename A5, typename A6,
4929 typename X1, typename X2, typename X3, typename X4, typename X5,
4930 typename X6>
4931inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4932CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5,
4933 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4934 const P6& p6) {
4935 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4936 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
4937 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple6<A1, A2, A3, A4, A5, A6> >
4938 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4939 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4940}
4941#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4942
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004943#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004944template <typename R, typename T, typename U, typename P1, typename P2,
4945 typename P3, typename P4, typename P5, typename P6, typename A1,
4946 typename A2, typename A3, typename A4, typename A5, typename A6,
4947 typename X1, typename X2, typename X3, typename X4, typename X5,
4948 typename X6>
4949inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4950CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4951 A3, A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4952 const P5& p5, const P6& p6) {
4953 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4954 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
4955 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple6<A1, A2, A3, A4, A5, A6> >
4956 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4957 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4958}
4959
4960template <typename R, typename P1, typename P2, typename P3, typename P4,
4961 typename P5, typename P6, typename A1, typename A2, typename A3,
4962 typename A4, typename A5, typename A6, typename X1, typename X2,
4963 typename X3, typename X4, typename X5, typename X6>
4964inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4965CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
4966 A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4967 const P5& p5, const P6& p6) {
4968 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4969 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
4970 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple6<A1, A2, A3, A4, A5, A6> >
4971 (function, MakeTuple(p1, p2, p3, p4, p5, p6));
4972 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4973}
4974#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4975template <typename R, typename T, typename U, typename P1, typename P2,
4976 typename P3, typename P4, typename P5, typename P6, typename A1,
4977 typename A2, typename A3, typename A4, typename A5, typename A6,
4978 typename X1, typename X2, typename X3, typename X4, typename X5,
4979 typename X6>
4980inline MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >
4981CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
4982 A3, A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4983 const P5& p5, const P6& p6) {
4984 MutantRunner<R, Tuple6<A1, A2, A3, A4, A5, A6> >* t =
4985 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
4986 Tuple6<P1, P2, P3, P4, P5, P6>, Tuple6<A1, A2, A3, A4, A5, A6> >
4987 (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6));
4988 return MutantFunctor<R, Tuple6<A1, A2, A3, A4, A5, A6> >(t);
4989}
4990#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
wolenetz@chromium.org876aac52013-02-08 04:20:21 +09004991#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
amit@chromium.orge025b842010-02-13 03:19:07 +09004992
stoyan@google.comce161d82009-10-27 09:05:00 +09004993} // namespace testing
4994
4995#endif // TESTING_GMOCK_MUTANT_H_