Update of /cvsroot/mockpp/mockpp/mockpp
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22798/mockpp
Modified Files:
VisitableMockMethod.h
Log Message:
backup
Index: VisitableMockMethod.h
===================================================================
RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- VisitableMockMethod.h 19 Oct 2005 20:14:27 -0000 1.6
+++ VisitableMockMethod.h 19 Oct 2005 20:53:09 -0000 1.7
@@ -125,7 +125,7 @@
}
}
- private:
+ protected:
VMM *method;
VisitableMockObject *object;
@@ -147,8 +147,6 @@
//////////////////////////////////////////////////////////////////////////////////////////////
-#ifdef MOCKPP_XXX
-
template <typename R>
class VisitableMockReturningMethodBase : public VisitableMockMethodBase
{
@@ -163,8 +161,7 @@
, returnValues(getMethodName() + MOCKPP_PCHAR("/returnValues"))
{}
-
- class ControllerFor : public VisitableMockMethodBase::ControllerFor<VisitableMockMethodBase>
+ class ControllerFor : public VisitableMockMethodBase::ControllerFor<VisitableMockReturningMethodBase>
{
typedef VisitableMockMethodBase::ControllerFor<VisitableMockReturningMethodBase<R> > Inherited;
@@ -177,35 +174,35 @@
void setDefaultReturnValue(const R &rv)
{
- MOCKPP_ASSERT_FALSE(object->isActivated());
- method->haveDefaultReturnValue = true;
- method->defaultReturnValue = rv;
+ MOCKPP_ASSERT_FALSE(this->object->isActivated());
+ this->method->haveDefaultReturnValue = true;
+ this->method->defaultReturnValue = rv;
}
virtual void reset()
{
Inherited::reset();
- method->haveDefaultReturnValue = false;
- method->defaultReturnValueUsed = false;
- returnValues.clear();
+ this->method->haveDefaultReturnValue = false;
+ this->method->defaultReturnValueUsed = false;
+ this->returnValues.clear();
}
virtual void verify()
{
Inherited::verify();
- if (method->haveDefaultReturnValue)
+ if (this->method->haveDefaultReturnValue)
{
String fmt = mockpp_i18n(MOCKPP_PCHAR("%1 is unused."));
- fmt << method->getMethodName() + MOCKPP_PCHAR("/defaultReturnValueUsed");
- MOCKPP_ASSERT_TRUE_MESSAGE(fmt, method->defaultReturnValueUsed);
+ fmt << this->method->getMethodName() + MOCKPP_PCHAR("/defaultReturnValueUsed");
+ MOCKPP_ASSERT_TRUE_MESSAGE(fmt, this->method->defaultReturnValueUsed);
}
- returnvalues.verify();
+ this->returnvalues.verify();
}
};
- friend class ControllerFor;
+ friend class VisitableMockReturningMethodBase::ControllerFor;
protected:
@@ -229,9 +226,9 @@
: VisitableMockMethodBase(name, parent)
{}
- friend class ControllerFor : public VisitableMockMethodBase::ControllerFor<VisitableMockMethodBase>
+ class ControllerFor : public VisitableMockMethodBase::ControllerFor<VisitableMockReturningMethodBase<void> >
{
- typedef VisitableMockMethodBase::ControllerFor<VisitableMockMethodBase> Inherited;
+ typedef VisitableMockMethodBase::ControllerFor<VisitableMockReturningMethodBase<void> > Inherited;
public:
@@ -240,12 +237,15 @@
{
}
};
+
+ friend class VisitableMockReturningMethodBase<void>::ControllerFor;
};
//////////////////////////////////////////////////////////////////////////////////////////////
+#ifdef MOCKPP_XXX
template <typename R, typename P1>
class VisitableMockMethod1 : public VisitableMockReturningMethodBase<R>
@@ -318,7 +318,7 @@
Parameter1.addExpected(param1);
}
- friend class ControllerFor : public VisitableMockReturningMethodBase<R>::ControllerFor
+ class ControllerFor : public VisitableMockReturningMethodBase<R>::ControllerFor
{
public:
@@ -334,7 +334,7 @@
public:
- friend class ControllerFor : public VisitableMockObject::Controller
+ class ControllerFor : public VisitableMockObject::Controller
{
classname *object;
|