Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Catch::Matchers::Impl::MatchAllOf< ArgT > Struct Template Reference

#include <catch_matchers.h>

Inheritance diagram for Catch::Matchers::Impl::MatchAllOf< ArgT >:
Collaboration diagram for Catch::Matchers::Impl::MatchAllOf< ArgT >:

Public Member Functions

bool match (ArgT const &arg) const override
 
std::string describe () const override
 
MatchAllOf< ArgT > & operator&& (MatcherBase< ArgT > const &other)
 
bool match (ArgT const &arg) const override
 
std::string describe () const override
 
MatchAllOf< ArgT > & operator&& (MatcherBase< ArgT > const &other)
 
- Public Member Functions inherited from Catch::Matchers::Impl::MatcherBase< ArgT >
MatchAllOf< ArgT > operator&& (MatcherBase const &other) const
 
MatchAllOf< ArgT > operator&& (MatcherBase const &other) const
 
MatchAnyOf< ArgT > operator|| (MatcherBase const &other) const
 
MatchAnyOf< ArgT > operator|| (MatcherBase const &other) const
 
MatchNotOf< ArgT > operator! () const
 
MatchNotOf< ArgT > operator! () 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< ArgT >

Public Attributes

std::vector< MatcherBase< ArgT > const * > m_matchers
 

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 ArgT>
struct Catch::Matchers::Impl::MatchAllOf< ArgT >

Definition at line 2933 of file catch.hpp.

Member Function Documentation

◆ describe() [1/2]

template<typename ArgT >
std::string Catch::Matchers::Impl::MatchAllOf< ArgT >::describe ( ) const
inlineoverridevirtual

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

Definition at line 69 of file catch_matchers.h.

69 {
70 std::string description;
71 description.reserve( 4 + m_matchers.size()*32 );
72 description += "( ";
73 bool first = true;
74 for( auto matcher : m_matchers ) {
75 if( first )
76 first = false;
77 else
78 description += " and ";
79 description += matcher->toString();
80 }
81 description += " )";
82 return description;
83 }
std::vector< MatcherBase< ArgT > const * > m_matchers

◆ describe() [2/2]

template<typename ArgT >
std::string Catch::Matchers::Impl::MatchAllOf< ArgT >::describe ( ) const
inlineoverridevirtual

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

Definition at line 2941 of file catch.hpp.

2941 {
2942 std::string description;
2943 description.reserve( 4 + m_matchers.size()*32 );
2944 description += "( ";
2945 bool first = true;
2946 for( auto matcher : m_matchers ) {
2947 if( first )
2948 first = false;
2949 else
2950 description += " and ";
2951 description += matcher->toString();
2952 }
2953 description += " )";
2954 return description;
2955 }

◆ match() [1/2]

template<typename ArgT >
bool Catch::Matchers::Impl::MatchAllOf< ArgT >::match ( ArgT const & arg) const
inlineoverridevirtual

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

Definition at line 62 of file catch_matchers.h.

62 {
63 for( auto matcher : m_matchers ) {
64 if (!matcher->match(arg))
65 return false;
66 }
67 return true;
68 }

◆ match() [2/2]

template<typename ArgT >
bool Catch::Matchers::Impl::MatchAllOf< ArgT >::match ( ArgT const & arg) const
inlineoverridevirtual

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

Definition at line 2934 of file catch.hpp.

2934 {
2935 for( auto matcher : m_matchers ) {
2936 if (!matcher->match(arg))
2937 return false;
2938 }
2939 return true;
2940 }

◆ operator&&() [1/2]

template<typename ArgT >
MatchAllOf< ArgT > & Catch::Matchers::Impl::MatchAllOf< ArgT >::operator&& ( MatcherBase< ArgT > const & other)
inline

Definition at line 85 of file catch_matchers.h.

85 {
86 m_matchers.push_back( &other );
87 return *this;
88 }

◆ operator&&() [2/2]

template<typename ArgT >
MatchAllOf< ArgT > & Catch::Matchers::Impl::MatchAllOf< ArgT >::operator&& ( MatcherBase< ArgT > const & other)
inline

Definition at line 2957 of file catch.hpp.

2957 {
2958 m_matchers.push_back( &other );
2959 return *this;
2960 }

Member Data Documentation

◆ m_matchers

template<typename ArgT >
std::vector< MatcherBase< ArgT > const * > Catch::Matchers::Impl::MatchAllOf< ArgT >::m_matchers

Definition at line 90 of file catch_matchers.h.


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