00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef MOCKPP_ReturnAndTrigger_H
00031 #define MOCKPP_ReturnAndTrigger_H
00032
00033 #include <mockpp/constraint/TriggeredConstraint.h>
00034
00035 #include <mockpp/stub/ReturnAndTriggerStub.h>
00036 #include <mockpp/stub/TriggerStub.h>
00037
00038
00039 MOCKPP_NS_START
00040
00041
00049 template < typename R
00050 , typename TC1
00051 >
00052 typename TypelessStub<R>::AP returnValueAndTrigger( const R &o
00053 , TriggeredConstraint<TC1> *tc1
00054 )
00055 {
00056 return new ReturnAndTriggerStub1<R, TC1>(
00057 o
00058 , tc1
00059 );
00060 }
00061
00062
00069 template < typename TC1
00070 >
00071 typename TypelessStub<void>::AP trigger( TriggeredConstraint<TC1> *tc1
00072 )
00073 {
00074 return new TriggerStub1<TC1>
00075 ( tc1);
00076 }
00077
00078
00087 template < typename R
00088 , typename TC1
00089 , typename TC2
00090 >
00091 typename TypelessStub<R>::AP returnValueAndTrigger( const R &o
00092 , TriggeredConstraint<TC1> *tc1
00093 , TriggeredConstraint<TC2> *tc2
00094 )
00095 {
00096 return new ReturnAndTriggerStub2<R, TC1, TC2>(
00097 o
00098 , tc1
00099 , tc2
00100 );
00101 }
00102
00103
00111 template < typename TC1
00112 , typename TC2
00113 >
00114 typename TypelessStub<void>::AP trigger( TriggeredConstraint<TC1> *tc1
00115 , TriggeredConstraint<TC2> *tc2
00116 )
00117 {
00118 return new TriggerStub2<TC1, TC2>
00119 ( tc1
00120 , tc2);
00121 }
00122
00123
00133 template < typename R
00134 , typename TC1
00135 , typename TC2
00136 , typename TC3
00137 >
00138 typename TypelessStub<R>::AP returnValueAndTrigger( const R &o
00139 , TriggeredConstraint<TC1> *tc1
00140 , TriggeredConstraint<TC2> *tc2
00141 , TriggeredConstraint<TC3> *tc3
00142 )
00143 {
00144 return new ReturnAndTriggerStub3<R, TC1, TC2, TC3>(
00145 o
00146 , tc1
00147 , tc2
00148 , tc3
00149 );
00150 }
00151
00152
00161 template < typename TC1
00162 , typename TC2
00163 , typename TC3
00164 >
00165 typename TypelessStub<void>::AP trigger( TriggeredConstraint<TC1> *tc1
00166 , TriggeredConstraint<TC2> *tc2
00167 , TriggeredConstraint<TC3> *tc3
00168 )
00169 {
00170 return new TriggerStub3<TC1, TC2, TC3>
00171 ( tc1
00172 , tc2
00173 , tc3);
00174 }
00175
00176
00187 template < typename R
00188 , typename TC1
00189 , typename TC2
00190 , typename TC3
00191 , typename TC4
00192 >
00193 typename TypelessStub<R>::AP returnValueAndTrigger( const R &o
00194 , TriggeredConstraint<TC1> *tc1
00195 , TriggeredConstraint<TC2> *tc2
00196 , TriggeredConstraint<TC3> *tc3
00197 , TriggeredConstraint<TC4> *tc4
00198 )
00199 {
00200 return new ReturnAndTriggerStub4<R, TC1, TC2, TC3, TC4>(
00201 o
00202 , tc1
00203 , tc2
00204 , tc3
00205 , tc4
00206 );
00207 }
00208
00209
00219 template < typename TC1
00220 , typename TC2
00221 , typename TC3
00222 , typename TC4
00223 >
00224 typename TypelessStub<void>::AP trigger( TriggeredConstraint<TC1> *tc1
00225 , TriggeredConstraint<TC2> *tc2
00226 , TriggeredConstraint<TC3> *tc3
00227 , TriggeredConstraint<TC4> *tc4
00228 )
00229 {
00230 return new TriggerStub4<TC1, TC2, TC3, TC4>
00231 ( tc1
00232 , tc2
00233 , tc3
00234 , tc4);
00235 }
00236
00237
00249 template < typename R
00250 , typename TC1
00251 , typename TC2
00252 , typename TC3
00253 , typename TC4
00254 , typename TC5
00255 >
00256 typename TypelessStub<R>::AP returnValueAndTrigger( const R &o
00257 , TriggeredConstraint<TC1> *tc1
00258 , TriggeredConstraint<TC2> *tc2
00259 , TriggeredConstraint<TC3> *tc3
00260 , TriggeredConstraint<TC4> *tc4
00261 , TriggeredConstraint<TC5> *tc5
00262 )
00263 {
00264 return new ReturnAndTriggerStub5<R, TC1, TC2, TC3, TC4, TC5>(
00265 o
00266 , tc1
00267 , tc2
00268 , tc3
00269 , tc4
00270 , tc5
00271 );
00272 }
00273
00274
00285 template < typename TC1
00286 , typename TC2
00287 , typename TC3
00288 , typename TC4
00289 , typename TC5
00290 >
00291 typename TypelessStub<void>::AP trigger( TriggeredConstraint<TC1> *tc1
00292 , TriggeredConstraint<TC2> *tc2
00293 , TriggeredConstraint<TC3> *tc3
00294 , TriggeredConstraint<TC4> *tc4
00295 , TriggeredConstraint<TC5> *tc5
00296 )
00297 {
00298 return new TriggerStub5<TC1, TC2, TC3, TC4, TC5>
00299 ( tc1
00300 , tc2
00301 , tc3
00302 , tc4
00303 , tc5);
00304 }
00305
00306
00319 template < typename R
00320 , typename TC1
00321 , typename TC2
00322 , typename TC3
00323 , typename TC4
00324 , typename TC5
00325 , typename TC6
00326 >
00327 typename TypelessStub<R>::AP returnValueAndTrigger( const R &o
00328 , TriggeredConstraint<TC1> *tc1
00329 , TriggeredConstraint<TC2> *tc2
00330 , TriggeredConstraint<TC3> *tc3
00331 , TriggeredConstraint<TC4> *tc4
00332 , TriggeredConstraint<TC5> *tc5
00333 , TriggeredConstraint<TC6> *tc6
00334 )
00335 {
00336 return new ReturnAndTriggerStub6<R, TC1, TC2, TC3, TC4, TC5, TC6>(
00337 o
00338 , tc1
00339 , tc2
00340 , tc3
00341 , tc4
00342 , tc5
00343 , tc6
00344 );
00345 }
00346
00347
00359 template < typename TC1
00360 , typename TC2
00361 , typename TC3
00362 , typename TC4
00363 , typename TC5
00364 , typename TC6
00365 >
00366 typename TypelessStub<void>::AP trigger( TriggeredConstraint<TC1> *tc1
00367 , TriggeredConstraint<TC2> *tc2
00368 , TriggeredConstraint<TC3> *tc3
00369 , TriggeredConstraint<TC4> *tc4
00370 , TriggeredConstraint<TC5> *tc5
00371 , TriggeredConstraint<TC6> *tc6
00372 )
00373 {
00374 return new TriggerStub6<TC1, TC2, TC3, TC4, TC5, TC6>
00375 ( tc1
00376 , tc2
00377 , tc3
00378 , tc4
00379 , tc5
00380 , tc6);
00381 }
00382
00383
00384
00385
00386 MOCKPP_NS_END
00387
00388
00389 #endif // MOCKPP_ReturnAndTrigger_H
00390