blob: acc1ae92496294bac622a6ef1a8fc7f07c17513f [file] [log] [blame]
James Robinson646469d2014-10-03 15:33:28 -07001// Copyright (c) 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// This file automatically generated by testing/generate_gmock_mutant.py.
6// DO NOT EDIT.
7
8#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//
17// DispatchToMethod/Function supports two sets of arguments: pre-bound (P) and
18// call-time (C). The arguments as well as the return type are templatized.
19// DispatchToMethod/Function will also try to call the selected method or
20// function even if provided pre-bound arguments does not match exactly with
21// the function signature hence the X1, X2 ... XN parameters in CreateFunctor.
22// DispatchToMethod will try to invoke method that may not belong to the
23// object's class itself but to the object's class base class.
24//
25// Additionally you can bind the object at calltime by binding a pointer to
26// pointer to the object at creation time - before including this file you
27// have to #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING.
28//
29// TODO(stoyan): It's yet not clear to me should we use T& and T&* instead
30// of T* and T** when we invoke CreateFunctor to match the EXPECT_CALL style.
31//
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) {
50// base::MessageLoop* loop = base::MessageLoop::current();
51// loop->PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(),
52// 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
106#include "base/memory/linked_ptr.h"
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700107#include "base/tuple.h"
James Robinson646469d2014-10-03 15:33:28 -0700108
109namespace testing {
110
111// 0 - 0
112template <typename R, typename T, typename Method>
113inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700114 const base::Tuple<>& p,
115 const base::Tuple<>& c) {
James Robinson646469d2014-10-03 15:33:28 -0700116 return (obj->*method)();
117}
118template <typename R, typename Function>
119inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700120 const base::Tuple<>& p,
121 const base::Tuple<>& c) {
James Robinson646469d2014-10-03 15:33:28 -0700122 return (*function)();
123}
124
125// 0 - 1
126template <typename R, typename T, typename Method, typename C1>
127inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700128 const base::Tuple<>& p,
129 const base::Tuple<C1>& c) {
130 return (obj->*method)(base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700131}
132template <typename R, typename Function, typename C1>
133inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700134 const base::Tuple<>& p,
135 const base::Tuple<C1>& c) {
136 return (*function)(base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700137}
138
139// 0 - 2
140template <typename R, typename T, typename Method, typename C1, typename C2>
141inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700142 const base::Tuple<>& p,
143 const base::Tuple<C1, C2>& c) {
144 return (obj->*method)(base::get<0>(c), base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700145}
146template <typename R, typename Function, typename C1, typename C2>
147inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700148 const base::Tuple<>& p,
149 const base::Tuple<C1, C2>& c) {
150 return (*function)(base::get<0>(c), base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700151}
152
153// 0 - 3
154template <typename R, typename T, typename Method, typename C1, typename C2,
155 typename C3>
156inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700157 const base::Tuple<>& p,
158 const base::Tuple<C1, C2, C3>& c) {
159 return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700160}
161template <typename R, typename Function, typename C1, typename C2, typename C3>
162inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700163 const base::Tuple<>& p,
164 const base::Tuple<C1, C2, C3>& c) {
165 return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700166}
167
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,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700172 const base::Tuple<>& p,
173 const base::Tuple<C1, C2, C3, C4>& c) {
174 return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
175 base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700176}
177template <typename R, typename Function, typename C1, typename C2, typename C3,
178 typename C4>
179inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700180 const base::Tuple<>& p,
181 const base::Tuple<C1, C2, C3, C4>& c) {
182 return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
183 base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700184}
185
186// 0 - 5
187template <typename R, typename T, typename Method, typename C1, typename C2,
188 typename C3, typename C4, typename C5>
189inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700190 const base::Tuple<>& p,
191 const base::Tuple<C1, C2, C3, C4, C5>& c) {
192 return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
193 base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700194}
195template <typename R, typename Function, typename C1, typename C2, typename C3,
196 typename C4, typename C5>
197inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700198 const base::Tuple<>& p,
199 const base::Tuple<C1, C2, C3, C4, C5>& c) {
200 return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
201 base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700202}
203
204// 0 - 6
205template <typename R, typename T, typename Method, typename C1, typename C2,
206 typename C3, typename C4, typename C5, typename C6>
207inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700208 const base::Tuple<>& p,
209 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
210 return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
211 base::get<3>(c), base::get<4>(c), base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700212}
213template <typename R, typename Function, typename C1, typename C2, typename C3,
214 typename C4, typename C5, typename C6>
215inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700216 const base::Tuple<>& p,
217 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
218 return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c),
219 base::get<3>(c), base::get<4>(c), base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700220}
221
222// 1 - 0
223template <typename R, typename T, typename Method, typename P1>
224inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700225 const base::Tuple<P1>& p,
226 const base::Tuple<>& c) {
227 return (obj->*method)(base::get<0>(p));
James Robinson646469d2014-10-03 15:33:28 -0700228}
229template <typename R, typename Function, typename P1>
230inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700231 const base::Tuple<P1>& p,
232 const base::Tuple<>& c) {
233 return (*function)(base::get<0>(p));
James Robinson646469d2014-10-03 15:33:28 -0700234}
235
236// 1 - 1
237template <typename R, typename T, typename Method, typename P1, typename C1>
238inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700239 const base::Tuple<P1>& p,
240 const base::Tuple<C1>& c) {
241 return (obj->*method)(base::get<0>(p), base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700242}
243template <typename R, typename Function, typename P1, typename C1>
244inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700245 const base::Tuple<P1>& p,
246 const base::Tuple<C1>& c) {
247 return (*function)(base::get<0>(p), base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700248}
249
250// 1 - 2
251template <typename R, typename T, typename Method, typename P1, typename C1,
252 typename C2>
253inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700254 const base::Tuple<P1>& p,
255 const base::Tuple<C1, C2>& c) {
256 return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700257}
258template <typename R, typename Function, typename P1, typename C1, typename C2>
259inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700260 const base::Tuple<P1>& p,
261 const base::Tuple<C1, C2>& c) {
262 return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700263}
264
265// 1 - 3
266template <typename R, typename T, typename Method, typename P1, typename C1,
267 typename C2, typename C3>
268inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700269 const base::Tuple<P1>& p,
270 const base::Tuple<C1, C2, C3>& c) {
271 return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
272 base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700273}
274template <typename R, typename Function, typename P1, typename C1, typename C2,
275 typename C3>
276inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700277 const base::Tuple<P1>& p,
278 const base::Tuple<C1, C2, C3>& c) {
279 return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
280 base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700281}
282
283// 1 - 4
284template <typename R, typename T, typename Method, typename P1, typename C1,
285 typename C2, typename C3, typename C4>
286inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700287 const base::Tuple<P1>& p,
288 const base::Tuple<C1, C2, C3, C4>& c) {
289 return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
290 base::get<2>(c), base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700291}
292template <typename R, typename Function, typename P1, typename C1, typename C2,
293 typename C3, typename C4>
294inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700295 const base::Tuple<P1>& p,
296 const base::Tuple<C1, C2, C3, C4>& c) {
297 return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
298 base::get<2>(c), base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700299}
300
301// 1 - 5
302template <typename R, typename T, typename Method, typename P1, typename C1,
303 typename C2, typename C3, typename C4, typename C5>
304inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700305 const base::Tuple<P1>& p,
306 const base::Tuple<C1, C2, C3, C4, C5>& c) {
307 return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
308 base::get<2>(c), base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700309}
310template <typename R, typename Function, typename P1, typename C1, typename C2,
311 typename C3, typename C4, typename C5>
312inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700313 const base::Tuple<P1>& p,
314 const base::Tuple<C1, C2, C3, C4, C5>& c) {
315 return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
316 base::get<2>(c), base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700317}
318
319// 1 - 6
320template <typename R, typename T, typename Method, typename P1, typename C1,
321 typename C2, typename C3, typename C4, typename C5, typename C6>
322inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700323 const base::Tuple<P1>& p,
324 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
325 return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
326 base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700327}
328template <typename R, typename Function, typename P1, typename C1, typename C2,
329 typename C3, typename C4, typename C5, typename C6>
330inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700331 const base::Tuple<P1>& p,
332 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
333 return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c),
334 base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700335}
336
337// 2 - 0
338template <typename R, typename T, typename Method, typename P1, typename P2>
339inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700340 const base::Tuple<P1, P2>& p,
341 const base::Tuple<>& c) {
342 return (obj->*method)(base::get<0>(p), base::get<1>(p));
James Robinson646469d2014-10-03 15:33:28 -0700343}
344template <typename R, typename Function, typename P1, typename P2>
345inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700346 const base::Tuple<P1, P2>& p,
347 const base::Tuple<>& c) {
348 return (*function)(base::get<0>(p), base::get<1>(p));
James Robinson646469d2014-10-03 15:33:28 -0700349}
350
351// 2 - 1
352template <typename R, typename T, typename Method, typename P1, typename P2,
353 typename C1>
354inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700355 const base::Tuple<P1, P2>& p,
356 const base::Tuple<C1>& c) {
357 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700358}
359template <typename R, typename Function, typename P1, typename P2, typename C1>
360inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700361 const base::Tuple<P1, P2>& p,
362 const base::Tuple<C1>& c) {
363 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700364}
365
366// 2 - 2
367template <typename R, typename T, typename Method, typename P1, typename P2,
368 typename C1, typename C2>
369inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700370 const base::Tuple<P1, P2>& p,
371 const base::Tuple<C1, C2>& c) {
372 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
373 base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700374}
375template <typename R, typename Function, typename P1, typename P2, typename C1,
376 typename C2>
377inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700378 const base::Tuple<P1, P2>& p,
379 const base::Tuple<C1, C2>& c) {
380 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
381 base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700382}
383
384// 2 - 3
385template <typename R, typename T, typename Method, typename P1, typename P2,
386 typename C1, typename C2, typename C3>
387inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700388 const base::Tuple<P1, P2>& p,
389 const base::Tuple<C1, C2, C3>& c) {
390 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
391 base::get<1>(c), base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700392}
393template <typename R, typename Function, typename P1, typename P2, typename C1,
394 typename C2, typename C3>
395inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700396 const base::Tuple<P1, P2>& p,
397 const base::Tuple<C1, C2, C3>& c) {
398 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
399 base::get<1>(c), base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700400}
401
402// 2 - 4
403template <typename R, typename T, typename Method, typename P1, typename P2,
404 typename C1, typename C2, typename C3, typename C4>
405inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700406 const base::Tuple<P1, P2>& p,
407 const base::Tuple<C1, C2, C3, C4>& c) {
408 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
409 base::get<1>(c), base::get<2>(c), base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700410}
411template <typename R, typename Function, typename P1, typename P2, typename C1,
412 typename C2, typename C3, typename C4>
413inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700414 const base::Tuple<P1, P2>& p,
415 const base::Tuple<C1, C2, C3, C4>& c) {
416 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
417 base::get<1>(c), base::get<2>(c), base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700418}
419
420// 2 - 5
421template <typename R, typename T, typename Method, typename P1, typename P2,
422 typename C1, typename C2, typename C3, typename C4, typename C5>
423inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700424 const base::Tuple<P1, P2>& p,
425 const base::Tuple<C1, C2, C3, C4, C5>& c) {
426 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
427 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700428}
429template <typename R, typename Function, typename P1, typename P2, typename C1,
430 typename C2, typename C3, typename C4, typename C5>
431inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700432 const base::Tuple<P1, P2>& p,
433 const base::Tuple<C1, C2, C3, C4, C5>& c) {
434 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
435 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700436}
437
438// 2 - 6
439template <typename R, typename T, typename Method, typename P1, typename P2,
440 typename C1, typename C2, typename C3, typename C4, typename C5,
441 typename C6>
442inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700443 const base::Tuple<P1, P2>& p,
444 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
445 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
446 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c),
447 base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700448}
449template <typename R, typename Function, typename P1, typename P2, typename C1,
450 typename C2, typename C3, typename C4, typename C5, typename C6>
451inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700452 const base::Tuple<P1, P2>& p,
453 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
454 return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c),
455 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c),
456 base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700457}
458
459// 3 - 0
460template <typename R, typename T, typename Method, typename P1, typename P2,
461 typename P3>
462inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700463 const base::Tuple<P1, P2, P3>& p,
464 const base::Tuple<>& c) {
465 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p));
James Robinson646469d2014-10-03 15:33:28 -0700466}
467template <typename R, typename Function, typename P1, typename P2, typename P3>
468inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700469 const base::Tuple<P1, P2, P3>& p,
470 const base::Tuple<>& c) {
471 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p));
James Robinson646469d2014-10-03 15:33:28 -0700472}
473
474// 3 - 1
475template <typename R, typename T, typename Method, typename P1, typename P2,
476 typename P3, typename C1>
477inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700478 const base::Tuple<P1, P2, P3>& p,
479 const base::Tuple<C1>& c) {
480 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
481 base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700482}
483template <typename R, typename Function, typename P1, typename P2, typename P3,
484 typename C1>
485inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700486 const base::Tuple<P1, P2, P3>& p,
487 const base::Tuple<C1>& c) {
488 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
489 base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700490}
491
492// 3 - 2
493template <typename R, typename T, typename Method, typename P1, typename P2,
494 typename P3, typename C1, typename C2>
495inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700496 const base::Tuple<P1, P2, P3>& p,
497 const base::Tuple<C1, C2>& c) {
498 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
499 base::get<0>(c), base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700500}
501template <typename R, typename Function, typename P1, typename P2, typename P3,
502 typename C1, typename C2>
503inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700504 const base::Tuple<P1, P2, P3>& p,
505 const base::Tuple<C1, C2>& c) {
506 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
507 base::get<0>(c), base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700508}
509
510// 3 - 3
511template <typename R, typename T, typename Method, typename P1, typename P2,
512 typename P3, typename C1, typename C2, typename C3>
513inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700514 const base::Tuple<P1, P2, P3>& p,
515 const base::Tuple<C1, C2, C3>& c) {
516 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
517 base::get<0>(c), base::get<1>(c), base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700518}
519template <typename R, typename Function, typename P1, typename P2, typename P3,
520 typename C1, typename C2, typename C3>
521inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700522 const base::Tuple<P1, P2, P3>& p,
523 const base::Tuple<C1, C2, C3>& c) {
524 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
525 base::get<0>(c), base::get<1>(c), base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700526}
527
528// 3 - 4
529template <typename R, typename T, typename Method, typename P1, typename P2,
530 typename P3, typename C1, typename C2, typename C3, typename C4>
531inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700532 const base::Tuple<P1, P2, P3>& p,
533 const base::Tuple<C1, C2, C3, C4>& c) {
534 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
535 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700536}
537template <typename R, typename Function, typename P1, typename P2, typename P3,
538 typename C1, typename C2, typename C3, typename C4>
539inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700540 const base::Tuple<P1, P2, P3>& p,
541 const base::Tuple<C1, C2, C3, C4>& c) {
542 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
543 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700544}
545
546// 3 - 5
547template <typename R, typename T, typename Method, typename P1, typename P2,
548 typename P3, typename C1, typename C2, typename C3, typename C4,
549 typename C5>
550inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700551 const base::Tuple<P1, P2, P3>& p,
552 const base::Tuple<C1, C2, C3, C4, C5>& c) {
553 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
554 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c),
555 base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700556}
557template <typename R, typename Function, typename P1, typename P2, typename P3,
558 typename C1, typename C2, typename C3, typename C4, typename C5>
559inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700560 const base::Tuple<P1, P2, P3>& p,
561 const base::Tuple<C1, C2, C3, C4, C5>& c) {
562 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
563 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c),
564 base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700565}
566
567// 3 - 6
568template <typename R, typename T, typename Method, typename P1, typename P2,
569 typename P3, typename C1, typename C2, typename C3, typename C4,
570 typename C5, typename C6>
571inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700572 const base::Tuple<P1, P2, P3>& p,
573 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
574 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
575 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c),
576 base::get<4>(c), base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700577}
578template <typename R, typename Function, typename P1, typename P2, typename P3,
579 typename C1, typename C2, typename C3, typename C4, typename C5,
580 typename C6>
581inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700582 const base::Tuple<P1, P2, P3>& p,
583 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
584 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
585 base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c),
586 base::get<4>(c), base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700587}
588
589// 4 - 0
590template <typename R, typename T, typename Method, typename P1, typename P2,
591 typename P3, typename P4>
592inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700593 const base::Tuple<P1, P2, P3, P4>& p,
594 const base::Tuple<>& c) {
595 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
596 base::get<3>(p));
James Robinson646469d2014-10-03 15:33:28 -0700597}
598template <typename R, typename Function, typename P1, typename P2, typename P3,
599 typename P4>
600inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700601 const base::Tuple<P1, P2, P3, P4>& p,
602 const base::Tuple<>& c) {
603 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
604 base::get<3>(p));
James Robinson646469d2014-10-03 15:33:28 -0700605}
606
607// 4 - 1
608template <typename R, typename T, typename Method, typename P1, typename P2,
609 typename P3, typename P4, typename C1>
610inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700611 const base::Tuple<P1, P2, P3, P4>& p,
612 const base::Tuple<C1>& c) {
613 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
614 base::get<3>(p), base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700615}
616template <typename R, typename Function, typename P1, typename P2, typename P3,
617 typename P4, typename C1>
618inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700619 const base::Tuple<P1, P2, P3, P4>& p,
620 const base::Tuple<C1>& c) {
621 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
622 base::get<3>(p), base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700623}
624
625// 4 - 2
626template <typename R, typename T, typename Method, typename P1, typename P2,
627 typename P3, typename P4, typename C1, typename C2>
628inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700629 const base::Tuple<P1, P2, P3, P4>& p,
630 const base::Tuple<C1, C2>& c) {
631 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
632 base::get<3>(p), base::get<0>(c), base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700633}
634template <typename R, typename Function, typename P1, typename P2, typename P3,
635 typename P4, typename C1, typename C2>
636inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700637 const base::Tuple<P1, P2, P3, P4>& p,
638 const base::Tuple<C1, C2>& c) {
639 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
640 base::get<3>(p), base::get<0>(c), base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700641}
642
643// 4 - 3
644template <typename R, typename T, typename Method, typename P1, typename P2,
645 typename P3, typename P4, typename C1, typename C2, typename C3>
646inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700647 const base::Tuple<P1, P2, P3, P4>& p,
648 const base::Tuple<C1, C2, C3>& c) {
649 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
650 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700651}
652template <typename R, typename Function, typename P1, typename P2, typename P3,
653 typename P4, typename C1, typename C2, typename C3>
654inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700655 const base::Tuple<P1, P2, P3, P4>& p,
656 const base::Tuple<C1, C2, C3>& c) {
657 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
658 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700659}
660
661// 4 - 4
662template <typename R, typename T, typename Method, typename P1, typename P2,
663 typename P3, typename P4, typename C1, typename C2, typename C3,
664 typename C4>
665inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700666 const base::Tuple<P1, P2, P3, P4>& p,
667 const base::Tuple<C1, C2, C3, C4>& c) {
668 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
669 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
670 base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700671}
672template <typename R, typename Function, typename P1, typename P2, typename P3,
673 typename P4, typename C1, typename C2, typename C3, typename C4>
674inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700675 const base::Tuple<P1, P2, P3, P4>& p,
676 const base::Tuple<C1, C2, C3, C4>& c) {
677 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
678 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
679 base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700680}
681
682// 4 - 5
683template <typename R, typename T, typename Method, typename P1, typename P2,
684 typename P3, typename P4, typename C1, typename C2, typename C3,
685 typename C4, typename C5>
686inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700687 const base::Tuple<P1, P2, P3, P4>& p,
688 const base::Tuple<C1, C2, C3, C4, C5>& c) {
689 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
690 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
691 base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700692}
693template <typename R, typename Function, typename P1, typename P2, typename P3,
694 typename P4, typename C1, typename C2, typename C3, typename C4,
695 typename C5>
696inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700697 const base::Tuple<P1, P2, P3, P4>& p,
698 const base::Tuple<C1, C2, C3, C4, C5>& c) {
699 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
700 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
701 base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700702}
703
704// 4 - 6
705template <typename R, typename T, typename Method, typename P1, typename P2,
706 typename P3, typename P4, typename C1, typename C2, typename C3,
707 typename C4, typename C5, typename C6>
708inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700709 const base::Tuple<P1, P2, P3, P4>& p,
710 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
711 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
712 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
713 base::get<3>(c), base::get<4>(c), base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700714}
715template <typename R, typename Function, typename P1, typename P2, typename P3,
716 typename P4, typename C1, typename C2, typename C3, typename C4,
717 typename C5, typename C6>
718inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700719 const base::Tuple<P1, P2, P3, P4>& p,
720 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
721 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
722 base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c),
723 base::get<3>(c), base::get<4>(c), base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700724}
725
726// 5 - 0
727template <typename R, typename T, typename Method, typename P1, typename P2,
728 typename P3, typename P4, typename P5>
729inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700730 const base::Tuple<P1, P2, P3, P4, P5>& p,
731 const base::Tuple<>& c) {
732 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
733 base::get<3>(p), base::get<4>(p));
James Robinson646469d2014-10-03 15:33:28 -0700734}
735template <typename R, typename Function, typename P1, typename P2, typename P3,
736 typename P4, typename P5>
737inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700738 const base::Tuple<P1, P2, P3, P4, P5>& p,
739 const base::Tuple<>& c) {
740 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
741 base::get<3>(p), base::get<4>(p));
James Robinson646469d2014-10-03 15:33:28 -0700742}
743
744// 5 - 1
745template <typename R, typename T, typename Method, typename P1, typename P2,
746 typename P3, typename P4, typename P5, typename C1>
747inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700748 const base::Tuple<P1, P2, P3, P4, P5>& p,
749 const base::Tuple<C1>& c) {
750 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
751 base::get<3>(p), base::get<4>(p), base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700752}
753template <typename R, typename Function, typename P1, typename P2, typename P3,
754 typename P4, typename P5, typename C1>
755inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700756 const base::Tuple<P1, P2, P3, P4, P5>& p,
757 const base::Tuple<C1>& c) {
758 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
759 base::get<3>(p), base::get<4>(p), base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700760}
761
762// 5 - 2
763template <typename R, typename T, typename Method, typename P1, typename P2,
764 typename P3, typename P4, typename P5, typename C1, typename C2>
765inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700766 const base::Tuple<P1, P2, P3, P4, P5>& p,
767 const base::Tuple<C1, C2>& c) {
768 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
769 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700770}
771template <typename R, typename Function, typename P1, typename P2, typename P3,
772 typename P4, typename P5, typename C1, typename C2>
773inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700774 const base::Tuple<P1, P2, P3, P4, P5>& p,
775 const base::Tuple<C1, C2>& c) {
776 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
777 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700778}
779
780// 5 - 3
781template <typename R, typename T, typename Method, typename P1, typename P2,
782 typename P3, typename P4, typename P5, typename C1, typename C2,
783 typename C3>
784inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700785 const base::Tuple<P1, P2, P3, P4, P5>& p,
786 const base::Tuple<C1, C2, C3>& c) {
787 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
788 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
789 base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700790}
791template <typename R, typename Function, typename P1, typename P2, typename P3,
792 typename P4, typename P5, typename C1, typename C2, typename C3>
793inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700794 const base::Tuple<P1, P2, P3, P4, P5>& p,
795 const base::Tuple<C1, C2, C3>& c) {
796 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
797 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
798 base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700799}
800
801// 5 - 4
802template <typename R, typename T, typename Method, typename P1, typename P2,
803 typename P3, typename P4, typename P5, typename C1, typename C2,
804 typename C3, typename C4>
805inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700806 const base::Tuple<P1, P2, P3, P4, P5>& p,
807 const base::Tuple<C1, C2, C3, C4>& c) {
808 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
809 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
810 base::get<2>(c), base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700811}
812template <typename R, typename Function, typename P1, typename P2, typename P3,
813 typename P4, typename P5, typename C1, typename C2, typename C3,
814 typename C4>
815inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700816 const base::Tuple<P1, P2, P3, P4, P5>& p,
817 const base::Tuple<C1, C2, C3, C4>& c) {
818 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
819 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
820 base::get<2>(c), base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700821}
822
823// 5 - 5
824template <typename R, typename T, typename Method, typename P1, typename P2,
825 typename P3, typename P4, typename P5, typename C1, typename C2,
826 typename C3, typename C4, typename C5>
827inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700828 const base::Tuple<P1, P2, P3, P4, P5>& p,
829 const base::Tuple<C1, C2, C3, C4, C5>& c) {
830 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
831 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
832 base::get<2>(c), base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700833}
834template <typename R, typename Function, typename P1, typename P2, typename P3,
835 typename P4, typename P5, typename C1, typename C2, typename C3,
836 typename C4, typename C5>
837inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700838 const base::Tuple<P1, P2, P3, P4, P5>& p,
839 const base::Tuple<C1, C2, C3, C4, C5>& c) {
840 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
841 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
842 base::get<2>(c), base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700843}
844
845// 5 - 6
846template <typename R, typename T, typename Method, typename P1, typename P2,
847 typename P3, typename P4, typename P5, typename C1, typename C2,
848 typename C3, typename C4, typename C5, typename C6>
849inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700850 const base::Tuple<P1, P2, P3, P4, P5>& p,
851 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
852 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
853 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
854 base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700855}
856template <typename R, typename Function, typename P1, typename P2, typename P3,
857 typename P4, typename P5, typename C1, typename C2, typename C3,
858 typename C4, typename C5, typename C6>
859inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700860 const base::Tuple<P1, P2, P3, P4, P5>& p,
861 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
862 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
863 base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c),
864 base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -0700865}
866
867// 6 - 0
868template <typename R, typename T, typename Method, typename P1, typename P2,
869 typename P3, typename P4, typename P5, typename P6>
870inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700871 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
872 const base::Tuple<>& c) {
873 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
874 base::get<3>(p), base::get<4>(p), base::get<5>(p));
James Robinson646469d2014-10-03 15:33:28 -0700875}
876template <typename R, typename Function, typename P1, typename P2, typename P3,
877 typename P4, typename P5, typename P6>
878inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700879 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
880 const base::Tuple<>& c) {
881 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
882 base::get<3>(p), base::get<4>(p), base::get<5>(p));
James Robinson646469d2014-10-03 15:33:28 -0700883}
884
885// 6 - 1
886template <typename R, typename T, typename Method, typename P1, typename P2,
887 typename P3, typename P4, typename P5, typename P6, typename C1>
888inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700889 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
890 const base::Tuple<C1>& c) {
891 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
892 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700893}
894template <typename R, typename Function, typename P1, typename P2, typename P3,
895 typename P4, typename P5, typename P6, typename C1>
896inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700897 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
898 const base::Tuple<C1>& c) {
899 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
900 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c));
James Robinson646469d2014-10-03 15:33:28 -0700901}
902
903// 6 - 2
904template <typename R, typename T, typename Method, typename P1, typename P2,
905 typename P3, typename P4, typename P5, typename P6, typename C1,
906 typename C2>
907inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700908 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
909 const base::Tuple<C1, C2>& c) {
910 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
911 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
912 base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700913}
914template <typename R, typename Function, typename P1, typename P2, typename P3,
915 typename P4, typename P5, typename P6, typename C1, typename C2>
916inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700917 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
918 const base::Tuple<C1, C2>& c) {
919 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
920 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
921 base::get<1>(c));
James Robinson646469d2014-10-03 15:33:28 -0700922}
923
924// 6 - 3
925template <typename R, typename T, typename Method, typename P1, typename P2,
926 typename P3, typename P4, typename P5, typename P6, typename C1,
927 typename C2, typename C3>
928inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700929 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
930 const base::Tuple<C1, C2, C3>& c) {
931 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
932 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
933 base::get<1>(c), base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700934}
935template <typename R, typename Function, typename P1, typename P2, typename P3,
936 typename P4, typename P5, typename P6, typename C1, typename C2,
937 typename C3>
938inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700939 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
940 const base::Tuple<C1, C2, C3>& c) {
941 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
942 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
943 base::get<1>(c), base::get<2>(c));
James Robinson646469d2014-10-03 15:33:28 -0700944}
945
946// 6 - 4
947template <typename R, typename T, typename Method, typename P1, typename P2,
948 typename P3, typename P4, typename P5, typename P6, typename C1,
949 typename C2, typename C3, typename C4>
950inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700951 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
952 const base::Tuple<C1, C2, C3, C4>& c) {
953 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
954 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
955 base::get<1>(c), base::get<2>(c), base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700956}
957template <typename R, typename Function, typename P1, typename P2, typename P3,
958 typename P4, typename P5, typename P6, typename C1, typename C2,
959 typename C3, typename C4>
960inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700961 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
962 const base::Tuple<C1, C2, C3, C4>& c) {
963 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
964 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
965 base::get<1>(c), base::get<2>(c), base::get<3>(c));
James Robinson646469d2014-10-03 15:33:28 -0700966}
967
968// 6 - 5
969template <typename R, typename T, typename Method, typename P1, typename P2,
970 typename P3, typename P4, typename P5, typename P6, typename C1,
971 typename C2, typename C3, typename C4, typename C5>
972inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700973 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
974 const base::Tuple<C1, C2, C3, C4, C5>& c) {
975 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
976 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
977 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700978}
979template <typename R, typename Function, typename P1, typename P2, typename P3,
980 typename P4, typename P5, typename P6, typename C1, typename C2,
981 typename C3, typename C4, typename C5>
982inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700983 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
984 const base::Tuple<C1, C2, C3, C4, C5>& c) {
985 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
986 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
987 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c));
James Robinson646469d2014-10-03 15:33:28 -0700988}
989
990// 6 - 6
991template <typename R, typename T, typename Method, typename P1, typename P2,
992 typename P3, typename P4, typename P5, typename P6, typename C1,
993 typename C2, typename C3, typename C4, typename C5, typename C6>
994inline R DispatchToMethod(T* obj, Method method,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -0700995 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
996 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
997 return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
998 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
999 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c),
1000 base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -07001001}
1002template <typename R, typename Function, typename P1, typename P2, typename P3,
1003 typename P4, typename P5, typename P6, typename C1, typename C2,
1004 typename C3, typename C4, typename C5, typename C6>
1005inline R DispatchToFunction(Function function,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001006 const base::Tuple<P1, P2, P3, P4, P5, P6>& p,
1007 const base::Tuple<C1, C2, C3, C4, C5, C6>& c) {
1008 return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p),
1009 base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c),
1010 base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c),
1011 base::get<5>(c));
James Robinson646469d2014-10-03 15:33:28 -07001012}
1013
1014// Interface that is exposed to the consumer, that does the actual calling
1015// of the method.
1016template <typename R, typename Params>
1017class MutantRunner {
1018 public:
1019 virtual R RunWithParams(const Params& params) = 0;
1020 virtual ~MutantRunner() {}
1021};
1022
1023// Mutant holds pre-bound arguments (like Task). Like Callback
1024// allows call-time arguments. You bind a pointer to the object
1025// at creation time.
1026template <typename R, typename T, typename Method,
1027 typename PreBound, typename Params>
1028class Mutant : public MutantRunner<R, Params> {
1029 public:
1030 Mutant(T* obj, Method method, const PreBound& pb)
1031 : obj_(obj), method_(method), pb_(pb) {
1032 }
1033
1034 // MutantRunner implementation
1035 virtual R RunWithParams(const Params& params) {
1036 return DispatchToMethod<R>(this->obj_, this->method_, pb_, params);
1037 }
1038
1039 T* obj_;
1040 Method method_;
1041 PreBound pb_;
1042};
1043
1044template <typename R, typename Function, typename PreBound, typename Params>
1045class MutantFunction : public MutantRunner<R, Params> {
1046 public:
1047 MutantFunction(Function function, const PreBound& pb)
1048 : function_(function), pb_(pb) {
1049 }
1050
1051 // MutantRunner implementation
1052 virtual R RunWithParams(const Params& params) {
1053 return DispatchToFunction<R>(function_, pb_, params);
1054 }
1055
1056 Function function_;
1057 PreBound pb_;
1058};
1059
1060#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1061// MutantLateBind is like Mutant, but you bind a pointer to a pointer
1062// to the object. This way you can create actions for an object
1063// that is not yet created (has only storage for a pointer to it).
1064template <typename R, typename T, typename Method,
1065 typename PreBound, typename Params>
1066class MutantLateObjectBind : public MutantRunner<R, Params> {
1067 public:
1068 MutantLateObjectBind(T** obj, Method method, const PreBound& pb)
1069 : obj_(obj), method_(method), pb_(pb) {
1070 }
1071
1072 // MutantRunner implementation.
1073 virtual R RunWithParams(const Params& params) {
1074 EXPECT_THAT(*this->obj_, testing::NotNull());
1075 if (NULL == *this->obj_)
1076 return R();
1077 return DispatchToMethod<R>( *this->obj_, this->method_, pb_, params);
1078 }
1079
1080 T** obj_;
1081 Method method_;
1082 PreBound pb_;
1083};
1084#endif
1085
1086// Simple MutantRunner<> wrapper acting as a functor.
1087// Redirects operator() to MutantRunner<Params>::Run()
1088template <typename R, typename Params>
1089struct MutantFunctor {
1090 explicit MutantFunctor(MutantRunner<R, Params>* cb) : impl_(cb) {
1091 }
1092
1093 ~MutantFunctor() {
1094 }
1095
1096 inline R operator()() {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001097 return impl_->RunWithParams(base::Tuple<>());
James Robinson646469d2014-10-03 15:33:28 -07001098 }
1099
1100 template <typename Arg1>
1101 inline R operator()(const Arg1& a) {
1102 return impl_->RunWithParams(Params(a));
1103 }
1104
1105 template <typename Arg1, typename Arg2>
1106 inline R operator()(const Arg1& a, const Arg2& b) {
1107 return impl_->RunWithParams(Params(a, b));
1108 }
1109
1110 template <typename Arg1, typename Arg2, typename Arg3>
1111 inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c) {
1112 return impl_->RunWithParams(Params(a, b, c));
1113 }
1114
1115 template <typename Arg1, typename Arg2, typename Arg3, typename Arg4>
1116 inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c,
1117 const Arg4& d) {
1118 return impl_->RunWithParams(Params(a, b, c, d));
1119 }
1120
1121 private:
1122 // We need copy constructor since MutantFunctor is copied few times
1123 // inside GMock machinery, hence no DISALLOW_EVIL_CONTRUCTORS
1124 MutantFunctor();
1125 linked_ptr<MutantRunner<R, Params> > impl_;
1126};
1127
1128// 0 - 0
1129template <typename R, typename T, typename U>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001130inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001131CreateFunctor(T* obj, R (U::*method)()) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001132 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001133 new Mutant<R, T, R (U::*)(),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001134 base::Tuple<>, base::Tuple<>>
1135 (obj, method, base::MakeTuple());
1136 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001137}
1138
1139template <typename R>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001140inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001141CreateFunctor(R (*function)()) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001142 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001143 new MutantFunction<R, R (*)(),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001144 base::Tuple<>, base::Tuple<>>
1145 (function, base::MakeTuple());
1146 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001147}
1148
1149#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1150template <typename R, typename T, typename U>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001151inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001152CreateFunctor(T** obj, R (U::*method)()) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001153 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001154 new MutantLateObjectBind<R, T, R (U::*)(),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001155 base::Tuple<>, base::Tuple<>>
1156 (obj, method, base::MakeTuple());
1157 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001158}
1159#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1160
1161#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1162template <typename R, typename T, typename U>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001163inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001164CreateFunctor(T* obj, R (__stdcall U::*method)()) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001165 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001166 new Mutant<R, T, R (__stdcall U::*)(),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001167 base::Tuple<>, base::Tuple<>>
1168 (obj, method, base::MakeTuple());
1169 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001170}
1171
1172template <typename R>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001173inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001174CreateFunctor(R (__stdcall *function)()) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001175 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001176 new MutantFunction<R, R (__stdcall *)(),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001177 base::Tuple<>, base::Tuple<>>
1178 (function, base::MakeTuple());
1179 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001180}
1181#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1182template <typename R, typename T, typename U>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001183inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001184CreateFunctor(T** obj, R (__stdcall U::*method)()) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001185 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001186 new MutantLateObjectBind<R, T, R (__stdcall U::*)(),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001187 base::Tuple<>, base::Tuple<>>
1188 (obj, method, base::MakeTuple());
1189 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001190}
1191#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1192#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1193
1194// 0 - 1
1195template <typename R, typename T, typename U, typename A1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001196inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001197CreateFunctor(T* obj, R (U::*method)(A1)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001198 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001199 new Mutant<R, T, R (U::*)(A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001200 base::Tuple<>, base::Tuple<A1>>
1201 (obj, method, base::MakeTuple());
1202 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001203}
1204
1205template <typename R, typename A1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001206inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001207CreateFunctor(R (*function)(A1)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001208 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001209 new MutantFunction<R, R (*)(A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001210 base::Tuple<>, base::Tuple<A1>>
1211 (function, base::MakeTuple());
1212 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001213}
1214
1215#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1216template <typename R, typename T, typename U, typename A1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001217inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001218CreateFunctor(T** obj, R (U::*method)(A1)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001219 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001220 new MutantLateObjectBind<R, T, R (U::*)(A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001221 base::Tuple<>, base::Tuple<A1>>
1222 (obj, method, base::MakeTuple());
1223 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001224}
1225#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1226
1227#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1228template <typename R, typename T, typename U, typename A1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001229inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001230CreateFunctor(T* obj, R (__stdcall U::*method)(A1)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001231 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001232 new Mutant<R, T, R (__stdcall U::*)(A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001233 base::Tuple<>, base::Tuple<A1>>
1234 (obj, method, base::MakeTuple());
1235 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001236}
1237
1238template <typename R, typename A1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001239inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001240CreateFunctor(R (__stdcall *function)(A1)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001241 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001242 new MutantFunction<R, R (__stdcall *)(A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001243 base::Tuple<>, base::Tuple<A1>>
1244 (function, base::MakeTuple());
1245 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001246}
1247#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1248template <typename R, typename T, typename U, typename A1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001249inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001250CreateFunctor(T** obj, R (__stdcall U::*method)(A1)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001251 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001252 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001253 base::Tuple<>, base::Tuple<A1>>
1254 (obj, method, base::MakeTuple());
1255 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001256}
1257#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1258#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1259
1260// 0 - 2
1261template <typename R, typename T, typename U, typename A1, typename A2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001262inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001263CreateFunctor(T* obj, R (U::*method)(A1, A2)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001264 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001265 new Mutant<R, T, R (U::*)(A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001266 base::Tuple<>, base::Tuple<A1, A2>>
1267 (obj, method, base::MakeTuple());
1268 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001269}
1270
1271template <typename R, typename A1, typename A2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001272inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001273CreateFunctor(R (*function)(A1, A2)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001274 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001275 new MutantFunction<R, R (*)(A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001276 base::Tuple<>, base::Tuple<A1, A2>>
1277 (function, base::MakeTuple());
1278 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001279}
1280
1281#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1282template <typename R, typename T, typename U, typename A1, typename A2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001283inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001284CreateFunctor(T** obj, R (U::*method)(A1, A2)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001285 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001286 new MutantLateObjectBind<R, T, R (U::*)(A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001287 base::Tuple<>, base::Tuple<A1, A2>>
1288 (obj, method, base::MakeTuple());
1289 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001290}
1291#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1292
1293#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1294template <typename R, typename T, typename U, typename A1, typename A2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001295inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001296CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001297 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001298 new Mutant<R, T, R (__stdcall U::*)(A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001299 base::Tuple<>, base::Tuple<A1, A2>>
1300 (obj, method, base::MakeTuple());
1301 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001302}
1303
1304template <typename R, typename A1, typename A2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001305inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001306CreateFunctor(R (__stdcall *function)(A1, A2)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001307 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001308 new MutantFunction<R, R (__stdcall *)(A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001309 base::Tuple<>, base::Tuple<A1, A2>>
1310 (function, base::MakeTuple());
1311 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001312}
1313#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1314template <typename R, typename T, typename U, typename A1, typename A2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001315inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001316CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001317 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001318 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001319 base::Tuple<>, base::Tuple<A1, A2>>
1320 (obj, method, base::MakeTuple());
1321 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001322}
1323#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1324#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1325
1326// 0 - 3
1327template <typename R, typename T, typename U, typename A1, typename A2,
1328 typename A3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001329inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001330CreateFunctor(T* obj, R (U::*method)(A1, A2, A3)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001331 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001332 new Mutant<R, T, R (U::*)(A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001333 base::Tuple<>, base::Tuple<A1, A2, A3>>
1334 (obj, method, base::MakeTuple());
1335 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001336}
1337
1338template <typename R, typename A1, typename A2, typename A3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001339inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001340CreateFunctor(R (*function)(A1, A2, A3)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001341 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001342 new MutantFunction<R, R (*)(A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001343 base::Tuple<>, base::Tuple<A1, A2, A3>>
1344 (function, base::MakeTuple());
1345 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001346}
1347
1348#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1349template <typename R, typename T, typename U, typename A1, typename A2,
1350 typename A3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001351inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001352CreateFunctor(T** obj, R (U::*method)(A1, A2, A3)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001353 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001354 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001355 base::Tuple<>, base::Tuple<A1, A2, A3>>
1356 (obj, method, base::MakeTuple());
1357 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001358}
1359#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1360
1361#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1362template <typename R, typename T, typename U, typename A1, typename A2,
1363 typename A3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001364inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001365CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001366 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001367 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001368 base::Tuple<>, base::Tuple<A1, A2, A3>>
1369 (obj, method, base::MakeTuple());
1370 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001371}
1372
1373template <typename R, typename A1, typename A2, typename A3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001374inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001375CreateFunctor(R (__stdcall *function)(A1, A2, A3)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001376 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001377 new MutantFunction<R, R (__stdcall *)(A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001378 base::Tuple<>, base::Tuple<A1, A2, A3>>
1379 (function, base::MakeTuple());
1380 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001381}
1382#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1383template <typename R, typename T, typename U, typename A1, typename A2,
1384 typename A3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001385inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001386CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001387 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001388 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001389 base::Tuple<>, base::Tuple<A1, A2, A3>>
1390 (obj, method, base::MakeTuple());
1391 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001392}
1393#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1394#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1395
1396// 0 - 4
1397template <typename R, typename T, typename U, typename A1, typename A2,
1398 typename A3, typename A4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001399inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001400CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001401 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001402 new Mutant<R, T, R (U::*)(A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001403 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1404 (obj, method, base::MakeTuple());
1405 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001406}
1407
1408template <typename R, typename A1, typename A2, typename A3, typename A4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001409inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001410CreateFunctor(R (*function)(A1, A2, A3, A4)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001411 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001412 new MutantFunction<R, R (*)(A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001413 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1414 (function, base::MakeTuple());
1415 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001416}
1417
1418#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1419template <typename R, typename T, typename U, typename A1, typename A2,
1420 typename A3, typename A4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001421inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001422CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001423 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001424 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001425 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1426 (obj, method, base::MakeTuple());
1427 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001428}
1429#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1430
1431#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1432template <typename R, typename T, typename U, typename A1, typename A2,
1433 typename A3, typename A4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001434inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001435CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001436 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001437 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001438 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1439 (obj, method, base::MakeTuple());
1440 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001441}
1442
1443template <typename R, typename A1, typename A2, typename A3, typename A4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001444inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001445CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001446 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001447 new MutantFunction<R, R (__stdcall *)(A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001448 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1449 (function, base::MakeTuple());
1450 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001451}
1452#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1453template <typename R, typename T, typename U, typename A1, typename A2,
1454 typename A3, typename A4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001455inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001456CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001457 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001458 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001459 base::Tuple<>, base::Tuple<A1, A2, A3, A4>>
1460 (obj, method, base::MakeTuple());
1461 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001462}
1463#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1464#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1465
1466// 0 - 5
1467template <typename R, typename T, typename U, typename A1, typename A2,
1468 typename A3, typename A4, typename A5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001469inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07001470CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4, A5)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001471 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001472 new Mutant<R, T, R (U::*)(A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001473 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1474 (obj, method, base::MakeTuple());
1475 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001476}
1477
1478template <typename R, typename A1, typename A2, typename A3, typename A4,
1479 typename A5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001480inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07001481CreateFunctor(R (*function)(A1, A2, A3, A4, A5)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001482 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001483 new MutantFunction<R, R (*)(A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001484 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1485 (function, base::MakeTuple());
1486 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001487}
1488
1489#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1490template <typename R, typename T, typename U, typename A1, typename A2,
1491 typename A3, typename A4, typename A5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001492inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07001493CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4, A5)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001494 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001495 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001496 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1497 (obj, method, base::MakeTuple());
1498 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001499}
1500#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1501
1502#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1503template <typename R, typename T, typename U, typename A1, typename A2,
1504 typename A3, typename A4, typename A5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001505inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07001506CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001507 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001508 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001509 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1510 (obj, method, base::MakeTuple());
1511 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001512}
1513
1514template <typename R, typename A1, typename A2, typename A3, typename A4,
1515 typename A5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001516inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07001517CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4, A5)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001518 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001519 new MutantFunction<R, R (__stdcall *)(A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001520 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1521 (function, base::MakeTuple());
1522 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001523}
1524#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1525template <typename R, typename T, typename U, typename A1, typename A2,
1526 typename A3, typename A4, typename A5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001527inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07001528CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001529 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001530 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001531 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5>>
1532 (obj, method, base::MakeTuple());
1533 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001534}
1535#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1536#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1537
1538// 0 - 6
1539template <typename R, typename T, typename U, typename A1, typename A2,
1540 typename A3, typename A4, typename A5, typename A6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001541inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07001542CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4, A5, A6)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001543 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001544 new Mutant<R, T, R (U::*)(A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001545 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1546 (obj, method, base::MakeTuple());
1547 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001548}
1549
1550template <typename R, typename A1, typename A2, typename A3, typename A4,
1551 typename A5, typename A6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001552inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07001553CreateFunctor(R (*function)(A1, A2, A3, A4, A5, A6)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001554 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001555 new MutantFunction<R, R (*)(A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001556 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1557 (function, base::MakeTuple());
1558 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001559}
1560
1561#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1562template <typename R, typename T, typename U, typename A1, typename A2,
1563 typename A3, typename A4, typename A5, typename A6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001564inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07001565CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4, A5, A6)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001566 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001567 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001568 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1569 (obj, method, base::MakeTuple());
1570 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001571}
1572#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1573
1574#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1575template <typename R, typename T, typename U, typename A1, typename A2,
1576 typename A3, typename A4, typename A5, typename A6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001577inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07001578CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5, A6)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001579 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001580 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001581 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1582 (obj, method, base::MakeTuple());
1583 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001584}
1585
1586template <typename R, typename A1, typename A2, typename A3, typename A4,
1587 typename A5, typename A6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001588inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07001589CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4, A5, A6)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001590 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001591 new MutantFunction<R, R (__stdcall *)(A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001592 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1593 (function, base::MakeTuple());
1594 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001595}
1596#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1597template <typename R, typename T, typename U, typename A1, typename A2,
1598 typename A3, typename A4, typename A5, typename A6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001599inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07001600CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5, A6)) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001601 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001602 new MutantLateObjectBind<R, T, R (__stdcall U::*)(A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001603 base::Tuple<>, base::Tuple<A1, A2, A3, A4, A5, A6>>
1604 (obj, method, base::MakeTuple());
1605 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001606}
1607#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1608#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1609
1610// 1 - 0
1611template <typename R, typename T, typename U, typename P1, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001612inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001613CreateFunctor(T* obj, R (U::*method)(X1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001614 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001615 new Mutant<R, T, R (U::*)(X1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001616 base::Tuple<P1>, base::Tuple<>>
1617 (obj, method, base::MakeTuple(p1));
1618 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001619}
1620
1621template <typename R, typename P1, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001622inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001623CreateFunctor(R (*function)(X1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001624 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001625 new MutantFunction<R, R (*)(X1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001626 base::Tuple<P1>, base::Tuple<>>
1627 (function, base::MakeTuple(p1));
1628 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001629}
1630
1631#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1632template <typename R, typename T, typename U, typename P1, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001633inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001634CreateFunctor(T** obj, R (U::*method)(X1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001635 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001636 new MutantLateObjectBind<R, T, R (U::*)(X1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001637 base::Tuple<P1>, base::Tuple<>>
1638 (obj, method, base::MakeTuple(p1));
1639 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001640}
1641#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1642
1643#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1644template <typename R, typename T, typename U, typename P1, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001645inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001646CreateFunctor(T* obj, R (__stdcall U::*method)(X1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001647 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001648 new Mutant<R, T, R (__stdcall U::*)(X1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001649 base::Tuple<P1>, base::Tuple<>>
1650 (obj, method, base::MakeTuple(p1));
1651 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001652}
1653
1654template <typename R, typename P1, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001655inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001656CreateFunctor(R (__stdcall *function)(X1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001657 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001658 new MutantFunction<R, R (__stdcall *)(X1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001659 base::Tuple<P1>, base::Tuple<>>
1660 (function, base::MakeTuple(p1));
1661 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001662}
1663#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1664template <typename R, typename T, typename U, typename P1, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001665inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07001666CreateFunctor(T** obj, R (__stdcall U::*method)(X1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001667 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001668 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001669 base::Tuple<P1>, base::Tuple<>>
1670 (obj, method, base::MakeTuple(p1));
1671 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001672}
1673#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1674#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1675
1676// 1 - 1
1677template <typename R, typename T, typename U, typename P1, typename A1,
1678 typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001679inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001680CreateFunctor(T* obj, R (U::*method)(X1, A1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001681 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001682 new Mutant<R, T, R (U::*)(X1, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001683 base::Tuple<P1>, base::Tuple<A1>>
1684 (obj, method, base::MakeTuple(p1));
1685 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001686}
1687
1688template <typename R, typename P1, typename A1, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001689inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001690CreateFunctor(R (*function)(X1, A1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001691 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001692 new MutantFunction<R, R (*)(X1, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001693 base::Tuple<P1>, base::Tuple<A1>>
1694 (function, base::MakeTuple(p1));
1695 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001696}
1697
1698#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1699template <typename R, typename T, typename U, typename P1, typename A1,
1700 typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001701inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001702CreateFunctor(T** obj, R (U::*method)(X1, A1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001703 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001704 new MutantLateObjectBind<R, T, R (U::*)(X1, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001705 base::Tuple<P1>, base::Tuple<A1>>
1706 (obj, method, base::MakeTuple(p1));
1707 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001708}
1709#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1710
1711#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1712template <typename R, typename T, typename U, typename P1, typename A1,
1713 typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001714inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001715CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001716 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001717 new Mutant<R, T, R (__stdcall U::*)(X1, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001718 base::Tuple<P1>, base::Tuple<A1>>
1719 (obj, method, base::MakeTuple(p1));
1720 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001721}
1722
1723template <typename R, typename P1, typename A1, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001724inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001725CreateFunctor(R (__stdcall *function)(X1, A1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001726 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001727 new MutantFunction<R, R (__stdcall *)(X1, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001728 base::Tuple<P1>, base::Tuple<A1>>
1729 (function, base::MakeTuple(p1));
1730 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001731}
1732#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1733template <typename R, typename T, typename U, typename P1, typename A1,
1734 typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001735inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07001736CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001737 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001738 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001739 base::Tuple<P1>, base::Tuple<A1>>
1740 (obj, method, base::MakeTuple(p1));
1741 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001742}
1743#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1744#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1745
1746// 1 - 2
1747template <typename R, typename T, typename U, typename P1, typename A1,
1748 typename A2, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001749inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001750CreateFunctor(T* obj, R (U::*method)(X1, A1, A2), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001751 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001752 new Mutant<R, T, R (U::*)(X1, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001753 base::Tuple<P1>, base::Tuple<A1, A2>>
1754 (obj, method, base::MakeTuple(p1));
1755 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001756}
1757
1758template <typename R, typename P1, typename A1, typename A2, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001759inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001760CreateFunctor(R (*function)(X1, A1, A2), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001761 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001762 new MutantFunction<R, R (*)(X1, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001763 base::Tuple<P1>, base::Tuple<A1, A2>>
1764 (function, base::MakeTuple(p1));
1765 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001766}
1767
1768#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1769template <typename R, typename T, typename U, typename P1, typename A1,
1770 typename A2, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001771inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001772CreateFunctor(T** obj, R (U::*method)(X1, A1, A2), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001773 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001774 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001775 base::Tuple<P1>, base::Tuple<A1, A2>>
1776 (obj, method, base::MakeTuple(p1));
1777 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001778}
1779#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1780
1781#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1782template <typename R, typename T, typename U, typename P1, typename A1,
1783 typename A2, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001784inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001785CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001786 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001787 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001788 base::Tuple<P1>, base::Tuple<A1, A2>>
1789 (obj, method, base::MakeTuple(p1));
1790 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001791}
1792
1793template <typename R, typename P1, typename A1, typename A2, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001794inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001795CreateFunctor(R (__stdcall *function)(X1, A1, A2), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001796 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001797 new MutantFunction<R, R (__stdcall *)(X1, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001798 base::Tuple<P1>, base::Tuple<A1, A2>>
1799 (function, base::MakeTuple(p1));
1800 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001801}
1802#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1803template <typename R, typename T, typename U, typename P1, typename A1,
1804 typename A2, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001805inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07001806CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001807 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001808 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001809 base::Tuple<P1>, base::Tuple<A1, A2>>
1810 (obj, method, base::MakeTuple(p1));
1811 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001812}
1813#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1814#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1815
1816// 1 - 3
1817template <typename R, typename T, typename U, typename P1, typename A1,
1818 typename A2, typename A3, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001819inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001820CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001821 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001822 new Mutant<R, T, R (U::*)(X1, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001823 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1824 (obj, method, base::MakeTuple(p1));
1825 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001826}
1827
1828template <typename R, typename P1, typename A1, typename A2, typename A3,
1829 typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001830inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001831CreateFunctor(R (*function)(X1, A1, A2, A3), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001832 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001833 new MutantFunction<R, R (*)(X1, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001834 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1835 (function, base::MakeTuple(p1));
1836 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001837}
1838
1839#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1840template <typename R, typename T, typename U, typename P1, typename A1,
1841 typename A2, typename A3, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001842inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001843CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001844 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001845 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001846 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1847 (obj, method, base::MakeTuple(p1));
1848 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001849}
1850#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1851
1852#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1853template <typename R, typename T, typename U, typename P1, typename A1,
1854 typename A2, typename A3, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001855inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001856CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001857 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001858 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001859 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1860 (obj, method, base::MakeTuple(p1));
1861 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001862}
1863
1864template <typename R, typename P1, typename A1, typename A2, typename A3,
1865 typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001866inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001867CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001868 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001869 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001870 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1871 (function, base::MakeTuple(p1));
1872 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001873}
1874#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1875template <typename R, typename T, typename U, typename P1, typename A1,
1876 typename A2, typename A3, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001877inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07001878CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001879 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001880 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001881 base::Tuple<P1>, base::Tuple<A1, A2, A3>>
1882 (obj, method, base::MakeTuple(p1));
1883 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001884}
1885#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1886#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1887
1888// 1 - 4
1889template <typename R, typename T, typename U, typename P1, typename A1,
1890 typename A2, typename A3, typename A4, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001891inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001892CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001893 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001894 new Mutant<R, T, R (U::*)(X1, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001895 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1896 (obj, method, base::MakeTuple(p1));
1897 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001898}
1899
1900template <typename R, typename P1, typename A1, typename A2, typename A3,
1901 typename A4, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001902inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001903CreateFunctor(R (*function)(X1, A1, A2, A3, A4), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001904 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001905 new MutantFunction<R, R (*)(X1, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001906 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1907 (function, base::MakeTuple(p1));
1908 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001909}
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 X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001914inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001915CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001916 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001917 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001918 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1919 (obj, method, base::MakeTuple(p1));
1920 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001921}
1922#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1923
1924#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1925template <typename R, typename T, typename U, typename P1, typename A1,
1926 typename A2, typename A3, typename A4, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001927inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001928CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001929 const P1& p1) {
1930 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001931 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001932 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1933 (obj, method, base::MakeTuple(p1));
1934 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001935}
1936
1937template <typename R, typename P1, typename A1, typename A2, typename A3,
1938 typename A4, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001939inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001940CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001941 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001942 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001943 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1944 (function, base::MakeTuple(p1));
1945 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001946}
1947#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1948template <typename R, typename T, typename U, typename P1, typename A1,
1949 typename A2, typename A3, typename A4, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001950inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07001951CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001952 const P1& p1) {
1953 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001954 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001955 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4>>
1956 (obj, method, base::MakeTuple(p1));
1957 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001958}
1959#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1960#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1961
1962// 1 - 5
1963template <typename R, typename T, typename U, typename P1, typename A1,
1964 typename A2, typename A3, typename A4, typename A5, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001965inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07001966CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4, A5), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001967 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001968 new Mutant<R, T, R (U::*)(X1, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001969 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
1970 (obj, method, base::MakeTuple(p1));
1971 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001972}
1973
1974template <typename R, typename P1, typename A1, typename A2, typename A3,
1975 typename A4, typename A5, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001976inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07001977CreateFunctor(R (*function)(X1, A1, A2, A3, A4, A5), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001978 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001979 new MutantFunction<R, R (*)(X1, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001980 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
1981 (function, base::MakeTuple(p1));
1982 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001983}
1984
1985#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1986template <typename R, typename T, typename U, typename P1, typename A1,
1987 typename A2, typename A3, typename A4, typename A5, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001988inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07001989CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4, A5), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001990 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07001991 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07001992 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
1993 (obj, method, base::MakeTuple(p1));
1994 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07001995}
1996#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
1997
1998#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
1999template <typename R, typename T, typename U, typename P1, typename A1,
2000 typename A2, typename A3, typename A4, typename A5, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002001inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07002002CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002003 const P1& p1) {
2004 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002005 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002006 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
2007 (obj, method, base::MakeTuple(p1));
2008 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002009}
2010
2011template <typename R, typename P1, typename A1, typename A2, typename A3,
2012 typename A4, typename A5, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002013inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07002014CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4, A5), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002015 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002016 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002017 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
2018 (function, base::MakeTuple(p1));
2019 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002020}
2021#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2022template <typename R, typename T, typename U, typename P1, typename A1,
2023 typename A2, typename A3, typename A4, typename A5, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002024inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07002025CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002026 const P1& p1) {
2027 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002028 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002029 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5>>
2030 (obj, method, base::MakeTuple(p1));
2031 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002032}
2033#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2034#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2035
2036// 1 - 6
2037template <typename R, typename T, typename U, typename P1, typename A1,
2038 typename A2, typename A3, typename A4, typename A5, typename A6,
2039 typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002040inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002041CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002042 const P1& p1) {
2043 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002044 new Mutant<R, T, R (U::*)(X1, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002045 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2046 (obj, method, base::MakeTuple(p1));
2047 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002048}
2049
2050template <typename R, typename P1, typename A1, typename A2, typename A3,
2051 typename A4, typename A5, typename A6, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002052inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002053CreateFunctor(R (*function)(X1, A1, A2, A3, A4, A5, A6), const P1& p1) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002054 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002055 new MutantFunction<R, R (*)(X1, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002056 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2057 (function, base::MakeTuple(p1));
2058 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002059}
2060
2061#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2062template <typename R, typename T, typename U, typename P1, typename A1,
2063 typename A2, typename A3, typename A4, typename A5, typename A6,
2064 typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002065inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002066CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002067 const P1& p1) {
2068 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002069 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002070 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2071 (obj, method, base::MakeTuple(p1));
2072 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002073}
2074#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2075
2076#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2077template <typename R, typename T, typename U, typename P1, typename A1,
2078 typename A2, typename A3, typename A4, typename A5, typename A6,
2079 typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002080inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002081CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002082 const P1& p1) {
2083 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002084 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002085 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2086 (obj, method, base::MakeTuple(p1));
2087 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002088}
2089
2090template <typename R, typename P1, typename A1, typename A2, typename A3,
2091 typename A4, typename A5, typename A6, typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002092inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002093CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002094 const P1& p1) {
2095 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002096 new MutantFunction<R, R (__stdcall *)(X1, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002097 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2098 (function, base::MakeTuple(p1));
2099 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002100}
2101#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2102template <typename R, typename T, typename U, typename P1, typename A1,
2103 typename A2, typename A3, typename A4, typename A5, typename A6,
2104 typename X1>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002105inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002106CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002107 const P1& p1) {
2108 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002109 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002110 base::Tuple<P1>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2111 (obj, method, base::MakeTuple(p1));
2112 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002113}
2114#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2115#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2116
2117// 2 - 0
2118template <typename R, typename T, typename U, typename P1, typename P2,
2119 typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002120inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002121CreateFunctor(T* obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002122 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002123 new Mutant<R, T, R (U::*)(X1, X2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002124 base::Tuple<P1, P2>, base::Tuple<>>
2125 (obj, method, base::MakeTuple(p1, p2));
2126 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002127}
2128
2129template <typename R, typename P1, typename P2, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002130inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002131CreateFunctor(R (*function)(X1, X2), const P1& p1, const P2& p2) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002132 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002133 new MutantFunction<R, R (*)(X1, X2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002134 base::Tuple<P1, P2>, base::Tuple<>>
2135 (function, base::MakeTuple(p1, p2));
2136 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002137}
2138
2139#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2140template <typename R, typename T, typename U, typename P1, typename P2,
2141 typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002142inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002143CreateFunctor(T** obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002144 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002145 new MutantLateObjectBind<R, T, R (U::*)(X1, X2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002146 base::Tuple<P1, P2>, base::Tuple<>>
2147 (obj, method, base::MakeTuple(p1, p2));
2148 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002149}
2150#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2151
2152#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2153template <typename R, typename T, typename U, typename P1, typename P2,
2154 typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002155inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002156CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002157 const P2& p2) {
2158 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002159 new Mutant<R, T, R (__stdcall U::*)(X1, X2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002160 base::Tuple<P1, P2>, base::Tuple<>>
2161 (obj, method, base::MakeTuple(p1, p2));
2162 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002163}
2164
2165template <typename R, typename P1, typename P2, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002166inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002167CreateFunctor(R (__stdcall *function)(X1, X2), const P1& p1, const P2& p2) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002168 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002169 new MutantFunction<R, R (__stdcall *)(X1, X2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002170 base::Tuple<P1, P2>, base::Tuple<>>
2171 (function, base::MakeTuple(p1, p2));
2172 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002173}
2174#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2175template <typename R, typename T, typename U, typename P1, typename P2,
2176 typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002177inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002178CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002179 const P2& p2) {
2180 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002181 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002182 base::Tuple<P1, P2>, base::Tuple<>>
2183 (obj, method, base::MakeTuple(p1, p2));
2184 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002185}
2186#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2187#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2188
2189// 2 - 1
2190template <typename R, typename T, typename U, typename P1, typename P2,
2191 typename A1, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002192inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07002193CreateFunctor(T* obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002194 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002195 new Mutant<R, T, R (U::*)(X1, X2, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002196 base::Tuple<P1, P2>, base::Tuple<A1>>
2197 (obj, method, base::MakeTuple(p1, p2));
2198 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002199}
2200
2201template <typename R, typename P1, typename P2, typename A1, typename X1,
2202 typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002203inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07002204CreateFunctor(R (*function)(X1, X2, A1), const P1& p1, const P2& p2) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002205 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002206 new MutantFunction<R, R (*)(X1, X2, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002207 base::Tuple<P1, P2>, base::Tuple<A1>>
2208 (function, base::MakeTuple(p1, p2));
2209 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002210}
2211
2212#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2213template <typename R, typename T, typename U, typename P1, typename P2,
2214 typename A1, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002215inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07002216CreateFunctor(T** obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002217 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002218 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002219 base::Tuple<P1, P2>, base::Tuple<A1>>
2220 (obj, method, base::MakeTuple(p1, p2));
2221 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002222}
2223#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2224
2225#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2226template <typename R, typename T, typename U, typename P1, typename P2,
2227 typename A1, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002228inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07002229CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002230 const P2& p2) {
2231 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002232 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002233 base::Tuple<P1, P2>, base::Tuple<A1>>
2234 (obj, method, base::MakeTuple(p1, p2));
2235 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002236}
2237
2238template <typename R, typename P1, typename P2, typename A1, typename X1,
2239 typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002240inline MutantFunctor<R, base::Tuple<A1>>
2241CreateFunctor(R (__stdcall *function)(X1, X2, A1), const P1& p1, const P2& p2) {
2242 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002243 new MutantFunction<R, R (__stdcall *)(X1, X2, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002244 base::Tuple<P1, P2>, base::Tuple<A1>>
2245 (function, base::MakeTuple(p1, p2));
2246 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002247}
2248#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2249template <typename R, typename T, typename U, typename P1, typename P2,
2250 typename A1, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002251inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07002252CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002253 const P2& p2) {
2254 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002255 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002256 base::Tuple<P1, P2>, base::Tuple<A1>>
2257 (obj, method, base::MakeTuple(p1, p2));
2258 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002259}
2260#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2261#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2262
2263// 2 - 2
2264template <typename R, typename T, typename U, typename P1, typename P2,
2265 typename A1, typename A2, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002266inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002267CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002268 const P2& p2) {
2269 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002270 new Mutant<R, T, R (U::*)(X1, X2, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002271 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2272 (obj, method, base::MakeTuple(p1, p2));
2273 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002274}
2275
2276template <typename R, typename P1, typename P2, typename A1, typename A2,
2277 typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002278inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002279CreateFunctor(R (*function)(X1, X2, A1, A2), const P1& p1, const P2& p2) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002280 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002281 new MutantFunction<R, R (*)(X1, X2, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002282 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2283 (function, base::MakeTuple(p1, p2));
2284 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002285}
2286
2287#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2288template <typename R, typename T, typename U, typename P1, typename P2,
2289 typename A1, typename A2, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002290inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002291CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002292 const P2& p2) {
2293 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002294 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002295 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2296 (obj, method, base::MakeTuple(p1, p2));
2297 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002298}
2299#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2300
2301#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2302template <typename R, typename T, typename U, typename P1, typename P2,
2303 typename A1, typename A2, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002304inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002305CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002306 const P2& p2) {
2307 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002308 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002309 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2310 (obj, method, base::MakeTuple(p1, p2));
2311 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002312}
2313
2314template <typename R, typename P1, typename P2, typename A1, typename A2,
2315 typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002316inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002317CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002318 const P2& p2) {
2319 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002320 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002321 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2322 (function, base::MakeTuple(p1, p2));
2323 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002324}
2325#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2326template <typename R, typename T, typename U, typename P1, typename P2,
2327 typename A1, typename A2, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002328inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002329CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002330 const P2& p2) {
2331 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002332 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002333 base::Tuple<P1, P2>, base::Tuple<A1, A2>>
2334 (obj, method, base::MakeTuple(p1, p2));
2335 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002336}
2337#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2338#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2339
2340// 2 - 3
2341template <typename R, typename T, typename U, typename P1, typename P2,
2342 typename A1, typename A2, typename A3, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002343inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002344CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002345 const P2& p2) {
2346 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002347 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002348 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2349 (obj, method, base::MakeTuple(p1, p2));
2350 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002351}
2352
2353template <typename R, typename P1, typename P2, typename A1, typename A2,
2354 typename A3, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002355inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002356CreateFunctor(R (*function)(X1, X2, A1, A2, A3), const P1& p1, const P2& p2) {
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002357 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002358 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002359 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2360 (function, base::MakeTuple(p1, p2));
2361 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002362}
2363
2364#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2365template <typename R, typename T, typename U, typename P1, typename P2,
2366 typename A1, typename A2, typename A3, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002367inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002368CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002369 const P2& p2) {
2370 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002371 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002372 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2373 (obj, method, base::MakeTuple(p1, p2));
2374 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002375}
2376#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2377
2378#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2379template <typename R, typename T, typename U, typename P1, typename P2,
2380 typename A1, typename A2, typename A3, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002381inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002382CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002383 const P1& p1, const P2& p2) {
2384 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002385 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002386 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2387 (obj, method, base::MakeTuple(p1, p2));
2388 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002389}
2390
2391template <typename R, typename P1, typename P2, typename A1, typename A2,
2392 typename A3, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002393inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002394CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002395 const P2& p2) {
2396 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002397 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002398 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2399 (function, base::MakeTuple(p1, p2));
2400 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002401}
2402#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2403template <typename R, typename T, typename U, typename P1, typename P2,
2404 typename A1, typename A2, typename A3, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002405inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002406CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002407 const P1& p1, const P2& p2) {
2408 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002409 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002410 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3>>
2411 (obj, method, base::MakeTuple(p1, p2));
2412 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002413}
2414#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2415#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2416
2417// 2 - 4
2418template <typename R, typename T, typename U, typename P1, typename P2,
2419 typename A1, typename A2, typename A3, typename A4, typename X1,
2420 typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002421inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07002422CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002423 const P2& p2) {
2424 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002425 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002426 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2427 (obj, method, base::MakeTuple(p1, p2));
2428 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002429}
2430
2431template <typename R, typename P1, typename P2, typename A1, typename A2,
2432 typename A3, typename A4, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002433inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07002434CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002435 const P2& p2) {
2436 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002437 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002438 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2439 (function, base::MakeTuple(p1, p2));
2440 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002441}
2442
2443#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2444template <typename R, typename T, typename U, typename P1, typename P2,
2445 typename A1, typename A2, typename A3, typename A4, typename X1,
2446 typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002447inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07002448CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002449 const P2& p2) {
2450 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002451 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002452 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2453 (obj, method, base::MakeTuple(p1, p2));
2454 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002455}
2456#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2457
2458#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2459template <typename R, typename T, typename U, typename P1, typename P2,
2460 typename A1, typename A2, typename A3, typename A4, typename X1,
2461 typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002462inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07002463CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002464 const P1& p1, const P2& p2) {
2465 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002466 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002467 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2468 (obj, method, base::MakeTuple(p1, p2));
2469 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002470}
2471
2472template <typename R, typename P1, typename P2, typename A1, typename A2,
2473 typename A3, typename A4, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002474inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07002475CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002476 const P2& p2) {
2477 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002478 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002479 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2480 (function, base::MakeTuple(p1, p2));
2481 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002482}
2483#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2484template <typename R, typename T, typename U, typename P1, typename P2,
2485 typename A1, typename A2, typename A3, typename A4, typename X1,
2486 typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002487inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07002488CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002489 const P1& p1, const P2& p2) {
2490 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002491 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002492 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4>>
2493 (obj, method, base::MakeTuple(p1, p2));
2494 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002495}
2496#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2497#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2498
2499// 2 - 5
2500template <typename R, typename T, typename U, typename P1, typename P2,
2501 typename A1, typename A2, typename A3, typename A4, typename A5,
2502 typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002503inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07002504CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002505 const P2& p2) {
2506 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002507 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002508 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2509 (obj, method, base::MakeTuple(p1, p2));
2510 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002511}
2512
2513template <typename R, typename P1, typename P2, typename A1, typename A2,
2514 typename A3, typename A4, typename A5, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002515inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07002516CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002517 const P2& p2) {
2518 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002519 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002520 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2521 (function, base::MakeTuple(p1, p2));
2522 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002523}
2524
2525#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2526template <typename R, typename T, typename U, typename P1, typename P2,
2527 typename A1, typename A2, typename A3, typename A4, typename A5,
2528 typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002529inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07002530CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002531 const P2& p2) {
2532 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002533 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002534 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2535 (obj, method, base::MakeTuple(p1, p2));
2536 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002537}
2538#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2539
2540#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2541template <typename R, typename T, typename U, typename P1, typename P2,
2542 typename A1, typename A2, typename A3, typename A4, typename A5,
2543 typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002544inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07002545CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002546 const P1& p1, const P2& p2) {
2547 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002548 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002549 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2550 (obj, method, base::MakeTuple(p1, p2));
2551 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002552}
2553
2554template <typename R, typename P1, typename P2, typename A1, typename A2,
2555 typename A3, typename A4, typename A5, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002556inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07002557CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4, A5), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002558 const P2& p2) {
2559 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002560 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002561 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2562 (function, base::MakeTuple(p1, p2));
2563 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002564}
2565#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2566template <typename R, typename T, typename U, typename P1, typename P2,
2567 typename A1, typename A2, typename A3, typename A4, typename A5,
2568 typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002569inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07002570CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002571 const P1& p1, const P2& p2) {
2572 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002573 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002574 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5>>
2575 (obj, method, base::MakeTuple(p1, p2));
2576 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002577}
2578#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2579#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2580
2581// 2 - 6
2582template <typename R, typename T, typename U, typename P1, typename P2,
2583 typename A1, typename A2, typename A3, typename A4, typename A5,
2584 typename A6, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002585inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002586CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002587 const P1& p1, const P2& p2) {
2588 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002589 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002590 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2591 (obj, method, base::MakeTuple(p1, p2));
2592 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002593}
2594
2595template <typename R, typename P1, typename P2, typename A1, typename A2,
2596 typename A3, typename A4, typename A5, typename A6, typename X1,
2597 typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002598inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002599CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4, A5, A6), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002600 const P2& p2) {
2601 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002602 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002603 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5,
2604 A6>>
2605 (function, base::MakeTuple(p1, p2));
2606 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002607}
2608
2609#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2610template <typename R, typename T, typename U, typename P1, typename P2,
2611 typename A1, typename A2, typename A3, typename A4, typename A5,
2612 typename A6, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002613inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002614CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002615 const P1& p1, const P2& p2) {
2616 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002617 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002618 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2619 (obj, method, base::MakeTuple(p1, p2));
2620 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002621}
2622#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2623
2624#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2625template <typename R, typename T, typename U, typename P1, typename P2,
2626 typename A1, typename A2, typename A3, typename A4, typename A5,
2627 typename A6, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002628inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002629CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002630 const P1& p1, const P2& p2) {
2631 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002632 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002633 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2634 (obj, method, base::MakeTuple(p1, p2));
2635 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002636}
2637
2638template <typename R, typename P1, typename P2, typename A1, typename A2,
2639 typename A3, typename A4, typename A5, typename A6, typename X1,
2640 typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002641inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002642CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002643 const P1& p1, const P2& p2) {
2644 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002645 new MutantFunction<R, R (__stdcall *)(X1, X2, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002646 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5,
2647 A6>>
2648 (function, base::MakeTuple(p1, p2));
2649 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002650}
2651#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2652template <typename R, typename T, typename U, typename P1, typename P2,
2653 typename A1, typename A2, typename A3, typename A4, typename A5,
2654 typename A6, typename X1, typename X2>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002655inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07002656CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002657 const P1& p1, const P2& p2) {
2658 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002659 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002660 base::Tuple<P1, P2>, base::Tuple<A1, A2, A3, A4, A5, A6>>
2661 (obj, method, base::MakeTuple(p1, p2));
2662 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002663}
2664#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2665#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2666
2667// 3 - 0
2668template <typename R, typename T, typename U, typename P1, typename P2,
2669 typename P3, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002670inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002671CreateFunctor(T* obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002672 const P3& p3) {
2673 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002674 new Mutant<R, T, R (U::*)(X1, X2, X3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002675 base::Tuple<P1, P2, P3>, base::Tuple<>>
2676 (obj, method, base::MakeTuple(p1, p2, p3));
2677 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002678}
2679
2680template <typename R, typename P1, typename P2, typename P3, typename X1,
2681 typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002682inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002683CreateFunctor(R (*function)(X1, X2, X3), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002684 const P3& p3) {
2685 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002686 new MutantFunction<R, R (*)(X1, X2, X3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002687 base::Tuple<P1, P2, P3>, base::Tuple<>>
2688 (function, base::MakeTuple(p1, p2, p3));
2689 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002690}
2691
2692#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2693template <typename R, typename T, typename U, typename P1, typename P2,
2694 typename P3, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002695inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002696CreateFunctor(T** obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002697 const P3& p3) {
2698 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002699 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002700 base::Tuple<P1, P2, P3>, base::Tuple<>>
2701 (obj, method, base::MakeTuple(p1, p2, p3));
2702 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002703}
2704#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2705
2706#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2707template <typename R, typename T, typename U, typename P1, typename P2,
2708 typename P3, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002709inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002710CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002711 const P2& p2, const P3& p3) {
2712 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002713 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002714 base::Tuple<P1, P2, P3>, base::Tuple<>>
2715 (obj, method, base::MakeTuple(p1, p2, p3));
2716 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002717}
2718
2719template <typename R, typename P1, typename P2, typename P3, typename X1,
2720 typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002721inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002722CreateFunctor(R (__stdcall *function)(X1, X2, X3), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002723 const P3& p3) {
2724 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002725 new MutantFunction<R, R (__stdcall *)(X1, X2, X3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002726 base::Tuple<P1, P2, P3>, base::Tuple<>>
2727 (function, base::MakeTuple(p1, p2, p3));
2728 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002729}
2730#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2731template <typename R, typename T, typename U, typename P1, typename P2,
2732 typename P3, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002733inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07002734CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002735 const P2& p2, const P3& p3) {
2736 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002737 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002738 base::Tuple<P1, P2, P3>, base::Tuple<>>
2739 (obj, method, base::MakeTuple(p1, p2, p3));
2740 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002741}
2742#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2743#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2744
2745// 3 - 1
2746template <typename R, typename T, typename U, typename P1, typename P2,
2747 typename P3, typename A1, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002748inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07002749CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002750 const P2& p2, const P3& p3) {
2751 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002752 new Mutant<R, T, R (U::*)(X1, X2, X3, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002753 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2754 (obj, method, base::MakeTuple(p1, p2, p3));
2755 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002756}
2757
2758template <typename R, typename P1, typename P2, typename P3, typename A1,
2759 typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002760inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07002761CreateFunctor(R (*function)(X1, X2, X3, A1), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002762 const P3& p3) {
2763 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002764 new MutantFunction<R, R (*)(X1, X2, X3, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002765 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2766 (function, base::MakeTuple(p1, p2, p3));
2767 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002768}
2769
2770#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2771template <typename R, typename T, typename U, typename P1, typename P2,
2772 typename P3, typename A1, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002773inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07002774CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002775 const P2& p2, const P3& p3) {
2776 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002777 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002778 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2779 (obj, method, base::MakeTuple(p1, p2, p3));
2780 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002781}
2782#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2783
2784#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2785template <typename R, typename T, typename U, typename P1, typename P2,
2786 typename P3, typename A1, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002787inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07002788CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002789 const P2& p2, const P3& p3) {
2790 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002791 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002792 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2793 (obj, method, base::MakeTuple(p1, p2, p3));
2794 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002795}
2796
2797template <typename R, typename P1, typename P2, typename P3, typename A1,
2798 typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002799inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07002800CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002801 const P2& p2, const P3& p3) {
2802 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002803 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002804 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2805 (function, base::MakeTuple(p1, p2, p3));
2806 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002807}
2808#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2809template <typename R, typename T, typename U, typename P1, typename P2,
2810 typename P3, typename A1, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002811inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07002812CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002813 const P2& p2, const P3& p3) {
2814 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002815 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002816 base::Tuple<P1, P2, P3>, base::Tuple<A1>>
2817 (obj, method, base::MakeTuple(p1, p2, p3));
2818 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002819}
2820#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2821#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2822
2823// 3 - 2
2824template <typename R, typename T, typename U, typename P1, typename P2,
2825 typename P3, typename A1, typename A2, typename X1, typename X2,
2826 typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002827inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002828CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002829 const P2& p2, const P3& p3) {
2830 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002831 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002832 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2833 (obj, method, base::MakeTuple(p1, p2, p3));
2834 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002835}
2836
2837template <typename R, typename P1, typename P2, typename P3, typename A1,
2838 typename A2, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002839inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002840CreateFunctor(R (*function)(X1, X2, X3, A1, A2), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002841 const P3& p3) {
2842 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002843 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002844 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2845 (function, base::MakeTuple(p1, p2, p3));
2846 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002847}
2848
2849#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2850template <typename R, typename T, typename U, typename P1, typename P2,
2851 typename P3, typename A1, typename A2, typename X1, typename X2,
2852 typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002853inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002854CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002855 const P2& p2, const P3& p3) {
2856 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002857 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002858 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2859 (obj, method, base::MakeTuple(p1, p2, p3));
2860 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002861}
2862#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2863
2864#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2865template <typename R, typename T, typename U, typename P1, typename P2,
2866 typename P3, typename A1, typename A2, typename X1, typename X2,
2867 typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002868inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002869CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002870 const P1& p1, const P2& p2, const P3& p3) {
2871 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002872 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002873 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2874 (obj, method, base::MakeTuple(p1, p2, p3));
2875 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002876}
2877
2878template <typename R, typename P1, typename P2, typename P3, typename A1,
2879 typename A2, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002880inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002881CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002882 const P2& p2, const P3& p3) {
2883 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002884 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002885 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2886 (function, base::MakeTuple(p1, p2, p3));
2887 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002888}
2889#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2890template <typename R, typename T, typename U, typename P1, typename P2,
2891 typename P3, typename A1, typename A2, typename X1, typename X2,
2892 typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002893inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07002894CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002895 const P1& p1, const P2& p2, const P3& p3) {
2896 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002897 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002898 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2>>
2899 (obj, method, base::MakeTuple(p1, p2, p3));
2900 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002901}
2902#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2903#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2904
2905// 3 - 3
2906template <typename R, typename T, typename U, typename P1, typename P2,
2907 typename P3, typename A1, typename A2, typename A3, typename X1,
2908 typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002909inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002910CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002911 const P2& p2, const P3& p3) {
2912 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002913 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002914 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2915 (obj, method, base::MakeTuple(p1, p2, p3));
2916 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002917}
2918
2919template <typename R, typename P1, typename P2, typename P3, typename A1,
2920 typename A2, typename A3, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002921inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002922CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002923 const P3& p3) {
2924 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002925 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002926 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2927 (function, base::MakeTuple(p1, p2, p3));
2928 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002929}
2930
2931#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2932template <typename R, typename T, typename U, typename P1, typename P2,
2933 typename P3, typename A1, typename A2, typename A3, typename X1,
2934 typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002935inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002936CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002937 const P2& p2, const P3& p3) {
2938 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002939 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002940 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2941 (obj, method, base::MakeTuple(p1, p2, p3));
2942 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002943}
2944#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2945
2946#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2947template <typename R, typename T, typename U, typename P1, typename P2,
2948 typename P3, typename A1, typename A2, typename A3, typename X1,
2949 typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002950inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002951CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002952 const P1& p1, const P2& p2, const P3& p3) {
2953 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002954 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002955 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2956 (obj, method, base::MakeTuple(p1, p2, p3));
2957 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002958}
2959
2960template <typename R, typename P1, typename P2, typename P3, typename A1,
2961 typename A2, typename A3, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002962inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002963CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002964 const P2& p2, const P3& p3) {
2965 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002966 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002967 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2968 (function, base::MakeTuple(p1, p2, p3));
2969 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002970}
2971#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2972template <typename R, typename T, typename U, typename P1, typename P2,
2973 typename P3, typename A1, typename A2, typename A3, typename X1,
2974 typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002975inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07002976CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002977 const P1& p1, const P2& p2, const P3& p3) {
2978 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002979 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002980 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3>>
2981 (obj, method, base::MakeTuple(p1, p2, p3));
2982 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002983}
2984#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
2985#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
2986
2987// 3 - 4
2988template <typename R, typename T, typename U, typename P1, typename P2,
2989 typename P3, typename A1, typename A2, typename A3, typename A4,
2990 typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002991inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07002992CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002993 const P2& p2, const P3& p3) {
2994 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07002995 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07002996 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
2997 (obj, method, base::MakeTuple(p1, p2, p3));
2998 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07002999}
3000
3001template <typename R, typename P1, typename P2, typename P3, typename A1,
3002 typename A2, typename A3, typename A4, typename X1, typename X2,
3003 typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003004inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07003005CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003006 const P2& p2, const P3& p3) {
3007 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003008 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003009 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
3010 (function, base::MakeTuple(p1, p2, p3));
3011 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003012}
3013
3014#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3015template <typename R, typename T, typename U, typename P1, typename P2,
3016 typename P3, typename A1, typename A2, typename A3, typename A4,
3017 typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003018inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07003019CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003020 const P2& p2, const P3& p3) {
3021 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003022 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003023 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
3024 (obj, method, base::MakeTuple(p1, p2, p3));
3025 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003026}
3027#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3028
3029#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3030template <typename R, typename T, typename U, typename P1, typename P2,
3031 typename P3, typename A1, typename A2, typename A3, typename A4,
3032 typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003033inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07003034CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003035 const P1& p1, const P2& p2, const P3& p3) {
3036 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003037 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003038 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
3039 (obj, method, base::MakeTuple(p1, p2, p3));
3040 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003041}
3042
3043template <typename R, typename P1, typename P2, typename P3, typename A1,
3044 typename A2, typename A3, typename A4, typename X1, typename X2,
3045 typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003046inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07003047CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003048 const P2& p2, const P3& p3) {
3049 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003050 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003051 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
3052 (function, base::MakeTuple(p1, p2, p3));
3053 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003054}
3055#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3056template <typename R, typename T, typename U, typename P1, typename P2,
3057 typename P3, typename A1, typename A2, typename A3, typename A4,
3058 typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003059inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07003060CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003061 const P1& p1, const P2& p2, const P3& p3) {
3062 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003063 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003064 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4>>
3065 (obj, method, base::MakeTuple(p1, p2, p3));
3066 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003067}
3068#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3069#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3070
3071// 3 - 5
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 X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003075inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003076CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003077 const P1& p1, const P2& p2, const P3& p3) {
3078 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003079 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003080 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5>>
3081 (obj, method, base::MakeTuple(p1, p2, p3));
3082 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003083}
3084
3085template <typename R, typename P1, typename P2, typename P3, typename A1,
3086 typename A2, typename A3, typename A4, typename A5, typename X1,
3087 typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003088inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003089CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4, A5), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003090 const P2& p2, const P3& p3) {
3091 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003092 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003093 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4,
3094 A5>>
3095 (function, base::MakeTuple(p1, p2, p3));
3096 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003097}
3098
3099#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3100template <typename R, typename T, typename U, typename P1, typename P2,
3101 typename P3, typename A1, typename A2, typename A3, typename A4,
3102 typename A5, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003103inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003104CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003105 const P1& p1, const P2& p2, const P3& p3) {
3106 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003107 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003108 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5>>
3109 (obj, method, base::MakeTuple(p1, p2, p3));
3110 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003111}
3112#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3113
3114#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3115template <typename R, typename T, typename U, typename P1, typename P2,
3116 typename P3, typename A1, typename A2, typename A3, typename A4,
3117 typename A5, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003118inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003119CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003120 const P1& p1, const P2& p2, const P3& p3) {
3121 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003122 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003123 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5>>
3124 (obj, method, base::MakeTuple(p1, p2, p3));
3125 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003126}
3127
3128template <typename R, typename P1, typename P2, typename P3, typename A1,
3129 typename A2, typename A3, typename A4, typename A5, typename X1,
3130 typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003131inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003132CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003133 const P1& p1, const P2& p2, const P3& p3) {
3134 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003135 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003136 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4,
3137 A5>>
3138 (function, base::MakeTuple(p1, p2, p3));
3139 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003140}
3141#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3142template <typename R, typename T, typename U, typename P1, typename P2,
3143 typename P3, typename A1, typename A2, typename A3, typename A4,
3144 typename A5, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003145inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003146CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003147 const P1& p1, const P2& p2, const P3& p3) {
3148 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003149 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003150 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5>>
3151 (obj, method, base::MakeTuple(p1, p2, p3));
3152 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003153}
3154#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3155#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3156
3157// 3 - 6
3158template <typename R, typename T, typename U, typename P1, typename P2,
3159 typename P3, typename A1, typename A2, typename A3, typename A4,
3160 typename A5, typename A6, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003161inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003162CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003163 const P1& p1, const P2& p2, const P3& p3) {
3164 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003165 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003166 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5, A6>>
3167 (obj, method, base::MakeTuple(p1, p2, p3));
3168 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003169}
3170
3171template <typename R, typename P1, typename P2, typename P3, typename A1,
3172 typename A2, typename A3, typename A4, typename A5, typename A6,
3173 typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003174inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003175CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4, A5, A6), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003176 const P2& p2, const P3& p3) {
3177 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003178 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003179 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4,
3180 A5, A6>>
3181 (function, base::MakeTuple(p1, p2, p3));
3182 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003183}
3184
3185#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3186template <typename R, typename T, typename U, typename P1, typename P2,
3187 typename P3, typename A1, typename A2, typename A3, typename A4,
3188 typename A5, typename A6, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003189inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003190CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003191 const P1& p1, const P2& p2, const P3& p3) {
3192 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003193 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003194 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5, A6>>
3195 (obj, method, base::MakeTuple(p1, p2, p3));
3196 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003197}
3198#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3199
3200#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3201template <typename R, typename T, typename U, typename P1, typename P2,
3202 typename P3, typename A1, typename A2, typename A3, typename A4,
3203 typename A5, typename A6, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003204inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003205CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003206 A6), const P1& p1, const P2& p2, const P3& p3) {
3207 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003208 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003209 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5, A6>>
3210 (obj, method, base::MakeTuple(p1, p2, p3));
3211 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003212}
3213
3214template <typename R, typename P1, typename P2, typename P3, typename A1,
3215 typename A2, typename A3, typename A4, typename A5, typename A6,
3216 typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003217inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003218CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003219 const P1& p1, const P2& p2, const P3& p3) {
3220 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003221 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003222 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4,
3223 A5, A6>>
3224 (function, base::MakeTuple(p1, p2, p3));
3225 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003226}
3227#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3228template <typename R, typename T, typename U, typename P1, typename P2,
3229 typename P3, typename A1, typename A2, typename A3, typename A4,
3230 typename A5, typename A6, typename X1, typename X2, typename X3>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003231inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003232CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003233 A6), const P1& p1, const P2& p2, const P3& p3) {
3234 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003235 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003236 base::Tuple<P1, P2, P3>, base::Tuple<A1, A2, A3, A4, A5, A6>>
3237 (obj, method, base::MakeTuple(p1, p2, p3));
3238 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003239}
3240#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3241#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3242
3243// 4 - 0
3244template <typename R, typename T, typename U, typename P1, typename P2,
3245 typename P3, typename P4, typename X1, typename X2, typename X3,
3246 typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003247inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003248CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003249 const P2& p2, const P3& p3, const P4& p4) {
3250 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003251 new Mutant<R, T, R (U::*)(X1, X2, X3, X4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003252 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3253 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3254 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003255}
3256
3257template <typename R, typename P1, typename P2, typename P3, typename P4,
3258 typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003259inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003260CreateFunctor(R (*function)(X1, X2, X3, X4), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003261 const P3& p3, const P4& p4) {
3262 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003263 new MutantFunction<R, R (*)(X1, X2, X3, X4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003264 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3265 (function, base::MakeTuple(p1, p2, p3, p4));
3266 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003267}
3268
3269#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3270template <typename R, typename T, typename U, typename P1, typename P2,
3271 typename P3, typename P4, typename X1, typename X2, typename X3,
3272 typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003273inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003274CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003275 const P2& p2, const P3& p3, const P4& p4) {
3276 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003277 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003278 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3279 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3280 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003281}
3282#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3283
3284#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3285template <typename R, typename T, typename U, typename P1, typename P2,
3286 typename P3, typename P4, typename X1, typename X2, typename X3,
3287 typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003288inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003289CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003290 const P2& p2, const P3& p3, const P4& p4) {
3291 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003292 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003293 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3294 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3295 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003296}
3297
3298template <typename R, typename P1, typename P2, typename P3, typename P4,
3299 typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003300inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003301CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003302 const P2& p2, const P3& p3, const P4& p4) {
3303 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003304 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003305 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3306 (function, base::MakeTuple(p1, p2, p3, p4));
3307 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003308}
3309#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3310template <typename R, typename T, typename U, typename P1, typename P2,
3311 typename P3, typename P4, typename X1, typename X2, typename X3,
3312 typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003313inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003314CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003315 const P2& p2, const P3& p3, const P4& p4) {
3316 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003317 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003318 base::Tuple<P1, P2, P3, P4>, base::Tuple<>>
3319 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3320 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003321}
3322#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3323#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3324
3325// 4 - 1
3326template <typename R, typename T, typename U, typename P1, typename P2,
3327 typename P3, typename P4, typename A1, typename X1, typename X2,
3328 typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003329inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07003330CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003331 const P2& p2, const P3& p3, const P4& p4) {
3332 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003333 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003334 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3335 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3336 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003337}
3338
3339template <typename R, typename P1, typename P2, typename P3, typename P4,
3340 typename A1, typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003341inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07003342CreateFunctor(R (*function)(X1, X2, X3, X4, A1), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003343 const P3& p3, const P4& p4) {
3344 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003345 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003346 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3347 (function, base::MakeTuple(p1, p2, p3, p4));
3348 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003349}
3350
3351#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3352template <typename R, typename T, typename U, typename P1, typename P2,
3353 typename P3, typename P4, typename A1, typename X1, typename X2,
3354 typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003355inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07003356CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003357 const P2& p2, const P3& p3, const P4& p4) {
3358 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003359 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003360 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3361 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3362 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003363}
3364#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3365
3366#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3367template <typename R, typename T, typename U, typename P1, typename P2,
3368 typename P3, typename P4, typename A1, typename X1, typename X2,
3369 typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003370inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07003371CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003372 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3373 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003374 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003375 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3376 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3377 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003378}
3379
3380template <typename R, typename P1, typename P2, typename P3, typename P4,
3381 typename A1, typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003382inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07003383CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003384 const P2& p2, const P3& p3, const P4& p4) {
3385 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003386 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003387 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3388 (function, base::MakeTuple(p1, p2, p3, p4));
3389 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003390}
3391#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3392template <typename R, typename T, typename U, typename P1, typename P2,
3393 typename P3, typename P4, typename A1, typename X1, typename X2,
3394 typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003395inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07003396CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003397 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3398 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003399 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003400 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1>>
3401 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3402 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003403}
3404#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3405#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3406
3407// 4 - 2
3408template <typename R, typename T, typename U, typename P1, typename P2,
3409 typename P3, typename P4, typename A1, typename A2, typename X1,
3410 typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003411inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07003412CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003413 const P2& p2, const P3& p3, const P4& p4) {
3414 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003415 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003416 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3417 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3418 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003419}
3420
3421template <typename R, typename P1, typename P2, typename P3, typename P4,
3422 typename A1, typename A2, typename X1, typename X2, typename X3,
3423 typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003424inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07003425CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003426 const P3& p3, const P4& p4) {
3427 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003428 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003429 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3430 (function, base::MakeTuple(p1, p2, p3, p4));
3431 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003432}
3433
3434#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3435template <typename R, typename T, typename U, typename P1, typename P2,
3436 typename P3, typename P4, typename A1, typename A2, typename X1,
3437 typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003438inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07003439CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003440 const P2& p2, const P3& p3, const P4& p4) {
3441 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003442 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003443 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3444 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3445 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003446}
3447#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3448
3449#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3450template <typename R, typename T, typename U, typename P1, typename P2,
3451 typename P3, typename P4, typename A1, typename A2, typename X1,
3452 typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003453inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07003454CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003455 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3456 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003457 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003458 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3459 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3460 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003461}
3462
3463template <typename R, typename P1, typename P2, typename P3, typename P4,
3464 typename A1, typename A2, typename X1, typename X2, typename X3,
3465 typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003466inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07003467CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003468 const P2& p2, const P3& p3, const P4& p4) {
3469 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003470 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003471 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3472 (function, base::MakeTuple(p1, p2, p3, p4));
3473 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003474}
3475#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3476template <typename R, typename T, typename U, typename P1, typename P2,
3477 typename P3, typename P4, typename A1, typename A2, typename X1,
3478 typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003479inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07003480CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003481 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3482 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003483 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003484 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2>>
3485 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3486 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003487}
3488#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3489#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3490
3491// 4 - 3
3492template <typename R, typename T, typename U, typename P1, typename P2,
3493 typename P3, typename P4, typename A1, typename A2, typename A3,
3494 typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003495inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07003496CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003497 const P2& p2, const P3& p3, const P4& p4) {
3498 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003499 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003500 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3501 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3502 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003503}
3504
3505template <typename R, typename P1, typename P2, typename P3, typename P4,
3506 typename A1, typename A2, typename A3, typename X1, typename X2,
3507 typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003508inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07003509CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003510 const P2& p2, const P3& p3, const P4& p4) {
3511 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003512 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003513 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3514 (function, base::MakeTuple(p1, p2, p3, p4));
3515 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003516}
3517
3518#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3519template <typename R, typename T, typename U, typename P1, typename P2,
3520 typename P3, typename P4, typename A1, typename A2, typename A3,
3521 typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003522inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07003523CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003524 const P2& p2, const P3& p3, const P4& p4) {
3525 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003526 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003527 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3528 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3529 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003530}
3531#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3532
3533#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3534template <typename R, typename T, typename U, typename P1, typename P2,
3535 typename P3, typename P4, typename A1, typename A2, typename A3,
3536 typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003537inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07003538CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003539 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3540 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003541 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003542 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3543 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3544 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003545}
3546
3547template <typename R, typename P1, typename P2, typename P3, typename P4,
3548 typename A1, typename A2, typename A3, typename X1, typename X2,
3549 typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003550inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07003551CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003552 const P2& p2, const P3& p3, const P4& p4) {
3553 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003554 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003555 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3556 (function, base::MakeTuple(p1, p2, p3, p4));
3557 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003558}
3559#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3560template <typename R, typename T, typename U, typename P1, typename P2,
3561 typename P3, typename P4, typename A1, typename A2, typename A3,
3562 typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003563inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07003564CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003565 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3566 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003567 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003568 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3>>
3569 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3570 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003571}
3572#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3573#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3574
3575// 4 - 4
3576template <typename R, typename T, typename U, typename P1, typename P2,
3577 typename P3, typename P4, typename A1, typename A2, typename A3,
3578 typename A4, typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003579inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07003580CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003581 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3582 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003583 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003584 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4>>
3585 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3586 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003587}
3588
3589template <typename R, typename P1, typename P2, typename P3, typename P4,
3590 typename A1, typename A2, typename A3, typename A4, typename X1,
3591 typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003592inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07003593CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003594 const P2& p2, const P3& p3, const P4& p4) {
3595 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003596 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003597 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3598 A4>>
3599 (function, base::MakeTuple(p1, p2, p3, p4));
3600 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003601}
3602
3603#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3604template <typename R, typename T, typename U, typename P1, typename P2,
3605 typename P3, typename P4, typename A1, typename A2, typename A3,
3606 typename A4, typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003607inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07003608CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003609 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3610 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003611 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003612 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4>>
3613 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3614 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003615}
3616#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3617
3618#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3619template <typename R, typename T, typename U, typename P1, typename P2,
3620 typename P3, typename P4, typename A1, typename A2, typename A3,
3621 typename A4, typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003622inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07003623CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003624 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3625 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003626 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003627 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4>>
3628 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3629 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003630}
3631
3632template <typename R, typename P1, typename P2, typename P3, typename P4,
3633 typename A1, typename A2, typename A3, typename A4, typename X1,
3634 typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003635inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07003636CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003637 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3638 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003639 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003640 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3641 A4>>
3642 (function, base::MakeTuple(p1, p2, p3, p4));
3643 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003644}
3645#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3646template <typename R, typename T, typename U, typename P1, typename P2,
3647 typename P3, typename P4, typename A1, typename A2, typename A3,
3648 typename A4, typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003649inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07003650CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003651 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3652 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003653 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003654 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4>>
3655 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3656 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003657}
3658#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3659#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3660
3661// 4 - 5
3662template <typename R, typename T, typename U, typename P1, typename P2,
3663 typename P3, typename P4, typename A1, typename A2, typename A3,
3664 typename A4, typename A5, typename X1, typename X2, typename X3,
3665 typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003666inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003667CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003668 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3669 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003670 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003671 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5>>
3672 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3673 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003674}
3675
3676template <typename R, typename P1, typename P2, typename P3, typename P4,
3677 typename A1, typename A2, typename A3, typename A4, typename A5,
3678 typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003679inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003680CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4, A5), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003681 const P2& p2, const P3& p3, const P4& p4) {
3682 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003683 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003684 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3685 A4, A5>>
3686 (function, base::MakeTuple(p1, p2, p3, p4));
3687 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003688}
3689
3690#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3691template <typename R, typename T, typename U, typename P1, typename P2,
3692 typename P3, typename P4, typename A1, typename A2, typename A3,
3693 typename A4, typename A5, typename X1, typename X2, typename X3,
3694 typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003695inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003696CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003697 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3698 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003699 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003700 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5>>
3701 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3702 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003703}
3704#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3705
3706#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3707template <typename R, typename T, typename U, typename P1, typename P2,
3708 typename P3, typename P4, typename A1, typename A2, typename A3,
3709 typename A4, typename A5, typename X1, typename X2, typename X3,
3710 typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003711inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003712CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003713 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3714 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003715 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003716 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5>>
3717 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3718 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003719}
3720
3721template <typename R, typename P1, typename P2, typename P3, typename P4,
3722 typename A1, typename A2, typename A3, typename A4, typename A5,
3723 typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003724inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003725CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003726 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3727 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003728 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003729 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3730 A4, A5>>
3731 (function, base::MakeTuple(p1, p2, p3, p4));
3732 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003733}
3734#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3735template <typename R, typename T, typename U, typename P1, typename P2,
3736 typename P3, typename P4, typename A1, typename A2, typename A3,
3737 typename A4, typename A5, typename X1, typename X2, typename X3,
3738 typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003739inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07003740CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003741 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3742 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003743 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003744 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5>>
3745 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3746 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003747}
3748#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3749#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3750
3751// 4 - 6
3752template <typename R, typename T, typename U, typename P1, typename P2,
3753 typename P3, typename P4, typename A1, typename A2, typename A3,
3754 typename A4, typename A5, typename A6, typename X1, typename X2,
3755 typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003756inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003757CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003758 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3759 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003760 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003761 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5,
3762 A6>>
3763 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3764 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003765}
3766
3767template <typename R, typename P1, typename P2, typename P3, typename P4,
3768 typename A1, typename A2, typename A3, typename A4, typename A5,
3769 typename A6, typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003770inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003771CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003772 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3773 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003774 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003775 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3776 A4, A5, A6>>
3777 (function, base::MakeTuple(p1, p2, p3, p4));
3778 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003779}
3780
3781#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3782template <typename R, typename T, typename U, typename P1, typename P2,
3783 typename P3, typename P4, typename A1, typename A2, typename A3,
3784 typename A4, typename A5, typename A6, typename X1, typename X2,
3785 typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003786inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003787CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003788 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3789 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003790 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003791 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5,
3792 A6>>
3793 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3794 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003795}
3796#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3797
3798#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3799template <typename R, typename T, typename U, typename P1, typename P2,
3800 typename P3, typename P4, typename A1, typename A2, typename A3,
3801 typename A4, typename A5, typename A6, typename X1, typename X2,
3802 typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003803inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003804CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003805 A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3806 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3807 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5,
3808 A6),
3809 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5,
3810 A6>>
3811 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3812 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003813}
3814
3815template <typename R, typename P1, typename P2, typename P3, typename P4,
3816 typename A1, typename A2, typename A3, typename A4, typename A5,
3817 typename A6, typename X1, typename X2, typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003818inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003819CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003820 const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3821 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3822 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, A1, A2, A3, A4, A5,
3823 A6),
3824 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3,
3825 A4, A5, A6>>
3826 (function, base::MakeTuple(p1, p2, p3, p4));
3827 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003828}
3829#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3830template <typename R, typename T, typename U, typename P1, typename P2,
3831 typename P3, typename P4, typename A1, typename A2, typename A3,
3832 typename A4, typename A5, typename A6, typename X1, typename X2,
3833 typename X3, typename X4>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003834inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07003835CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003836 A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4) {
3837 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
3838 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4, A5,
3839 A6),
3840 base::Tuple<P1, P2, P3, P4>, base::Tuple<A1, A2, A3, A4, A5,
3841 A6>>
3842 (obj, method, base::MakeTuple(p1, p2, p3, p4));
3843 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003844}
3845#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3846#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3847
3848// 5 - 0
3849template <typename R, typename T, typename U, typename P1, typename P2,
3850 typename P3, typename P4, typename P5, typename X1, typename X2,
3851 typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003852inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003853CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003854 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3855 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003856 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003857 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3858 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3859 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003860}
3861
3862template <typename R, typename P1, typename P2, typename P3, typename P4,
3863 typename P5, typename X1, typename X2, typename X3, typename X4,
3864 typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003865inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003866CreateFunctor(R (*function)(X1, X2, X3, X4, X5), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003867 const P3& p3, const P4& p4, const P5& p5) {
3868 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003869 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003870 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3871 (function, base::MakeTuple(p1, p2, p3, p4, p5));
3872 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003873}
3874
3875#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3876template <typename R, typename T, typename U, typename P1, typename P2,
3877 typename P3, typename P4, typename P5, typename X1, typename X2,
3878 typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003879inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003880CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003881 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3882 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003883 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003884 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3885 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3886 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003887}
3888#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3889
3890#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3891template <typename R, typename T, typename U, typename P1, typename P2,
3892 typename P3, typename P4, typename P5, typename X1, typename X2,
3893 typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003894inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003895CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003896 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3897 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003898 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003899 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3900 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3901 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003902}
3903
3904template <typename R, typename P1, typename P2, typename P3, typename P4,
3905 typename P5, typename X1, typename X2, typename X3, typename X4,
3906 typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003907inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003908CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003909 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3910 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003911 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003912 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3913 (function, base::MakeTuple(p1, p2, p3, p4, p5));
3914 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003915}
3916#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3917template <typename R, typename T, typename U, typename P1, typename P2,
3918 typename P3, typename P4, typename P5, typename X1, typename X2,
3919 typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003920inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07003921CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003922 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3923 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003924 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003925 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<>>
3926 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3927 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003928}
3929#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3930#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3931
3932// 5 - 1
3933template <typename R, typename T, typename U, typename P1, typename P2,
3934 typename P3, typename P4, typename P5, typename A1, typename X1,
3935 typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003936inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07003937CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003938 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3939 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003940 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003941 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
3942 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3943 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003944}
3945
3946template <typename R, typename P1, typename P2, typename P3, typename P4,
3947 typename P5, typename A1, typename X1, typename X2, typename X3,
3948 typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003949inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07003950CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003951 const P3& p3, const P4& p4, const P5& p5) {
3952 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003953 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003954 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
3955 (function, base::MakeTuple(p1, p2, p3, p4, p5));
3956 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003957}
3958
3959#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3960template <typename R, typename T, typename U, typename P1, typename P2,
3961 typename P3, typename P4, typename P5, typename A1, typename X1,
3962 typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003963inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07003964CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003965 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3966 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003967 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003968 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
3969 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3970 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003971}
3972#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
3973
3974#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
3975template <typename R, typename T, typename U, typename P1, typename P2,
3976 typename P3, typename P4, typename P5, typename A1, typename X1,
3977 typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003978inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07003979CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003980 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3981 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003982 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003983 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
3984 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
3985 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003986}
3987
3988template <typename R, typename P1, typename P2, typename P3, typename P4,
3989 typename P5, typename A1, typename X1, typename X2, typename X3,
3990 typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003991inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07003992CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003993 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
3994 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07003995 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07003996 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
3997 (function, base::MakeTuple(p1, p2, p3, p4, p5));
3998 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07003999}
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 X1,
4003 typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004004inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07004005CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004006 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4007 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004008 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004009 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1>>
4010 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4011 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004012}
4013#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4014#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4015
4016// 5 - 2
4017template <typename R, typename T, typename U, typename P1, typename P2,
4018 typename P3, typename P4, typename P5, typename A1, typename A2,
4019 typename X1, typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004020inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004021CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004022 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4023 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004024 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004025 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4026 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4027 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004028}
4029
4030template <typename R, typename P1, typename P2, typename P3, typename P4,
4031 typename P5, typename A1, typename A2, typename X1, typename X2,
4032 typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004033inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004034CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004035 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4036 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004037 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004038 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4039 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4040 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004041}
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 X1, typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004047inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004048CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004049 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4050 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004051 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004052 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4053 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4054 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004055}
4056#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4057
4058#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4059template <typename R, typename T, typename U, typename P1, typename P2,
4060 typename P3, typename P4, typename P5, typename A1, typename A2,
4061 typename X1, typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004062inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004063CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004064 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4065 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004066 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004067 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4068 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4069 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004070}
4071
4072template <typename R, typename P1, typename P2, typename P3, typename P4,
4073 typename P5, typename A1, typename A2, typename X1, typename X2,
4074 typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004075inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004076CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004077 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4078 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004079 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004080 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4081 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4082 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004083}
4084#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4085template <typename R, typename T, typename U, typename P1, typename P2,
4086 typename P3, typename P4, typename P5, typename A1, typename A2,
4087 typename X1, typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004088inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004089CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004090 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4091 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004092 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004093 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2>>
4094 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4095 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004096}
4097#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4098#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4099
4100// 5 - 3
4101template <typename R, typename T, typename U, typename P1, typename P2,
4102 typename P3, typename P4, typename P5, typename A1, typename A2,
4103 typename A3, typename X1, typename X2, typename X3, typename X4,
4104 typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004105inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004106CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004107 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4108 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004109 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004110 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3>>
4111 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4112 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004113}
4114
4115template <typename R, typename P1, typename P2, typename P3, typename P4,
4116 typename P5, typename A1, typename A2, typename A3, typename X1,
4117 typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004118inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004119CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004120 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4121 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004122 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004123 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4124 A3>>
4125 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4126 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004127}
4128
4129#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4130template <typename R, typename T, typename U, typename P1, typename P2,
4131 typename P3, typename P4, typename P5, typename A1, typename A2,
4132 typename A3, typename X1, typename X2, typename X3, typename X4,
4133 typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004134inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004135CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004136 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4137 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004138 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004139 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3>>
4140 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4141 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004142}
4143#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4144
4145#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4146template <typename R, typename T, typename U, typename P1, typename P2,
4147 typename P3, typename P4, typename P5, typename A1, typename A2,
4148 typename A3, typename X1, typename X2, typename X3, typename X4,
4149 typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004150inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004151CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004152 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4153 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004154 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004155 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3>>
4156 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4157 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004158}
4159
4160template <typename R, typename P1, typename P2, typename P3, typename P4,
4161 typename P5, typename A1, typename A2, typename A3, typename X1,
4162 typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004163inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004164CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004165 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4166 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004167 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004168 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4169 A3>>
4170 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4171 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004172}
4173#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4174template <typename R, typename T, typename U, typename P1, typename P2,
4175 typename P3, typename P4, typename P5, typename A1, typename A2,
4176 typename A3, typename X1, typename X2, typename X3, typename X4,
4177 typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004178inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004179CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004180 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4181 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004182 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004183 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3>>
4184 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4185 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004186}
4187#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4188#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4189
4190// 5 - 4
4191template <typename R, typename T, typename U, typename P1, typename P2,
4192 typename P3, typename P4, typename P5, typename A1, typename A2,
4193 typename A3, typename A4, typename X1, typename X2, typename X3,
4194 typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004195inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004196CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004197 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4198 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004199 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004200 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4>>
4201 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4202 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004203}
4204
4205template <typename R, typename P1, typename P2, typename P3, typename P4,
4206 typename P5, typename A1, typename A2, typename A3, typename A4,
4207 typename X1, typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004208inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004209CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004210 const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4211 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004212 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004213 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4214 A3, A4>>
4215 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4216 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004217}
4218
4219#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4220template <typename R, typename T, typename U, typename P1, typename P2,
4221 typename P3, typename P4, typename P5, typename A1, typename A2,
4222 typename A3, typename A4, typename X1, typename X2, typename X3,
4223 typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004224inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004225CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004226 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4227 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004228 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004229 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4>>
4230 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4231 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004232}
4233#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4234
4235#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4236template <typename R, typename T, typename U, typename P1, typename P2,
4237 typename P3, typename P4, typename P5, typename A1, typename A2,
4238 typename A3, typename A4, typename X1, typename X2, typename X3,
4239 typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004240inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004241CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004242 A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4243 const P5& p5) {
4244 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004245 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004246 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4>>
4247 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4248 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004249}
4250
4251template <typename R, typename P1, typename P2, typename P3, typename P4,
4252 typename P5, typename A1, typename A2, typename A3, typename A4,
4253 typename X1, typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004254inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004255CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004256 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4257 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004258 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004259 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4260 A3, A4>>
4261 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4262 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004263}
4264#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4265template <typename R, typename T, typename U, typename P1, typename P2,
4266 typename P3, typename P4, typename P5, typename A1, typename A2,
4267 typename A3, typename A4, typename X1, typename X2, typename X3,
4268 typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004269inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004270CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004271 A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4272 const P5& p5) {
4273 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004274 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004275 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4>>
4276 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4277 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004278}
4279#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4280#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4281
4282// 5 - 5
4283template <typename R, typename T, typename U, typename P1, typename P2,
4284 typename P3, typename P4, typename P5, typename A1, typename A2,
4285 typename A3, typename A4, typename A5, typename X1, typename X2,
4286 typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004287inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07004288CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004289 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4290 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004291 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004292 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4293 A5>>
4294 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4295 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004296}
4297
4298template <typename R, typename P1, typename P2, typename P3, typename P4,
4299 typename P5, typename A1, typename A2, typename A3, typename A4,
4300 typename A5, typename X1, typename X2, typename X3, typename X4,
4301 typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004302inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07004303CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004304 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4305 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004306 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004307 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4308 A3, A4, A5>>
4309 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4310 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004311}
4312
4313#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4314template <typename R, typename T, typename U, typename P1, typename P2,
4315 typename P3, typename P4, typename P5, typename A1, typename A2,
4316 typename A3, typename A4, typename A5, typename X1, typename X2,
4317 typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004318inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07004319CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004320 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4321 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004322 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004323 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4324 A5>>
4325 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4326 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004327}
4328#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4329
4330#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4331template <typename R, typename T, typename U, typename P1, typename P2,
4332 typename P3, typename P4, typename P5, typename A1, typename A2,
4333 typename A3, typename A4, typename A5, typename X1, typename X2,
4334 typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004335inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07004336CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004337 A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4338 const P5& p5) {
4339 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
4340 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4341 A5),
4342 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4343 A5>>
4344 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4345 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004346}
4347
4348template <typename R, typename P1, typename P2, typename P3, typename P4,
4349 typename P5, typename A1, typename A2, typename A3, typename A4,
4350 typename A5, typename X1, typename X2, typename X3, typename X4,
4351 typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004352inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07004353CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004354 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4355 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
4356 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4357 A5),
4358 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4359 A3, A4, A5>>
4360 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4361 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004362}
4363#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4364template <typename R, typename T, typename U, typename P1, typename P2,
4365 typename P3, typename P4, typename P5, typename A1, typename A2,
4366 typename A3, typename A4, typename A5, typename X1, typename X2,
4367 typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004368inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07004369CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004370 A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4371 const P5& p5) {
4372 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
4373 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4374 A5),
4375 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4376 A5>>
4377 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4378 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004379}
4380#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4381#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4382
4383// 5 - 6
4384template <typename R, typename T, typename U, typename P1, typename P2,
4385 typename P3, typename P4, typename P5, typename A1, typename A2,
4386 typename A3, typename A4, typename A5, typename A6, typename X1,
4387 typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004388inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07004389CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004390 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4391 const P5& p5) {
4392 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004393 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004394 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4395 A5, A6>>
4396 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4397 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004398}
4399
4400template <typename R, typename P1, typename P2, typename P3, typename P4,
4401 typename P5, typename A1, typename A2, typename A3, typename A4,
4402 typename A5, typename A6, typename X1, typename X2, typename X3,
4403 typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004404inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07004405CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004406 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) {
4407 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004408 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004409 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4410 A3, A4, A5, A6>>
4411 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4412 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004413}
4414
4415#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4416template <typename R, typename T, typename U, typename P1, typename P2,
4417 typename P3, typename P4, typename P5, typename A1, typename A2,
4418 typename A3, typename A4, typename A5, typename A6, typename X1,
4419 typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004420inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07004421CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004422 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4423 const P5& p5) {
4424 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004425 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004426 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4427 A5, A6>>
4428 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4429 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004430}
4431#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4432
4433#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4434template <typename R, typename T, typename U, typename P1, typename P2,
4435 typename P3, typename P4, typename P5, typename A1, typename A2,
4436 typename A3, typename A4, typename A5, typename A6, typename X1,
4437 typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004438inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07004439CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004440 A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4441 const P5& p5) {
4442 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
4443 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4444 A5, A6),
4445 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4446 A5, A6>>
4447 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4448 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004449}
4450
4451template <typename R, typename P1, typename P2, typename P3, typename P4,
4452 typename P5, typename A1, typename A2, typename A3, typename A4,
4453 typename A5, typename A6, typename X1, typename X2, typename X3,
4454 typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004455inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07004456CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004457 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4458 const P5& p5) {
4459 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
4460 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4461 A5, A6),
4462 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2,
4463 A3, A4, A5, A6>>
4464 (function, base::MakeTuple(p1, p2, p3, p4, p5));
4465 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004466}
4467#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4468template <typename R, typename T, typename U, typename P1, typename P2,
4469 typename P3, typename P4, typename P5, typename A1, typename A2,
4470 typename A3, typename A4, typename A5, typename A6, typename X1,
4471 typename X2, typename X3, typename X4, typename X5>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004472inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07004473CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004474 A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4475 const P5& p5) {
4476 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
4477 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, A1, A2, A3, A4,
4478 A5, A6),
4479 base::Tuple<P1, P2, P3, P4, P5>, base::Tuple<A1, A2, A3, A4,
4480 A5, A6>>
4481 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5));
4482 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004483}
4484#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4485#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4486
4487// 6 - 0
4488template <typename R, typename T, typename U, typename P1, typename P2,
4489 typename P3, typename P4, typename P5, typename P6, typename X1,
4490 typename X2, typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004491inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07004492CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004493 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4494 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004495 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004496 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4497 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4498 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004499}
4500
4501template <typename R, typename P1, typename P2, typename P3, typename P4,
4502 typename P5, typename P6, typename X1, typename X2, typename X3,
4503 typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004504inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07004505CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6), const P1& p1, const P2& p2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004506 const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4507 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004508 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004509 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4510 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4511 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004512}
4513
4514#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4515template <typename R, typename T, typename U, typename P1, typename P2,
4516 typename P3, typename P4, typename P5, typename P6, typename X1,
4517 typename X2, typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004518inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07004519CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004520 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4521 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004522 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004523 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4524 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4525 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004526}
4527#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4528
4529#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4530template <typename R, typename T, typename U, typename P1, typename P2,
4531 typename P3, typename P4, typename P5, typename P6, typename X1,
4532 typename X2, typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004533inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07004534CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004535 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4536 const P6& p6) {
4537 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004538 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004539 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4540 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4541 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004542}
4543
4544template <typename R, typename P1, typename P2, typename P3, typename P4,
4545 typename P5, typename P6, typename X1, typename X2, typename X3,
4546 typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004547inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07004548CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004549 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4550 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004551 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004552 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4553 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4554 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004555}
4556#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4557template <typename R, typename T, typename U, typename P1, typename P2,
4558 typename P3, typename P4, typename P5, typename P6, typename X1,
4559 typename X2, typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004560inline MutantFunctor<R, base::Tuple<>>
James Robinson646469d2014-10-03 15:33:28 -07004561CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004562 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4563 const P6& p6) {
4564 MutantRunner<R, base::Tuple<>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004565 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004566 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<>>
4567 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4568 return MutantFunctor<R, base::Tuple<>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004569}
4570#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4571#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4572
4573// 6 - 1
4574template <typename R, typename T, typename U, typename P1, typename P2,
4575 typename P3, typename P4, typename P5, typename P6, typename A1,
4576 typename X1, typename X2, typename X3, typename X4, typename X5,
4577 typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004578inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07004579CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004580 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4581 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004582 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004583 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4584 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4585 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004586}
4587
4588template <typename R, typename P1, typename P2, typename P3, typename P4,
4589 typename P5, typename P6, typename A1, typename X1, typename X2,
4590 typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004591inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07004592CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004593 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4594 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004595 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004596 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4597 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4598 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004599}
4600
4601#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4602template <typename R, typename T, typename U, typename P1, typename P2,
4603 typename P3, typename P4, typename P5, typename P6, typename A1,
4604 typename X1, typename X2, typename X3, typename X4, typename X5,
4605 typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004606inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07004607CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004608 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4609 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004610 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004611 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4612 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4613 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004614}
4615#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4616
4617#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4618template <typename R, typename T, typename U, typename P1, typename P2,
4619 typename P3, typename P4, typename P5, typename P6, typename A1,
4620 typename X1, typename X2, typename X3, typename X4, typename X5,
4621 typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004622inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07004623CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004624 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4625 const P6& p6) {
4626 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004627 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004628 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4629 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4630 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004631}
4632
4633template <typename R, typename P1, typename P2, typename P3, typename P4,
4634 typename P5, typename P6, typename A1, typename X1, typename X2,
4635 typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004636inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07004637CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004638 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4639 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004640 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004641 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4642 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4643 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004644}
4645#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4646template <typename R, typename T, typename U, typename P1, typename P2,
4647 typename P3, typename P4, typename P5, typename P6, typename A1,
4648 typename X1, typename X2, typename X3, typename X4, typename X5,
4649 typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004650inline MutantFunctor<R, base::Tuple<A1>>
James Robinson646469d2014-10-03 15:33:28 -07004651CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004652 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4653 const P6& p6) {
4654 MutantRunner<R, base::Tuple<A1>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004655 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004656 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1>>
4657 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4658 return MutantFunctor<R, base::Tuple<A1>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004659}
4660#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4661#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4662
4663// 6 - 2
4664template <typename R, typename T, typename U, typename P1, typename P2,
4665 typename P3, typename P4, typename P5, typename P6, typename A1,
4666 typename A2, typename X1, typename X2, typename X3, typename X4,
4667 typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004668inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004669CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004670 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4671 const P6& p6) {
4672 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004673 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004674 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2>>
4675 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4676 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004677}
4678
4679template <typename R, typename P1, typename P2, typename P3, typename P4,
4680 typename P5, typename P6, typename A1, typename A2, typename X1,
4681 typename X2, typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004682inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004683CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004684 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4685 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004686 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004687 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4688 A2>>
4689 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4690 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004691}
4692
4693#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4694template <typename R, typename T, typename U, typename P1, typename P2,
4695 typename P3, typename P4, typename P5, typename P6, typename A1,
4696 typename A2, typename X1, typename X2, typename X3, typename X4,
4697 typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004698inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004699CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004700 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4701 const P6& p6) {
4702 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004703 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004704 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2>>
4705 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4706 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004707}
4708#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4709
4710#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4711template <typename R, typename T, typename U, typename P1, typename P2,
4712 typename P3, typename P4, typename P5, typename P6, typename A1,
4713 typename A2, typename X1, typename X2, typename X3, typename X4,
4714 typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004715inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004716CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004717 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4718 const P6& p6) {
4719 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004720 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004721 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2>>
4722 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4723 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004724}
4725
4726template <typename R, typename P1, typename P2, typename P3, typename P4,
4727 typename P5, typename P6, typename A1, typename A2, typename X1,
4728 typename X2, typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004729inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004730CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004731 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4732 const P6& p6) {
4733 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004734 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004735 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4736 A2>>
4737 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4738 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004739}
4740#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4741template <typename R, typename T, typename U, typename P1, typename P2,
4742 typename P3, typename P4, typename P5, typename P6, typename A1,
4743 typename A2, typename X1, typename X2, typename X3, typename X4,
4744 typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004745inline MutantFunctor<R, base::Tuple<A1, A2>>
James Robinson646469d2014-10-03 15:33:28 -07004746CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004747 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4748 const P6& p6) {
4749 MutantRunner<R, base::Tuple<A1, A2>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004750 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004751 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2>>
4752 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4753 return MutantFunctor<R, base::Tuple<A1, A2>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004754}
4755#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4756#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4757
4758// 6 - 3
4759template <typename R, typename T, typename U, typename P1, typename P2,
4760 typename P3, typename P4, typename P5, typename P6, typename A1,
4761 typename A2, typename A3, typename X1, typename X2, typename X3,
4762 typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004763inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004764CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004765 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4766 const P6& p6) {
4767 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004768 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004769 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3>>
4770 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4771 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004772}
4773
4774template <typename R, typename P1, typename P2, typename P3, typename P4,
4775 typename P5, typename P6, typename A1, typename A2, typename A3,
4776 typename X1, typename X2, typename X3, typename X4, typename X5,
4777 typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004778inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004779CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3), const P1& p1,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004780 const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) {
4781 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004782 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004783 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4784 A2, A3>>
4785 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4786 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004787}
4788
4789#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4790template <typename R, typename T, typename U, typename P1, typename P2,
4791 typename P3, typename P4, typename P5, typename P6, typename A1,
4792 typename A2, typename A3, typename X1, typename X2, typename X3,
4793 typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004794inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004795CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004796 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4797 const P6& p6) {
4798 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004799 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004800 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3>>
4801 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4802 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004803}
4804#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4805
4806#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4807template <typename R, typename T, typename U, typename P1, typename P2,
4808 typename P3, typename P4, typename P5, typename P6, typename A1,
4809 typename A2, typename A3, typename X1, typename X2, typename X3,
4810 typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004811inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004812CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004813 A3), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4814 const P6& p6) {
4815 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004816 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004817 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3>>
4818 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4819 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004820}
4821
4822template <typename R, typename P1, typename P2, typename P3, typename P4,
4823 typename P5, typename P6, typename A1, typename A2, typename A3,
4824 typename X1, typename X2, typename X3, typename X4, typename X5,
4825 typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004826inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004827CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004828 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4829 const P6& p6) {
4830 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004831 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004832 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4833 A2, A3>>
4834 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4835 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004836}
4837#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4838template <typename R, typename T, typename U, typename P1, typename P2,
4839 typename P3, typename P4, typename P5, typename P6, typename A1,
4840 typename A2, typename A3, typename X1, typename X2, typename X3,
4841 typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004842inline MutantFunctor<R, base::Tuple<A1, A2, A3>>
James Robinson646469d2014-10-03 15:33:28 -07004843CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004844 A3), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4845 const P6& p6) {
4846 MutantRunner<R, base::Tuple<A1, A2, A3>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004847 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004848 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3>>
4849 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4850 return MutantFunctor<R, base::Tuple<A1, A2, A3>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004851}
4852#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4853#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4854
4855// 6 - 4
4856template <typename R, typename T, typename U, typename P1, typename P2,
4857 typename P3, typename P4, typename P5, typename P6, typename A1,
4858 typename A2, typename A3, typename A4, typename X1, typename X2,
4859 typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004860inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004861CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004862 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4863 const P6& p6) {
4864 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004865 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004866 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
4867 A4>>
4868 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4869 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004870}
4871
4872template <typename R, typename P1, typename P2, typename P3, typename P4,
4873 typename P5, typename P6, typename A1, typename A2, typename A3,
4874 typename A4, typename X1, typename X2, typename X3, typename X4,
4875 typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004876inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004877CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004878 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4879 const P6& p6) {
4880 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004881 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004882 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4883 A2, A3, A4>>
4884 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4885 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004886}
4887
4888#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4889template <typename R, typename T, typename U, typename P1, typename P2,
4890 typename P3, typename P4, typename P5, typename P6, typename A1,
4891 typename A2, typename A3, typename A4, typename X1, typename X2,
4892 typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004893inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004894CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004895 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4896 const P6& p6) {
4897 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004898 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004899 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
4900 A4>>
4901 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4902 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004903}
4904#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4905
4906#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4907template <typename R, typename T, typename U, typename P1, typename P2,
4908 typename P3, typename P4, typename P5, typename P6, typename A1,
4909 typename A2, typename A3, typename A4, typename X1, typename X2,
4910 typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004911inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004912CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004913 A3, A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4914 const P5& p5, const P6& p6) {
4915 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4916 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
4917 A4),
4918 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
4919 A4>>
4920 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4921 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004922}
4923
4924template <typename R, typename P1, typename P2, typename P3, typename P4,
4925 typename P5, typename P6, typename A1, typename A2, typename A3,
4926 typename A4, typename X1, typename X2, typename X3, typename X4,
4927 typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004928inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004929CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004930 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4931 const P6& p6) {
4932 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4933 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
4934 A4),
4935 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4936 A2, A3, A4>>
4937 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4938 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004939}
4940#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4941template <typename R, typename T, typename U, typename P1, typename P2,
4942 typename P3, typename P4, typename P5, typename P6, typename A1,
4943 typename A2, typename A3, typename A4, typename X1, typename X2,
4944 typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004945inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>
James Robinson646469d2014-10-03 15:33:28 -07004946CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004947 A3, A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
4948 const P5& p5, const P6& p6) {
4949 MutantRunner<R, base::Tuple<A1, A2, A3, A4>>* t =
4950 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
4951 A4),
4952 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
4953 A4>>
4954 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4955 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004956}
4957#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4958#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
4959
4960// 6 - 5
4961template <typename R, typename T, typename U, typename P1, typename P2,
4962 typename P3, typename P4, typename P5, typename P6, typename A1,
4963 typename A2, typename A3, typename A4, typename A5, typename X1,
4964 typename X2, typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004965inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07004966CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004967 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4968 const P6& p6) {
4969 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004970 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004971 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
4972 A4, A5>>
4973 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4974 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004975}
4976
4977template <typename R, typename P1, typename P2, typename P3, typename P4,
4978 typename P5, typename P6, typename A1, typename A2, typename A3,
4979 typename A4, typename A5, typename X1, typename X2, typename X3,
4980 typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004981inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07004982CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004983 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
4984 const P6& p6) {
4985 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07004986 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004987 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
4988 A2, A3, A4, A5>>
4989 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
4990 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07004991}
4992
4993#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
4994template <typename R, typename T, typename U, typename P1, typename P2,
4995 typename P3, typename P4, typename P5, typename P6, typename A1,
4996 typename A2, typename A3, typename A4, typename A5, typename X1,
4997 typename X2, typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07004998inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07004999CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005000 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
5001 const P6& p6) {
5002 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
James Robinson646469d2014-10-03 15:33:28 -07005003 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005004 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5005 A4, A5>>
5006 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5007 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07005008}
5009#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5010
5011#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
5012template <typename R, typename T, typename U, typename P1, typename P2,
5013 typename P3, typename P4, typename P5, typename P6, typename A1,
5014 typename A2, typename A3, typename A4, typename A5, typename X1,
5015 typename X2, typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005016inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07005017CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005018 A3, A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
5019 const P5& p5, const P6& p6) {
5020 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
5021 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5022 A4, A5),
5023 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5024 A4, A5>>
5025 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5026 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07005027}
5028
5029template <typename R, typename P1, typename P2, typename P3, typename P4,
5030 typename P5, typename P6, typename A1, typename A2, typename A3,
5031 typename A4, typename A5, typename X1, typename X2, typename X3,
5032 typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005033inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07005034CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005035 A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
5036 const P6& p6) {
5037 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
5038 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5039 A4, A5),
5040 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
5041 A2, A3, A4, A5>>
5042 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5043 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07005044}
5045#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5046template <typename R, typename T, typename U, typename P1, typename P2,
5047 typename P3, typename P4, typename P5, typename P6, typename A1,
5048 typename A2, typename A3, typename A4, typename A5, typename X1,
5049 typename X2, typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005050inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>
James Robinson646469d2014-10-03 15:33:28 -07005051CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005052 A3, A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
5053 const P5& p5, const P6& p6) {
5054 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5>>* t =
5055 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5056 A4, A5),
5057 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5058 A4, A5>>
5059 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5060 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5>>(t);
James Robinson646469d2014-10-03 15:33:28 -07005061}
5062#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5063#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
5064
5065// 6 - 6
5066template <typename R, typename T, typename U, typename P1, typename P2,
5067 typename P3, typename P4, typename P5, typename P6, typename A1,
5068 typename A2, typename A3, typename A4, typename A5, typename A6,
5069 typename X1, typename X2, typename X3, typename X4, typename X5,
5070 typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005071inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07005072CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005073 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
5074 const P6& p6) {
5075 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07005076 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005077 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5078 A4, A5, A6>>
5079 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5080 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07005081}
5082
5083template <typename R, typename P1, typename P2, typename P3, typename P4,
5084 typename P5, typename P6, typename A1, typename A2, typename A3,
5085 typename A4, typename A5, typename A6, typename X1, typename X2,
5086 typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005087inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07005088CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005089 const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
5090 const P6& p6) {
5091 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
5092 new MutantFunction<R, R (*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5,
5093 A6),
5094 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
5095 A2, A3, A4, A5, A6>>
5096 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5097 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07005098}
5099
5100#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5101template <typename R, typename T, typename U, typename P1, typename P2,
5102 typename P3, typename P4, typename P5, typename P6, typename A1,
5103 typename A2, typename A3, typename A4, typename A5, typename A6,
5104 typename X1, typename X2, typename X3, typename X4, typename X5,
5105 typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005106inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07005107CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005108 A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5,
5109 const P6& p6) {
5110 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
James Robinson646469d2014-10-03 15:33:28 -07005111 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6),
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005112 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5113 A4, A5, A6>>
5114 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5115 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07005116}
5117#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5118
5119#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
5120template <typename R, typename T, typename U, typename P1, typename P2,
5121 typename P3, typename P4, typename P5, typename P6, typename A1,
5122 typename A2, typename A3, typename A4, typename A5, typename A6,
5123 typename X1, typename X2, typename X3, typename X4, typename X5,
5124 typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005125inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07005126CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005127 A3, A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
5128 const P5& p5, const P6& p6) {
5129 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
5130 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5131 A4, A5, A6),
5132 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5133 A4, A5, A6>>
5134 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5135 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07005136}
5137
5138template <typename R, typename P1, typename P2, typename P3, typename P4,
5139 typename P5, typename P6, typename A1, typename A2, typename A3,
5140 typename A4, typename A5, typename A6, typename X1, typename X2,
5141 typename X3, typename X4, typename X5, typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005142inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07005143CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005144 A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
5145 const P5& p5, const P6& p6) {
5146 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
5147 new MutantFunction<R, R (__stdcall *)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5148 A4, A5, A6),
5149 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1,
5150 A2, A3, A4, A5, A6>>
5151 (function, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5152 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07005153}
5154#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5155template <typename R, typename T, typename U, typename P1, typename P2,
5156 typename P3, typename P4, typename P5, typename P6, typename A1,
5157 typename A2, typename A3, typename A4, typename A5, typename A6,
5158 typename X1, typename X2, typename X3, typename X4, typename X5,
5159 typename X6>
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005160inline MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>
James Robinson646469d2014-10-03 15:33:28 -07005161CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2,
Viet-Trung Luu235cf3d2015-06-11 10:01:25 -07005162 A3, A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4,
5163 const P5& p5, const P6& p6) {
5164 MutantRunner<R, base::Tuple<A1, A2, A3, A4, A5, A6>>* t =
5165 new MutantLateObjectBind<R, T, R (__stdcall U::*)(X1, X2, X3, X4, X5, X6, A1, A2, A3,
5166 A4, A5, A6),
5167 base::Tuple<P1, P2, P3, P4, P5, P6>, base::Tuple<A1, A2, A3,
5168 A4, A5, A6>>
5169 (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6));
5170 return MutantFunctor<R, base::Tuple<A1, A2, A3, A4, A5, A6>>(t);
James Robinson646469d2014-10-03 15:33:28 -07005171}
5172#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
5173#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)
5174
5175} // namespace testing
5176
5177#endif // TESTING_GMOCK_MUTANT_H_