Thread: [Mockpp-commits] mockpp/mockpp/chaining ChainableMockMethod.h,1.9,1.10 ChainableMockMethod0.h,1.8,1.
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-11-18 08:49:25
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5776/mockpp/chaining Modified Files: ChainableMockMethod.h ChainableMockMethod0.h ChainableMockMethod1.h ChainableMockMethod2.h ChainableMockMethod3.h ChainableMockMethod4.h ChainableMockMethod5.h ChainableMockMethod6.h gen_chainablemethod_N.pl Log Message: docs Index: ChainableMockMethod6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod6.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ChainableMockMethod6.h 15 Nov 2005 19:42:04 -0000 1.6 +++ ChainableMockMethod6.h 18 Nov 2005 08:49:17 -0000 1.7 @@ -1,7 +1,7 @@ /** @file @brief Chainable Mock Method with 6 parameters. Generated with gen_chainablemethod_N.pl. - + $Id$ ***************************************************************************/ @@ -39,18 +39,19 @@ namespace mockpp { - + /** Common stuff to set up chainable mock method expectations with 6 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer + * @internal */ template <typename R, 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> > > +class ChainableMockMethod6Common + : public ChainableMockMethodCommon<R> + , public ChainingMockBuilder <ArgumentsMatchBuilder6<R, Invocation6<P1, P2, P3, P4, P5, P6> > > { public: - - typedef Invocation6<P1, P2, P3, P4, P5, P6> InvocationType; + + typedef Invocation6<P1, P2, P3, P4, P5, P6> InvocationType; typedef CoreMock<R, InvocationType> CoreMockType; typedef R ReturnType; @@ -85,10 +86,10 @@ /** Set up a chainable mock method expectations with 6 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> -class ChainableMockMethod6 +class ChainableMockMethod6 : public ChainableMockMethod6Common<R, P1, P2, P3, P4, P5, P6> { public: @@ -122,14 +123,14 @@ /** Set up a chainable mock method expectations with 6 parameters. * Partial specialisation for a void return value. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> -class ChainableMockMethod6<void, P1, P2, P3, P4, P5, P6> +class ChainableMockMethod6<void, P1, P2, P3, P4, P5, P6> : public ChainableMockMethod6Common<void, P1, P2, P3, P4, P5, P6> { public: - + typedef typename ChainableMockMethod6Common<void, P1, P2, P3, P4, P5, P6>::InvocationType InvocationType; /** Constructs the mock object. Index: ChainableMockMethod.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod.h 30 Oct 2005 13:54:52 -0000 1.9 +++ ChainableMockMethod.h 18 Nov 2005 08:49:17 -0000 1.10 @@ -41,6 +41,10 @@ namespace mockpp { +/** Common stuff to set up chainable mock method expectations + * @ingroup grp_controller + * @internal + */ template <typename R> class ChainableMockMethodCommon : public MockObject { Index: ChainableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod2.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ChainableMockMethod2.h 15 Nov 2005 19:42:04 -0000 1.8 +++ ChainableMockMethod2.h 18 Nov 2005 08:49:17 -0000 1.9 @@ -1,7 +1,7 @@ /** @file @brief Chainable Mock Method with 2 parameters. Generated with gen_chainablemethod_N.pl. - + $Id$ ***************************************************************************/ @@ -39,18 +39,19 @@ namespace mockpp { - + /** Common stuff to set up chainable mock method expectations with 2 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer + * @internal */ template <typename R, typename P1, typename P2> -class ChainableMockMethod2Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder2<R, Invocation2<P1, P2> > > +class ChainableMockMethod2Common + : public ChainableMockMethodCommon<R> + , public ChainingMockBuilder <ArgumentsMatchBuilder2<R, Invocation2<P1, P2> > > { public: - - typedef Invocation2<P1, P2> InvocationType; + + typedef Invocation2<P1, P2> InvocationType; typedef CoreMock<R, InvocationType> CoreMockType; typedef R ReturnType; @@ -85,10 +86,10 @@ /** Set up a chainable mock method expectations with 2 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename R, typename P1, typename P2> -class ChainableMockMethod2 +class ChainableMockMethod2 : public ChainableMockMethod2Common<R, P1, P2> { public: @@ -118,14 +119,14 @@ /** Set up a chainable mock method expectations with 2 parameters. * Partial specialisation for a void return value. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename P1, typename P2> -class ChainableMockMethod2<void, P1, P2> +class ChainableMockMethod2<void, P1, P2> : public ChainableMockMethod2Common<void, P1, P2> { public: - + typedef typename ChainableMockMethod2Common<void, P1, P2>::InvocationType InvocationType; /** Constructs the mock object. Index: ChainableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod3.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ChainableMockMethod3.h 15 Nov 2005 19:42:04 -0000 1.8 +++ ChainableMockMethod3.h 18 Nov 2005 08:49:17 -0000 1.9 @@ -1,7 +1,7 @@ /** @file @brief Chainable Mock Method with 3 parameters. Generated with gen_chainablemethod_N.pl. - + $Id$ ***************************************************************************/ @@ -39,18 +39,19 @@ namespace mockpp { - + /** Common stuff to set up chainable mock method expectations with 3 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer + * @internal */ template <typename R, typename P1, typename P2, typename P3> -class ChainableMockMethod3Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder3<R, Invocation3<P1, P2, P3> > > +class ChainableMockMethod3Common + : public ChainableMockMethodCommon<R> + , public ChainingMockBuilder <ArgumentsMatchBuilder3<R, Invocation3<P1, P2, P3> > > { public: - - typedef Invocation3<P1, P2, P3> InvocationType; + + typedef Invocation3<P1, P2, P3> InvocationType; typedef CoreMock<R, InvocationType> CoreMockType; typedef R ReturnType; @@ -85,10 +86,10 @@ /** Set up a chainable mock method expectations with 3 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename R, typename P1, typename P2, typename P3> -class ChainableMockMethod3 +class ChainableMockMethod3 : public ChainableMockMethod3Common<R, P1, P2, P3> { public: @@ -119,14 +120,14 @@ /** Set up a chainable mock method expectations with 3 parameters. * Partial specialisation for a void return value. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename P1, typename P2, typename P3> -class ChainableMockMethod3<void, P1, P2, P3> +class ChainableMockMethod3<void, P1, P2, P3> : public ChainableMockMethod3Common<void, P1, P2, P3> { public: - + typedef typename ChainableMockMethod3Common<void, P1, P2, P3>::InvocationType InvocationType; /** Constructs the mock object. Index: ChainableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod4.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ChainableMockMethod4.h 15 Nov 2005 19:42:04 -0000 1.8 +++ ChainableMockMethod4.h 18 Nov 2005 08:49:17 -0000 1.9 @@ -1,7 +1,7 @@ /** @file @brief Chainable Mock Method with 4 parameters. Generated with gen_chainablemethod_N.pl. - + $Id$ ***************************************************************************/ @@ -39,18 +39,19 @@ namespace mockpp { - + /** Common stuff to set up chainable mock method expectations with 4 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer + * @internal */ template <typename R, typename P1, typename P2, typename P3, typename P4> -class ChainableMockMethod4Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder4<R, Invocation4<P1, P2, P3, P4> > > +class ChainableMockMethod4Common + : public ChainableMockMethodCommon<R> + , public ChainingMockBuilder <ArgumentsMatchBuilder4<R, Invocation4<P1, P2, P3, P4> > > { public: - - typedef Invocation4<P1, P2, P3, P4> InvocationType; + + typedef Invocation4<P1, P2, P3, P4> InvocationType; typedef CoreMock<R, InvocationType> CoreMockType; typedef R ReturnType; @@ -85,10 +86,10 @@ /** Set up a chainable mock method expectations with 4 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename R, typename P1, typename P2, typename P3, typename P4> -class ChainableMockMethod4 +class ChainableMockMethod4 : public ChainableMockMethod4Common<R, P1, P2, P3, P4> { public: @@ -120,14 +121,14 @@ /** Set up a chainable mock method expectations with 4 parameters. * Partial specialisation for a void return value. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename P1, typename P2, typename P3, typename P4> -class ChainableMockMethod4<void, P1, P2, P3, P4> +class ChainableMockMethod4<void, P1, P2, P3, P4> : public ChainableMockMethod4Common<void, P1, P2, P3, P4> { public: - + typedef typename ChainableMockMethod4Common<void, P1, P2, P3, P4>::InvocationType InvocationType; /** Constructs the mock object. Index: gen_chainablemethod_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/gen_chainablemethod_N.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gen_chainablemethod_N.pl 15 Nov 2005 19:42:04 -0000 1.5 +++ gen_chainablemethod_N.pl 18 Nov 2005 08:49:17 -0000 1.6 @@ -13,16 +13,16 @@ $totalNumArgs = $ARGV[0]; if ($totalNumArgs < 5) { $totalNumArgs = 5; } - + for ($numArgs = 0; $numArgs <= $totalNumArgs; ++$numArgs) { open OUT, ">ChainableMockMethod" . $numArgs . ".h"; print "Creating ChainableMockMethod" . $numArgs . ".h\n"; -print OUT +print OUT "/** \@file \@brief Chainable Mock Method with $numArgs parameters. Generated with gen_chainablemethod_N.pl. - + \$I" . "d: ChainableMockMethod" . $numArgs . ".h,v 1.7 2005/10/19 20:53:09 ewald-arnold Exp \$ ***************************************************************************/ @@ -60,7 +60,7 @@ namespace mockpp { - + "; $templateParms = ""; @@ -71,20 +71,20 @@ } $templateParms .= "typename P$i"; } - if ($numArgs > 0) { + if ($numArgs > 0) { $templateParms_colon = ", " . $templateParms; } -# print OUT "// templateParms: $templateParms\n"; - +# print OUT "// templateParms: $templateParms\n"; + $templateArgs_colon = ""; $_ = $templateParms; s/typename //g; $templateArgs = $_; - if ($numArgs > 0) { + if ($numArgs > 0) { $templateArgs_colon = ", ". $templateArgs; } -# print OUT "// templateArgs: $templateArgs\n"; - +# print OUT "// templateArgs: $templateArgs\n"; + $parms = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { @@ -93,7 +93,7 @@ $parms .= "const P$i &p$i"; } -# print OUT "// parms: $parms\n"; +# print OUT "// parms: $parms\n"; $holderParms = ""; for ($i = 1; $i <= $numArgs; ++$i) { @@ -103,7 +103,7 @@ $holderParms .= "const ConstraintHolder<P$i> &p$i"; } -# print OUT "// holderParms: $holderParms\n"; +# print OUT "// holderParms: $holderParms\n"; $args_colon = ""; $args = ""; @@ -113,11 +113,11 @@ } $args .= "p$i"; } - if ($numArgs > 0) { + if ($numArgs > 0) { $args_colon = ", ". $args; } -# print OUT "// args: $args\n"; - +# print OUT "// args: $args\n"; + $boundArgs = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { @@ -126,15 +126,15 @@ $boundArgs .= "args->a$i"; } -# print OUT "// boundArgs: $boundArgs\n"; +# print OUT "// boundArgs: $boundArgs\n"; $argsAsMembers = ""; for ($i = 1; $i <= $numArgs; ++$i) { $argsAsMembers .= "P$i p$i;"; } -# print OUT "// argsAsMembers: $argsAsMembers\n"; - +# print OUT "// argsAsMembers: $argsAsMembers\n"; + $copyParms = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { @@ -143,7 +143,7 @@ $copyParms .= "P$i ia$i"; } -# print OUT "// copyParms: $copyParms\n"; +# print OUT "// copyParms: $copyParms\n"; $initArgs = ""; if ($numArgs > 0) { @@ -156,7 +156,7 @@ $initArgs .= "p$i(ip$i)"; } -# print OUT "// initArgs: $initArgs\n"; +# print OUT "// initArgs: $initArgs\n"; $argTypes = ""; for ($i = 1; $i <= $numArgs; ++$i) { @@ -165,42 +165,43 @@ # print OUT "// argTypes: $argTypes\n\n\n"; -print OUT +print OUT "/** Common stuff to set up chainable mock method expectations with " . $numArgs . " parameters. - * \@ingroup grp_controller + * \@ingroup grp_chainer + * \@internal */ template <typename R" . $templateParms_colon . "> -class ChainableMockMethod" . $numArgs . "Common +class ChainableMockMethod" . $numArgs . "Common : public ChainableMockMethodCommon<R>"; - + if ($numArgs > 0) { -print OUT " +print OUT " , public ChainingMockBuilder <ArgumentsMatchBuilder" . $numArgs . "<R, Invocation" . $numArgs . "<" . $templateArgs . "> > >"; } else { -print OUT " +print OUT " , public ChainingMockBuilder <ArgumentsMatchBuilder0<R, Invocation0> >"; -} - -print OUT " +} + +print OUT " { public: "; - + if ($numArgs > 0) { -print OUT " +print OUT " typedef Invocation" . $numArgs . "<" . $templateArgs . "> InvocationType;"; } else { -print OUT " +print OUT " typedef Invocation0 InvocationType;"; } -print OUT " +print OUT " typedef CoreMock<R, InvocationType> CoreMockType; typedef R ReturnType; @@ -235,10 +236,10 @@ /** Set up a chainable mock method expectations with " . $numArgs . " parameters. - * \@ingroup grp_controller + * \@ingroup grp_chainer */ template <typename R" . $templateParms_colon . "> -class ChainableMockMethod" . $numArgs . " +class ChainableMockMethod" . $numArgs . " : public ChainableMockMethod" . $numArgs . "Common<R" . $templateArgs_colon . "> { public: @@ -271,10 +272,10 @@ /** Set up a chainable mock method expectations with " . $numArgs . " parameters. * Partial specialisation for a void return value. - * \@ingroup grp_controller + * \@ingroup grp_chainer */ template <" . $templateParms . "> -class ChainableMockMethod" . $numArgs . "<void" . $templateArgs_colon . "> +class ChainableMockMethod" . $numArgs . "<void" . $templateArgs_colon . "> : public ChainableMockMethod" . $numArgs . "Common<void" . $templateArgs_colon . "> { public: @@ -282,12 +283,12 @@ if ($numArgs > 0) { -print OUT " +print OUT " typedef typename ChainableMockMethod" . $numArgs . "Common<void" . $templateArgs_colon . ">::InvocationType InvocationType;"; } else { -print OUT " +print OUT " typedef ChainableMockMethod" . $numArgs . "Common<void" . $templateArgs_colon . ">::InvocationType InvocationType;"; } Index: ChainableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod5.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ChainableMockMethod5.h 15 Nov 2005 19:42:04 -0000 1.8 +++ ChainableMockMethod5.h 18 Nov 2005 08:49:17 -0000 1.9 @@ -1,7 +1,7 @@ /** @file @brief Chainable Mock Method with 5 parameters. Generated with gen_chainablemethod_N.pl. - + $Id$ ***************************************************************************/ @@ -39,18 +39,19 @@ namespace mockpp { - + /** Common stuff to set up chainable mock method expectations with 5 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer + * @internal */ template <typename R, 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> > > +class ChainableMockMethod5Common + : public ChainableMockMethodCommon<R> + , public ChainingMockBuilder <ArgumentsMatchBuilder5<R, Invocation5<P1, P2, P3, P4, P5> > > { public: - - typedef Invocation5<P1, P2, P3, P4, P5> InvocationType; + + typedef Invocation5<P1, P2, P3, P4, P5> InvocationType; typedef CoreMock<R, InvocationType> CoreMockType; typedef R ReturnType; @@ -85,10 +86,10 @@ /** Set up a chainable mock method expectations with 5 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5> -class ChainableMockMethod5 +class ChainableMockMethod5 : public ChainableMockMethod5Common<R, P1, P2, P3, P4, P5> { public: @@ -121,14 +122,14 @@ /** Set up a chainable mock method expectations with 5 parameters. * Partial specialisation for a void return value. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename P1, typename P2, typename P3, typename P4, typename P5> -class ChainableMockMethod5<void, P1, P2, P3, P4, P5> +class ChainableMockMethod5<void, P1, P2, P3, P4, P5> : public ChainableMockMethod5Common<void, P1, P2, P3, P4, P5> { public: - + typedef typename ChainableMockMethod5Common<void, P1, P2, P3, P4, P5>::InvocationType InvocationType; /** Constructs the mock object. Index: ChainableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod0.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ChainableMockMethod0.h 15 Nov 2005 19:42:04 -0000 1.8 +++ ChainableMockMethod0.h 18 Nov 2005 08:49:17 -0000 1.9 @@ -1,7 +1,7 @@ /** @file @brief Chainable Mock Method with 0 parameters. Generated with gen_chainablemethod_N.pl. - + $Id$ ***************************************************************************/ @@ -39,18 +39,19 @@ namespace mockpp { - + /** Common stuff to set up chainable mock method expectations with 0 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer + * @internal */ template <typename R> -class ChainableMockMethod0Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder0<R, Invocation0> > +class ChainableMockMethod0Common + : public ChainableMockMethodCommon<R> + , public ChainingMockBuilder <ArgumentsMatchBuilder0<R, Invocation0> > { public: - - typedef Invocation0 InvocationType; + + typedef Invocation0 InvocationType; typedef CoreMock<R, InvocationType> CoreMockType; typedef R ReturnType; @@ -85,10 +86,10 @@ /** Set up a chainable mock method expectations with 0 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename R> -class ChainableMockMethod0 +class ChainableMockMethod0 : public ChainableMockMethod0Common<R> { public: @@ -116,14 +117,14 @@ /** Set up a chainable mock method expectations with 0 parameters. * Partial specialisation for a void return value. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <> -class ChainableMockMethod0<void> +class ChainableMockMethod0<void> : public ChainableMockMethod0Common<void> { public: - + typedef ChainableMockMethod0Common<void>::InvocationType InvocationType; /** Constructs the mock object. Index: ChainableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod1.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ChainableMockMethod1.h 15 Nov 2005 19:42:04 -0000 1.8 +++ ChainableMockMethod1.h 18 Nov 2005 08:49:17 -0000 1.9 @@ -1,7 +1,7 @@ /** @file @brief Chainable Mock Method with 1 parameters. Generated with gen_chainablemethod_N.pl. - + $Id$ ***************************************************************************/ @@ -39,18 +39,19 @@ namespace mockpp { - + /** Common stuff to set up chainable mock method expectations with 1 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer + * @internal */ template <typename R, typename P1> -class ChainableMockMethod1Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder1<R, Invocation1<P1> > > +class ChainableMockMethod1Common + : public ChainableMockMethodCommon<R> + , public ChainingMockBuilder <ArgumentsMatchBuilder1<R, Invocation1<P1> > > { public: - - typedef Invocation1<P1> InvocationType; + + typedef Invocation1<P1> InvocationType; typedef CoreMock<R, InvocationType> CoreMockType; typedef R ReturnType; @@ -85,10 +86,10 @@ /** Set up a chainable mock method expectations with 1 parameters. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename R, typename P1> -class ChainableMockMethod1 +class ChainableMockMethod1 : public ChainableMockMethod1Common<R, P1> { public: @@ -117,14 +118,14 @@ /** Set up a chainable mock method expectations with 1 parameters. * Partial specialisation for a void return value. - * @ingroup grp_controller + * @ingroup grp_chainer */ template <typename P1> -class ChainableMockMethod1<void, P1> +class ChainableMockMethod1<void, P1> : public ChainableMockMethod1Common<void, P1> { public: - + typedef typename ChainableMockMethod1Common<void, P1>::InvocationType InvocationType; /** Constructs the mock object. |