media/webrtc/trunk/testing/gmock_mutant.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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

mercurial