[Mockpp-commits] mockpp/mockpp AbstractExpectationCollection.h,1.16,1.17 ChainableMockObject.cpp,1.1
Brought to you by:
ewald-arnold
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27653/mockpp Modified Files: AbstractExpectationCollection.h ChainableMockObject.cpp ChainableMockObject.h CountParameters.h CountedVisitableMethod.h ExpectationBoundary.h ExpectationConglomeration.h ExpectationCounter.cpp ExpectationCounter.h ExpectationList.h ExpectationMap.h ExpectationSegment.h ExpectationSet.h ExpectationValue.h MixedMockObject.cpp MixedMockObject.h ResponseVector1.h ResponseVector2.h ResponseVector3.h ResponseVector4.h ResponseVector5.h ResponseVector6.h ReturnObjectList.h Throwable.cpp Throwable.h ThrowableList.cpp ThrowableList.h TrackingCounter.cpp TrackingCounter.h VisitableMockObject.cpp VisitableMockObject.h VisitableMockObject_macro.h gen_responsevector_N.pl Log Message: cleanup: migrate clear() to reset() Index: ResponseVector3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector3.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ResponseVector3.h 31 Oct 2005 19:01:00 -0000 1.6 +++ ResponseVector3.h 13 Nov 2005 11:53:18 -0000 1.7 @@ -1,7 +1,7 @@ /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_responsevector_N.pl. - + $Id$ ***************************************************************************/ @@ -102,17 +102,10 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { counter.clear(); - tvec.clear(); + tvec.reset(); for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) delete t1vec[i1]; @@ -245,16 +238,9 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { - ResponseThrowableVector3<P1, P2, P3>::clear(); + ResponseThrowableVector3<P1, P2, P3>::reset(); rvec.clear(); } Index: AbstractExpectationCollection.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/AbstractExpectationCollection.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- AbstractExpectationCollection.h 30 Dec 2004 20:54:03 -0000 1.16 +++ AbstractExpectationCollection.h 13 Nov 2005 11:53:18 -0000 1.17 @@ -70,7 +70,7 @@ /** * Resets the internal state completely. */ - virtual void clear() = 0; + virtual void reset() = 0; /** Index: TrackingCounter.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/TrackingCounter.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- TrackingCounter.cpp 7 May 2005 12:45:10 -0000 1.9 +++ TrackingCounter.cpp 13 Nov 2005 11:53:18 -0000 1.10 @@ -69,7 +69,7 @@ } -void MOCKPP_EXPORT TrackingCounterBase::clear() +void MOCKPP_EXPORT TrackingCounterBase::reset() { clearActual(); clearExpectation(); @@ -176,11 +176,6 @@ } -void MOCKPP_EXPORT TrackingCounterMaster::reset() -{ - clearActual(); -} - void MOCKPP_EXPORT TrackingCounterMaster::clearActual() { myActualValue = 0; @@ -222,11 +217,6 @@ } -void MOCKPP_EXPORT TrackingCounterClient::reset() -{ - clearActual(); -} - void MOCKPP_EXPORT TrackingCounterClient::clearActual() { myActualValue = 0; Index: ResponseVector2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector2.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ResponseVector2.h 31 Oct 2005 19:01:00 -0000 1.6 +++ ResponseVector2.h 13 Nov 2005 11:53:18 -0000 1.7 @@ -1,7 +1,7 @@ /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_responsevector_N.pl. - + $Id$ ***************************************************************************/ @@ -96,17 +96,10 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { counter.clear(); - tvec.clear(); + tvec.reset(); for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) delete t1vec[i1]; @@ -226,16 +219,9 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { - ResponseThrowableVector2<P1, P2>::clear(); + ResponseThrowableVector2<P1, P2>::reset(); rvec.clear(); } Index: VisitableMockObject_macro.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject_macro.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- VisitableMockObject_macro.h 23 Oct 2005 10:54:49 -0000 1.33 +++ VisitableMockObject_macro.h 13 Nov 2005 11:53:18 -0000 1.34 @@ -50,38 +50,38 @@ //########################################################################## #define MOCKPP_IMPL_RESET_VOID_BASE(methname) \ - objptr->methname ## Throwables.clear(); \ - objptr->methname ## DefaultThrowable.clear(); \ + objptr->methname ## Throwables.reset(); \ + objptr->methname ## DefaultThrowable.reset(); \ objptr->methname ## ThrowablesInline = MOCKPP_THROWABLE_INLINE; \ objptr->methname ## ThrowableInsteadReturn.clear() #define MOCKPP_IMPL_RESET_BASE(methname) \ MOCKPP_IMPL_RESET_VOID_BASE(methname); \ - objptr->methname ## ReturnValues.clear(); \ + objptr->methname ## ReturnValues.reset(); \ objptr->methname ## haveDefaultReturnValue = false; \ objptr->methname ## DefaultReturnValueUsed = false //////////////////////////////////////////////////////////////////////////// #define MOCKPP_IMPL_RESET_P1(methname) \ - objptr->methname ## ResponseValues.clear(); \ - objptr->methname ## Parameter1.clear(); + objptr->methname ## ResponseValues.reset(); \ + objptr->methname ## Parameter1.reset(); #define MOCKPP_IMPL_RESET_P2(methname) \ MOCKPP_IMPL_RESET_P1(methname); \ - objptr->methname ## Parameter2.clear() + objptr->methname ## Parameter2.reset() #define MOCKPP_IMPL_RESET_P3(methname) \ MOCKPP_IMPL_RESET_P2(methname); \ - objptr->methname ## Parameter3.clear() + objptr->methname ## Parameter3.reset() #define MOCKPP_IMPL_RESET_P4(methname) \ MOCKPP_IMPL_RESET_P3(methname); \ - objptr->methname ## Parameter4.clear() + objptr->methname ## Parameter4.reset() #define MOCKPP_IMPL_RESET_P5(methname) \ MOCKPP_IMPL_RESET_P4(methname); \ - objptr->methname ## Parameter5.clear() + objptr->methname ## Parameter5.reset() //////////////////////////////////////////////////////////////////////////// Index: ExpectationCounter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationCounter.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- ExpectationCounter.h 27 Feb 2005 11:48:14 -0000 1.22 +++ ExpectationCounter.h 13 Nov 2005 11:53:18 -0000 1.23 @@ -59,10 +59,6 @@ /** Resets the internal state completely. */ - virtual void clear(); - - /** Clears all internal states - */ virtual void reset(); /** Increments the actual number of calls by 1. Index: VisitableMockObject.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- VisitableMockObject.cpp 11 Oct 2005 19:07:44 -0000 1.24 +++ VisitableMockObject.cpp 13 Nov 2005 11:53:18 -0000 1.25 @@ -135,6 +135,7 @@ void MOCKPP_EXPORT VisitableMockObject::verify() { + MockObject::verify(); visitableVerify(); } @@ -146,12 +147,6 @@ } -void MOCKPP_EXPORT VisitableMockObject::clear() -{ - reset(); -} - - ///////////////////////////////////////////////////////////////// Index: ExpectationConglomeration.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationConglomeration.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- ExpectationConglomeration.h 7 May 2005 12:45:10 -0000 1.18 +++ ExpectationConglomeration.h 13 Nov 2005 11:53:18 -0000 1.19 @@ -136,15 +136,6 @@ */ virtual void reset() { - clear(); - } - - - /** - * Resets the internal state completely. - */ - virtual void clear() - { this->clearFailOnVerify(); clearActual(); clearExpectation(); Index: ExpectationValue.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationValue.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- ExpectationValue.h 7 May 2005 12:45:10 -0000 1.30 +++ ExpectationValue.h 13 Nov 2005 11:53:18 -0000 1.31 @@ -72,17 +72,9 @@ } - /** Resets the internal state to reflect that there is no actual value set. - */ - virtual void reset() - { - clear(); - } - - /** Resets the internal state completely. */ - virtual void clear() + virtual void reset() { this->clearFailOnVerify(); clearActual(); Index: Throwable.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Throwable.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Throwable.h 6 Jan 2005 13:09:21 -0000 1.14 +++ Throwable.h 13 Nov 2005 11:53:18 -0000 1.15 @@ -93,7 +93,7 @@ /** * Resets the counter to 0. */ - void clear() + void reset() { thrown = 0; } @@ -195,7 +195,7 @@ /** * Sets the object into a clean and unused state */ - void clear(); + void reset(); /** * Queries if the throwable object was taken via get(). Index: ChainableMockObject.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ChainableMockObject.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- ChainableMockObject.cpp 28 Aug 2005 20:40:23 -0000 1.17 +++ ChainableMockObject.cpp 13 Nov 2005 11:53:18 -0000 1.18 @@ -46,7 +46,7 @@ MOCKPP_EXPORT ChainableMockObjectBase::~ChainableMockObjectBase() { - chainableClear(); + chainableReset(); } @@ -124,7 +124,7 @@ } -void MOCKPP_EXPORT ChainableMockObjectBase::chainableClear() +void MOCKPP_EXPORT ChainableMockObjectBase::chainableReset() { while(idTable.size() != 0) { @@ -156,7 +156,7 @@ MOCKPP_EXPORT ChainableMockObject::~ChainableMockObject() { - clear(); + reset(); } @@ -167,9 +167,10 @@ } -void MOCKPP_EXPORT ChainableMockObject::clear() +void MOCKPP_EXPORT ChainableMockObject::reset() { - chainableClear(); + MockObject::reset(); + chainableReset(); } Index: ChainableMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ChainableMockObject.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- ChainableMockObject.h 29 Oct 2005 21:00:25 -0000 1.28 +++ ChainableMockObject.h 13 Nov 2005 11:53:18 -0000 1.29 @@ -119,7 +119,7 @@ /** Frees all internal data. * @internal */ - virtual void chainableClear(); + virtual void chainableReset(); private: @@ -166,7 +166,7 @@ /** Frees all internal data. * @internal */ - virtual void clear(); + virtual void reset(); }; Index: gen_responsevector_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/gen_responsevector_N.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gen_responsevector_N.pl 27 Oct 2005 18:56:07 -0000 1.2 +++ gen_responsevector_N.pl 13 Nov 2005 11:53:18 -0000 1.3 @@ -13,16 +13,16 @@ $totalNumArgs = $ARGV[0]; if ($totalNumArgs < 5) { $totalNumArgs = 5; } - + for ($numArgs = 1; $numArgs <= $totalNumArgs; ++$numArgs) { open OUT, ">ResponseVector" . $numArgs . ".h"; print "Creating ResponseVector" . $numArgs . ".h\n"; -print OUT +print OUT "/** \@file \@internal NOT INTENDED FOR PUBLIC INCLUSION \@brief Generated with gen_responsevector_N.pl. - + \$I" . "d: ResponseVector" . $numArgs . ".h,v 1.7 2005/10/19 20:53:09 ewald-arnold Exp \$ ***************************************************************************/ @@ -68,18 +68,18 @@ } $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; } - + $parms = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { @@ -106,7 +106,7 @@ $args .= "p$i"; } - + $boundArgs = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { @@ -121,7 +121,7 @@ $argsAsMembers .= "P$i p$i;"; } - + $copyParms = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { @@ -139,7 +139,7 @@ $hArgs .= "h$i"; } - + $initArgs = ""; if ($numArgs > 0) { $initArgs = ":"; @@ -151,13 +151,13 @@ $initArgs .= "p$i(ip$i)"; } - + $argTypes = ""; for ($i = 1; $i <= $numArgs; ++$i) { $argTypes .= "typedef P$i p". ($i+1) . "_type; "; } - + print OUT " /** Class returning a throwable depending on the parameters * passed to a method. @@ -194,10 +194,10 @@ */ void add(Throwable *t, " . $parms . ", unsigned count) {"; - + for($p = 1; $p <= $numArgs; ++$p) { print OUT " const ConstraintHolder<P" . $p . "> h" . $p . " = new IsEqual<P" . $p . ">(p" . $p . ");" } - + print OUT " add(t, " . $hArgs . ", count); } @@ -212,16 +212,16 @@ * \@param count the number of times the object may be used */ void add(Throwable *t,"; - + for($p = 1; $p <= $numArgs; ++$p) { print OUT " const ConstraintHolder<P" . $p . "> &p" . $p . ","; } - + print OUT " unsigned count) { counter.push_back(count); tvec.push_back(t);"; - + for($p = 1; $p <= $numArgs; ++$p) { print OUT " typename mockpp::Constraint<P" . $p . ">::AP cons" . $p . " (p" . $p . ");"; } @@ -233,18 +233,11 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { counter.clear(); - tvec.clear();"; - + tvec.reset();"; + for($p = 1; $p <= $numArgs; ++$p) { print OUT " for (unsigned i" . $p . " = 0; i" . $p . " < t" . $p . "vec.size(); ++i" . $p . ") @@ -267,10 +260,10 @@ { for (unsigned i = 0; i < t1vec.size(); ++i) if ( counter[i] > 0"; - + for($p = 1; $p <= $numArgs; ++$p) { print OUT " && t" . $p . "vec[i]->eval(p" . $p . ")"; } - + print OUT " ) { @@ -339,7 +332,7 @@ * \@param count the number of times the object may be used */ void add(Throwable *t,"; - + for($p = 1; $p <= $numArgs; ++$p) { print OUT " const ConstraintHolder<P" . $p . "> &p" . $p . ","; } @@ -377,7 +370,7 @@ * \@param count the number of times the object may be used */ void add(const R &r,"; - + for($p = 1; $p <= $numArgs; ++$p) { print OUT " const ConstraintHolder<P" . $p . "> &p" . $p . ","; } @@ -390,16 +383,9 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { - ResponseThrowableVector" . $numArgs . "<" . $templateArgs . ">::clear(); + ResponseThrowableVector" . $numArgs . "<" . $templateArgs . ">::reset(); rvec.clear(); } Index: ResponseVector4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector4.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ResponseVector4.h 31 Oct 2005 19:01:00 -0000 1.6 +++ ResponseVector4.h 13 Nov 2005 11:53:18 -0000 1.7 @@ -1,7 +1,7 @@ /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_responsevector_N.pl. - + $Id$ ***************************************************************************/ @@ -108,17 +108,10 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { counter.clear(); - tvec.clear(); + tvec.reset(); for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) delete t1vec[i1]; @@ -264,16 +257,9 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { - ResponseThrowableVector4<P1, P2, P3, P4>::clear(); + ResponseThrowableVector4<P1, P2, P3, P4>::reset(); rvec.clear(); } Index: MixedMockObject.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MixedMockObject.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- MixedMockObject.cpp 6 Mar 2005 21:45:52 -0000 1.1 +++ MixedMockObject.cpp 13 Nov 2005 11:53:18 -0000 1.2 @@ -37,7 +37,7 @@ MOCKPP_EXPORT MixedMockObject::MixedMockObject(const String &name, VerifiableList *parent) - : VerifiableList(name, parent) + : MockObject(name, parent) , VisitableMockObjectBase(name+MOCKPP_PCHAR("/Visitable"), parent) , ChainableMockObjectBase(name+MOCKPP_PCHAR("/Chainable")) { @@ -51,21 +51,17 @@ void MOCKPP_EXPORT MixedMockObject::verify() { + MockObject::verify(); visitableVerify(); chainableVerify(); } -void MOCKPP_EXPORT MixedMockObject::clear() -{ - reset(); -} - - void MOCKPP_EXPORT MixedMockObject::reset() { + MockObject::reset(); visitableReset(); - chainableClear(); + chainableReset(); } Index: ThrowableList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ThrowableList.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ThrowableList.h 30 Apr 2005 15:06:05 -0000 1.19 +++ ThrowableList.h 13 Nov 2005 11:53:18 -0000 1.20 @@ -118,10 +118,6 @@ */ Throwable * at(unsigned i); - /** Removes all the objects from the list. - */ - void clear(); - /** Verify that there are no objects left within the list. * If it fails, an AssertionFailedError is thrown */ Index: ResponseVector5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector5.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ResponseVector5.h 31 Oct 2005 19:01:00 -0000 1.6 +++ ResponseVector5.h 13 Nov 2005 11:53:18 -0000 1.7 @@ -1,7 +1,7 @@ /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_responsevector_N.pl. - + $Id$ ***************************************************************************/ @@ -114,17 +114,10 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { counter.clear(); - tvec.clear(); + tvec.reset(); for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) delete t1vec[i1]; @@ -283,16 +276,9 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { - ResponseThrowableVector5<P1, P2, P3, P4, P5>::clear(); + ResponseThrowableVector5<P1, P2, P3, P4, P5>::reset(); rvec.clear(); } Index: ExpectationList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationList.h,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- ExpectationList.h 7 May 2005 12:45:10 -0000 1.38 +++ ExpectationList.h 13 Nov 2005 11:53:18 -0000 1.39 @@ -62,13 +62,6 @@ } - /** Sets all internal objects to the state after construction. - */ - virtual void reset() - { - clear(); - } - /** * Verify that the expected values equal the expected ones. * Note: in a list there can be any number of elements of a given value and the order @@ -179,7 +172,7 @@ /** * Resets the internal state completely. */ - virtual void clear() + virtual void reset() { this->clearFailOnVerify(); clearActual(); Index: ResponseVector6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector6.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ResponseVector6.h 31 Oct 2005 19:01:00 -0000 1.4 +++ ResponseVector6.h 13 Nov 2005 11:53:18 -0000 1.5 @@ -1,7 +1,7 @@ /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_responsevector_N.pl. - + $Id$ ***************************************************************************/ @@ -120,17 +120,10 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { counter.clear(); - tvec.clear(); + tvec.reset(); for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) delete t1vec[i1]; @@ -302,16 +295,9 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { - ResponseThrowableVector6<P1, P2, P3, P4, P5, P6>::clear(); + ResponseThrowableVector6<P1, P2, P3, P4, P5, P6>::reset(); rvec.clear(); } Index: ExpectationMap.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationMap.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ExpectationMap.h 24 Mar 2005 21:43:06 -0000 1.24 +++ ExpectationMap.h 13 Nov 2005 11:53:18 -0000 1.25 @@ -126,7 +126,7 @@ ExpectationSet<Key>::setExpectNothing; ExpectationSet<Key>::addActual; ExpectationSet<Key>::clearActual; - ExpectationSet<Key>::clear; + ExpectationSet<Key>::reset; ExpectationSet<Key>::hasExpectations; ExpectationSet<Key>::setFailOnVerify; ExpectationSet<Key>::verify; Index: ThrowableList.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ThrowableList.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- ThrowableList.cpp 7 May 2005 12:45:10 -0000 1.21 +++ ThrowableList.cpp 13 Nov 2005 11:53:18 -0000 1.22 @@ -45,7 +45,7 @@ MOCKPP_EXPORT ThrowableList::~ThrowableList() throw() { - clear(); + reset(); } @@ -105,7 +105,7 @@ } -void MOCKPP_EXPORT ThrowableList::clear() +void MOCKPP_EXPORT ThrowableList::reset() { for (unsigned i1 = 0; i1 < list.size(); ++i1) delete list[i1]; @@ -117,12 +117,6 @@ } -void MOCKPP_EXPORT ThrowableList::reset() -{ - clear(); -} - - void MOCKPP_EXPORT ThrowableList::verify() { String fmt = mockpp_i18n(MOCKPP_PCHAR("%1 has %2 un-used objects.")); Index: Throwable.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Throwable.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Throwable.cpp 30 Dec 2004 20:54:03 -0000 1.13 +++ Throwable.cpp 13 Nov 2005 11:53:18 -0000 1.14 @@ -87,7 +87,7 @@ } -void MOCKPP_EXPORT ThrowableItem::clear() +void MOCKPP_EXPORT ThrowableItem::reset() { take((Throwable*)0); } Index: ExpectationCounter.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationCounter.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- ExpectationCounter.cpp 7 May 2005 12:45:10 -0000 1.22 +++ ExpectationCounter.cpp 13 Nov 2005 11:53:18 -0000 1.23 @@ -61,11 +61,6 @@ void MOCKPP_EXPORT ExpectationCounter::reset() { - clear(); -} - -void MOCKPP_EXPORT ExpectationCounter::clear() -{ clearActual(); clearExpectation(); this->clearHasExpectations(); Index: MixedMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MixedMockObject.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- MixedMockObject.h 29 Oct 2005 21:00:26 -0000 1.2 +++ MixedMockObject.h 13 Nov 2005 11:53:18 -0000 1.3 @@ -42,9 +42,9 @@ /** A MockObject that merges all the advanced mock objects. * \ingroup grp_advanced_mo */ -class MixedMockObject : public VerifiableList - , public VisitableMockObjectBase - , public ChainableMockObjectBase +class MixedMockObject : public MockObject + , public VisitableMockObjectBase + , public ChainableMockObjectBase { public: @@ -60,10 +60,6 @@ /** Frees all internal data. */ - virtual void clear(); - - /** Frees all internal data. - */ virtual void reset(); /** Verifies the object and the mock objects it contains. Index: TrackingCounter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/TrackingCounter.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- TrackingCounter.h 6 Apr 2005 20:15:19 -0000 1.5 +++ TrackingCounter.h 13 Nov 2005 11:53:18 -0000 1.6 @@ -61,9 +61,9 @@ */ virtual void clearActual() = 0; - /** Resets the internal state completely. + /** Resets the internal state to reflect that there is no actual value set. */ - virtual void clear(); + virtual void reset(); /** Sets the exact number of expected value. * @param expectedValue number of expected value @@ -153,10 +153,6 @@ */ unsigned numClients () const; - /** Clears all internal states - */ - virtual void reset(); - protected: friend class TrackingCounterClient; @@ -246,10 +242,6 @@ */ unsigned getTag(unsigned index) const; - /** Clears all internal states - */ - virtual void reset(); - private: TrackingCounterClient (const TrackingCounterClient &); // forbid Index: ExpectationSegment.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationSegment.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- ExpectationSegment.h 7 May 2005 12:45:10 -0000 1.26 +++ ExpectationSegment.h 13 Nov 2005 11:53:18 -0000 1.27 @@ -60,17 +60,9 @@ } - /** Resets the internal state to reflect that there is no actual value set. - */ - virtual void reset() - { - clear(); - } - - /** Resets the internal state completely. */ - virtual void clear() + virtual void reset() { this->clearFailOnVerify(); clearActual(); Index: ExpectationSet.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationSet.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- ExpectationSet.h 7 May 2005 12:45:10 -0000 1.32 +++ ExpectationSet.h 13 Nov 2005 11:53:18 -0000 1.33 @@ -168,18 +168,10 @@ } - /** Resets the internal state to reflect that there is no actual value set. - */ - virtual void reset() - { - clear(); - } - - /** * Resets the internal state completely. */ - virtual void clear() + virtual void reset() { this->clearFailOnVerify(); clearActual(); Index: ExpectationBoundary.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationBoundary.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ExpectationBoundary.h 29 Oct 2005 21:00:26 -0000 1.20 +++ ExpectationBoundary.h 13 Nov 2005 11:53:18 -0000 1.21 @@ -126,18 +126,10 @@ #endif - /** Resets the internal state to reflect that there is no actual value set. - */ - virtual void reset() - { - clear(); - } - - /** * Resets the internal state completely. */ - virtual void clear() + virtual void reset() { this->clearFailOnVerify(); clearActual(); Index: ResponseVector1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector1.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ResponseVector1.h 31 Oct 2005 19:01:00 -0000 1.6 +++ ResponseVector1.h 13 Nov 2005 11:53:18 -0000 1.7 @@ -1,7 +1,7 @@ /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_responsevector_N.pl. - + $Id$ ***************************************************************************/ @@ -90,17 +90,10 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { counter.clear(); - tvec.clear(); + tvec.reset(); for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) delete t1vec[i1]; @@ -207,16 +200,9 @@ /** Removes all the objects from the list. */ - virtual void reset() - { - clear(); - } - - /** Removes all the objects from the list. - */ - void clear() + void reset() { - ResponseThrowableVector1<P1>::clear(); + ResponseThrowableVector1<P1>::reset(); rvec.clear(); } Index: ReturnObjectList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ReturnObjectList.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- ReturnObjectList.h 31 Aug 2005 14:47:07 -0000 1.29 +++ ReturnObjectList.h 13 Nov 2005 11:53:18 -0000 1.30 @@ -74,14 +74,6 @@ } - /** Removes all the objects from the list. - */ - virtual void reset() - { - clear(); - } - - /** Add a next object to the end of the list. * @param anObjectToReturn object to be added to the list * @return reference to itself for chaining @@ -152,7 +144,7 @@ /** Removes all the objects from the list. */ - void clear() + void reset() { haveDefault = false; myObjects.clear(); Index: VisitableMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject.h,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- VisitableMockObject.h 23 Oct 2005 12:03:42 -0000 1.41 +++ VisitableMockObject.h 13 Nov 2005 11:53:18 -0000 1.42 @@ -137,7 +137,7 @@ * \ingroup grp_advanced_mo */ class VisitableMockObject : public MockObject - , public VisitableMockObjectBase + , public VisitableMockObjectBase { public: @@ -162,11 +162,6 @@ * Sets all internal objects to the state after construction. */ virtual void reset(); - - /** - * Sets all internal objects to the state after construction. - */ - virtual void clear(); }; @@ -205,8 +200,8 @@ virtual void unsetThrowablesInline() = 0; /** - * Verify the conditions which are not in the verify() chain of the - * visitable mock object. Located here instead of the object for traditional + * Verify the conditions which are not in the verify() chain of the + * visitable mock object. Located here instead of the object for traditional * reasons. * If it fails, an AssertionFailedError is thrown */ |