mockpp::IsCloseTo< NumberType > Class Template Reference
[Parameter Constraints]

Is the value of a number equal to a value within some range of acceptable deviation? More...

Inheritance diagram for mockpp::IsCloseTo< NumberType >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 IsCloseTo (const NumberType &in_value, const NumberType &in_deviation)
 Constructs the object.
virtual bool eval (const NumberType &arg) const
 Evaluates the constraint.
virtual String describeTo (String &buffer) const
 Appends the description of this object to the buffer.

Detailed Description

template<typename NumberType>
class mockpp::IsCloseTo< NumberType >

Is the value of a number equal to a value within some range of acceptable deviation?

See also:
mockpp::eq( const T &operand, const T &deviation )

Definition at line 52 of file IsCloseTo.h.


Constructor & Destructor Documentation

template<typename NumberType>
mockpp::IsCloseTo< NumberType >::IsCloseTo ( const NumberType &  in_value,
const NumberType &  in_deviation 
) [inline]

Constructs the object.

Parameters:
in_value the value for the comparison
in_deviation the allowed deviation

Definition at line 60 of file IsCloseTo.h.


Member Function Documentation

template<typename NumberType>
virtual String mockpp::IsCloseTo< NumberType >::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 81 of file IsCloseTo.h.

template<typename NumberType>
virtual bool mockpp::IsCloseTo< NumberType >::eval ( const NumberType &  arg  )  const [inline, virtual]

Evaluates the constraint.

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

Implements mockpp::Constraint< NumberType >.

Definition at line 70 of file IsCloseTo.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