Thread: [Mockpp-commits] mockpp/mockpp/stub CustomStub.h,1.18,1.19 DefaultResultStub.h,1.20,1.21 ReturnStub.
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-12-29 19:30:03
|
Update of /cvsroot/mockpp/mockpp/mockpp/stub In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12933/mockpp/stub Modified Files: CustomStub.h DefaultResultStub.h ReturnStub.h Stub.h StubHolder.h StubSequence.h TestFailureStub.h ThrowStub.h TypelessStub.h TypelessStubSequence.h VoidStub.cpp VoidStub.h Log Message: update copyright date Index: VoidStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/VoidStub.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- VoidStub.h 3 Mar 2005 16:11:42 -0000 1.18 +++ VoidStub.h 29 Dec 2005 19:29:51 -0000 1.19 @@ -8,7 +8,7 @@ /************************************************************************** begin : Thu Aug 24 2004 - copyright : (C) 2002-2005 by Ewald Arnold + copyright : (C) 2002-2006 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify Index: StubSequence.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/StubSequence.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- StubSequence.h 28 Dec 2005 21:29:19 -0000 1.28 +++ StubSequence.h 29 Dec 2005 19:29:51 -0000 1.29 @@ -8,7 +8,7 @@ /************************************************************************** begin : Thu Aug 24 2004 - copyright : (C) 2002-2005 by Ewald Arnold + copyright : (C) 2002-2006 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify Index: ReturnStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/ReturnStub.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ReturnStub.h 28 Dec 2005 21:29:19 -0000 1.20 +++ ReturnStub.h 29 Dec 2005 19:29:51 -0000 1.21 @@ -8,7 +8,7 @@ /************************************************************************** begin : Thu Aug 24 2004 - copyright : (C) 2002-2005 by Ewald Arnold + copyright : (C) 2002-2006 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify Index: StubHolder.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/StubHolder.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- StubHolder.h 3 Apr 2005 18:32:53 -0000 1.11 +++ StubHolder.h 29 Dec 2005 19:29:51 -0000 1.12 @@ -1,105 +1,105 @@ -/** @file - @internal - @brief Container helper for Stub objects. - - $Id$ - - ***************************************************************************/ - -/************************************************************************** - - begin : Sun Oct 24 2004 - copyright : (C) 2002-2005 by Ewald Arnold - email : mockpp at ewald-arnold dot de - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - **/ - -#ifndef MOCKPP_STUBHOLDER_H -#define MOCKPP_STUBHOLDER_H - -#include <mockpp/util/AutoPointer.h> - -#include <mockpp/mockpp.h> // always first - -#include <mockpp/stub/Stub.h> -#include <mockpp/stub/TypelessStub.h> - - -namespace mockpp { - - -/** Proxy class to conveniently move Stubs into Stub related methods. - * @internal - * @attention Not intended for common use since this class is actually a liar. - */ -template <typename R, // Returntype - typename I> // Invocation -class StubHolder -{ - public: - - /** Creates the object. - * @param in_stub pointer to the stub - */ - StubHolder(const typename TypelessStub<R>::AP &in_stub) - : stub(new TypelessStubAdapter<R, I>(in_stub)) - {} - - /** Creates the object. - * @param in_stub pointer to the stub - */ - StubHolder(TypelessStub<R> *in_stub) - : stub(new TypelessStubAdapter<R, I>(in_stub)) - {} - - /** Creates the object. - * @param in_stub pointer to the stub - */ - StubHolder(Stub<R, I> *in_stub) - : stub(in_stub) - {} - -#ifndef _MSC_VER - - /** Creates the object. - * @param in_stub pointer to the stub - */ - StubHolder(const AutoPointer<Stub<R, I> > &in_stub) - : stub(in_stub) - {} - -#endif - - /** Returns the stub object. - * @attention After this method is called this object becomes invalid. - * @return the stub object - */ - operator AutoPointer<Stub<R, I> > () const // we we actually lie a bit - { - return stub; - } - - private: - - mutable typename Stub<R, I>::AP stub; // we we actually lie a bit -}; - - -} // namespace mockpp - - -#endif // MOCKPP_STUBHOLDER_H +/** @file + @internal + @brief Container helper for Stub objects. + + $Id$ + + ***************************************************************************/ + +/************************************************************************** + + begin : Sun Oct 24 2004 + copyright : (C) 2002-2006 by Ewald Arnold + email : mockpp at ewald-arnold dot de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + **/ + +#ifndef MOCKPP_STUBHOLDER_H +#define MOCKPP_STUBHOLDER_H + +#include <mockpp/util/AutoPointer.h> + +#include <mockpp/mockpp.h> // always first + +#include <mockpp/stub/Stub.h> +#include <mockpp/stub/TypelessStub.h> + + +namespace mockpp { + + +/** Proxy class to conveniently move Stubs into Stub related methods. + * @internal + * @attention Not intended for common use since this class is actually a liar. + */ +template <typename R, // Returntype + typename I> // Invocation +class StubHolder +{ + public: + + /** Creates the object. + * @param in_stub pointer to the stub + */ + StubHolder(const typename TypelessStub<R>::AP &in_stub) + : stub(new TypelessStubAdapter<R, I>(in_stub)) + {} + + /** Creates the object. + * @param in_stub pointer to the stub + */ + StubHolder(TypelessStub<R> *in_stub) + : stub(new TypelessStubAdapter<R, I>(in_stub)) + {} + + /** Creates the object. + * @param in_stub pointer to the stub + */ + StubHolder(Stub<R, I> *in_stub) + : stub(in_stub) + {} + +#ifndef _MSC_VER + + /** Creates the object. + * @param in_stub pointer to the stub + */ + StubHolder(const AutoPointer<Stub<R, I> > &in_stub) + : stub(in_stub) + {} + +#endif + + /** Returns the stub object. + * @attention After this method is called this object becomes invalid. + * @return the stub object + */ + operator AutoPointer<Stub<R, I> > () const // we we actually lie a bit + { + return stub; + } + + private: + + mutable typename Stub<R, I>::AP stub; // we we actually lie a bit +}; + + +} // namespace mockpp + + +#endif // MOCKPP_STUBHOLDER_H Index: DefaultResultStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/DefaultResultStub.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- DefaultResultStub.h 6 Jan 2005 13:09:23 -0000 1.20 +++ DefaultResultStub.h 29 Dec 2005 19:29:51 -0000 1.21 @@ -8,7 +8,7 @@ /************************************************************************** begin : Thu Aug 24 2004 - copyright : (C) 2002-2005 by Ewald Arnold + copyright : (C) 2002-2006 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify Index: ThrowStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/ThrowStub.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- ThrowStub.h 27 Nov 2005 15:34:36 -0000 1.32 +++ ThrowStub.h 29 Dec 2005 19:29:51 -0000 1.33 @@ -8,7 +8,7 @@ /************************************************************************** begin : Thu Aug 24 2004 - copyright : (C) 2002-2005 by Ewald Arnold + copyright : (C) 2002-2006 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify Index: Stub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/Stub.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Stub.h 6 Jan 2005 13:09:23 -0000 1.6 +++ Stub.h 29 Dec 2005 19:29:51 -0000 1.7 @@ -9,7 +9,7 @@ /************************************************************************** begin : Thu Aug 24 2004 - copyright : (C) 2002-2005 by Ewald Arnold + copyright : (C) 2002-2006 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify Index: CustomStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/CustomStub.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- CustomStub.h 3 Apr 2005 18:32:53 -0000 1.18 +++ CustomStub.h 29 Dec 2005 19:29:51 -0000 1.19 @@ -8,7 +8,7 @@ /************************************************************************** begin : Thu Aug 24 2004 - copyright : (C) 2002-2005 by Ewald Arnold + copyright : (C) 2002-2006 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify @@ -68,20 +68,20 @@ } protected: - - /** Appends the description of this object to the buffer. - * Needed for compilers that can't invoke \c CustumStub<>::describeTo() directly. - * @param buffer The buffer that the description is appended to. - * @return The current content of the buffer data - */ - String internalDescribeTo( String &buffer ) const // msvc6 hack - { - buffer += description; - return buffer; - } - - private: - + + /** Appends the description of this object to the buffer. + * Needed for compilers that can't invoke \c CustumStub<>::describeTo() directly. + * @param buffer The buffer that the description is appended to. + * @return The current content of the buffer data + */ + String internalDescribeTo( String &buffer ) const // msvc6 hack + { + buffer += description; + return buffer; + } + + private: + const String description; }; Index: VoidStub.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/VoidStub.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- VoidStub.cpp 3 Mar 2005 16:11:42 -0000 1.1 +++ VoidStub.cpp 29 Dec 2005 19:29:51 -0000 1.2 @@ -8,7 +8,7 @@ /************************************************************************** begin : Thu Aug 24 2004 - copyright : (C) 2002-2005 by Ewald Arnold + copyright : (C) 2002-2006 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify Index: TypelessStubSequence.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/TypelessStubSequence.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- TypelessStubSequence.h 28 Dec 2005 21:29:19 -0000 1.10 +++ TypelessStubSequence.h 29 Dec 2005 19:29:51 -0000 1.11 @@ -8,7 +8,7 @@ /************************************************************************** begin : Fri Oct 22 2004 - copyright : (C) 2002-2005 by Ewald Arnold + copyright : (C) 2002-2006 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify Index: TypelessStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/TypelessStub.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- TypelessStub.h 3 Apr 2005 21:49:57 -0000 1.17 +++ TypelessStub.h 29 Dec 2005 19:29:51 -0000 1.18 @@ -9,7 +9,7 @@ /************************************************************************** begin : Sun Aug 22 2004 - copyright : (C) 2002-2005 by Ewald Arnold + copyright : (C) 2002-2006 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify Index: TestFailureStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/TestFailureStub.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- TestFailureStub.h 28 Aug 2005 20:40:24 -0000 1.21 +++ TestFailureStub.h 29 Dec 2005 19:29:51 -0000 1.22 @@ -8,7 +8,7 @@ /************************************************************************** begin : Thu Aug 24 2004 - copyright : (C) 2002-2005 by Ewald Arnold + copyright : (C) 2002-2006 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify |