[Mockpp-commits] mockpp/mockpp/chaining AbstractDynamicChainingMock.h,1.21,1.22 FIFOInvocationDispat
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-03-11 00:25:08
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22866/mockpp/chaining Modified Files: AbstractDynamicChainingMock.h FIFOInvocationDispatcher.h InvocationMocker.h LIFOInvocationDispatcher.h Log Message: scope fixes for gcc-3.4.3 Index: InvocationMocker.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/InvocationMocker.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- InvocationMocker.h 27 Feb 2005 11:48:15 -0000 1.23 +++ InvocationMocker.h 11 Mar 2005 00:24:55 -0000 1.24 @@ -63,10 +63,12 @@ class InvocationMockerBase : public Invokable<R, I>, public StubMatchersCollection<R, I> { - protected: + public: class DescriberBase; + protected: + /** Constructs the object * @param in_describer pointer to describer object * @param defaultStub pointer to default stub object @@ -128,7 +130,7 @@ catch ( const AssertionFailedError & error ) { throw AssertionFailedError( __LINE__, __FILE__, - error.getMessage() + MOCKPP_PCHAR( "\n" ) + toString() ); + error.getMessage() + MOCKPP_PCHAR( "\n" ) + this->toString() ); } } @@ -305,7 +307,8 @@ Stub<R, I> *stub, const String &name ) const { - for ( InvocationMockerBase<R, I>::ConstIterator it = matchers.begin(); it != matchers.end(); ++it ) + typename InvocationMockerBase<R, I>::ConstIterator it; + for (it = matchers.begin(); it != matchers.end(); ++it ) { InvocationMatcher<I>* matcher = *it; @@ -375,9 +378,9 @@ */ virtual R invoke( const I &invocation ) { - for ( Iterator it = matchers.begin(); it != matchers.end(); ++it ) + for ( Iterator it = this->matchers.begin(); it != this->matchers.end(); ++it ) ( *it ) ->incInvoked( invocation ); - return stub->invoke( invocation ); + return this->stub->invoke( invocation ); } }; @@ -423,9 +426,9 @@ */ virtual void invoke( const I &invocation ) { - for ( Iterator it = matchers.begin(); it != matchers.end(); ++it ) + for ( Iterator it = this->matchers.begin(); it != this->matchers.end(); ++it ) ( *it ) ->incInvoked( invocation ); - stub->invoke( invocation ); + this->stub->invoke( invocation ); } }; @@ -463,9 +466,9 @@ \ void mockpp::InvocationMocker<void, I>::invoke( const I &invocation ) \ { \ - for ( Iterator it = matchers.begin(); it != matchers.end(); ++it ) \ + for ( Iterator it = this->matchers.begin(); it != this->matchers.end(); ++it ) \ ( *it ) ->incInvoked( invocation ); \ - stub->invoke( invocation ); \ + this->stub->invoke( invocation ); \ } Index: LIFOInvocationDispatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/LIFOInvocationDispatcher.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- LIFOInvocationDispatcher.h 12 Jan 2005 20:25:06 -0000 1.9 +++ LIFOInvocationDispatcher.h 11 Mar 2005 00:24:55 -0000 1.10 @@ -59,8 +59,8 @@ */ virtual R dispatch( const I &invocation ) { - Iterator it = invokables.rbegin(); - Iterator end = invokables.rend(); + Iterator it = this->invokables.rbegin(); + Iterator end = this->invokables.rend(); for ( /**/; it != end; ++it ) { @@ -68,7 +68,7 @@ return ( *it ) ->invoke( invocation ); } - return defaultStub->invoke( invocation ); + return this->defaultStub->invoke( invocation ); } }; @@ -91,8 +91,8 @@ */ virtual void dispatch( const I &invocation ) { - Iterator it = invokables.rbegin(); - Iterator end = invokables.rend(); + Iterator it = this->invokables.rbegin(); + Iterator end = this->invokables.rend(); for ( /**/; it != end; ++it ) { if ( ( *it ) ->matches( invocation ) ) @@ -102,7 +102,7 @@ } } - defaultStub->invoke( invocation ); + this->defaultStub->invoke( invocation ); } }; @@ -122,8 +122,8 @@ #define MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_IMPL(I) \ void mockpp::LIFOInvocationDispatcher<void, I>::dispatch( const I &invocation ) \ { \ - Iterator it = invokables.rbegin(); \ - Iterator end = invokables.rend(); \ + Iterator it = this->invokables.rbegin(); \ + Iterator end = this->invokables.rend(); \ for ( /**/; it != end; ++it ) \ { \ if ( ( *it ) ->matches( invocation ) ) \ @@ -133,7 +133,7 @@ } \ } \ \ - defaultStub->invoke( invocation ); \ + this->defaultStub->invoke( invocation ); \ } \ #endif Index: AbstractDynamicChainingMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/AbstractDynamicChainingMock.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- AbstractDynamicChainingMock.h 27 Feb 2005 11:48:15 -0000 1.21 +++ AbstractDynamicChainingMock.h 11 Mar 2005 00:24:55 -0000 1.22 @@ -139,7 +139,7 @@ */ virtual String toString() const { - return getVerifiableName(); + return this->getVerifiableName(); } /** Gets the mock object's name @@ -147,7 +147,7 @@ */ String getMockName() const { - return getVerifiableName(); + return this->getVerifiableName(); } /** Sets the default stub for the object @@ -235,22 +235,22 @@ */ virtual R mockInvocation( const I &invocation ) { - if ( failure.get() != 0 ) - throw *failure.get(); + if ( this->failure.get() != 0 ) + throw *this->failure.get(); try { - return invocationDispatcher->dispatch( invocation ); + return this->invocationDispatcher->dispatch( invocation ); } catch ( const AssertionFailedError & assertion ) { DynamicChainingMockError<R, I> dme( this, invocation, - invocationDispatcher.get(), + this->invocationDispatcher.get(), assertion.getMessage() ); - failure.reset( new AssertionFailedError(__LINE__, __FILE__, dme.getMessage())); - throw *failure.get(); + this->failure.reset( new AssertionFailedError(__LINE__, __FILE__, dme.getMessage())); + throw *this->failure.get(); } } }; @@ -294,22 +294,22 @@ */ virtual void mockInvocation( const I &invocation ) { - if ( failure.get() != 0 ) - throw *failure.get(); + if ( this->failure.get() != 0 ) + throw *this->failure.get(); try { - invocationDispatcher->dispatch( invocation ); + this->invocationDispatcher->dispatch( invocation ); } catch ( const AssertionFailedError & assertion ) { DynamicChainingMockError<void, I> dme( this, invocation, - invocationDispatcher.get(), + this->invocationDispatcher.get(), assertion.getMessage() ); - failure.reset( new AssertionFailedError(__LINE__, __FILE__, dme.getMessage())); - throw *failure.get(); + this->failure.reset( new AssertionFailedError(__LINE__, __FILE__, dme.getMessage())); + throw *this->failure.get(); } } }; @@ -330,22 +330,22 @@ #define MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(I) \ void mockpp::AbstractDynamicChainingMock<void, I>::mockInvocation( const I &invocation ) \ { \ - if ( failure.get() != 0 ) \ - throw *failure.get(); \ + if ( this->failure.get() != 0 ) \ + throw *this->failure.get(); \ \ try \ { \ - invocationDispatcher->dispatch( invocation ); \ + this->invocationDispatcher->dispatch( invocation ); \ } \ \ catch ( const AssertionFailedError & assertion ) \ { \ DynamicChainingMockError<void, I> dme( this, \ invocation, \ - invocationDispatcher.get(), \ + this->invocationDispatcher.get(), \ assertion.getMessage() ); \ - failure.reset( new AssertionFailedError(__LINE__, __FILE__, dme.getMessage())); \ - throw *failure.get(); \ + this->failure.reset( new AssertionFailedError(__LINE__, __FILE__, dme.getMessage())); \ + throw *this->failure.get(); \ } \ } Index: FIFOInvocationDispatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/FIFOInvocationDispatcher.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- FIFOInvocationDispatcher.h 12 Jan 2005 20:25:06 -0000 1.9 +++ FIFOInvocationDispatcher.h 11 Mar 2005 00:24:55 -0000 1.10 @@ -60,15 +60,15 @@ */ virtual R dispatch( const I &invocation ) { - Iterator it = invokables.begin(); - Iterator end = invokables.end(); + Iterator it = this->invokables.begin(); + Iterator end = this->invokables.end(); for ( /**/; it != end; ++it ) { if ( ( *it ) ->matches( invocation ) ) return ( *it ) ->invoke( invocation ); } - return defaultStub->invoke( invocation ); + return this->defaultStub->invoke( invocation ); } }; @@ -91,8 +91,8 @@ */ virtual void dispatch( const I &invocation ) { - Iterator it = invokables.begin(); - Iterator end = invokables.end(); + Iterator it = this->invokables.begin(); + Iterator end = this->invokables.end(); for ( /**/; it != end; ++it ) { if ( ( *it ) ->matches( invocation ) ) @@ -102,7 +102,7 @@ } } - defaultStub->invoke( invocation ); + this->defaultStub->invoke( invocation ); } }; @@ -122,8 +122,8 @@ #define MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_IMPL(I) \ void mockpp::FIFOInvocationDispatcher<void, I>::dispatch( const I &invocation ) \ { \ - Iterator it = invokables.begin(); \ - Iterator end = invokables.end(); \ + Iterator it = this->invokables.begin(); \ + Iterator end = this->invokables.end(); \ for ( /**/; it != end; ++it ) \ { \ if ( ( *it ) ->matches( invocation ) ) \ @@ -133,7 +133,7 @@ } \ } \ \ - defaultStub->invoke( invocation ); \ + this->defaultStub->invoke( invocation ); \ } |