From: <ag...@us...> - 2012-01-05 21:51:02
|
Revision: 2660 http://zoolib.svn.sourceforge.net/zoolib/?rev=2660&view=rev Author: agreen Date: 2012-01-05 21:50:56 +0000 (Thu, 05 Jan 2012) Log Message: ----------- Rename XXX_Applied --> XXX_With. Applied made some sense in the context of a tween, less so in context of a cog. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZCog.h trunk/zoolib/source/cxx/zoolib/ZTween.h Modified: trunk/zoolib/source/cxx/zoolib/ZCog.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-05 21:50:14 UTC (rev 2659) +++ trunk/zoolib/source/cxx/zoolib/ZCog.h 2012-01-05 21:50:56 UTC (rev 2660) @@ -502,39 +502,39 @@ // ================================================================================================= #pragma mark - -#pragma mark * sCog_Applied +#pragma mark * sCog_With template <class Param> -ZCog<Param> spCogFun_Applied(const ZCog<Param>& iSelf, Param iParam, +ZCog<Param> spCogFun_With(const ZCog<Param>& iSelf, Param iParam, const ZCog<Param>& iCog0, const ZCog<Param>& iCog1_Init, const ZCog<Param>& iCog1); template <class Param> -ZCog<Param> spCog_Applied +ZCog<Param> spCog_With (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1_Init, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { ZAssert(iCallable0 && iCallable1_Init && iCallable1); - static ZMACRO_auto(spCallable, sCallable(spCogFun_Applied<Param>)); + static ZMACRO_auto(spCallable, sCallable(spCogFun_With<Param>)); return sBindR(spCallable, iCallable0, iCallable1_Init, iCallable1); } template <class Param> -ZCog<Param> sCog_Applied +ZCog<Param> sCog_With (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) { if (iCallable0) { if (iCallable1 && not sIsTerm(iCallable1)) - return spCog_Applied(iCallable0, iCallable1, iCallable1); + return spCog_With(iCallable0, iCallable1, iCallable1); return iCallable0; } return null; } template <class Param> -ZCog<Param> spCogFun_Applied(const ZCog<Param>& iSelf, Param iParam, +ZCog<Param> spCogFun_With(const ZCog<Param>& iSelf, Param iParam, const ZCog<Param>& iCog0, const ZCog<Param>& iCog1_Init, const ZCog<Param>& iCog1) { ZAssert(iCog0 && iCog1); @@ -558,9 +558,9 @@ return lCog0; if (sIsTerm(lCog1)) - return spCog_Applied(lCog0, iCog1_Init, iCog1_Init); + return spCog_With(lCog0, iCog1_Init, iCog1_Init); - return spCog_Applied(lCog0, iCog1_Init, lCog1); + return spCog_With(lCog0, iCog1_Init, lCog1); } else if (not lCog0) { @@ -579,9 +579,9 @@ return lCog0; if (sIsTerm(lCog1)) - return spCog_Applied(lCog0, iCog1_Init, iCog1_Init); + return spCog_With(lCog0, iCog1_Init, iCog1_Init); - return spCog_Applied(lCog0, iCog1_Init, lCog1); + return spCog_With(lCog0, iCog1_Init, lCog1); } } @@ -589,19 +589,19 @@ ZCog<Param> operator^ (const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return sCog_Applied<Param>(iCallable0, iCallable1); } + { return sCog_With<Param>(iCallable0, iCallable1); } template <class Param> ZCog<Param>& operator^= (ZCog<Param>& ioCog0, const ZRef<ZCallable<ZCog<Param>(const ZCog<Param>&,Param)> >& iCallable1) - { return ioCog0 = sCog_Applied<Param>(ioCog0, iCallable1); } + { return ioCog0 = sCog_With<Param>(ioCog0, iCallable1); } template <class Param> -struct ZCogAccumulatorCombiner_Applied +struct ZCogAccumulatorCombiner_With { void operator()(ZCog<Param>& io0, const ZCog<Param>& i1) const - { io0 = sCog_Applied(io0, i1); } + { io0 = sCog_With(io0, i1); } }; // ================================================================================================= Modified: trunk/zoolib/source/cxx/zoolib/ZTween.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZTween.h 2012-01-05 21:50:14 UTC (rev 2659) +++ trunk/zoolib/source/cxx/zoolib/ZTween.h 2012-01-05 21:50:56 UTC (rev 2660) @@ -325,14 +325,14 @@ // ================================================================================================= #pragma mark - -#pragma mark * sTween_Applied +#pragma mark * sTween_With template <class Val0, class Val1, class Combiner = TweenCombiner<Val0,Val1> > -class ZTween_Applied +class ZTween_With : public ZTween<Val0> { public: - ZTween_Applied(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) + ZTween_With(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) : f0(i0) , f1(i1) {} @@ -358,12 +358,12 @@ }; template <class Val0, class Val1> -ZRef<ZTween<Val0> > sTween_Applied(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) +ZRef<ZTween<Val0> > sTween_With(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) { if (i0) { if (i1) - return new ZTween_Applied<Val0,Val1>(i0, i1); + return new ZTween_With<Val0,Val1>(i0, i1); return i0; } return null; @@ -371,20 +371,20 @@ template <class Val0, class Val1> ZRef<ZTween<Val0> > operator^(const ZRef<ZTween<Val0> >& i0, const ZRef<ZTween<Val1> >& i1) - { return sTween_Applied(i0, i1); } + { return sTween_With(i0, i1); } template <class Val0, class Val1> ZRef<ZTween<Val0> >& operator^=(ZRef<ZTween<Val0> >& io0, const ZRef<ZTween<Val1> >& i1) { return io0 = io0 ^ i1; } template <class Val_p> -struct ZTweenAccumulatorCombiner_Applied +struct ZTweenAccumulatorCombiner_With { typedef Val_p Val; void operator()(ZRef<ZTween<Val> >& io0, const ZRef<ZTween<Val> >& i1) const { if (io0) - io0 = sTween_Applied(io0, i1); + io0 = sTween_With(io0, i1); else io0 = i1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |