00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
00039 #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_
00040
00041 #include "gmock/gmock-actions.h"
00042 #include "gmock/internal/gmock-port.h"
00043
00044 namespace testing {
00045 namespace internal {
00046
00047
00048
00049
00050 template <typename Result, typename ArgumentTuple>
00051 class InvokeHelper;
00052
00053 template <typename R>
00054 class InvokeHelper<R, ::testing::tuple<> > {
00055 public:
00056 template <typename Function>
00057 static R Invoke(Function function, const ::testing::tuple<>&) {
00058 return function();
00059 }
00060
00061 template <class Class, typename MethodPtr>
00062 static R InvokeMethod(Class* obj_ptr,
00063 MethodPtr method_ptr,
00064 const ::testing::tuple<>&) {
00065 return (obj_ptr->*method_ptr)();
00066 }
00067 };
00068
00069 template <typename R, typename A1>
00070 class InvokeHelper<R, ::testing::tuple<A1> > {
00071 public:
00072 template <typename Function>
00073 static R Invoke(Function function, const ::testing::tuple<A1>& args) {
00074 return function(get<0>(args));
00075 }
00076
00077 template <class Class, typename MethodPtr>
00078 static R InvokeMethod(Class* obj_ptr,
00079 MethodPtr method_ptr,
00080 const ::testing::tuple<A1>& args) {
00081 return (obj_ptr->*method_ptr)(get<0>(args));
00082 }
00083 };
00084
00085 template <typename R, typename A1, typename A2>
00086 class InvokeHelper<R, ::testing::tuple<A1, A2> > {
00087 public:
00088 template <typename Function>
00089 static R Invoke(Function function, const ::testing::tuple<A1, A2>& args) {
00090 return function(get<0>(args), get<1>(args));
00091 }
00092
00093 template <class Class, typename MethodPtr>
00094 static R InvokeMethod(Class* obj_ptr,
00095 MethodPtr method_ptr,
00096 const ::testing::tuple<A1, A2>& args) {
00097 return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args));
00098 }
00099 };
00100
00101 template <typename R, typename A1, typename A2, typename A3>
00102 class InvokeHelper<R, ::testing::tuple<A1, A2, A3> > {
00103 public:
00104 template <typename Function>
00105 static R Invoke(Function function, const ::testing::tuple<A1, A2, A3>& args) {
00106 return function(get<0>(args), get<1>(args), get<2>(args));
00107 }
00108
00109 template <class Class, typename MethodPtr>
00110 static R InvokeMethod(Class* obj_ptr,
00111 MethodPtr method_ptr,
00112 const ::testing::tuple<A1, A2, A3>& args) {
00113 return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
00114 get<2>(args));
00115 }
00116 };
00117
00118 template <typename R, typename A1, typename A2, typename A3, typename A4>
00119 class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4> > {
00120 public:
00121 template <typename Function>
00122 static R Invoke(Function function, const ::testing::tuple<A1, A2, A3,
00123 A4>& args) {
00124 return function(get<0>(args), get<1>(args), get<2>(args),
00125 get<3>(args));
00126 }
00127
00128 template <class Class, typename MethodPtr>
00129 static R InvokeMethod(Class* obj_ptr,
00130 MethodPtr method_ptr,
00131 const ::testing::tuple<A1, A2, A3, A4>& args) {
00132 return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
00133 get<2>(args), get<3>(args));
00134 }
00135 };
00136
00137 template <typename R, typename A1, typename A2, typename A3, typename A4,
00138 typename A5>
00139 class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5> > {
00140 public:
00141 template <typename Function>
00142 static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4,
00143 A5>& args) {
00144 return function(get<0>(args), get<1>(args), get<2>(args),
00145 get<3>(args), get<4>(args));
00146 }
00147
00148 template <class Class, typename MethodPtr>
00149 static R InvokeMethod(Class* obj_ptr,
00150 MethodPtr method_ptr,
00151 const ::testing::tuple<A1, A2, A3, A4, A5>& args) {
00152 return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
00153 get<2>(args), get<3>(args), get<4>(args));
00154 }
00155 };
00156
00157 template <typename R, typename A1, typename A2, typename A3, typename A4,
00158 typename A5, typename A6>
00159 class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6> > {
00160 public:
00161 template <typename Function>
00162 static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
00163 A6>& args) {
00164 return function(get<0>(args), get<1>(args), get<2>(args),
00165 get<3>(args), get<4>(args), get<5>(args));
00166 }
00167
00168 template <class Class, typename MethodPtr>
00169 static R InvokeMethod(Class* obj_ptr,
00170 MethodPtr method_ptr,
00171 const ::testing::tuple<A1, A2, A3, A4, A5, A6>& args) {
00172 return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
00173 get<2>(args), get<3>(args), get<4>(args), get<5>(args));
00174 }
00175 };
00176
00177 template <typename R, typename A1, typename A2, typename A3, typename A4,
00178 typename A5, typename A6, typename A7>
00179 class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7> > {
00180 public:
00181 template <typename Function>
00182 static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
00183 A6, A7>& args) {
00184 return function(get<0>(args), get<1>(args), get<2>(args),
00185 get<3>(args), get<4>(args), get<5>(args), get<6>(args));
00186 }
00187
00188 template <class Class, typename MethodPtr>
00189 static R InvokeMethod(Class* obj_ptr,
00190 MethodPtr method_ptr,
00191 const ::testing::tuple<A1, A2, A3, A4, A5, A6,
00192 A7>& args) {
00193 return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
00194 get<2>(args), get<3>(args), get<4>(args), get<5>(args),
00195 get<6>(args));
00196 }
00197 };
00198
00199 template <typename R, typename A1, typename A2, typename A3, typename A4,
00200 typename A5, typename A6, typename A7, typename A8>
00201 class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
00202 public:
00203 template <typename Function>
00204 static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
00205 A6, A7, A8>& args) {
00206 return function(get<0>(args), get<1>(args), get<2>(args),
00207 get<3>(args), get<4>(args), get<5>(args), get<6>(args),
00208 get<7>(args));
00209 }
00210
00211 template <class Class, typename MethodPtr>
00212 static R InvokeMethod(Class* obj_ptr,
00213 MethodPtr method_ptr,
00214 const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7,
00215 A8>& args) {
00216 return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
00217 get<2>(args), get<3>(args), get<4>(args), get<5>(args),
00218 get<6>(args), get<7>(args));
00219 }
00220 };
00221
00222 template <typename R, typename A1, typename A2, typename A3, typename A4,
00223 typename A5, typename A6, typename A7, typename A8, typename A9>
00224 class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
00225 public:
00226 template <typename Function>
00227 static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
00228 A6, A7, A8, A9>& args) {
00229 return function(get<0>(args), get<1>(args), get<2>(args),
00230 get<3>(args), get<4>(args), get<5>(args), get<6>(args),
00231 get<7>(args), get<8>(args));
00232 }
00233
00234 template <class Class, typename MethodPtr>
00235 static R InvokeMethod(Class* obj_ptr,
00236 MethodPtr method_ptr,
00237 const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
00238 A9>& args) {
00239 return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
00240 get<2>(args), get<3>(args), get<4>(args), get<5>(args),
00241 get<6>(args), get<7>(args), get<8>(args));
00242 }
00243 };
00244
00245 template <typename R, typename A1, typename A2, typename A3, typename A4,
00246 typename A5, typename A6, typename A7, typename A8, typename A9,
00247 typename A10>
00248 class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
00249 A10> > {
00250 public:
00251 template <typename Function>
00252 static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
00253 A6, A7, A8, A9, A10>& args) {
00254 return function(get<0>(args), get<1>(args), get<2>(args),
00255 get<3>(args), get<4>(args), get<5>(args), get<6>(args),
00256 get<7>(args), get<8>(args), get<9>(args));
00257 }
00258
00259 template <class Class, typename MethodPtr>
00260 static R InvokeMethod(Class* obj_ptr,
00261 MethodPtr method_ptr,
00262 const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
00263 A9, A10>& args) {
00264 return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
00265 get<2>(args), get<3>(args), get<4>(args), get<5>(args),
00266 get<6>(args), get<7>(args), get<8>(args), get<9>(args));
00267 }
00268 };
00269
00270
00271
00272 #define GMOCK_FIELD_(Tuple, N) \
00273 typename ::testing::tuple_element<N, Tuple>::type
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293 template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
00294 int k4, int k5, int k6, int k7, int k8, int k9, int k10>
00295 class SelectArgs {
00296 public:
00297 typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
00298 GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
00299 GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
00300 GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
00301 GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9),
00302 GMOCK_FIELD_(ArgumentTuple, k10));
00303 typedef typename Function<type>::ArgumentTuple SelectedArgs;
00304 static SelectedArgs Select(const ArgumentTuple& args) {
00305 return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
00306 get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
00307 get<k8>(args), get<k9>(args), get<k10>(args));
00308 }
00309 };
00310
00311 template <typename Result, typename ArgumentTuple>
00312 class SelectArgs<Result, ArgumentTuple,
00313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
00314 public:
00315 typedef Result type();
00316 typedef typename Function<type>::ArgumentTuple SelectedArgs;
00317 static SelectedArgs Select(const ArgumentTuple& ) {
00318 return SelectedArgs();
00319 }
00320 };
00321
00322 template <typename Result, typename ArgumentTuple, int k1>
00323 class SelectArgs<Result, ArgumentTuple,
00324 k1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
00325 public:
00326 typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1));
00327 typedef typename Function<type>::ArgumentTuple SelectedArgs;
00328 static SelectedArgs Select(const ArgumentTuple& args) {
00329 return SelectedArgs(get<k1>(args));
00330 }
00331 };
00332
00333 template <typename Result, typename ArgumentTuple, int k1, int k2>
00334 class SelectArgs<Result, ArgumentTuple,
00335 k1, k2, -1, -1, -1, -1, -1, -1, -1, -1> {
00336 public:
00337 typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
00338 GMOCK_FIELD_(ArgumentTuple, k2));
00339 typedef typename Function<type>::ArgumentTuple SelectedArgs;
00340 static SelectedArgs Select(const ArgumentTuple& args) {
00341 return SelectedArgs(get<k1>(args), get<k2>(args));
00342 }
00343 };
00344
00345 template <typename Result, typename ArgumentTuple, int k1, int k2, int k3>
00346 class SelectArgs<Result, ArgumentTuple,
00347 k1, k2, k3, -1, -1, -1, -1, -1, -1, -1> {
00348 public:
00349 typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
00350 GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3));
00351 typedef typename Function<type>::ArgumentTuple SelectedArgs;
00352 static SelectedArgs Select(const ArgumentTuple& args) {
00353 return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args));
00354 }
00355 };
00356
00357 template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
00358 int k4>
00359 class SelectArgs<Result, ArgumentTuple,
00360 k1, k2, k3, k4, -1, -1, -1, -1, -1, -1> {
00361 public:
00362 typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
00363 GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
00364 GMOCK_FIELD_(ArgumentTuple, k4));
00365 typedef typename Function<type>::ArgumentTuple SelectedArgs;
00366 static SelectedArgs Select(const ArgumentTuple& args) {
00367 return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
00368 get<k4>(args));
00369 }
00370 };
00371
00372 template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
00373 int k4, int k5>
00374 class SelectArgs<Result, ArgumentTuple,
00375 k1, k2, k3, k4, k5, -1, -1, -1, -1, -1> {
00376 public:
00377 typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
00378 GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
00379 GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5));
00380 typedef typename Function<type>::ArgumentTuple SelectedArgs;
00381 static SelectedArgs Select(const ArgumentTuple& args) {
00382 return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
00383 get<k4>(args), get<k5>(args));
00384 }
00385 };
00386
00387 template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
00388 int k4, int k5, int k6>
00389 class SelectArgs<Result, ArgumentTuple,
00390 k1, k2, k3, k4, k5, k6, -1, -1, -1, -1> {
00391 public:
00392 typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
00393 GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
00394 GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
00395 GMOCK_FIELD_(ArgumentTuple, k6));
00396 typedef typename Function<type>::ArgumentTuple SelectedArgs;
00397 static SelectedArgs Select(const ArgumentTuple& args) {
00398 return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
00399 get<k4>(args), get<k5>(args), get<k6>(args));
00400 }
00401 };
00402
00403 template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
00404 int k4, int k5, int k6, int k7>
00405 class SelectArgs<Result, ArgumentTuple,
00406 k1, k2, k3, k4, k5, k6, k7, -1, -1, -1> {
00407 public:
00408 typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
00409 GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
00410 GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
00411 GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7));
00412 typedef typename Function<type>::ArgumentTuple SelectedArgs;
00413 static SelectedArgs Select(const ArgumentTuple& args) {
00414 return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
00415 get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args));
00416 }
00417 };
00418
00419 template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
00420 int k4, int k5, int k6, int k7, int k8>
00421 class SelectArgs<Result, ArgumentTuple,
00422 k1, k2, k3, k4, k5, k6, k7, k8, -1, -1> {
00423 public:
00424 typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
00425 GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
00426 GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
00427 GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
00428 GMOCK_FIELD_(ArgumentTuple, k8));
00429 typedef typename Function<type>::ArgumentTuple SelectedArgs;
00430 static SelectedArgs Select(const ArgumentTuple& args) {
00431 return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
00432 get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
00433 get<k8>(args));
00434 }
00435 };
00436
00437 template <typename Result, typename ArgumentTuple, int k1, int k2, int k3,
00438 int k4, int k5, int k6, int k7, int k8, int k9>
00439 class SelectArgs<Result, ArgumentTuple,
00440 k1, k2, k3, k4, k5, k6, k7, k8, k9, -1> {
00441 public:
00442 typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1),
00443 GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3),
00444 GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5),
00445 GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7),
00446 GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9));
00447 typedef typename Function<type>::ArgumentTuple SelectedArgs;
00448 static SelectedArgs Select(const ArgumentTuple& args) {
00449 return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
00450 get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
00451 get<k8>(args), get<k9>(args));
00452 }
00453 };
00454
00455 #undef GMOCK_FIELD_
00456
00457
00458 template <typename InnerAction, int k1 = -1, int k2 = -1, int k3 = -1,
00459 int k4 = -1, int k5 = -1, int k6 = -1, int k7 = -1, int k8 = -1,
00460 int k9 = -1, int k10 = -1>
00461 class WithArgsAction {
00462 public:
00463 explicit WithArgsAction(const InnerAction& action) : action_(action) {}
00464
00465 template <typename F>
00466 operator Action<F>() const { return MakeAction(new Impl<F>(action_)); }
00467
00468 private:
00469 template <typename F>
00470 class Impl : public ActionInterface<F> {
00471 public:
00472 typedef typename Function<F>::Result Result;
00473 typedef typename Function<F>::ArgumentTuple ArgumentTuple;
00474
00475 explicit Impl(const InnerAction& action) : action_(action) {}
00476
00477 virtual Result Perform(const ArgumentTuple& args) {
00478 return action_.Perform(SelectArgs<Result, ArgumentTuple, k1, k2, k3, k4,
00479 k5, k6, k7, k8, k9, k10>::Select(args));
00480 }
00481
00482 private:
00483 typedef typename SelectArgs<Result, ArgumentTuple,
00484 k1, k2, k3, k4, k5, k6, k7, k8, k9, k10>::type InnerFunctionType;
00485
00486 Action<InnerFunctionType> action_;
00487 };
00488
00489 const InnerAction action_;
00490
00491 GTEST_DISALLOW_ASSIGN_(WithArgsAction);
00492 };
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508 struct ExcessiveArg {};
00509
00510
00511 template <typename Result, class Impl>
00512 class ActionHelper {
00513 public:
00514 static Result Perform(Impl* impl, const ::testing::tuple<>& args) {
00515 return impl->template gmock_PerformImpl<>(args, ExcessiveArg(),
00516 ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
00517 ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
00518 ExcessiveArg());
00519 }
00520
00521 template <typename A0>
00522 static Result Perform(Impl* impl, const ::testing::tuple<A0>& args) {
00523 return impl->template gmock_PerformImpl<A0>(args, get<0>(args),
00524 ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
00525 ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
00526 ExcessiveArg());
00527 }
00528
00529 template <typename A0, typename A1>
00530 static Result Perform(Impl* impl, const ::testing::tuple<A0, A1>& args) {
00531 return impl->template gmock_PerformImpl<A0, A1>(args, get<0>(args),
00532 get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
00533 ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
00534 ExcessiveArg());
00535 }
00536
00537 template <typename A0, typename A1, typename A2>
00538 static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2>& args) {
00539 return impl->template gmock_PerformImpl<A0, A1, A2>(args, get<0>(args),
00540 get<1>(args), get<2>(args), ExcessiveArg(), ExcessiveArg(),
00541 ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
00542 ExcessiveArg());
00543 }
00544
00545 template <typename A0, typename A1, typename A2, typename A3>
00546 static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2,
00547 A3>& args) {
00548 return impl->template gmock_PerformImpl<A0, A1, A2, A3>(args, get<0>(args),
00549 get<1>(args), get<2>(args), get<3>(args), ExcessiveArg(),
00550 ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
00551 ExcessiveArg());
00552 }
00553
00554 template <typename A0, typename A1, typename A2, typename A3, typename A4>
00555 static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3,
00556 A4>& args) {
00557 return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4>(args,
00558 get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
00559 ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
00560 ExcessiveArg());
00561 }
00562
00563 template <typename A0, typename A1, typename A2, typename A3, typename A4,
00564 typename A5>
00565 static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
00566 A5>& args) {
00567 return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5>(args,
00568 get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
00569 get<5>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
00570 ExcessiveArg());
00571 }
00572
00573 template <typename A0, typename A1, typename A2, typename A3, typename A4,
00574 typename A5, typename A6>
00575 static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
00576 A5, A6>& args) {
00577 return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6>(args,
00578 get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
00579 get<5>(args), get<6>(args), ExcessiveArg(), ExcessiveArg(),
00580 ExcessiveArg());
00581 }
00582
00583 template <typename A0, typename A1, typename A2, typename A3, typename A4,
00584 typename A5, typename A6, typename A7>
00585 static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
00586 A5, A6, A7>& args) {
00587 return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6,
00588 A7>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
00589 get<4>(args), get<5>(args), get<6>(args), get<7>(args), ExcessiveArg(),
00590 ExcessiveArg());
00591 }
00592
00593 template <typename A0, typename A1, typename A2, typename A3, typename A4,
00594 typename A5, typename A6, typename A7, typename A8>
00595 static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
00596 A5, A6, A7, A8>& args) {
00597 return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7,
00598 A8>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
00599 get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
00600 ExcessiveArg());
00601 }
00602
00603 template <typename A0, typename A1, typename A2, typename A3, typename A4,
00604 typename A5, typename A6, typename A7, typename A8, typename A9>
00605 static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
00606 A5, A6, A7, A8, A9>& args) {
00607 return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7, A8,
00608 A9>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
00609 get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
00610 get<9>(args));
00611 }
00612 };
00613
00614 }
00615
00616
00617
00618
00619
00620
00621
00622
00623 template <int k1, typename InnerAction>
00624 inline internal::WithArgsAction<InnerAction, k1>
00625 WithArgs(const InnerAction& action) {
00626 return internal::WithArgsAction<InnerAction, k1>(action);
00627 }
00628
00629 template <int k1, int k2, typename InnerAction>
00630 inline internal::WithArgsAction<InnerAction, k1, k2>
00631 WithArgs(const InnerAction& action) {
00632 return internal::WithArgsAction<InnerAction, k1, k2>(action);
00633 }
00634
00635 template <int k1, int k2, int k3, typename InnerAction>
00636 inline internal::WithArgsAction<InnerAction, k1, k2, k3>
00637 WithArgs(const InnerAction& action) {
00638 return internal::WithArgsAction<InnerAction, k1, k2, k3>(action);
00639 }
00640
00641 template <int k1, int k2, int k3, int k4, typename InnerAction>
00642 inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4>
00643 WithArgs(const InnerAction& action) {
00644 return internal::WithArgsAction<InnerAction, k1, k2, k3, k4>(action);
00645 }
00646
00647 template <int k1, int k2, int k3, int k4, int k5, typename InnerAction>
00648 inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5>
00649 WithArgs(const InnerAction& action) {
00650 return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5>(action);
00651 }
00652
00653 template <int k1, int k2, int k3, int k4, int k5, int k6, typename InnerAction>
00654 inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6>
00655 WithArgs(const InnerAction& action) {
00656 return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6>(action);
00657 }
00658
00659 template <int k1, int k2, int k3, int k4, int k5, int k6, int k7,
00660 typename InnerAction>
00661 inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7>
00662 WithArgs(const InnerAction& action) {
00663 return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6,
00664 k7>(action);
00665 }
00666
00667 template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
00668 typename InnerAction>
00669 inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8>
00670 WithArgs(const InnerAction& action) {
00671 return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7,
00672 k8>(action);
00673 }
00674
00675 template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
00676 int k9, typename InnerAction>
00677 inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8, k9>
00678 WithArgs(const InnerAction& action) {
00679 return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
00680 k9>(action);
00681 }
00682
00683 template <int k1, int k2, int k3, int k4, int k5, int k6, int k7, int k8,
00684 int k9, int k10, typename InnerAction>
00685 inline internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
00686 k9, k10>
00687 WithArgs(const InnerAction& action) {
00688 return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6, k7, k8,
00689 k9, k10>(action);
00690 }
00691
00692
00693
00694 template <typename Action1, typename Action2>
00695 inline internal::DoBothAction<Action1, Action2>
00696 DoAll(Action1 a1, Action2 a2) {
00697 return internal::DoBothAction<Action1, Action2>(a1, a2);
00698 }
00699
00700 template <typename Action1, typename Action2, typename Action3>
00701 inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
00702 Action3> >
00703 DoAll(Action1 a1, Action2 a2, Action3 a3) {
00704 return DoAll(a1, DoAll(a2, a3));
00705 }
00706
00707 template <typename Action1, typename Action2, typename Action3,
00708 typename Action4>
00709 inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
00710 internal::DoBothAction<Action3, Action4> > >
00711 DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4) {
00712 return DoAll(a1, DoAll(a2, a3, a4));
00713 }
00714
00715 template <typename Action1, typename Action2, typename Action3,
00716 typename Action4, typename Action5>
00717 inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
00718 internal::DoBothAction<Action3, internal::DoBothAction<Action4,
00719 Action5> > > >
00720 DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5) {
00721 return DoAll(a1, DoAll(a2, a3, a4, a5));
00722 }
00723
00724 template <typename Action1, typename Action2, typename Action3,
00725 typename Action4, typename Action5, typename Action6>
00726 inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
00727 internal::DoBothAction<Action3, internal::DoBothAction<Action4,
00728 internal::DoBothAction<Action5, Action6> > > > >
00729 DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6) {
00730 return DoAll(a1, DoAll(a2, a3, a4, a5, a6));
00731 }
00732
00733 template <typename Action1, typename Action2, typename Action3,
00734 typename Action4, typename Action5, typename Action6, typename Action7>
00735 inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
00736 internal::DoBothAction<Action3, internal::DoBothAction<Action4,
00737 internal::DoBothAction<Action5, internal::DoBothAction<Action6,
00738 Action7> > > > > >
00739 DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
00740 Action7 a7) {
00741 return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7));
00742 }
00743
00744 template <typename Action1, typename Action2, typename Action3,
00745 typename Action4, typename Action5, typename Action6, typename Action7,
00746 typename Action8>
00747 inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
00748 internal::DoBothAction<Action3, internal::DoBothAction<Action4,
00749 internal::DoBothAction<Action5, internal::DoBothAction<Action6,
00750 internal::DoBothAction<Action7, Action8> > > > > > >
00751 DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
00752 Action7 a7, Action8 a8) {
00753 return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8));
00754 }
00755
00756 template <typename Action1, typename Action2, typename Action3,
00757 typename Action4, typename Action5, typename Action6, typename Action7,
00758 typename Action8, typename Action9>
00759 inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
00760 internal::DoBothAction<Action3, internal::DoBothAction<Action4,
00761 internal::DoBothAction<Action5, internal::DoBothAction<Action6,
00762 internal::DoBothAction<Action7, internal::DoBothAction<Action8,
00763 Action9> > > > > > > >
00764 DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
00765 Action7 a7, Action8 a8, Action9 a9) {
00766 return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9));
00767 }
00768
00769 template <typename Action1, typename Action2, typename Action3,
00770 typename Action4, typename Action5, typename Action6, typename Action7,
00771 typename Action8, typename Action9, typename Action10>
00772 inline internal::DoBothAction<Action1, internal::DoBothAction<Action2,
00773 internal::DoBothAction<Action3, internal::DoBothAction<Action4,
00774 internal::DoBothAction<Action5, internal::DoBothAction<Action6,
00775 internal::DoBothAction<Action7, internal::DoBothAction<Action8,
00776 internal::DoBothAction<Action9, Action10> > > > > > > > >
00777 DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
00778 Action7 a7, Action8 a8, Action9 a9, Action10 a10) {
00779 return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9, a10));
00780 }
00781
00782 }
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828
00829
00830
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850
00851
00852
00853
00854
00855
00856
00857
00858
00859
00860
00861
00862
00863
00864
00865
00866
00867
00868
00869
00870
00871
00872
00873
00874
00875
00876
00877
00878
00879
00880
00881 #define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\
00882 const args_type& args GTEST_ATTRIBUTE_UNUSED_, \
00883 arg0_type arg0 GTEST_ATTRIBUTE_UNUSED_, \
00884 arg1_type arg1 GTEST_ATTRIBUTE_UNUSED_, \
00885 arg2_type arg2 GTEST_ATTRIBUTE_UNUSED_, \
00886 arg3_type arg3 GTEST_ATTRIBUTE_UNUSED_, \
00887 arg4_type arg4 GTEST_ATTRIBUTE_UNUSED_, \
00888 arg5_type arg5 GTEST_ATTRIBUTE_UNUSED_, \
00889 arg6_type arg6 GTEST_ATTRIBUTE_UNUSED_, \
00890 arg7_type arg7 GTEST_ATTRIBUTE_UNUSED_, \
00891 arg8_type arg8 GTEST_ATTRIBUTE_UNUSED_, \
00892 arg9_type arg9 GTEST_ATTRIBUTE_UNUSED_
00893
00894
00895
00896
00897
00898
00899
00900
00901
00902
00903
00904
00905
00906
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925
00926
00927
00928
00929
00930
00931
00932
00933
00934
00935
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947
00948
00949
00950
00951
00952
00953
00954
00955
00956
00957
00958
00959
00960
00961
00962
00963
00964
00965
00966
00967
00968
00969
00970
00971
00972
00973
00974
00975
00976 #define GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0) kind0 name0
00977 #define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
00978 name1) kind0 name0, kind1 name1
00979 #define GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
00980 kind2, name2) kind0 name0, kind1 name1, kind2 name2
00981 #define GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
00982 kind2, name2, kind3, name3) kind0 name0, kind1 name1, kind2 name2, \
00983 kind3 name3
00984 #define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
00985 kind2, name2, kind3, name3, kind4, name4) kind0 name0, kind1 name1, \
00986 kind2 name2, kind3 name3, kind4 name4
00987 #define GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
00988 kind2, name2, kind3, name3, kind4, name4, kind5, name5) kind0 name0, \
00989 kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5
00990 #define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
00991 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
00992 name6) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \
00993 kind5 name5, kind6 name6
00994 #define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
00995 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
00996 kind7, name7) kind0 name0, kind1 name1, kind2 name2, kind3 name3, \
00997 kind4 name4, kind5 name5, kind6 name6, kind7 name7
00998 #define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
00999 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
01000 kind7, name7, kind8, name8) kind0 name0, kind1 name1, kind2 name2, \
01001 kind3 name3, kind4 name4, kind5 name5, kind6 name6, kind7 name7, \
01002 kind8 name8
01003 #define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
01004 name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
01005 name6, kind7, name7, kind8, name8, kind9, name9) kind0 name0, \
01006 kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5, \
01007 kind6 name6, kind7 name7, kind8 name8, kind9 name9
01008
01009
01010 #define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0
01011 #define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
01012 name1) name0, name1
01013 #define GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
01014 kind2, name2) name0, name1, name2
01015 #define GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
01016 kind2, name2, kind3, name3) name0, name1, name2, name3
01017 #define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
01018 kind2, name2, kind3, name3, kind4, name4) name0, name1, name2, name3, \
01019 name4
01020 #define GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
01021 kind2, name2, kind3, name3, kind4, name4, kind5, name5) name0, name1, \
01022 name2, name3, name4, name5
01023 #define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
01024 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
01025 name6) name0, name1, name2, name3, name4, name5, name6
01026 #define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
01027 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
01028 kind7, name7) name0, name1, name2, name3, name4, name5, name6, name7
01029 #define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
01030 kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
01031 kind7, name7, kind8, name8) name0, name1, name2, name3, name4, name5, \
01032 name6, name7, name8
01033 #define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
01034 name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
01035 name6, kind7, name7, kind8, name8, kind9, name9) name0, name1, name2, \
01036 name3, name4, name5, name6, name7, name8, name9
01037
01038
01039 #define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS()
01040 #define GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0) , typename p0##_type
01041 #define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) , \
01042 typename p0##_type, typename p1##_type
01043 #define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , \
01044 typename p0##_type, typename p1##_type, typename p2##_type
01045 #define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
01046 typename p0##_type, typename p1##_type, typename p2##_type, \
01047 typename p3##_type
01048 #define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
01049 typename p0##_type, typename p1##_type, typename p2##_type, \
01050 typename p3##_type, typename p4##_type
01051 #define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
01052 typename p0##_type, typename p1##_type, typename p2##_type, \
01053 typename p3##_type, typename p4##_type, typename p5##_type
01054 #define GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
01055 p6) , typename p0##_type, typename p1##_type, typename p2##_type, \
01056 typename p3##_type, typename p4##_type, typename p5##_type, \
01057 typename p6##_type
01058 #define GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
01059 p6, p7) , typename p0##_type, typename p1##_type, typename p2##_type, \
01060 typename p3##_type, typename p4##_type, typename p5##_type, \
01061 typename p6##_type, typename p7##_type
01062 #define GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
01063 p6, p7, p8) , typename p0##_type, typename p1##_type, typename p2##_type, \
01064 typename p3##_type, typename p4##_type, typename p5##_type, \
01065 typename p6##_type, typename p7##_type, typename p8##_type
01066 #define GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
01067 p6, p7, p8, p9) , typename p0##_type, typename p1##_type, \
01068 typename p2##_type, typename p3##_type, typename p4##_type, \
01069 typename p5##_type, typename p6##_type, typename p7##_type, \
01070 typename p8##_type, typename p9##_type
01071
01072
01073 #define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\
01074 ()
01075 #define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)\
01076 (p0##_type gmock_p0) : p0(gmock_p0)
01077 #define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)\
01078 (p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), p1(gmock_p1)
01079 #define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)\
01080 (p0##_type gmock_p0, p1##_type gmock_p1, \
01081 p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2)
01082 #define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)\
01083 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01084 p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01085 p3(gmock_p3)
01086 #define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)\
01087 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01088 p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), \
01089 p2(gmock_p2), p3(gmock_p3), p4(gmock_p4)
01090 #define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)\
01091 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01092 p3##_type gmock_p3, p4##_type gmock_p4, \
01093 p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01094 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5)
01095 #define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)\
01096 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01097 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
01098 p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01099 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6)
01100 #define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)\
01101 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01102 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
01103 p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), \
01104 p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
01105 p7(gmock_p7)
01106 #define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01107 p7, p8)\
01108 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01109 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
01110 p6##_type gmock_p6, p7##_type gmock_p7, \
01111 p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01112 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
01113 p8(gmock_p8)
01114 #define GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01115 p7, p8, p9)\
01116 (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01117 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
01118 p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
01119 p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01120 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
01121 p8(gmock_p8), p9(gmock_p9)
01122
01123
01124 #define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS()
01125 #define GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0) p0##_type p0;
01126 #define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0; \
01127 p1##_type p1;
01128 #define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0; \
01129 p1##_type p1; p2##_type p2;
01130 #define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0; \
01131 p1##_type p1; p2##_type p2; p3##_type p3;
01132 #define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
01133 p4) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4;
01134 #define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
01135 p5) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
01136 p5##_type p5;
01137 #define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
01138 p6) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
01139 p5##_type p5; p6##_type p6;
01140 #define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01141 p7) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
01142 p5##_type p5; p6##_type p6; p7##_type p7;
01143 #define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01144 p7, p8) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
01145 p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8;
01146 #define GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01147 p7, p8, p9) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
01148 p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; \
01149 p9##_type p9;
01150
01151
01152 #define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS()
01153 #define GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0) p0
01154 #define GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1) p0, p1
01155 #define GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2) p0, p1, p2
01156 #define GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0, p1, p2, p3
01157 #define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) p0, p1, \
01158 p2, p3, p4
01159 #define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) p0, \
01160 p1, p2, p3, p4, p5
01161 #define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
01162 p6) p0, p1, p2, p3, p4, p5, p6
01163 #define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01164 p7) p0, p1, p2, p3, p4, p5, p6, p7
01165 #define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01166 p7, p8) p0, p1, p2, p3, p4, p5, p6, p7, p8
01167 #define GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01168 p7, p8, p9) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9
01169
01170
01171 #define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS()
01172 #define GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0) , p0##_type
01173 #define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) , p0##_type, \
01174 p1##_type
01175 #define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , p0##_type, \
01176 p1##_type, p2##_type
01177 #define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
01178 p0##_type, p1##_type, p2##_type, p3##_type
01179 #define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
01180 p0##_type, p1##_type, p2##_type, p3##_type, p4##_type
01181 #define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
01182 p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type
01183 #define GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
01184 p6) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \
01185 p6##_type
01186 #define GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
01187 p6, p7) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
01188 p5##_type, p6##_type, p7##_type
01189 #define GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
01190 p6, p7, p8) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
01191 p5##_type, p6##_type, p7##_type, p8##_type
01192 #define GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
01193 p6, p7, p8, p9) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
01194 p5##_type, p6##_type, p7##_type, p8##_type, p9##_type
01195
01196
01197 #define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS()
01198 #define GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0) p0##_type p0
01199 #define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0, \
01200 p1##_type p1
01201 #define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0, \
01202 p1##_type p1, p2##_type p2
01203 #define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0, \
01204 p1##_type p1, p2##_type p2, p3##_type p3
01205 #define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
01206 p4) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4
01207 #define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
01208 p5) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
01209 p5##_type p5
01210 #define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
01211 p6) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
01212 p5##_type p5, p6##_type p6
01213 #define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01214 p7) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
01215 p5##_type p5, p6##_type p6, p7##_type p7
01216 #define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01217 p7, p8) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
01218 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8
01219 #define GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01220 p7, p8, p9) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
01221 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
01222 p9##_type p9
01223
01224
01225 #define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS()
01226 #define GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0) P
01227 #define GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1) P2
01228 #define GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2) P3
01229 #define GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3) P4
01230 #define GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) P5
01231 #define GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) P6
01232 #define GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) P7
01233 #define GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01234 p7) P8
01235 #define GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01236 p7, p8) P9
01237 #define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
01238 p7, p8, p9) P10
01239
01240
01241 #define GMOCK_ACTION_CLASS_(name, value_params)\
01242 GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params)
01243
01244 #define ACTION_TEMPLATE(name, template_params, value_params)\
01245 template <GMOCK_INTERNAL_DECL_##template_params\
01246 GMOCK_INTERNAL_DECL_TYPE_##value_params>\
01247 class GMOCK_ACTION_CLASS_(name, value_params) {\
01248 public:\
01249 explicit GMOCK_ACTION_CLASS_(name, value_params)\
01250 GMOCK_INTERNAL_INIT_##value_params {}\
01251 template <typename F>\
01252 class gmock_Impl : public ::testing::ActionInterface<F> {\
01253 public:\
01254 typedef F function_type;\
01255 typedef typename ::testing::internal::Function<F>::Result return_type;\
01256 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
01257 args_type;\
01258 explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\
01259 virtual return_type Perform(const args_type& args) {\
01260 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
01261 Perform(this, args);\
01262 }\
01263 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01264 typename arg3_type, typename arg4_type, typename arg5_type, \
01265 typename arg6_type, typename arg7_type, typename arg8_type, \
01266 typename arg9_type>\
01267 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
01268 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
01269 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
01270 arg9_type arg9) const;\
01271 GMOCK_INTERNAL_DEFN_##value_params\
01272 private:\
01273 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
01274 };\
01275 template <typename F> operator ::testing::Action<F>() const {\
01276 return ::testing::Action<F>(\
01277 new gmock_Impl<F>(GMOCK_INTERNAL_LIST_##value_params));\
01278 }\
01279 GMOCK_INTERNAL_DEFN_##value_params\
01280 private:\
01281 GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\
01282 };\
01283 template <GMOCK_INTERNAL_DECL_##template_params\
01284 GMOCK_INTERNAL_DECL_TYPE_##value_params>\
01285 inline GMOCK_ACTION_CLASS_(name, value_params)<\
01286 GMOCK_INTERNAL_LIST_##template_params\
01287 GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\
01288 GMOCK_INTERNAL_DECL_##value_params) {\
01289 return GMOCK_ACTION_CLASS_(name, value_params)<\
01290 GMOCK_INTERNAL_LIST_##template_params\
01291 GMOCK_INTERNAL_LIST_TYPE_##value_params>(\
01292 GMOCK_INTERNAL_LIST_##value_params);\
01293 }\
01294 template <GMOCK_INTERNAL_DECL_##template_params\
01295 GMOCK_INTERNAL_DECL_TYPE_##value_params>\
01296 template <typename F>\
01297 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01298 typename arg3_type, typename arg4_type, typename arg5_type, \
01299 typename arg6_type, typename arg7_type, typename arg8_type, \
01300 typename arg9_type>\
01301 typename ::testing::internal::Function<F>::Result\
01302 GMOCK_ACTION_CLASS_(name, value_params)<\
01303 GMOCK_INTERNAL_LIST_##template_params\
01304 GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl<F>::\
01305 gmock_PerformImpl(\
01306 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
01307
01308 #define ACTION(name)\
01309 class name##Action {\
01310 public:\
01311 name##Action() {}\
01312 template <typename F>\
01313 class gmock_Impl : public ::testing::ActionInterface<F> {\
01314 public:\
01315 typedef F function_type;\
01316 typedef typename ::testing::internal::Function<F>::Result return_type;\
01317 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
01318 args_type;\
01319 gmock_Impl() {}\
01320 virtual return_type Perform(const args_type& args) {\
01321 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
01322 Perform(this, args);\
01323 }\
01324 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01325 typename arg3_type, typename arg4_type, typename arg5_type, \
01326 typename arg6_type, typename arg7_type, typename arg8_type, \
01327 typename arg9_type>\
01328 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
01329 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
01330 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
01331 arg9_type arg9) const;\
01332 private:\
01333 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
01334 };\
01335 template <typename F> operator ::testing::Action<F>() const {\
01336 return ::testing::Action<F>(new gmock_Impl<F>());\
01337 }\
01338 private:\
01339 GTEST_DISALLOW_ASSIGN_(name##Action);\
01340 };\
01341 inline name##Action name() {\
01342 return name##Action();\
01343 }\
01344 template <typename F>\
01345 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01346 typename arg3_type, typename arg4_type, typename arg5_type, \
01347 typename arg6_type, typename arg7_type, typename arg8_type, \
01348 typename arg9_type>\
01349 typename ::testing::internal::Function<F>::Result\
01350 name##Action::gmock_Impl<F>::gmock_PerformImpl(\
01351 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
01352
01353 #define ACTION_P(name, p0)\
01354 template <typename p0##_type>\
01355 class name##ActionP {\
01356 public:\
01357 explicit name##ActionP(p0##_type gmock_p0) : p0(gmock_p0) {}\
01358 template <typename F>\
01359 class gmock_Impl : public ::testing::ActionInterface<F> {\
01360 public:\
01361 typedef F function_type;\
01362 typedef typename ::testing::internal::Function<F>::Result return_type;\
01363 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
01364 args_type;\
01365 explicit gmock_Impl(p0##_type gmock_p0) : p0(gmock_p0) {}\
01366 virtual return_type Perform(const args_type& args) {\
01367 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
01368 Perform(this, args);\
01369 }\
01370 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01371 typename arg3_type, typename arg4_type, typename arg5_type, \
01372 typename arg6_type, typename arg7_type, typename arg8_type, \
01373 typename arg9_type>\
01374 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
01375 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
01376 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
01377 arg9_type arg9) const;\
01378 p0##_type p0;\
01379 private:\
01380 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
01381 };\
01382 template <typename F> operator ::testing::Action<F>() const {\
01383 return ::testing::Action<F>(new gmock_Impl<F>(p0));\
01384 }\
01385 p0##_type p0;\
01386 private:\
01387 GTEST_DISALLOW_ASSIGN_(name##ActionP);\
01388 };\
01389 template <typename p0##_type>\
01390 inline name##ActionP<p0##_type> name(p0##_type p0) {\
01391 return name##ActionP<p0##_type>(p0);\
01392 }\
01393 template <typename p0##_type>\
01394 template <typename F>\
01395 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01396 typename arg3_type, typename arg4_type, typename arg5_type, \
01397 typename arg6_type, typename arg7_type, typename arg8_type, \
01398 typename arg9_type>\
01399 typename ::testing::internal::Function<F>::Result\
01400 name##ActionP<p0##_type>::gmock_Impl<F>::gmock_PerformImpl(\
01401 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
01402
01403 #define ACTION_P2(name, p0, p1)\
01404 template <typename p0##_type, typename p1##_type>\
01405 class name##ActionP2 {\
01406 public:\
01407 name##ActionP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
01408 p1(gmock_p1) {}\
01409 template <typename F>\
01410 class gmock_Impl : public ::testing::ActionInterface<F> {\
01411 public:\
01412 typedef F function_type;\
01413 typedef typename ::testing::internal::Function<F>::Result return_type;\
01414 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
01415 args_type;\
01416 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \
01417 p1(gmock_p1) {}\
01418 virtual return_type Perform(const args_type& args) {\
01419 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
01420 Perform(this, args);\
01421 }\
01422 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01423 typename arg3_type, typename arg4_type, typename arg5_type, \
01424 typename arg6_type, typename arg7_type, typename arg8_type, \
01425 typename arg9_type>\
01426 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
01427 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
01428 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
01429 arg9_type arg9) const;\
01430 p0##_type p0;\
01431 p1##_type p1;\
01432 private:\
01433 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
01434 };\
01435 template <typename F> operator ::testing::Action<F>() const {\
01436 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1));\
01437 }\
01438 p0##_type p0;\
01439 p1##_type p1;\
01440 private:\
01441 GTEST_DISALLOW_ASSIGN_(name##ActionP2);\
01442 };\
01443 template <typename p0##_type, typename p1##_type>\
01444 inline name##ActionP2<p0##_type, p1##_type> name(p0##_type p0, \
01445 p1##_type p1) {\
01446 return name##ActionP2<p0##_type, p1##_type>(p0, p1);\
01447 }\
01448 template <typename p0##_type, typename p1##_type>\
01449 template <typename F>\
01450 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01451 typename arg3_type, typename arg4_type, typename arg5_type, \
01452 typename arg6_type, typename arg7_type, typename arg8_type, \
01453 typename arg9_type>\
01454 typename ::testing::internal::Function<F>::Result\
01455 name##ActionP2<p0##_type, p1##_type>::gmock_Impl<F>::gmock_PerformImpl(\
01456 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
01457
01458 #define ACTION_P3(name, p0, p1, p2)\
01459 template <typename p0##_type, typename p1##_type, typename p2##_type>\
01460 class name##ActionP3 {\
01461 public:\
01462 name##ActionP3(p0##_type gmock_p0, p1##_type gmock_p1, \
01463 p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
01464 template <typename F>\
01465 class gmock_Impl : public ::testing::ActionInterface<F> {\
01466 public:\
01467 typedef F function_type;\
01468 typedef typename ::testing::internal::Function<F>::Result return_type;\
01469 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
01470 args_type;\
01471 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, \
01472 p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\
01473 virtual return_type Perform(const args_type& args) {\
01474 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
01475 Perform(this, args);\
01476 }\
01477 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01478 typename arg3_type, typename arg4_type, typename arg5_type, \
01479 typename arg6_type, typename arg7_type, typename arg8_type, \
01480 typename arg9_type>\
01481 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
01482 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
01483 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
01484 arg9_type arg9) const;\
01485 p0##_type p0;\
01486 p1##_type p1;\
01487 p2##_type p2;\
01488 private:\
01489 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
01490 };\
01491 template <typename F> operator ::testing::Action<F>() const {\
01492 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2));\
01493 }\
01494 p0##_type p0;\
01495 p1##_type p1;\
01496 p2##_type p2;\
01497 private:\
01498 GTEST_DISALLOW_ASSIGN_(name##ActionP3);\
01499 };\
01500 template <typename p0##_type, typename p1##_type, typename p2##_type>\
01501 inline name##ActionP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
01502 p1##_type p1, p2##_type p2) {\
01503 return name##ActionP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\
01504 }\
01505 template <typename p0##_type, typename p1##_type, typename p2##_type>\
01506 template <typename F>\
01507 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01508 typename arg3_type, typename arg4_type, typename arg5_type, \
01509 typename arg6_type, typename arg7_type, typename arg8_type, \
01510 typename arg9_type>\
01511 typename ::testing::internal::Function<F>::Result\
01512 name##ActionP3<p0##_type, p1##_type, \
01513 p2##_type>::gmock_Impl<F>::gmock_PerformImpl(\
01514 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
01515
01516 #define ACTION_P4(name, p0, p1, p2, p3)\
01517 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01518 typename p3##_type>\
01519 class name##ActionP4 {\
01520 public:\
01521 name##ActionP4(p0##_type gmock_p0, p1##_type gmock_p1, \
01522 p2##_type gmock_p2, p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), \
01523 p2(gmock_p2), p3(gmock_p3) {}\
01524 template <typename F>\
01525 class gmock_Impl : public ::testing::ActionInterface<F> {\
01526 public:\
01527 typedef F function_type;\
01528 typedef typename ::testing::internal::Function<F>::Result return_type;\
01529 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
01530 args_type;\
01531 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01532 p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01533 p3(gmock_p3) {}\
01534 virtual return_type Perform(const args_type& args) {\
01535 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
01536 Perform(this, args);\
01537 }\
01538 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01539 typename arg3_type, typename arg4_type, typename arg5_type, \
01540 typename arg6_type, typename arg7_type, typename arg8_type, \
01541 typename arg9_type>\
01542 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
01543 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
01544 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
01545 arg9_type arg9) const;\
01546 p0##_type p0;\
01547 p1##_type p1;\
01548 p2##_type p2;\
01549 p3##_type p3;\
01550 private:\
01551 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
01552 };\
01553 template <typename F> operator ::testing::Action<F>() const {\
01554 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3));\
01555 }\
01556 p0##_type p0;\
01557 p1##_type p1;\
01558 p2##_type p2;\
01559 p3##_type p3;\
01560 private:\
01561 GTEST_DISALLOW_ASSIGN_(name##ActionP4);\
01562 };\
01563 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01564 typename p3##_type>\
01565 inline name##ActionP4<p0##_type, p1##_type, p2##_type, \
01566 p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
01567 p3##_type p3) {\
01568 return name##ActionP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, p1, \
01569 p2, p3);\
01570 }\
01571 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01572 typename p3##_type>\
01573 template <typename F>\
01574 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01575 typename arg3_type, typename arg4_type, typename arg5_type, \
01576 typename arg6_type, typename arg7_type, typename arg8_type, \
01577 typename arg9_type>\
01578 typename ::testing::internal::Function<F>::Result\
01579 name##ActionP4<p0##_type, p1##_type, p2##_type, \
01580 p3##_type>::gmock_Impl<F>::gmock_PerformImpl(\
01581 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
01582
01583 #define ACTION_P5(name, p0, p1, p2, p3, p4)\
01584 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01585 typename p3##_type, typename p4##_type>\
01586 class name##ActionP5 {\
01587 public:\
01588 name##ActionP5(p0##_type gmock_p0, p1##_type gmock_p1, \
01589 p2##_type gmock_p2, p3##_type gmock_p3, \
01590 p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01591 p3(gmock_p3), p4(gmock_p4) {}\
01592 template <typename F>\
01593 class gmock_Impl : public ::testing::ActionInterface<F> {\
01594 public:\
01595 typedef F function_type;\
01596 typedef typename ::testing::internal::Function<F>::Result return_type;\
01597 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
01598 args_type;\
01599 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01600 p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), \
01601 p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4) {}\
01602 virtual return_type Perform(const args_type& args) {\
01603 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
01604 Perform(this, args);\
01605 }\
01606 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01607 typename arg3_type, typename arg4_type, typename arg5_type, \
01608 typename arg6_type, typename arg7_type, typename arg8_type, \
01609 typename arg9_type>\
01610 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
01611 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
01612 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
01613 arg9_type arg9) const;\
01614 p0##_type p0;\
01615 p1##_type p1;\
01616 p2##_type p2;\
01617 p3##_type p3;\
01618 p4##_type p4;\
01619 private:\
01620 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
01621 };\
01622 template <typename F> operator ::testing::Action<F>() const {\
01623 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4));\
01624 }\
01625 p0##_type p0;\
01626 p1##_type p1;\
01627 p2##_type p2;\
01628 p3##_type p3;\
01629 p4##_type p4;\
01630 private:\
01631 GTEST_DISALLOW_ASSIGN_(name##ActionP5);\
01632 };\
01633 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01634 typename p3##_type, typename p4##_type>\
01635 inline name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
01636 p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
01637 p4##_type p4) {\
01638 return name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
01639 p4##_type>(p0, p1, p2, p3, p4);\
01640 }\
01641 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01642 typename p3##_type, typename p4##_type>\
01643 template <typename F>\
01644 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01645 typename arg3_type, typename arg4_type, typename arg5_type, \
01646 typename arg6_type, typename arg7_type, typename arg8_type, \
01647 typename arg9_type>\
01648 typename ::testing::internal::Function<F>::Result\
01649 name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \
01650 p4##_type>::gmock_Impl<F>::gmock_PerformImpl(\
01651 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
01652
01653 #define ACTION_P6(name, p0, p1, p2, p3, p4, p5)\
01654 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01655 typename p3##_type, typename p4##_type, typename p5##_type>\
01656 class name##ActionP6 {\
01657 public:\
01658 name##ActionP6(p0##_type gmock_p0, p1##_type gmock_p1, \
01659 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
01660 p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01661 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\
01662 template <typename F>\
01663 class gmock_Impl : public ::testing::ActionInterface<F> {\
01664 public:\
01665 typedef F function_type;\
01666 typedef typename ::testing::internal::Function<F>::Result return_type;\
01667 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
01668 args_type;\
01669 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01670 p3##_type gmock_p3, p4##_type gmock_p4, \
01671 p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01672 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\
01673 virtual return_type Perform(const args_type& args) {\
01674 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
01675 Perform(this, args);\
01676 }\
01677 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01678 typename arg3_type, typename arg4_type, typename arg5_type, \
01679 typename arg6_type, typename arg7_type, typename arg8_type, \
01680 typename arg9_type>\
01681 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
01682 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
01683 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
01684 arg9_type arg9) const;\
01685 p0##_type p0;\
01686 p1##_type p1;\
01687 p2##_type p2;\
01688 p3##_type p3;\
01689 p4##_type p4;\
01690 p5##_type p5;\
01691 private:\
01692 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
01693 };\
01694 template <typename F> operator ::testing::Action<F>() const {\
01695 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5));\
01696 }\
01697 p0##_type p0;\
01698 p1##_type p1;\
01699 p2##_type p2;\
01700 p3##_type p3;\
01701 p4##_type p4;\
01702 p5##_type p5;\
01703 private:\
01704 GTEST_DISALLOW_ASSIGN_(name##ActionP6);\
01705 };\
01706 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01707 typename p3##_type, typename p4##_type, typename p5##_type>\
01708 inline name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, \
01709 p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \
01710 p3##_type p3, p4##_type p4, p5##_type p5) {\
01711 return name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, \
01712 p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\
01713 }\
01714 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01715 typename p3##_type, typename p4##_type, typename p5##_type>\
01716 template <typename F>\
01717 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01718 typename arg3_type, typename arg4_type, typename arg5_type, \
01719 typename arg6_type, typename arg7_type, typename arg8_type, \
01720 typename arg9_type>\
01721 typename ::testing::internal::Function<F>::Result\
01722 name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
01723 p5##_type>::gmock_Impl<F>::gmock_PerformImpl(\
01724 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
01725
01726 #define ACTION_P7(name, p0, p1, p2, p3, p4, p5, p6)\
01727 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01728 typename p3##_type, typename p4##_type, typename p5##_type, \
01729 typename p6##_type>\
01730 class name##ActionP7 {\
01731 public:\
01732 name##ActionP7(p0##_type gmock_p0, p1##_type gmock_p1, \
01733 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
01734 p5##_type gmock_p5, p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), \
01735 p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \
01736 p6(gmock_p6) {}\
01737 template <typename F>\
01738 class gmock_Impl : public ::testing::ActionInterface<F> {\
01739 public:\
01740 typedef F function_type;\
01741 typedef typename ::testing::internal::Function<F>::Result return_type;\
01742 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
01743 args_type;\
01744 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01745 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
01746 p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01747 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) {}\
01748 virtual return_type Perform(const args_type& args) {\
01749 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
01750 Perform(this, args);\
01751 }\
01752 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01753 typename arg3_type, typename arg4_type, typename arg5_type, \
01754 typename arg6_type, typename arg7_type, typename arg8_type, \
01755 typename arg9_type>\
01756 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
01757 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
01758 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
01759 arg9_type arg9) const;\
01760 p0##_type p0;\
01761 p1##_type p1;\
01762 p2##_type p2;\
01763 p3##_type p3;\
01764 p4##_type p4;\
01765 p5##_type p5;\
01766 p6##_type p6;\
01767 private:\
01768 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
01769 };\
01770 template <typename F> operator ::testing::Action<F>() const {\
01771 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
01772 p6));\
01773 }\
01774 p0##_type p0;\
01775 p1##_type p1;\
01776 p2##_type p2;\
01777 p3##_type p3;\
01778 p4##_type p4;\
01779 p5##_type p5;\
01780 p6##_type p6;\
01781 private:\
01782 GTEST_DISALLOW_ASSIGN_(name##ActionP7);\
01783 };\
01784 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01785 typename p3##_type, typename p4##_type, typename p5##_type, \
01786 typename p6##_type>\
01787 inline name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, \
01788 p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \
01789 p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
01790 p6##_type p6) {\
01791 return name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, \
01792 p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\
01793 }\
01794 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01795 typename p3##_type, typename p4##_type, typename p5##_type, \
01796 typename p6##_type>\
01797 template <typename F>\
01798 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01799 typename arg3_type, typename arg4_type, typename arg5_type, \
01800 typename arg6_type, typename arg7_type, typename arg8_type, \
01801 typename arg9_type>\
01802 typename ::testing::internal::Function<F>::Result\
01803 name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
01804 p5##_type, p6##_type>::gmock_Impl<F>::gmock_PerformImpl(\
01805 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
01806
01807 #define ACTION_P8(name, p0, p1, p2, p3, p4, p5, p6, p7)\
01808 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01809 typename p3##_type, typename p4##_type, typename p5##_type, \
01810 typename p6##_type, typename p7##_type>\
01811 class name##ActionP8 {\
01812 public:\
01813 name##ActionP8(p0##_type gmock_p0, p1##_type gmock_p1, \
01814 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
01815 p5##_type gmock_p5, p6##_type gmock_p6, \
01816 p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01817 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
01818 p7(gmock_p7) {}\
01819 template <typename F>\
01820 class gmock_Impl : public ::testing::ActionInterface<F> {\
01821 public:\
01822 typedef F function_type;\
01823 typedef typename ::testing::internal::Function<F>::Result return_type;\
01824 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
01825 args_type;\
01826 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01827 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
01828 p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), \
01829 p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), \
01830 p5(gmock_p5), p6(gmock_p6), p7(gmock_p7) {}\
01831 virtual return_type Perform(const args_type& args) {\
01832 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
01833 Perform(this, args);\
01834 }\
01835 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01836 typename arg3_type, typename arg4_type, typename arg5_type, \
01837 typename arg6_type, typename arg7_type, typename arg8_type, \
01838 typename arg9_type>\
01839 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
01840 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
01841 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
01842 arg9_type arg9) const;\
01843 p0##_type p0;\
01844 p1##_type p1;\
01845 p2##_type p2;\
01846 p3##_type p3;\
01847 p4##_type p4;\
01848 p5##_type p5;\
01849 p6##_type p6;\
01850 p7##_type p7;\
01851 private:\
01852 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
01853 };\
01854 template <typename F> operator ::testing::Action<F>() const {\
01855 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
01856 p6, p7));\
01857 }\
01858 p0##_type p0;\
01859 p1##_type p1;\
01860 p2##_type p2;\
01861 p3##_type p3;\
01862 p4##_type p4;\
01863 p5##_type p5;\
01864 p6##_type p6;\
01865 p7##_type p7;\
01866 private:\
01867 GTEST_DISALLOW_ASSIGN_(name##ActionP8);\
01868 };\
01869 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01870 typename p3##_type, typename p4##_type, typename p5##_type, \
01871 typename p6##_type, typename p7##_type>\
01872 inline name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, \
01873 p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \
01874 p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \
01875 p6##_type p6, p7##_type p7) {\
01876 return name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, \
01877 p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \
01878 p6, p7);\
01879 }\
01880 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01881 typename p3##_type, typename p4##_type, typename p5##_type, \
01882 typename p6##_type, typename p7##_type>\
01883 template <typename F>\
01884 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01885 typename arg3_type, typename arg4_type, typename arg5_type, \
01886 typename arg6_type, typename arg7_type, typename arg8_type, \
01887 typename arg9_type>\
01888 typename ::testing::internal::Function<F>::Result\
01889 name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
01890 p5##_type, p6##_type, \
01891 p7##_type>::gmock_Impl<F>::gmock_PerformImpl(\
01892 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
01893
01894 #define ACTION_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8)\
01895 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01896 typename p3##_type, typename p4##_type, typename p5##_type, \
01897 typename p6##_type, typename p7##_type, typename p8##_type>\
01898 class name##ActionP9 {\
01899 public:\
01900 name##ActionP9(p0##_type gmock_p0, p1##_type gmock_p1, \
01901 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
01902 p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
01903 p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01904 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \
01905 p8(gmock_p8) {}\
01906 template <typename F>\
01907 class gmock_Impl : public ::testing::ActionInterface<F> {\
01908 public:\
01909 typedef F function_type;\
01910 typedef typename ::testing::internal::Function<F>::Result return_type;\
01911 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
01912 args_type;\
01913 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
01914 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
01915 p6##_type gmock_p6, p7##_type gmock_p7, \
01916 p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
01917 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
01918 p7(gmock_p7), p8(gmock_p8) {}\
01919 virtual return_type Perform(const args_type& args) {\
01920 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
01921 Perform(this, args);\
01922 }\
01923 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01924 typename arg3_type, typename arg4_type, typename arg5_type, \
01925 typename arg6_type, typename arg7_type, typename arg8_type, \
01926 typename arg9_type>\
01927 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
01928 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
01929 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
01930 arg9_type arg9) const;\
01931 p0##_type p0;\
01932 p1##_type p1;\
01933 p2##_type p2;\
01934 p3##_type p3;\
01935 p4##_type p4;\
01936 p5##_type p5;\
01937 p6##_type p6;\
01938 p7##_type p7;\
01939 p8##_type p8;\
01940 private:\
01941 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
01942 };\
01943 template <typename F> operator ::testing::Action<F>() const {\
01944 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
01945 p6, p7, p8));\
01946 }\
01947 p0##_type p0;\
01948 p1##_type p1;\
01949 p2##_type p2;\
01950 p3##_type p3;\
01951 p4##_type p4;\
01952 p5##_type p5;\
01953 p6##_type p6;\
01954 p7##_type p7;\
01955 p8##_type p8;\
01956 private:\
01957 GTEST_DISALLOW_ASSIGN_(name##ActionP9);\
01958 };\
01959 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01960 typename p3##_type, typename p4##_type, typename p5##_type, \
01961 typename p6##_type, typename p7##_type, typename p8##_type>\
01962 inline name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, \
01963 p4##_type, p5##_type, p6##_type, p7##_type, \
01964 p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
01965 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \
01966 p8##_type p8) {\
01967 return name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, \
01968 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \
01969 p3, p4, p5, p6, p7, p8);\
01970 }\
01971 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01972 typename p3##_type, typename p4##_type, typename p5##_type, \
01973 typename p6##_type, typename p7##_type, typename p8##_type>\
01974 template <typename F>\
01975 template <typename arg0_type, typename arg1_type, typename arg2_type, \
01976 typename arg3_type, typename arg4_type, typename arg5_type, \
01977 typename arg6_type, typename arg7_type, typename arg8_type, \
01978 typename arg9_type>\
01979 typename ::testing::internal::Function<F>::Result\
01980 name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
01981 p5##_type, p6##_type, p7##_type, \
01982 p8##_type>::gmock_Impl<F>::gmock_PerformImpl(\
01983 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
01984
01985 #define ACTION_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)\
01986 template <typename p0##_type, typename p1##_type, typename p2##_type, \
01987 typename p3##_type, typename p4##_type, typename p5##_type, \
01988 typename p6##_type, typename p7##_type, typename p8##_type, \
01989 typename p9##_type>\
01990 class name##ActionP10 {\
01991 public:\
01992 name##ActionP10(p0##_type gmock_p0, p1##_type gmock_p1, \
01993 p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \
01994 p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \
01995 p8##_type gmock_p8, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), \
01996 p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
01997 p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\
01998 template <typename F>\
01999 class gmock_Impl : public ::testing::ActionInterface<F> {\
02000 public:\
02001 typedef F function_type;\
02002 typedef typename ::testing::internal::Function<F>::Result return_type;\
02003 typedef typename ::testing::internal::Function<F>::ArgumentTuple\
02004 args_type;\
02005 gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
02006 p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
02007 p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
02008 p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \
02009 p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \
02010 p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\
02011 virtual return_type Perform(const args_type& args) {\
02012 return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\
02013 Perform(this, args);\
02014 }\
02015 template <typename arg0_type, typename arg1_type, typename arg2_type, \
02016 typename arg3_type, typename arg4_type, typename arg5_type, \
02017 typename arg6_type, typename arg7_type, typename arg8_type, \
02018 typename arg9_type>\
02019 return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
02020 arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
02021 arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
02022 arg9_type arg9) const;\
02023 p0##_type p0;\
02024 p1##_type p1;\
02025 p2##_type p2;\
02026 p3##_type p3;\
02027 p4##_type p4;\
02028 p5##_type p5;\
02029 p6##_type p6;\
02030 p7##_type p7;\
02031 p8##_type p8;\
02032 p9##_type p9;\
02033 private:\
02034 GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
02035 };\
02036 template <typename F> operator ::testing::Action<F>() const {\
02037 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
02038 p6, p7, p8, p9));\
02039 }\
02040 p0##_type p0;\
02041 p1##_type p1;\
02042 p2##_type p2;\
02043 p3##_type p3;\
02044 p4##_type p4;\
02045 p5##_type p5;\
02046 p6##_type p6;\
02047 p7##_type p7;\
02048 p8##_type p8;\
02049 p9##_type p9;\
02050 private:\
02051 GTEST_DISALLOW_ASSIGN_(name##ActionP10);\
02052 };\
02053 template <typename p0##_type, typename p1##_type, typename p2##_type, \
02054 typename p3##_type, typename p4##_type, typename p5##_type, \
02055 typename p6##_type, typename p7##_type, typename p8##_type, \
02056 typename p9##_type>\
02057 inline name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, \
02058 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
02059 p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
02060 p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
02061 p9##_type p9) {\
02062 return name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, \
02063 p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \
02064 p1, p2, p3, p4, p5, p6, p7, p8, p9);\
02065 }\
02066 template <typename p0##_type, typename p1##_type, typename p2##_type, \
02067 typename p3##_type, typename p4##_type, typename p5##_type, \
02068 typename p6##_type, typename p7##_type, typename p8##_type, \
02069 typename p9##_type>\
02070 template <typename F>\
02071 template <typename arg0_type, typename arg1_type, typename arg2_type, \
02072 typename arg3_type, typename arg4_type, typename arg5_type, \
02073 typename arg6_type, typename arg7_type, typename arg8_type, \
02074 typename arg9_type>\
02075 typename ::testing::internal::Function<F>::Result\
02076 name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
02077 p5##_type, p6##_type, p7##_type, p8##_type, \
02078 p9##_type>::gmock_Impl<F>::gmock_PerformImpl(\
02079 GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
02080
02081 namespace testing {
02082
02083
02084
02085
02086
02087
02088
02089 #ifdef _MSC_VER
02090 # pragma warning(push)
02091 # pragma warning(disable:4100)
02092 #endif
02093
02094
02095
02096
02097
02098
02099
02100
02101
02102
02103
02104
02105
02106
02107
02108
02109
02110
02111
02112
02113
02114
02115
02116
02117
02118
02119
02120
02121
02122
02123
02124 namespace internal {
02125 namespace invoke_argument {
02126
02127
02128
02129 struct AdlTag {};
02130
02131
02132
02133
02134
02135
02136 template <typename R, typename F>
02137 R InvokeArgumentAdl(AdlTag, F f) {
02138 return f();
02139 }
02140 template <typename R, typename F, typename A1>
02141 R InvokeArgumentAdl(AdlTag, F f, A1 a1) {
02142 return f(a1);
02143 }
02144 template <typename R, typename F, typename A1, typename A2>
02145 R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2) {
02146 return f(a1, a2);
02147 }
02148 template <typename R, typename F, typename A1, typename A2, typename A3>
02149 R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3) {
02150 return f(a1, a2, a3);
02151 }
02152 template <typename R, typename F, typename A1, typename A2, typename A3,
02153 typename A4>
02154 R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4) {
02155 return f(a1, a2, a3, a4);
02156 }
02157 template <typename R, typename F, typename A1, typename A2, typename A3,
02158 typename A4, typename A5>
02159 R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {
02160 return f(a1, a2, a3, a4, a5);
02161 }
02162 template <typename R, typename F, typename A1, typename A2, typename A3,
02163 typename A4, typename A5, typename A6>
02164 R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {
02165 return f(a1, a2, a3, a4, a5, a6);
02166 }
02167 template <typename R, typename F, typename A1, typename A2, typename A3,
02168 typename A4, typename A5, typename A6, typename A7>
02169 R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
02170 A7 a7) {
02171 return f(a1, a2, a3, a4, a5, a6, a7);
02172 }
02173 template <typename R, typename F, typename A1, typename A2, typename A3,
02174 typename A4, typename A5, typename A6, typename A7, typename A8>
02175 R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
02176 A7 a7, A8 a8) {
02177 return f(a1, a2, a3, a4, a5, a6, a7, a8);
02178 }
02179 template <typename R, typename F, typename A1, typename A2, typename A3,
02180 typename A4, typename A5, typename A6, typename A7, typename A8,
02181 typename A9>
02182 R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
02183 A7 a7, A8 a8, A9 a9) {
02184 return f(a1, a2, a3, a4, a5, a6, a7, a8, a9);
02185 }
02186 template <typename R, typename F, typename A1, typename A2, typename A3,
02187 typename A4, typename A5, typename A6, typename A7, typename A8,
02188 typename A9, typename A10>
02189 R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,
02190 A7 a7, A8 a8, A9 a9, A10 a10) {
02191 return f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
02192 }
02193 }
02194 }
02195
02196 ACTION_TEMPLATE(InvokeArgument,
02197 HAS_1_TEMPLATE_PARAMS(int, k),
02198 AND_0_VALUE_PARAMS()) {
02199 using internal::invoke_argument::InvokeArgumentAdl;
02200 return InvokeArgumentAdl<return_type>(
02201 internal::invoke_argument::AdlTag(),
02202 ::testing::get<k>(args));
02203 }
02204
02205 ACTION_TEMPLATE(InvokeArgument,
02206 HAS_1_TEMPLATE_PARAMS(int, k),
02207 AND_1_VALUE_PARAMS(p0)) {
02208 using internal::invoke_argument::InvokeArgumentAdl;
02209 return InvokeArgumentAdl<return_type>(
02210 internal::invoke_argument::AdlTag(),
02211 ::testing::get<k>(args), p0);
02212 }
02213
02214 ACTION_TEMPLATE(InvokeArgument,
02215 HAS_1_TEMPLATE_PARAMS(int, k),
02216 AND_2_VALUE_PARAMS(p0, p1)) {
02217 using internal::invoke_argument::InvokeArgumentAdl;
02218 return InvokeArgumentAdl<return_type>(
02219 internal::invoke_argument::AdlTag(),
02220 ::testing::get<k>(args), p0, p1);
02221 }
02222
02223 ACTION_TEMPLATE(InvokeArgument,
02224 HAS_1_TEMPLATE_PARAMS(int, k),
02225 AND_3_VALUE_PARAMS(p0, p1, p2)) {
02226 using internal::invoke_argument::InvokeArgumentAdl;
02227 return InvokeArgumentAdl<return_type>(
02228 internal::invoke_argument::AdlTag(),
02229 ::testing::get<k>(args), p0, p1, p2);
02230 }
02231
02232 ACTION_TEMPLATE(InvokeArgument,
02233 HAS_1_TEMPLATE_PARAMS(int, k),
02234 AND_4_VALUE_PARAMS(p0, p1, p2, p3)) {
02235 using internal::invoke_argument::InvokeArgumentAdl;
02236 return InvokeArgumentAdl<return_type>(
02237 internal::invoke_argument::AdlTag(),
02238 ::testing::get<k>(args), p0, p1, p2, p3);
02239 }
02240
02241 ACTION_TEMPLATE(InvokeArgument,
02242 HAS_1_TEMPLATE_PARAMS(int, k),
02243 AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) {
02244 using internal::invoke_argument::InvokeArgumentAdl;
02245 return InvokeArgumentAdl<return_type>(
02246 internal::invoke_argument::AdlTag(),
02247 ::testing::get<k>(args), p0, p1, p2, p3, p4);
02248 }
02249
02250 ACTION_TEMPLATE(InvokeArgument,
02251 HAS_1_TEMPLATE_PARAMS(int, k),
02252 AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) {
02253 using internal::invoke_argument::InvokeArgumentAdl;
02254 return InvokeArgumentAdl<return_type>(
02255 internal::invoke_argument::AdlTag(),
02256 ::testing::get<k>(args), p0, p1, p2, p3, p4, p5);
02257 }
02258
02259 ACTION_TEMPLATE(InvokeArgument,
02260 HAS_1_TEMPLATE_PARAMS(int, k),
02261 AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) {
02262 using internal::invoke_argument::InvokeArgumentAdl;
02263 return InvokeArgumentAdl<return_type>(
02264 internal::invoke_argument::AdlTag(),
02265 ::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6);
02266 }
02267
02268 ACTION_TEMPLATE(InvokeArgument,
02269 HAS_1_TEMPLATE_PARAMS(int, k),
02270 AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) {
02271 using internal::invoke_argument::InvokeArgumentAdl;
02272 return InvokeArgumentAdl<return_type>(
02273 internal::invoke_argument::AdlTag(),
02274 ::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7);
02275 }
02276
02277 ACTION_TEMPLATE(InvokeArgument,
02278 HAS_1_TEMPLATE_PARAMS(int, k),
02279 AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) {
02280 using internal::invoke_argument::InvokeArgumentAdl;
02281 return InvokeArgumentAdl<return_type>(
02282 internal::invoke_argument::AdlTag(),
02283 ::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8);
02284 }
02285
02286 ACTION_TEMPLATE(InvokeArgument,
02287 HAS_1_TEMPLATE_PARAMS(int, k),
02288 AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) {
02289 using internal::invoke_argument::InvokeArgumentAdl;
02290 return InvokeArgumentAdl<return_type>(
02291 internal::invoke_argument::AdlTag(),
02292 ::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
02293 }
02294
02295
02296
02297
02298
02299
02300 ACTION_TEMPLATE(ReturnNew,
02301 HAS_1_TEMPLATE_PARAMS(typename, T),
02302 AND_0_VALUE_PARAMS()) {
02303 return new T();
02304 }
02305
02306 ACTION_TEMPLATE(ReturnNew,
02307 HAS_1_TEMPLATE_PARAMS(typename, T),
02308 AND_1_VALUE_PARAMS(p0)) {
02309 return new T(p0);
02310 }
02311
02312 ACTION_TEMPLATE(ReturnNew,
02313 HAS_1_TEMPLATE_PARAMS(typename, T),
02314 AND_2_VALUE_PARAMS(p0, p1)) {
02315 return new T(p0, p1);
02316 }
02317
02318 ACTION_TEMPLATE(ReturnNew,
02319 HAS_1_TEMPLATE_PARAMS(typename, T),
02320 AND_3_VALUE_PARAMS(p0, p1, p2)) {
02321 return new T(p0, p1, p2);
02322 }
02323
02324 ACTION_TEMPLATE(ReturnNew,
02325 HAS_1_TEMPLATE_PARAMS(typename, T),
02326 AND_4_VALUE_PARAMS(p0, p1, p2, p3)) {
02327 return new T(p0, p1, p2, p3);
02328 }
02329
02330 ACTION_TEMPLATE(ReturnNew,
02331 HAS_1_TEMPLATE_PARAMS(typename, T),
02332 AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) {
02333 return new T(p0, p1, p2, p3, p4);
02334 }
02335
02336 ACTION_TEMPLATE(ReturnNew,
02337 HAS_1_TEMPLATE_PARAMS(typename, T),
02338 AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) {
02339 return new T(p0, p1, p2, p3, p4, p5);
02340 }
02341
02342 ACTION_TEMPLATE(ReturnNew,
02343 HAS_1_TEMPLATE_PARAMS(typename, T),
02344 AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) {
02345 return new T(p0, p1, p2, p3, p4, p5, p6);
02346 }
02347
02348 ACTION_TEMPLATE(ReturnNew,
02349 HAS_1_TEMPLATE_PARAMS(typename, T),
02350 AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) {
02351 return new T(p0, p1, p2, p3, p4, p5, p6, p7);
02352 }
02353
02354 ACTION_TEMPLATE(ReturnNew,
02355 HAS_1_TEMPLATE_PARAMS(typename, T),
02356 AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) {
02357 return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8);
02358 }
02359
02360 ACTION_TEMPLATE(ReturnNew,
02361 HAS_1_TEMPLATE_PARAMS(typename, T),
02362 AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) {
02363 return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
02364 }
02365
02366 #ifdef _MSC_VER
02367 # pragma warning(pop)
02368 #endif
02369
02370 }
02371
02372
02373
02374
02375 #include "gmock/internal/custom/gmock-generated-actions.h"
02376
02377 #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_