[Mockpp-commits] mockpp/mockpp ReturnObjectList.h,1.31,1.32 ThrowableList.cpp,1.22,1.23 ThrowableLis
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-11-26 18:27:38
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29052/mockpp Modified Files: ReturnObjectList.h ThrowableList.cpp ThrowableList.h gen_responsevector_N.pl mockpp.h Log Message: prepare use of alternative stl Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- mockpp.h 26 Nov 2005 18:00:17 -0000 1.58 +++ mockpp.h 26 Nov 2005 18:27:30 -0000 1.59 @@ -152,28 +152,32 @@ //# define _GLIBCPP_HAVE_WCHAR_H #endif -#ifdef MOCKPP_MINI_STL +#ifdef MOCKPP_USE_MINI_STL #include <ministl/string> -#define MOCKPP_VECTOR_H <ministl/vector> -#define MOCKPP_MAP_H <ministl/map> -#define MOCKPP_SET_H <ministl/set> +#define MOCKPP_VECTOR_H <ministl/vector> +#define MOCKPP_MAP_H <ministl/map> +#define MOCKPP_SET_H <ministl/set> #define MOCKPP_ALGORITHM_H <ministl/algorithm> -#define MOCKPP_FUNCTION_H <ministl/function> -#define MOCKPP_DEQUE_H <ministl/deque> -#define MOCKPP_STL ministl +#define MOCKPP_FUNCTION_H <ministl/function> +#define MOCKPP_DEQUE_H <ministl/deque> + +// no namespace ministl +#define MOCKPP_STL #else #include <string> -#define MOCKPP_STL std -#define MOCKPP_VECTOR_H <vector> -#define MOCKPP_MAP_H <map> -#define MOCKPP_DEQUE_H <deque> -#define MOCKPP_SET_H <set> -#define MOCKPP_FUNCTION_H <function> +#define MOCKPP_VECTOR_H <vector> +#define MOCKPP_MAP_H <map> +#define MOCKPP_DEQUE_H <deque> +#define MOCKPP_SET_H <set> +#define MOCKPP_FUNCTION_H <function> #define MOCKPP_ALGORITHM_H <algorithm> +// namespace std +#define MOCKPP_STL std + #endif #ifdef HAVE_LIMITS @@ -191,7 +195,7 @@ */ #ifdef HAVE_LIMITS -# define MOCKPP_UNLIMITED (MOCKPP_STL::numeric_limits<unsigned>::max()) +# define MOCKPP_UNLIMITED (std::numeric_limits<unsigned>::max()) #else # define MOCKPP_UNLIMITED (UINT_MAX) #endif Index: ThrowableList.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ThrowableList.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- ThrowableList.cpp 13 Nov 2005 11:53:18 -0000 1.22 +++ ThrowableList.cpp 26 Nov 2005 18:27:30 -0000 1.23 @@ -91,8 +91,8 @@ fmt << getVerifiableName(); MOCKPP_ASSERT_TRUE_MESSAGE(fmt, list.size() > 0); - Throwable *temp = list.front(); - list.pop_front(); + Throwable *temp = list[0]; + list.erase(list.begin()); already_used.push_back(temp); return temp; Index: gen_responsevector_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/gen_responsevector_N.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gen_responsevector_N.pl 13 Nov 2005 11:53:18 -0000 1.3 +++ gen_responsevector_N.pl 26 Nov 2005 18:27:30 -0000 1.4 @@ -283,7 +283,7 @@ "; for($p = 1; $p <= $numArgs; ++$p) { print OUT " - std::vector<Constraint<P" . $p . ">*> t" . $p . "vec;"; } + MOCKPP_STL::vector<Constraint<P" . $p . ">*> t" . $p . "vec;"; } print OUT " }; @@ -432,7 +432,7 @@ private: - std::vector<R> rvec; + MOCKPP_STL::vector<R> rvec; }; } // ns mockpp Index: ThrowableList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ThrowableList.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- ThrowableList.h 26 Nov 2005 18:00:17 -0000 1.21 +++ ThrowableList.h 26 Nov 2005 18:27:30 -0000 1.22 @@ -32,7 +32,7 @@ #include <mockpp/mockpp.h> // always first -#include MOCKPP_DEQUE_H +#include MOCKPP_VECTOR_H #include <mockpp/Verifiable.h> #include <mockpp/Throwable.h> @@ -138,8 +138,8 @@ ThrowableList (const ThrowableList &); // forbid ThrowableList& operator=(ThrowableList&); - std::deque<Throwable *> list; - std::deque<Throwable *> already_used; + std::vector<Throwable *> list; + std::vector<Throwable *> already_used; }; Index: ReturnObjectList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ReturnObjectList.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- ReturnObjectList.h 26 Nov 2005 18:00:17 -0000 1.31 +++ ReturnObjectList.h 26 Nov 2005 18:27:30 -0000 1.32 @@ -32,7 +32,7 @@ #include <mockpp/mockpp.h> // always first -#include MOCKPP_DEQUE_H +#include MOCKPP_VECTOR_H #include <mockpp/Verifiable.h> @@ -136,8 +136,8 @@ MOCKPP_ASSERT_TRUE_MESSAGE(fmt, myObjects.size() > 0); - T temp = myObjects.front(); - myObjects.pop_front(); + T temp = myObjects[0]; + myObjects.erase(myObjects.begin()); return temp; } @@ -203,9 +203,9 @@ private: - std::deque<T> myObjects; - bool haveDefault; - T defaultObject; + std::vector<T> myObjects; + bool haveDefault; + T defaultObject; }; |