Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::internal::QuantifierMatcherImpl< Container > Class Template Reference

#include <gmock-matchers.h>

Inheritance diagram for testing::internal::QuantifierMatcherImpl< Container >:
Collaboration diagram for testing::internal::QuantifierMatcherImpl< Container >:

Public Types

typedef StlContainerView< RawContainer > View
 
typedef View::type StlContainer
 
typedef View::const_reference StlContainerReference
 
typedef StlContainer::value_type Element
 

Public Member Functions

typedef GTEST_REMOVE_REFERENCE_AND_CONST_ (Container) RawContainer
 
template<typename InnerMatcher >
 QuantifierMatcherImpl (InnerMatcher inner_matcher)
 
bool MatchAndExplainImpl (bool all_elements_should_match, Container container, MatchResultListener *listener) const
 
- Public Member Functions inherited from testing::MatcherInterface< Container >
virtual bool MatchAndExplain (Container x, MatchResultListener *listener) const=0
 
- Public Member Functions inherited from testing::MatcherDescriberInterface
virtual ~MatcherDescriberInterface ()
 
virtual void DescribeTo (::std::ostream *os) const =0
 
virtual void DescribeNegationTo (::std::ostream *os) const
 

Protected Member Functions

 GTEST_DISALLOW_ASSIGN_ (QuantifierMatcherImpl)
 

Protected Attributes

const Matcher< const Element & > inner_matcher_
 

Detailed Description

template<typename Container>
class testing::internal::QuantifierMatcherImpl< Container >

Definition at line 3108 of file gmock-matchers.h.

Member Typedef Documentation

◆ Element

template<typename Container >
StlContainer::value_type testing::internal::QuantifierMatcherImpl< Container >::Element

Definition at line 3114 of file gmock-matchers.h.

◆ StlContainer

template<typename Container >
View::type testing::internal::QuantifierMatcherImpl< Container >::StlContainer

Definition at line 3112 of file gmock-matchers.h.

◆ StlContainerReference

template<typename Container >
View::const_reference testing::internal::QuantifierMatcherImpl< Container >::StlContainerReference

Definition at line 3113 of file gmock-matchers.h.

◆ View

template<typename Container >
StlContainerView<RawContainer> testing::internal::QuantifierMatcherImpl< Container >::View

Definition at line 3111 of file gmock-matchers.h.

Constructor & Destructor Documentation

◆ QuantifierMatcherImpl()

template<typename Container >
template<typename InnerMatcher >
testing::internal::QuantifierMatcherImpl< Container >::QuantifierMatcherImpl ( InnerMatcher inner_matcher)
inlineexplicit

Definition at line 3117 of file gmock-matchers.h.

const Matcher< const Element & > inner_matcher_
Matcher< T > SafeMatcherCast(const M &polymorphic_matcher)

Member Function Documentation

◆ GTEST_DISALLOW_ASSIGN_()

template<typename Container >
testing::internal::QuantifierMatcherImpl< Container >::GTEST_DISALLOW_ASSIGN_ ( QuantifierMatcherImpl< Container > )
protected

◆ GTEST_REMOVE_REFERENCE_AND_CONST_()

template<typename Container >
typedef testing::internal::QuantifierMatcherImpl< Container >::GTEST_REMOVE_REFERENCE_AND_CONST_ ( Container )

◆ MatchAndExplainImpl()

template<typename Container >
bool testing::internal::QuantifierMatcherImpl< Container >::MatchAndExplainImpl ( bool all_elements_should_match,
Container container,
MatchResultListener * listener ) const
inline

Definition at line 3124 of file gmock-matchers.h.

3126 {
3127 StlContainerReference stl_container = View::ConstReference(container);
3128 size_t i = 0;
3129 for (typename StlContainer::const_iterator it = stl_container.begin();
3130 it != stl_container.end(); ++it, ++i) {
3131 StringMatchResultListener inner_listener;
3132 const bool matches = inner_matcher_.MatchAndExplain(*it, &inner_listener);
3133
3134 if (matches != all_elements_should_match) {
3135 *listener << "whose element #" << i
3136 << (matches ? " matches" : " doesn't match");
3137 PrintIfNotEmpty(inner_listener.str(), listener->stream());
3138 return !all_elements_should_match;
3139 }
3140 }
3141 return all_elements_should_match;
3142 }
bool MatchAndExplain(GTEST_REFERENCE_TO_CONST_(T) x, MatchResultListener *listener) const
static const_reference ConstReference(const RawContainer &container)
void PrintIfNotEmpty(const std::string &explanation, ::std::ostream *os)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ inner_matcher_

template<typename Container >
const Matcher<const Element&> testing::internal::QuantifierMatcherImpl< Container >::inner_matcher_
protected

Definition at line 3145 of file gmock-matchers.h.


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