[Mockpp-commits] mockpp/mockpp/chaining gen_chainablemethod_N.pl,1.6,1.7 ChainableMockMethod6.h,1.7,
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-11-19 09:18:49
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11576/mockpp/chaining Modified Files: gen_chainablemethod_N.pl ChainableMockMethod6.h ChainableMockMethod5.h ChainableMockMethod4.h ChainableMockMethod3.h ChainableMockMethod2.h ChainableMockMethod1.h ChainableMockMethod0.h Log Message: fix warnings with gcc-3.3 Index: ChainableMockMethod6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod6.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChainableMockMethod6.h 18 Nov 2005 08:49:17 -0000 1.7 +++ ChainableMockMethod6.h 19 Nov 2005 09:18:40 -0000 1.8 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> +template <typename RT, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class ChainableMockMethod6Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder6<R, Invocation6<P1, P2, P3, P4, P5, P6> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder6<RT, Invocation6<P1, P2, P3, P4, P5, P6> > > { public: typedef Invocation6<P1, P2, P3, P4, P5, P6> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder6<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod6Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,32 +88,34 @@ /** Set up a chainable mock method expectations with 6 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> +template <typename RT, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class ChainableMockMethod6 - : public ChainableMockMethod6Common<R, P1, P2, P3, P4, P5, P6> + : public ChainableMockMethod6Common<RT, P1, P2, P3, P4, P5, P6> { public: - typedef typename ChainableMockMethod6Common<R, P1, P2, P3, P4, P5, P6>::InvocationType InvocationType; + typedef typename ChainableMockMethod6Common<RT, P1, P2, P3, P4, P5, P6>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod6(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod6Common<R, P1, P2, P3, P4, P5, P6>(name, parent) + : ChainableMockMethod6Common<RT, P1, P2, P3, P4, P5, P6>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 * @param p4 mock method parameter 4 * @param p5 mock method parameter 5 * @param p6 mock method parameter 6 + * @return the calculated value */ - R forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) const + RT forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) const { InvocationType inv(this->getMethodName(), p1, p2, p3, p4, p5, p6); return this->getCoreMock().invoke(inv); @@ -142,7 +144,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 Index: ChainableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod2.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod2.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod2.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1, typename P2> +template <typename RT, typename P1, typename P2> class ChainableMockMethod2Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder2<R, Invocation2<P1, P2> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder2<RT, Invocation2<P1, P2> > > { public: typedef Invocation2<P1, P2> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder2<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod2Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,28 +88,30 @@ /** Set up a chainable mock method expectations with 2 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1, typename P2> +template <typename RT, typename P1, typename P2> class ChainableMockMethod2 - : public ChainableMockMethod2Common<R, P1, P2> + : public ChainableMockMethod2Common<RT, P1, P2> { public: - typedef typename ChainableMockMethod2Common<R, P1, P2>::InvocationType InvocationType; + typedef typename ChainableMockMethod2Common<RT, P1, P2>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod2(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod2Common<R, P1, P2>(name, parent) + : ChainableMockMethod2Common<RT, P1, P2>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 + * @return the calculated value */ - R forward(const P1 &p1, const P2 &p2) const + RT forward(const P1 &p1, const P2 &p2) const { InvocationType inv(this->getMethodName(), p1, p2); return this->getCoreMock().invoke(inv); @@ -138,7 +140,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 */ Index: ChainableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod3.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod3.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod3.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1, typename P2, typename P3> +template <typename RT, typename P1, typename P2, typename P3> class ChainableMockMethod3Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder3<R, Invocation3<P1, P2, P3> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder3<RT, Invocation3<P1, P2, P3> > > { public: typedef Invocation3<P1, P2, P3> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder3<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod3Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,29 +88,31 @@ /** Set up a chainable mock method expectations with 3 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1, typename P2, typename P3> +template <typename RT, typename P1, typename P2, typename P3> class ChainableMockMethod3 - : public ChainableMockMethod3Common<R, P1, P2, P3> + : public ChainableMockMethod3Common<RT, P1, P2, P3> { public: - typedef typename ChainableMockMethod3Common<R, P1, P2, P3>::InvocationType InvocationType; + typedef typename ChainableMockMethod3Common<RT, P1, P2, P3>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod3(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod3Common<R, P1, P2, P3>(name, parent) + : ChainableMockMethod3Common<RT, P1, P2, P3>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 + * @return the calculated value */ - R forward(const P1 &p1, const P2 &p2, const P3 &p3) const + RT forward(const P1 &p1, const P2 &p2, const P3 &p3) const { InvocationType inv(this->getMethodName(), p1, p2, p3); return this->getCoreMock().invoke(inv); @@ -139,7 +141,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 Index: ChainableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod4.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod4.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod4.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1, typename P2, typename P3, typename P4> +template <typename RT, typename P1, typename P2, typename P3, typename P4> class ChainableMockMethod4Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder4<R, Invocation4<P1, P2, P3, P4> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder4<RT, Invocation4<P1, P2, P3, P4> > > { public: typedef Invocation4<P1, P2, P3, P4> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder4<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod4Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,30 +88,32 @@ /** Set up a chainable mock method expectations with 4 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1, typename P2, typename P3, typename P4> +template <typename RT, typename P1, typename P2, typename P3, typename P4> class ChainableMockMethod4 - : public ChainableMockMethod4Common<R, P1, P2, P3, P4> + : public ChainableMockMethod4Common<RT, P1, P2, P3, P4> { public: - typedef typename ChainableMockMethod4Common<R, P1, P2, P3, P4>::InvocationType InvocationType; + typedef typename ChainableMockMethod4Common<RT, P1, P2, P3, P4>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod4(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod4Common<R, P1, P2, P3, P4>(name, parent) + : ChainableMockMethod4Common<RT, P1, P2, P3, P4>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 * @param p4 mock method parameter 4 + * @return the calculated value */ - R forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4) const + RT forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4) const { InvocationType inv(this->getMethodName(), p1, p2, p3, p4); return this->getCoreMock().invoke(inv); @@ -140,7 +142,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 Index: ChainableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod0.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod0.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod0.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R> +template <typename RT> class ChainableMockMethod0Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder0<R, Invocation0> > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder0<RT, Invocation0> > { public: typedef Invocation0 InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder0<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod0Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,26 +88,28 @@ /** Set up a chainable mock method expectations with 0 parameters. * @ingroup grp_chainer */ -template <typename R> +template <typename RT> class ChainableMockMethod0 - : public ChainableMockMethod0Common<R> + : public ChainableMockMethod0Common<RT> { public: - typedef typename ChainableMockMethod0Common<R>::InvocationType InvocationType; + typedef typename ChainableMockMethod0Common<RT>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod0(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod0Common<R>(name, parent) + : ChainableMockMethod0Common<RT>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. + * @return the calculated value */ - R forward() const + RT forward() const { InvocationType inv(this->getMethodName()); return this->getCoreMock().invoke(inv); @@ -136,7 +138,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. */ void forward() const { Index: ChainableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod5.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod5.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod5.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5> +template <typename RT, typename P1, typename P2, typename P3, typename P4, typename P5> class ChainableMockMethod5Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder5<R, Invocation5<P1, P2, P3, P4, P5> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder5<RT, Invocation5<P1, P2, P3, P4, P5> > > { public: typedef Invocation5<P1, P2, P3, P4, P5> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder5<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod5Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,31 +88,33 @@ /** Set up a chainable mock method expectations with 5 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5> +template <typename RT, typename P1, typename P2, typename P3, typename P4, typename P5> class ChainableMockMethod5 - : public ChainableMockMethod5Common<R, P1, P2, P3, P4, P5> + : public ChainableMockMethod5Common<RT, P1, P2, P3, P4, P5> { public: - typedef typename ChainableMockMethod5Common<R, P1, P2, P3, P4, P5>::InvocationType InvocationType; + typedef typename ChainableMockMethod5Common<RT, P1, P2, P3, P4, P5>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod5(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod5Common<R, P1, P2, P3, P4, P5>(name, parent) + : ChainableMockMethod5Common<RT, P1, P2, P3, P4, P5>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 * @param p4 mock method parameter 4 * @param p5 mock method parameter 5 + * @return the calculated value */ - R forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5) const + RT forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5) const { InvocationType inv(this->getMethodName(), p1, p2, p3, p4, p5); return this->getCoreMock().invoke(inv); @@ -141,7 +143,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 Index: gen_chainablemethod_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/gen_chainablemethod_N.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- gen_chainablemethod_N.pl 18 Nov 2005 08:49:17 -0000 1.6 +++ gen_chainablemethod_N.pl 19 Nov 2005 09:18:39 -0000 1.7 @@ -170,19 +170,19 @@ * \@ingroup grp_chainer * \@internal */ -template <typename R" . $templateParms_colon . "> +template <typename RT" . $templateParms_colon . "> class ChainableMockMethod" . $numArgs . "Common - : public ChainableMockMethodCommon<R>"; + : public ChainableMockMethodCommon<RT>"; if ($numArgs > 0) { print OUT " - , public ChainingMockBuilder <ArgumentsMatchBuilder" . $numArgs . "<R, Invocation" . $numArgs . "<" . $templateArgs . "> > >"; + , public ChainingMockBuilder <ArgumentsMatchBuilder" . $numArgs . "<RT, Invocation" . $numArgs . "<" . $templateArgs . "> > >"; } else { print OUT " - , public ChainingMockBuilder <ArgumentsMatchBuilder0<R, Invocation0> >"; + , public ChainingMockBuilder <ArgumentsMatchBuilder0<RT, Invocation0> >"; } print OUT " @@ -203,17 +203,17 @@ print OUT " - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder" . $numArgs . "<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * \@param name human readable description about the expectation * \@param parent parent chainable mock object */ ChainableMockMethod" . $numArgs . "Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR(\"/coreMock\"), this) { @@ -238,31 +238,33 @@ /** Set up a chainable mock method expectations with " . $numArgs . " parameters. * \@ingroup grp_chainer */ -template <typename R" . $templateParms_colon . "> +template <typename RT" . $templateParms_colon . "> class ChainableMockMethod" . $numArgs . " - : public ChainableMockMethod" . $numArgs . "Common<R" . $templateArgs_colon . "> + : public ChainableMockMethod" . $numArgs . "Common<RT" . $templateArgs_colon . "> { public: - typedef typename ChainableMockMethod" . $numArgs . "Common<R" . $templateArgs_colon . ">::InvocationType InvocationType; + typedef typename ChainableMockMethod" . $numArgs . "Common<RT" . $templateArgs_colon . ">::InvocationType InvocationType; /** Constructs the mock object. * \@param name human readable description about the expectation * \@param parent parent chainable mock object */ ChainableMockMethod" . $numArgs . "(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod" . $numArgs . "Common<R" . $templateArgs_colon . ">(name, parent) + : ChainableMockMethod" . $numArgs . "Common<RT" . $templateArgs_colon . ">(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code."; + /** Actually verifies the mocked method. + * Must be called by the client code."; for($p = 1; $p <= $numArgs; ++$p) { print OUT " * \@param p" . $p . " mock method parameter " . $p; } print OUT " + * \@return the calculated value */ - R forward(" . $parms . ") const + RT forward(" . $parms . ") const { InvocationType inv(this->getMethodName()" . $args_colon . "); return this->getCoreMock().invoke(inv); @@ -303,7 +305,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code."; + /** Actually verifies the mocked method. + * Must be called by the client code."; for($p = 1; $p <= $numArgs; ++$p) { print OUT " * \@param p" . $p . " mock method parameter " . $p; } Index: ChainableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod1.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod1.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod1.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1> +template <typename RT, typename P1> class ChainableMockMethod1Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder1<R, Invocation1<P1> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder1<RT, Invocation1<P1> > > { public: typedef Invocation1<P1> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder1<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod1Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,27 +88,29 @@ /** Set up a chainable mock method expectations with 1 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1> +template <typename RT, typename P1> class ChainableMockMethod1 - : public ChainableMockMethod1Common<R, P1> + : public ChainableMockMethod1Common<RT, P1> { public: - typedef typename ChainableMockMethod1Common<R, P1>::InvocationType InvocationType; + typedef typename ChainableMockMethod1Common<RT, P1>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod1(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod1Common<R, P1>(name, parent) + : ChainableMockMethod1Common<RT, P1>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 + * @return the calculated value */ - R forward(const P1 &p1) const + RT forward(const P1 &p1) const { InvocationType inv(this->getMethodName(), p1); return this->getCoreMock().invoke(inv); @@ -137,7 +139,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 */ void forward(const P1 &p1) const |