Update of /cvsroot/mockpp/mockpp/mockpp
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19366/mockpp
Modified Files:
ThrowableList.cpp ThrowableList.h
Log Message:
consistent naming
Index: ThrowableList.cpp
===================================================================
RCS file: /cvsroot/mockpp/mockpp/mockpp/ThrowableList.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- ThrowableList.cpp 27 Feb 2005 11:48:14 -0000 1.19
+++ ThrowableList.cpp 21 Apr 2005 20:35:40 -0000 1.20
@@ -33,7 +33,6 @@
#include <mockpp/compat/Formatter.h>
#include <mockpp/ThrowableList.h>
-#include <mockpp/Throwable.h>
namespace mockpp {
@@ -50,7 +49,13 @@
}
-void MOCKPP_EXPORT ThrowableList::push_back(Throwable *t)
+void MOCKPP_EXPORT ThrowableList::push_back(Throwable* t)
+{
+ addObjectToThrow(t);
+}
+
+
+void MOCKPP_EXPORT ThrowableList::addObjectToThrow(Throwable* t)
{
// MOCKPP_ASSERT_TRUE(t != 0); Tricky: ResonseVector uses 0 to distinguish
// between values and throwables
Index: ThrowableList.h
===================================================================
RCS file: /cvsroot/mockpp/mockpp/mockpp/ThrowableList.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- ThrowableList.h 6 Apr 2005 20:15:19 -0000 1.17
+++ ThrowableList.h 21 Apr 2005 20:35:41 -0000 1.18
@@ -35,11 +35,11 @@
#include <deque>
#include <mockpp/Verifiable.h>
+#include <mockpp/Throwable.h>
namespace mockpp {
-class Throwable;
/** A list of throwable objects. The objects are completely managed which also includes
* the destruction of the objects by the destructor of this list.
@@ -64,19 +64,42 @@
* the list itself is destroyed! This is valid even for objects taken via
* nextThrowableObject()!
* Don't add the same object (the same pointer!) more than once via this method.
+ * @deprecated
* @param t pointer to object to be added to the list
*/
- void push_back(Throwable *t);
+ void push_back(Throwable* t);
+
+ /** Add a next object to the end of the list.
+ * The objects remains from now on in the responsibiliy of this list until
+ * the list itself is destroyed! This is valid even for objects taken via
+ * nextThrowableObject()!
+ * Don't add the same object (the same pointer!) more than once via this method.
+ * @param t pointer to object to be added to the list
+ */
+ void addObjectToThrow(Throwable* t);
/** Add a next object to the end of the list.
* The objects remains from now on in the responsibiliy of this list until
* the list itself is destroyed! This is valid even for objects taken via
* nextThrowableObject()!
+ * @deprecated
* @param w object to be added to the list
*/
template <class T>
void push_back(const T &w)
{
+ addObjectToThrow(w);
+ }
+
+ /** Add a next object to the end of the list.
+ * The objects remains from now on in the responsibiliy of this list until
+ * the list itself is destroyed! This is valid even for objects taken via
+ * nextThrowableObject()!
+ * @param w object to be added to the list
+ */
+ template <class T>
+ void addObjectToThrow(const T &w)
+ {
push_back(make_throwable(w));
}
|