[Mockpp-commits] mockpp/mockpp VisitableMockObject.h,1.36,1.37
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-03-05 20:43:16
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26844/mockpp Modified Files: VisitableMockObject.h Log Message: extended docs Index: VisitableMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- VisitableMockObject.h 4 Mar 2005 17:39:40 -0000 1.36 +++ VisitableMockObject.h 5 Mar 2005 20:43:07 -0000 1.37 @@ -80,6 +80,11 @@ */ virtual void reset(); + /** + * Sets all internal objects to the state after construction. + */ + virtual void clear(); + /** Switches exception handling back to pre-1.2 behaviour. * @see VisitableMockObject::Controller::unsetThrowablesInline() */ @@ -205,6 +210,13 @@ */ void setDefaultReturnValue (const your_type &rv); + /** Sets the default return value. + * This value is returned if there are no throwables available and if there + * are no other possible return values in a list. + * @param rv the default return value + */ + void setDefaultReturnValue (const your_type &rv); + /** Adds another response value. * Response values are determined on the parameters you pass. This way the * object returns a value that is totally based on the input. @@ -228,6 +240,28 @@ unsigned count = std::numeric_limits < unsigned >::max ()); /** Adds another response value. + * Response values are determined on the parameter constraints you pass. This way the + * object returns a value that is totally based on the input. + * @param rv the return value + * @param p1 the 1. parameter of the method + * @param count the number of times this value shall be returned. Default is unlimited. + */ + void addResponseValue(const ret_type &rv, + const mockpp::ConstraintHolder<type1> &p1, + unsigned count = MOCKPP_UNLIMITED); + + /** Adds another response throwable. + * Response throwables are determined on the parameter constraints you pass. This way the + * object throws an object that is totally based on the input. + * @param t the throwable + * @param p1 the 1. parameter of the method + * @param count the number of times this value shall be returned. Default is unlimited. + */ + void addResponseThrowable(mockpp::Throwable *t, + const mockpp::ConstraintHolder<type1> &p1, + unsigned count = MOCKPP_UNLIMITED); + + /** Adds another response value. * Response values are determined on the parameters you pass. This way the * object returns a value that is totally based on the input. * @param rv the return value @@ -252,6 +286,32 @@ unsigned count = std::numeric_limits < unsigned >::max ()); /** Adds another response value. + * Response values are determined on the parameter constraints you pass. This way the + * object returns a value that is totally based on the input. + * @param rv the return value + * @param p1 the 1. parameter of the method + * @param p2 the 2. parameter of the method + * @param count the number of times this value shall be returned. Default is unlimited. + */ + void addResponseValue(const ret_type &rv, + const mockpp::ConstraintHolder<type1> &p1, + const mockpp::ConstraintHolder<type2> &p2, + unsigned count = MOCKPP_UNLIMITED); + + /** Adds another response throwable. + * Response throwables are determined on the parameter constraints you pass. This way the + * object throws an object that is totally based on the input. + * @param t the throwable + * @param p1 the 1. parameter of the method + * @param p2 the 2. parameter of the method + * @param count the number of times this value shall be returned. Default is unlimited. + */ + void addResponseThrowable(mockpp::Throwable *t, + const mockpp::ConstraintHolder<type1> &p1, + const mockpp::ConstraintHolder<type2> &p2, + unsigned count = MOCKPP_UNLIMITED); + + /** Adds another response value. * Response values are determined on the parameters you pass. This way the * object returns a value that is totally based on the input. * @param rv the return value @@ -277,12 +337,35 @@ const your_type1 &p1, const your_type2 &p2, const your_type3 &p3, unsigned count = std::numeric_limits < unsigned >::max ()); - /** Sets the default return value. - * This value is returned if there are no throwables available and if there - * are no other possible return values in a list. - * @param rv the default return value + /** Adds another response value. + * Response values are determined on the parameter constraints you pass. This way the + * object returns a value that is totally based on the input. + * @param rv the return value + * @param p1 the 1. parameter of the method + * @param p2 the 2. parameter of the method + * @param p3 the 3. parameter of the method + * @param count the number of times this value shall be returned. Default is unlimited. */ - void setDefaultReturnValue (const your_type &rv); + void addResponseValue(const ret_type &rv, + const mockpp::ConstraintHolder<type1> &p1, + const mockpp::ConstraintHolder<type2> &p2, + const mockpp::ConstraintHolder<type3> &p3, + unsigned count = MOCKPP_UNLIMITED); + + /** Adds another response throwable. + * Response throwables are determined on the parameter constraints you pass. This way the + * object throws an object that is totally based on the input. + * @param t the throwable + * @param p1 the 1. parameter of the method + * @param p2 the 2. parameter of the method + * @param p3 the 3. parameter of the method + * @param count the number of times this value shall be returned. Default is unlimited. + */ + void addResponseThrowable(mockpp::Throwable *t, + const mockpp::ConstraintHolder<type1> &p1, + const mockpp::ConstraintHolder<type2> &p2, + const mockpp::ConstraintHolder<type3> &p3, + unsigned count = MOCKPP_UNLIMITED); /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -315,6 +398,40 @@ unsigned count = std::numeric_limits < unsigned >::max ()); /** Adds another response value. + * Response values are determined on the parameter constraints you pass. This way the + * object returns a value that is totally based on the input. + * @param rv the return value + * @param p1 the 1. parameter of the method + * @param p2 the 2. parameter of the method + * @param p3 the 3. parameter of the method + * @param p4 the 4. parameter of the method + * @param count the number of times this value shall be returned. Default is unlimited. + */ + void addResponseValue(const ret_type &rv, + const mockpp::ConstraintHolder<type1> &p1, + const mockpp::ConstraintHolder<type2> &p2, + const mockpp::ConstraintHolder<type3> &p3, + const mockpp::ConstraintHolder<type4> &p4, + unsigned count = MOCKPP_UNLIMITED); + + /** Adds another response throwable. + * Response throwables are determined on the parameter constraints you pass. This way the + * object throws an object that is totally based on the input. + * @param t the throwable + * @param p1 the 1. parameter of the method + * @param p2 the 2. parameter of the method + * @param p3 the 3. parameter of the method + * @param p4 the 4. parameter of the method + * @param count the number of times this value shall be returned. Default is unlimited. + */ + void addResponseThrowable(mockpp::Throwable *t, + const mockpp::ConstraintHolder<type1> &p1, + const mockpp::ConstraintHolder<type2> &p2, + const mockpp::ConstraintHolder<type3> &p3, + const mockpp::ConstraintHolder<type4> &p4, + unsigned count = MOCKPP_UNLIMITED); + + /** Adds another response value. * Response values are determined on the parameters you pass. This way the * object returns a value that is totally based on the input. * @param rv the return value @@ -345,7 +462,45 @@ const your_type1 &p1, const your_type2 &p2, const your_type3 &p3, const your_type4 &p4, const your_type5 &p5, unsigned count = std::numeric_limits < unsigned >::max ()); -// @todo update doc + + /** Adds another response value. + * Response values are determined on the parameter constraints you pass. This way the + * object returns a value that is totally based on the input. + * @param rv the return value + * @param p1 the 1. parameter of the method + * @param p2 the 2. parameter of the method + * @param p3 the 3. parameter of the method + * @param p4 the 4. parameter of the method + * @param p5 the 5. parameter of the method + * @param count the number of times this value shall be returned. Default is unlimited. + */ + void addResponseValue(const ret_type &rv, + const mockpp::ConstraintHolder<type1> &p1, + const mockpp::ConstraintHolder<type2> &p2, + const mockpp::ConstraintHolder<type3> &p3, + const mockpp::ConstraintHolder<type4> &p4, + const mockpp::ConstraintHolder<type5> &p5, + unsigned count = MOCKPP_UNLIMITED); + + /** Adds another response throwable. + * Response throwables are determined on the parameter constraints you pass. This way the + * object throws an object that is totally based on the input. + * @param t the throwable + * @param p1 the 1. parameter of the method + * @param p2 the 2. parameter of the method + * @param p3 the 3. parameter of the method + * @param p4 the 4. parameter of the method + * @param p5 the 5. parameter of the method + * @param count the number of times this value shall be returned. Default is unlimited. + */ + void addResponseThrowable(mockpp::Throwable *t, + const mockpp::ConstraintHolder<type1> &p1, + const mockpp::ConstraintHolder<type2> &p2, + const mockpp::ConstraintHolder<type3> &p3, + const mockpp::ConstraintHolder<type4> &p4, + const mockpp::ConstraintHolder<type5> &p5, + unsigned count = MOCKPP_UNLIMITED); + #endif // DOXYGEN_SHOULD_SKIP_THIS } ; |