mockpp::And< T > Class Template Reference

Calculates the logical conjunction of two constraints. More...

Inheritance diagram for mockpp::And< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 And (const ConstraintHolder< T > &in_left, const ConstraintHolder< T > &in_right, bool in_short=true)
 Constructs the object.
virtual ~And ()
 Destroys the object.
virtual bool eval (const T &o) const
 Evaluates the constraint.
virtual bool verify (const T &arg) const
 Evaluates the constraint at the end.
virtual String describeTo (String &buffer) const
 Appends the description of this object to the buffer.

Detailed Description

template<typename T>
class mockpp::And< T >

Calculates the logical conjunction of two constraints.

Evaluation is shortcut by default, so that the second constraint is not called if the first constraint returns false.

Definition at line 50 of file And.h.


Constructor & Destructor Documentation

template<typename T>
mockpp::And< T >::And ( const ConstraintHolder< T > &  in_left,
const ConstraintHolder< T > &  in_right,
bool  in_short = true 
) [inline]

Constructs the object.

Parameters:
in_left first operand
in_right second operand
in_short 
  • true: don't evaluate right if left is false (c++ standard behaviour)
  • false: always evaluate right even if left is false

Definition at line 60 of file And.h.


Member Function Documentation

template<typename T>
virtual String mockpp::And< T >::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 115 of file And.h.

template<typename T>
virtual bool mockpp::And< T >::eval ( const T &  o  )  const [inline, virtual]

Evaluates the constraint.

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

Implements mockpp::Constraint< T >.

Definition at line 78 of file And.h.

template<typename T>
virtual bool mockpp::And< T >::verify ( const T &  arg  )  const [inline, virtual]

Evaluates the constraint at the end.

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

Reimplemented from mockpp::Constraint< T >.

Definition at line 97 of file And.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