Thread: [Mockpp-commits] mockpp/mockpp/chaining CountedChainableMethod.h,1.4,1.5 gen_countchainable_N.pl,1.3
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-11-26 18:34:33
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30951/mockpp/chaining Modified Files: CountedChainableMethod.h gen_countchainable_N.pl Log Message: Index: CountedChainableMethod.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/CountedChainableMethod.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CountedChainableMethod.h 13 Nov 2005 11:53:18 -0000 1.4 +++ CountedChainableMethod.h 26 Nov 2005 18:34:16 -0000 1.5 @@ -1,7 +1,7 @@ /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_countparameters_N.pl. - + $Id$ ***************************************************************************/ @@ -44,7 +44,7 @@ namespace mockpp { - + #ifndef MOCKPP_COUNTED_WEAKNESS @@ -69,7 +69,7 @@ /** Helper class with an embeded type to the the method mock with 0 parameters. */ - template< typename R + template< typename RT , typename P1 , typename P2 , typename P3 @@ -80,7 +80,7 @@ { public: - typedef ChainableMockMethod0<R> ChainableMockMethodType; + typedef ChainableMockMethod0<RT> ChainableMockMethodType; }; }; @@ -96,7 +96,7 @@ /** Helper class with an embeded type to the the method mock with 1 parameters. */ - template< typename R + template< typename RT , typename P1 , typename P2 , typename P3 @@ -107,7 +107,7 @@ { public: - typedef ChainableMockMethod1<R, P1> ChainableMockMethodType; + typedef ChainableMockMethod1<RT, P1> ChainableMockMethodType; }; }; @@ -123,7 +123,7 @@ /** Helper class with an embeded type to the the method mock with 2 parameters. */ - template< typename R + template< typename RT , typename P1 , typename P2 , typename P3 @@ -134,7 +134,7 @@ { public: - typedef ChainableMockMethod2<R, P1, P2> ChainableMockMethodType; + typedef ChainableMockMethod2<RT, P1, P2> ChainableMockMethodType; }; }; @@ -150,7 +150,7 @@ /** Helper class with an embeded type to the the method mock with 3 parameters. */ - template< typename R + template< typename RT , typename P1 , typename P2 , typename P3 @@ -161,7 +161,7 @@ { public: - typedef ChainableMockMethod3<R, P1, P2, P3> ChainableMockMethodType; + typedef ChainableMockMethod3<RT, P1, P2, P3> ChainableMockMethodType; }; }; @@ -177,7 +177,7 @@ /** Helper class with an embeded type to the the method mock with 4 parameters. */ - template< typename R + template< typename RT , typename P1 , typename P2 , typename P3 @@ -188,7 +188,7 @@ { public: - typedef ChainableMockMethod4<R, P1, P2, P3, P4> ChainableMockMethodType; + typedef ChainableMockMethod4<RT, P1, P2, P3, P4> ChainableMockMethodType; }; }; @@ -204,7 +204,7 @@ /** Helper class with an embeded type to the the method mock with 5 parameters. */ - template< typename R + template< typename RT , typename P1 , typename P2 , typename P3 @@ -215,7 +215,7 @@ { public: - typedef ChainableMockMethod5<R, P1, P2, P3, P4, P5> ChainableMockMethodType; + typedef ChainableMockMethod5<RT, P1, P2, P3, P4, P5> ChainableMockMethodType; }; }; @@ -231,7 +231,7 @@ /** Helper class with an embeded type to the the method mock with 6 parameters. */ - template< typename R + template< typename RT , typename P1 , typename P2 , typename P3 @@ -242,7 +242,7 @@ { public: - typedef ChainableMockMethod6<R, P1, P2, P3, P4, P5, P6> ChainableMockMethodType; + typedef ChainableMockMethod6<RT, P1, P2, P3, P4, P5, P6> ChainableMockMethodType; }; }; @@ -250,7 +250,7 @@ /** Method mock class to select the actual class with the desired number of parameters. * Works with meta programming. */ -template< typename R +template< typename RT , typename P1 = NoParameter , typename P2 = NoParameter , typename P3 = NoParameter @@ -258,8 +258,8 @@ , typename P5 = NoParameter , typename P6 = NoParameter> class ChainableMockMethod - : public SwitchChainable<CountParameters<R, P1, P2, P3, P4, P5, P6>::value > - ::template Method<R, P1, P2, P3, P4, P5, P6> + : public SwitchChainable<CountParameters<RT, P1, P2, P3, P4, P5, P6>::value > + ::template Method<RT, P1, P2, P3, P4, P5, P6> ::ChainableMockMethodType { public: @@ -269,8 +269,8 @@ * @param parent parent chainable mock object */ ChainableMockMethod(const String &name, ChainableMockObject *parent ) - : SwitchChainable<CountParameters<R, P1, P2, P3, P4, P5, P6>::value > - ::template Method<R, P1, P2, P3, P4, P5, P6> + : SwitchChainable<CountParameters<RT, P1, P2, P3, P4, P5, P6>::value > + ::template Method<RT, P1, P2, P3, P4, P5, P6> ::ChainableMockMethodType(name, parent) { } @@ -284,7 +284,7 @@ * Works with partial specialisation. * @internal */ -template< typename R +template< typename RT , typename P1 = NoParameter , typename P2 = NoParameter , typename P3 = NoParameter @@ -300,9 +300,9 @@ /** Method mock class to select the actual class with 0 parameters. * Works with partial specialisation. */ -template<typename R> -class ChainableMockMethod<R, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter> - : public ChainableMockMethod0<R> +template<typename RT> +class ChainableMockMethod<RT, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter> + : public ChainableMockMethod0<RT> { public: @@ -310,9 +310,9 @@ * @param name human readable description about the expectation * @param parent parent chainable mock object */ - ChainableMockMethod<R, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter> + ChainableMockMethod<RT, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter> (const String &name, ChainableMockObject *parent ) - : ChainableMockMethod0<R>(name, parent) + : ChainableMockMethod0<RT>(name, parent) { } }; @@ -321,9 +321,9 @@ /** Method mock class to select the actual class with 1 parameters. * Works with partial specialisation. */ -template<typename R, typename P1> -class ChainableMockMethod<R, P1, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter> - : public ChainableMockMethod1<R, P1> +template<typename RT, typename P1> +class ChainableMockMethod<RT, P1, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter> + : public ChainableMockMethod1<RT, P1> { public: @@ -331,9 +331,9 @@ * @param name human readable description about the expectation * @param parent parent chainable mock object */ - ChainableMockMethod<R, P1, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter> + ChainableMockMethod<RT, P1, NoParameter, NoParameter, NoParameter, NoParameter, NoParameter> (const String &name, ChainableMockObject *parent ) - : ChainableMockMethod1<R, P1>(name, parent) + : ChainableMockMethod1<RT, P1>(name, parent) { } }; @@ -342,9 +342,9 @@ /** Method mock class to select the actual class with 2 parameters. * Works with partial specialisation. */ -template<typename R, typename P1, typename P2> -class ChainableMockMethod<R, P1, P2, NoParameter, NoParameter, NoParameter, NoParameter> - : public ChainableMockMethod2<R, P1, P2> +template<typename RT, typename P1, typename P2> +class ChainableMockMethod<RT, P1, P2, NoParameter, NoParameter, NoParameter, NoParameter> + : public ChainableMockMethod2<RT, P1, P2> { public: @@ -352,9 +352,9 @@ * @param name human readable description about the expectation * @param parent parent chainable mock object */ - ChainableMockMethod<R, P1, P2, NoParameter, NoParameter, NoParameter, NoParameter> + ChainableMockMethod<RT, P1, P2, NoParameter, NoParameter, NoParameter, NoParameter> (const String &name, ChainableMockObject *parent ) - : ChainableMockMethod2<R, P1, P2>(name, parent) + : ChainableMockMethod2<RT, P1, P2>(name, parent) { } }; @@ -363,9 +363,9 @@ /** Method mock class to select the actual class with 3 parameters. * Works with partial specialisation. */ -template<typename R, typename P1, typename P2, typename P3> -class ChainableMockMethod<R, P1, P2, P3, NoParameter, NoParameter, NoParameter> - : public ChainableMockMethod3<R, P1, P2, P3> +template<typename RT, typename P1, typename P2, typename P3> +class ChainableMockMethod<RT, P1, P2, P3, NoParameter, NoParameter, NoParameter> + : public ChainableMockMethod3<RT, P1, P2, P3> { public: @@ -373,9 +373,9 @@ * @param name human readable description about the expectation * @param parent parent chainable mock object */ - ChainableMockMethod<R, P1, P2, P3, NoParameter, NoParameter, NoParameter> + ChainableMockMethod<RT, P1, P2, P3, NoParameter, NoParameter, NoParameter> (const String &name, ChainableMockObject *parent ) - : ChainableMockMethod3<R, P1, P2, P3>(name, parent) + : ChainableMockMethod3<RT, P1, P2, P3>(name, parent) { } }; @@ -384,9 +384,9 @@ /** Method mock class to select the actual class with 4 parameters. * Works with partial specialisation. */ -template<typename R, typename P1, typename P2, typename P3, typename P4> -class ChainableMockMethod<R, P1, P2, P3, P4, NoParameter, NoParameter> - : public ChainableMockMethod4<R, P1, P2, P3, P4> +template<typename RT, typename P1, typename P2, typename P3, typename P4> +class ChainableMockMethod<RT, P1, P2, P3, P4, NoParameter, NoParameter> + : public ChainableMockMethod4<RT, P1, P2, P3, P4> { public: @@ -394,9 +394,9 @@ * @param name human readable description about the expectation * @param parent parent chainable mock object */ - ChainableMockMethod<R, P1, P2, P3, P4, NoParameter, NoParameter> + ChainableMockMethod<RT, P1, P2, P3, P4, NoParameter, NoParameter> (const String &name, ChainableMockObject *parent ) - : ChainableMockMethod4<R, P1, P2, P3, P4>(name, parent) + : ChainableMockMethod4<RT, P1, P2, P3, P4>(name, parent) { } }; @@ -405,9 +405,9 @@ /** Method mock class to select the actual class with 5 parameters. * Works with partial specialisation. */ -template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5> -class ChainableMockMethod<R, P1, P2, P3, P4, P5, NoParameter> - : public ChainableMockMethod5<R, P1, P2, P3, P4, P5> +template<typename RT, typename P1, typename P2, typename P3, typename P4, typename P5> +class ChainableMockMethod<RT, P1, P2, P3, P4, P5, NoParameter> + : public ChainableMockMethod5<RT, P1, P2, P3, P4, P5> { public: @@ -415,9 +415,9 @@ * @param name human readable description about the expectation * @param parent parent chainable mock object */ - ChainableMockMethod<R, P1, P2, P3, P4, P5, NoParameter> + ChainableMockMethod<RT, P1, P2, P3, P4, P5, NoParameter> (const String &name, ChainableMockObject *parent ) - : ChainableMockMethod5<R, P1, P2, P3, P4, P5>(name, parent) + : ChainableMockMethod5<RT, P1, P2, P3, P4, P5>(name, parent) { } }; @@ -426,9 +426,9 @@ /** Method mock class to select the actual class with 6 parameters. * Works with partial specialisation. */ -template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> -class ChainableMockMethod<R, P1, P2, P3, P4, P5, P6> - : public ChainableMockMethod6<R, P1, P2, P3, P4, P5, P6> +template<typename RT, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> +class ChainableMockMethod<RT, P1, P2, P3, P4, P5, P6> + : public ChainableMockMethod6<RT, P1, P2, P3, P4, P5, P6> { public: @@ -436,9 +436,9 @@ * @param name human readable description about the expectation * @param parent parent chainable mock object */ - ChainableMockMethod<R, P1, P2, P3, P4, P5, P6> + ChainableMockMethod<RT, P1, P2, P3, P4, P5, P6> (const String &name, ChainableMockObject *parent ) - : ChainableMockMethod6<R, P1, P2, P3, P4, P5, P6>(name, parent) + : ChainableMockMethod6<RT, P1, P2, P3, P4, P5, P6>(name, parent) { } }; Index: gen_countchainable_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/gen_countchainable_N.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gen_countchainable_N.pl 31 Oct 2005 20:50:37 -0000 1.3 +++ gen_countchainable_N.pl 26 Nov 2005 18:34:16 -0000 1.4 @@ -17,11 +17,11 @@ open OUT, ">CountedChainableMethod.h"; -print OUT +print OUT "/** \@file \@internal NOT INTENDED FOR PUBLIC INCLUSION \@brief Generated with gen_countparameters_N.pl. - + \$I" . "d: CountedChainableMethod.h,v 1.7 2005/10/19 20:53:09 ewald-arnold Exp \$ ***************************************************************************/ @@ -62,7 +62,7 @@ namespace mockpp { - + #ifndef MOCKPP_COUNTED_WEAKNESS @@ -89,19 +89,19 @@ } $templateParms .= "typename P$i"; } - if ($numArgs > 0) { + if ($numArgs > 0) { $templateParms_colon = ", " . $templateParms; } - + $templateArgs_colon = ""; $_ = $templateParms; s/typename //g; $templateArgs = $_; - if ($numArgs > 0) { + if ($numArgs > 0) { $templateArgs_colon = ", ". $templateArgs; } print "Creating CountedChainableMethod" . $numArgs ."\n"; - + print OUT " /** Helper class to select the method mock with " . $numArgs ." parameters. * Works with meta programming. @@ -112,11 +112,11 @@ { public: "; - + print OUT " /** Helper class with an embeded type to the the method mock with " . $numArgs ." parameters. */ - template< typename R"; + template< typename RT"; for($p = 1; $p <= $totalNumArgs; ++$p) { print OUT " , typename P" . $p; } @@ -126,7 +126,7 @@ { public: - typedef ChainableMockMethod" . $numArgs ."<R" . $templateArgs_colon . "> ChainableMockMethodType; + typedef ChainableMockMethod" . $numArgs ."<RT" . $templateArgs_colon . "> ChainableMockMethodType; }; }; @@ -139,7 +139,7 @@ /** Method mock class to select the actual class with the desired number of parameters. * Works with meta programming. */ -template< typename R +template< typename RT , typename P1 = NoParameter"; for($p = 2; $p <= $totalNumArgs; ++$p) { print OUT " @@ -147,8 +147,8 @@ print OUT "> class ChainableMockMethod - : public SwitchChainable<CountParameters<R, " . $templateArgs . ">::value > - ::template Method<R, " . $templateArgs . "> + : public SwitchChainable<CountParameters<RT, " . $templateArgs . ">::value > + ::template Method<RT, " . $templateArgs . "> ::ChainableMockMethodType { public: @@ -158,8 +158,8 @@ * \@param parent parent chainable mock object */ ChainableMockMethod(const String &name, ChainableMockObject *parent ) - : SwitchChainable<CountParameters<R, " . $templateArgs . ">::value > - ::template Method<R, " . $templateArgs . "> + : SwitchChainable<CountParameters<RT, " . $templateArgs . ">::value > + ::template Method<RT, " . $templateArgs . "> ::ChainableMockMethodType(name, parent) { } @@ -173,7 +173,7 @@ * Works with partial specialisation. * \@internal */ -template< typename R +template< typename RT , typename P1 = NoParameter"; for($p = 2; $p <= $totalNumArgs+1; ++$p) { print OUT " @@ -196,33 +196,33 @@ } $templateParms .= "typename P$i"; } - if ($numArgs > 0) { + if ($numArgs > 0) { $templateParms_colon = ", " . $templateParms; } - + $templateArgs_colon = ""; $_ = $templateParms; s/typename //g; $templateArgs = $_; - if ($numArgs > 0) { + if ($numArgs > 0) { $templateArgs_colon = ", ". $templateArgs; } $noParamArgs = $templateArgs; for ($i = $numArgs+1; $i <= $totalNumArgs; ++$i) { if ($i > 1) { $noParamArgs .= ", "; - } + } $noParamArgs .= "NoParameter"; } - + print OUT " /** Method mock class to select the actual class with " . $numArgs . " parameters. * Works with partial specialisation. */ -template<typename R" . $templateParms_colon . "> -class ChainableMockMethod<R, " . $noParamArgs . "> - : public ChainableMockMethod" . $numArgs . "<R" . $templateArgs_colon . "> +template<typename RT" . $templateParms_colon . "> +class ChainableMockMethod<RT, " . $noParamArgs . "> + : public ChainableMockMethod" . $numArgs . "<RT" . $templateArgs_colon . "> { public: @@ -230,9 +230,9 @@ * \@param name human readable description about the expectation * \@param parent parent chainable mock object */ - ChainableMockMethod<R, " . $noParamArgs . "> + ChainableMockMethod<RT, " . $noParamArgs . "> (const String &name, ChainableMockObject *parent ) - : ChainableMockMethod" . $numArgs . "<R" . $templateArgs_colon . ">(name, parent) + : ChainableMockMethod" . $numArgs . "<RT" . $templateArgs_colon . ">(name, parent) { } }; |