[Mockpp-commits] mockpp/mockpp/chaining ChainingMockObjectSupport.h,1.19,1.20
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-03-13 19:14:20
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25526/mockpp/chaining Modified Files: ChainingMockObjectSupport.h Log Message: fixed actually non-working IsInstanceOf Index: ChainingMockObjectSupport.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainingMockObjectSupport.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ChainingMockObjectSupport.h 13 Mar 2005 17:14:32 -0000 1.19 +++ ChainingMockObjectSupport.h 13 Mar 2005 19:13:24 -0000 1.20 @@ -222,16 +222,19 @@ } -/** Creates a constraint that checks if an object is derived +/** Creates a constraint that checks if an object is derived from a base class. + * The base class is needed since dynamic_cast checks for an existing traversal + * from \c derived to \c base. * @ingroup grp_constraint_abbrev * @see mockpp::IsInstanceOf * @return the new constraint */ -template <typename T> -typename Constraint<T*>::AP -isA( const T & /*operandClass*/ ) +template <typename ROOT, + typename DERIVED> +typename Constraint<ROOT*>::AP +isA( const DERIVED & /*operandClass*/ ) { - return new IsInstanceOf<T>(); + return new IsInstanceOf<ROOT, DERIVED>(); } |