00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef MOCKPP_ARGUMENTSMATCHBUILDER_N_H
00032 #define MOCKPP_ARGUMENTSMATCHBUILDER_N_H
00033
00034
00035
00036
00037 MOCKPP_NS_START
00038
00039
00044 template <typename R,
00045 typename I>
00046 class ArgumentsMatchBuilder1 : public MatchBuilder<R,I>
00047 {
00048 public:
00049
00050 typedef R ReturnType;
00051 typedef I InvocationType;
00052 typedef typename I::T1Type P1;
00053
00054 typedef ConstraintSet1<P1> ConstraintSetType;
00055
00060 virtual MatchBuilder<R, I>& addMatcher( const MatcherHolder<I> &matcher ) = 0;
00061
00067 MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1 )
00068 {
00069 return with_cs( ConstraintSetType( p1 ) );
00070 }
00071
00072 protected:
00073
00078 virtual MatchBuilder<R, I>& with_cs( const ConstraintSetType &constraintset ) = 0;
00079 };
00080
00081
00086 template <typename R,
00087 typename I>
00088 class ArgumentsMatchBuilder2 : public MatchBuilder<R,I>
00089 {
00090 public:
00091
00092 typedef R ReturnType;
00093 typedef I InvocationType;
00094 typedef typename I::T1Type P1;
00095 typedef typename I::T2Type P2;
00096
00097 typedef ConstraintSet2<P1, P2> ConstraintSetType;
00098
00103 virtual MatchBuilder<R, I>& addMatcher( const MatcherHolder<I> &matcher ) = 0;
00104
00111 MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1
00112 , const ConstraintHolder<P2> &p2 )
00113 {
00114 return with_cs( ConstraintSetType( p1, p2 ) );
00115 }
00116
00117 protected:
00118
00123 virtual MatchBuilder<R, I>& with_cs( const ConstraintSetType &constraintset ) = 0;
00124 };
00125
00126
00131 template <typename R,
00132 typename I>
00133 class ArgumentsMatchBuilder3 : public MatchBuilder<R,I>
00134 {
00135 public:
00136
00137 typedef R ReturnType;
00138 typedef I InvocationType;
00139 typedef typename I::T1Type P1;
00140 typedef typename I::T2Type P2;
00141 typedef typename I::T3Type P3;
00142
00143 typedef ConstraintSet3<P1, P2, P3> ConstraintSetType;
00144
00149 virtual MatchBuilder<R, I>& addMatcher( const MatcherHolder<I> &matcher ) = 0;
00150
00158 MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1
00159 , const ConstraintHolder<P2> &p2
00160 , const ConstraintHolder<P3> &p3 )
00161 {
00162 return with_cs( ConstraintSetType( p1, p2, p3 ) );
00163 }
00164
00165 protected:
00166
00171 virtual MatchBuilder<R, I>& with_cs( const ConstraintSetType &constraintset ) = 0;
00172 };
00173
00174
00179 template <typename R,
00180 typename I>
00181 class ArgumentsMatchBuilder4 : public MatchBuilder<R,I>
00182 {
00183 public:
00184
00185 typedef R ReturnType;
00186 typedef I InvocationType;
00187 typedef typename I::T1Type P1;
00188 typedef typename I::T2Type P2;
00189 typedef typename I::T3Type P3;
00190 typedef typename I::T4Type P4;
00191
00192 typedef ConstraintSet4<P1, P2, P3, P4> ConstraintSetType;
00193
00198 virtual MatchBuilder<R, I>& addMatcher( const MatcherHolder<I> &matcher ) = 0;
00199
00208 MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1
00209 , const ConstraintHolder<P2> &p2
00210 , const ConstraintHolder<P3> &p3
00211 , const ConstraintHolder<P4> &p4 )
00212 {
00213 return with_cs( ConstraintSetType( p1, p2, p3, p4 ) );
00214 }
00215
00216 protected:
00217
00222 virtual MatchBuilder<R, I>& with_cs( const ConstraintSetType &constraintset ) = 0;
00223 };
00224
00225
00230 template <typename R,
00231 typename I>
00232 class ArgumentsMatchBuilder5 : public MatchBuilder<R,I>
00233 {
00234 public:
00235
00236 typedef R ReturnType;
00237 typedef I InvocationType;
00238 typedef typename I::T1Type P1;
00239 typedef typename I::T2Type P2;
00240 typedef typename I::T3Type P3;
00241 typedef typename I::T4Type P4;
00242 typedef typename I::T5Type P5;
00243
00244 typedef ConstraintSet5<P1, P2, P3, P4, P5> ConstraintSetType;
00245
00250 virtual MatchBuilder<R, I>& addMatcher( const MatcherHolder<I> &matcher ) = 0;
00251
00261 MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1
00262 , const ConstraintHolder<P2> &p2
00263 , const ConstraintHolder<P3> &p3
00264 , const ConstraintHolder<P4> &p4
00265 , const ConstraintHolder<P5> &p5 )
00266 {
00267 return with_cs( ConstraintSetType( p1, p2, p3, p4, p5 ) );
00268 }
00269
00270 protected:
00271
00276 virtual MatchBuilder<R, I>& with_cs( const ConstraintSetType &constraintset ) = 0;
00277 };
00278
00279
00284 template <typename R,
00285 typename I>
00286 class ArgumentsMatchBuilder6 : public MatchBuilder<R,I>
00287 {
00288 public:
00289
00290 typedef R ReturnType;
00291 typedef I InvocationType;
00292 typedef typename I::T1Type P1;
00293 typedef typename I::T2Type P2;
00294 typedef typename I::T3Type P3;
00295 typedef typename I::T4Type P4;
00296 typedef typename I::T5Type P5;
00297 typedef typename I::T6Type P6;
00298
00299 typedef ConstraintSet6<P1, P2, P3, P4, P5, P6> ConstraintSetType;
00300
00305 virtual MatchBuilder<R, I>& addMatcher( const MatcherHolder<I> &matcher ) = 0;
00306
00317 MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1
00318 , const ConstraintHolder<P2> &p2
00319 , const ConstraintHolder<P3> &p3
00320 , const ConstraintHolder<P4> &p4
00321 , const ConstraintHolder<P5> &p5
00322 , const ConstraintHolder<P6> &p6 )
00323 {
00324 return with_cs( ConstraintSetType( p1, p2, p3, p4, p5, p6 ) );
00325 }
00326
00327 protected:
00328
00333 virtual MatchBuilder<R, I>& with_cs( const ConstraintSetType &constraintset ) = 0;
00334 };
00335
00336
00337
00338 MOCKPP_NS_END
00339
00340
00341 #endif // MOCKPP_ARGUMENTSMATCHBUILDER_N_H
00342