mockpp::Or< T > Class Template Reference
[Parameter Constraints]

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

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

List of all members.

Public Member Functions

 Or (const ConstraintHolder< T > &in_left, const ConstraintHolder< T > &in_right, bool in_short=true)
 Constructs the object.
virtual ~Or ()
 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::Or< T >

Calculates the logical disjunction of two constraints.

Evaluation is shortcut, so that the second constraint is not called if the first constraint returns true.

See also:
mockpp::logic_or

Definition at line 52 of file Or.h.


Constructor & Destructor Documentation

template<typename T>
mockpp::Or< T >::Or ( 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 true (c++ standard behaviour)
  • false: always evaluate right even if left is true

Definition at line 62 of file Or.h.


Member Function Documentation

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

template<typename T>
virtual bool mockpp::Or< 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 80 of file Or.h.

template<typename T>
virtual bool mockpp::Or< 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 99 of file Or.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:07 2010 for mockpp by  doxygen 1.6.1