Update of /cvsroot/mockpp/mockpp/mockpp/builder
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11255/mockpp/builder
Modified Files:
ArgumentsMatchBuilderN.h
Log Message:
provide up to 6 parameters
Index: ArgumentsMatchBuilderN.h
===================================================================
RCS file: /cvsroot/mockpp/mockpp/mockpp/builder/ArgumentsMatchBuilderN.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ArgumentsMatchBuilderN.h 28 Oct 2005 20:35:13 -0000 1.2
+++ ArgumentsMatchBuilderN.h 29 Oct 2005 18:17:30 -0000 1.3
@@ -277,6 +277,63 @@
};
+/** Build a matcher for an invocation with 6 argument.
+ * @ingroup grp_chainer
+ * @internal
+ */
+template <typename R, // Returntype
+ typename I> // Invocation
+class ArgumentsMatchBuilder6 : public MatchBuilder<R,I>
+{
+ public:
+
+ typedef R ReturnType;
+ typedef I InvocationType;
+ typedef typename I::T1Type P1;
+ typedef typename I::T2Type P2;
+ typedef typename I::T3Type P3;
+ typedef typename I::T4Type P4;
+ typedef typename I::T5Type P5;
+ typedef typename I::T6Type P6;
+
+ typedef ConstraintSet6<P1, P2, P3, P4, P5, P6> ConstraintSetType;
+
+ /** Adds another matcher.
+ * @param matcher the matcher object
+ * @return the builder object
+ */
+ virtual MatchBuilder<R, I>& addMatcher( const MatcherHolder<I> &matcher ) = 0;
+
+ /** Indicate a matcher for 6 arguments.
+ * @ingroup grp_chainer
+ * @param cons1 pointer to the constraint for method parameter 1
+ * @param cons2 pointer to the constraint for method parameter 2
+ * @param cons3 pointer to the constraint for method parameter 3
+ * @param cons4 pointer to the constraint for method parameter 4
+ * @param cons5 pointer to the constraint for method parameter 5
+ * @param cons6 pointer to the constraint for method parameter 6
+ * @return the builder object
+ */
+ MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1
+ , const ConstraintHolder<P2> &p2
+ , const ConstraintHolder<P3> &p3
+ , const ConstraintHolder<P4> &p4
+ , const ConstraintHolder<P5> &p5
+ , const ConstraintHolder<P6> &p6 )
+ {
+ return with_cs( ConstraintSetType( p1, p2, p3, p4, p5, p6 ) );
+ }
+
+ protected:
+
+ /** Indicate a matcher for a set of arguments.
+ * @param constraintset constraint set
+ * @return the builder object
+ */
+ virtual MatchBuilder<R, I>& with_cs( const ConstraintSetType &constraintset ) = 0;
+};
+
+
} // ns mockpp
|