mockpp::IsInstanceOf< BASE, DERIVED > Class Template Reference
[Parameter Constraints]

Tests whether the value is derived from the given class. More...

Inheritance diagram for mockpp::IsInstanceOf< BASE, DERIVED >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool eval (const pBASE &obj) const
 Evaluates the constraint.
virtual String describeTo (String &buffer) const
 Appends the description of this object to the buffer.

Detailed Description

template<typename BASE, typename DERIVED>
class mockpp::IsInstanceOf< BASE, DERIVED >

Tests whether the value is derived from the given class.

A base class is needed since dynamic_cast checks for an existing traversal from derived to base.

See also:
mockpp::isA

Definition at line 55 of file IsInstanceOf.h.


Member Function Documentation

template<typename BASE , typename DERIVED >
virtual String mockpp::IsInstanceOf< BASE, DERIVED >::describeTo ( String buffer  )  const [inline, virtual]

Appends the description of this object to the buffer.

Parameters:
buffer The buffer that the description is appended to.
Returns:
The current content of the buffer data

Implements mockpp::SelfDescribing.

Definition at line 75 of file IsInstanceOf.h.

template<typename BASE , typename DERIVED >
virtual bool mockpp::IsInstanceOf< BASE, DERIVED >::eval ( const pBASE &  obj  )  const [inline, virtual]

Evaluates the constraint.

Parameters:
obj the object against which the constraint is evaluated.
Returns:
true: obj meets the constraint,
false if it does not.

Implements mockpp::Constraint< BASE * >.

Definition at line 66 of file IsInstanceOf.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on Tue Jan 5 09:49:06 2010 for mockpp by  doxygen 1.6.1