Hamcrest-Qt  0.0.1
Hamcrest matchers for C++/Qt
 All Classes Namespaces Functions
Public Member Functions | List of all members
HamcrestQt::AnyOf< T > Class Template Reference

Calculates the logical disjunction of multiple matchers. More...

#include <anyof.h>

Inheritance diagram for HamcrestQt::AnyOf< T >:
HamcrestQt::ShortcutCombination< T > HamcrestQt::BaseMatcher< T > HamcrestQt::Matcher< T > HamcrestQt::SelfDescribing

Public Member Functions

 AnyOf (const QList< QSharedPointer< Matcher< T > > > &m)
 
virtual bool matches (const T &item) const
 Evaluates the matcher for argument item. More...
 
virtual void describeTo (Description &description) const
 Generates a description of the object. More...
 
- Public Member Functions inherited from HamcrestQt::ShortcutCombination< T >
 ShortcutCombination (const QList< QSharedPointer< Matcher< T > > > &m)
 
void describeTo (Description &description, const QString &op) const
 
- Public Member Functions inherited from HamcrestQt::BaseMatcher< T >
virtual void describeMismatch (const T &item, Description &description) const
 Generate a description of why the matcher has not accepted the item. More...
 
virtual QString toString () const
 

Additional Inherited Members

- Protected Member Functions inherited from HamcrestQt::ShortcutCombination< T >
virtual bool matches (const T &item, bool shortcut) const
 

Detailed Description

template<typename T>
class HamcrestQt::AnyOf< T >

Calculates the logical disjunction of multiple matchers.

Evaluation is shortcut, so subsequent matchers are not called if an earlier matcher returns true.

Member Function Documentation

template<typename T >
virtual void HamcrestQt::AnyOf< T >::describeTo ( Description description) const
inlinevirtual

Generates a description of the object.

The description may be part of a description of a larger object of which this is just a component, so it should be worded appropriately.

Parameters
descriptionThe description to be built or appended to.

Implements HamcrestQt::SelfDescribing.

template<typename T >
virtual bool HamcrestQt::AnyOf< T >::matches ( const T &  item) const
inlinevirtual

Evaluates the matcher for argument item.

Parameters
itemthe object against which the matcher is evaluated.
Returns
true if item matches, otherwise false.
See Also
BaseMatcher

Implements HamcrestQt::Matcher< T >.


The documentation for this class was generated from the following file: