Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Catch::Matchers::Generic::PredicateMatcher< T > Class Template Reference

#include <catch_matchers_generic.hpp>

Inheritance diagram for Catch::Matchers::Generic::PredicateMatcher< T >:
Collaboration diagram for Catch::Matchers::Generic::PredicateMatcher< T >:

Public Member Functions

 PredicateMatcher (std::function< bool(T const &)> const &elem, std::string const &descr)
 
bool match (T const &item) const override
 
std::string describe () const override
 
 PredicateMatcher (std::function< bool(T const &)> const &elem, std::string const &descr)
 
bool match (T const &item) const override
 
std::string describe () const override
 
- Public Member Functions inherited from Catch::Matchers::Impl::MatcherBase< T >
MatchAllOf< Toperator&& (MatcherBase const &other) const
 
MatchAnyOf< Toperator|| (MatcherBase const &other) const
 
MatchNotOf< Toperator! () const
 
MatchAllOf< Toperator&& (MatcherBase const &other) const
 
MatchAnyOf< Toperator|| (MatcherBase const &other) const
 
MatchNotOf< Toperator! () const
 
- Public Member Functions inherited from Catch::Matchers::Impl::MatcherUntypedBase
 MatcherUntypedBase ()=default
 
 MatcherUntypedBase (MatcherUntypedBase const &)=default
 
MatcherUntypedBaseoperator= (MatcherUntypedBase const &)=delete
 
std::string toString () const
 
 MatcherUntypedBase ()=default
 
 MatcherUntypedBase (MatcherUntypedBase const &)=default
 
MatcherUntypedBaseoperator= (MatcherUntypedBase const &)=delete
 
std::string toString () const
 
- Public Member Functions inherited from Catch::Matchers::Impl::MatcherMethod< T >

Additional Inherited Members

- Protected Member Functions inherited from Catch::Matchers::Impl::MatcherUntypedBase
virtual ~MatcherUntypedBase ()
 
virtual ~MatcherUntypedBase ()
 
- Protected Attributes inherited from Catch::Matchers::Impl::MatcherUntypedBase
std::string m_cachedToString
 

Detailed Description

template<typename T>
class Catch::Matchers::Generic::PredicateMatcher< T >

Definition at line 3093 of file catch.hpp.

Constructor & Destructor Documentation

◆ PredicateMatcher() [1/2]

template<typename T >
Catch::Matchers::Generic::PredicateMatcher< T >::PredicateMatcher ( std::function< bool(T const &)> const & elem,
std::string const & descr )
inline

Definition at line 30 of file catch_matchers_generic.hpp.

31 :m_predicate(std::move(elem)),
32 m_description(Detail::finalizeDescription(descr))
33 {}
std::string finalizeDescription(const std::string &desc)

◆ PredicateMatcher() [2/2]

template<typename T >
Catch::Matchers::Generic::PredicateMatcher< T >::PredicateMatcher ( std::function< bool(T const &)> const & elem,
std::string const & descr )
inline

Definition at line 3098 of file catch.hpp.

3099 :m_predicate(std::move(elem)),
3100 m_description(Detail::finalizeDescription(descr))
3101 {}

Member Function Documentation

◆ describe() [1/2]

template<typename T >
std::string Catch::Matchers::Generic::PredicateMatcher< T >::describe ( ) const
inlineoverridevirtual

Implements Catch::Matchers::Impl::MatcherUntypedBase.

Definition at line 39 of file catch_matchers_generic.hpp.

39 {
40 return m_description;
41 }

◆ describe() [2/2]

template<typename T >
std::string Catch::Matchers::Generic::PredicateMatcher< T >::describe ( ) const
inlineoverridevirtual

Implements Catch::Matchers::Impl::MatcherUntypedBase.

Definition at line 3107 of file catch.hpp.

3107 {
3108 return m_description;
3109 }

◆ match() [1/2]

template<typename T >
bool Catch::Matchers::Generic::PredicateMatcher< T >::match ( T const & item) const
inlineoverridevirtual

Implements Catch::Matchers::Impl::MatcherMethod< T >.

Definition at line 35 of file catch_matchers_generic.hpp.

35 {
36 return m_predicate(item);
37 }

◆ match() [2/2]

template<typename T >
bool Catch::Matchers::Generic::PredicateMatcher< T >::match ( T const & item) const
inlineoverridevirtual

Implements Catch::Matchers::Impl::MatcherMethod< T >.

Definition at line 3103 of file catch.hpp.

3103 {
3104 return m_predicate(item);
3105 }

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