proxygen
testing::internal::QuantifierMatcherImpl< Container > Class Template Reference

#include <gmock-matchers.h>

Inheritance diagram for testing::internal::QuantifierMatcherImpl< Container >:
testing::MatcherInterface< Container > testing::MatcherInterface< Container > testing::MatcherInterface< Container > testing::MatcherDescriberInterface testing::MatcherDescriberInterface testing::MatcherDescriberInterface testing::MatcherDescriberInterface testing::MatcherDescriberInterface testing::MatcherDescriberInterface testing::MatcherDescriberInterface testing::MatcherDescriberInterface testing::MatcherDescriberInterface testing::internal::ContainsMatcherImpl< Container > testing::internal::ContainsMatcherImpl< Container > testing::internal::ContainsMatcherImpl< Container > testing::internal::EachMatcherImpl< Container > testing::internal::EachMatcherImpl< Container > testing::internal::EachMatcherImpl< Container >

Public Types

typedef StlContainerView< RawContainer > View
 
typedef View::type StlContainer
 
typedef View::const_reference StlContainerReference
 
typedef StlContainer::value_type Element
 
typedef StlContainerView< RawContainer > View
 
typedef View::type StlContainer
 
typedef View::const_reference StlContainerReference
 
typedef StlContainer::value_type Element
 
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
 
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
 
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 (Containerx, MatchResultListener *listener) const =0
 
virtual bool MatchAndExplain (Containerx, MatchResultListener *listener) const =0
 
virtual bool MatchAndExplain (Containerx, 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
 
virtual ~MatcherDescriberInterface ()
 
virtual void DescribeTo (::std::ostream *os) const =0
 
virtual void DescribeNegationTo (::std::ostream *os) const
 
virtual ~MatcherDescriberInterface ()
 
virtual void DescribeTo (::std::ostream *os) const =0
 
virtual void DescribeNegationTo (::std::ostream *os) const
 

Protected Member Functions

 GTEST_DISALLOW_ASSIGN_ (QuantifierMatcherImpl)
 
 GTEST_DISALLOW_ASSIGN_ (QuantifierMatcherImpl)
 
 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 2800 of file gmock-matchers.h.

Member Typedef Documentation

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Constructor & Destructor Documentation

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

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

2810  : inner_matcher_(
2811  testing::SafeMatcherCast<const Element&>(inner_matcher)) {}
const Matcher< const Element & > inner_matcher_
template<typename Container >
template<typename InnerMatcher >
testing::internal::QuantifierMatcherImpl< Container >::QuantifierMatcherImpl ( InnerMatcher  inner_matcher)
inlineexplicit

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

2810  : inner_matcher_(
2811  testing::SafeMatcherCast<const Element&>(inner_matcher)) {}
const Matcher< const Element & > inner_matcher_
template<typename Container >
template<typename InnerMatcher >
testing::internal::QuantifierMatcherImpl< Container >::QuantifierMatcherImpl ( InnerMatcher  inner_matcher)
inlineexplicit

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

2810  : inner_matcher_(
2811  testing::SafeMatcherCast<const Element&>(inner_matcher)) {}
const Matcher< const Element & > inner_matcher_

Member Function Documentation

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

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

References i, testing::internal::PrintIfNotEmpty(), testing::StringMatchResultListener::str(), and testing::MatchResultListener::stream().

2818  {
2819  StlContainerReference stl_container = View::ConstReference(container);
2820  size_t i = 0;
2821  for (typename StlContainer::const_iterator it = stl_container.begin();
2822  it != stl_container.end(); ++it, ++i) {
2823  StringMatchResultListener inner_listener;
2824  const bool matches = inner_matcher_.MatchAndExplain(*it, &inner_listener);
2825 
2826  if (matches != all_elements_should_match) {
2827  *listener << "whose element #" << i
2828  << (matches ? " matches" : " doesn't match");
2829  PrintIfNotEmpty(inner_listener.str(), listener->stream());
2830  return !all_elements_should_match;
2831  }
2832  }
2833  return all_elements_should_match;
2834  }
static const_reference ConstReference(const RawContainer &container)
bool MatchAndExplain(T x, MatchResultListener *listener) const
void PrintIfNotEmpty(const internal::string &explanation,::std::ostream *os)
const Matcher< const Element & > inner_matcher_
template<typename Container >
bool testing::internal::QuantifierMatcherImpl< Container >::MatchAndExplainImpl ( bool  all_elements_should_match,
Container  container,
MatchResultListener listener 
) const
inline

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

References GTEST_DISALLOW_ASSIGN_, i, testing::internal::PrintIfNotEmpty(), and testing::StringMatchResultListener::str().

2818  {
2819  StlContainerReference stl_container = View::ConstReference(container);
2820  size_t i = 0;
2821  for (typename StlContainer::const_iterator it = stl_container.begin();
2822  it != stl_container.end(); ++it, ++i) {
2823  StringMatchResultListener inner_listener;
2824  const bool matches = inner_matcher_.MatchAndExplain(*it, &inner_listener);
2825 
2826  if (matches != all_elements_should_match) {
2827  *listener << "whose element #" << i
2828  << (matches ? " matches" : " doesn't match");
2829  PrintIfNotEmpty(inner_listener.str(), listener->stream());
2830  return !all_elements_should_match;
2831  }
2832  }
2833  return all_elements_should_match;
2834  }
static const_reference ConstReference(const RawContainer &container)
bool MatchAndExplain(T x, MatchResultListener *listener) const
void PrintIfNotEmpty(const internal::string &explanation,::std::ostream *os)
const Matcher< const Element & > inner_matcher_
template<typename Container >
bool testing::internal::QuantifierMatcherImpl< Container >::MatchAndExplainImpl ( bool  all_elements_should_match,
Container  container,
MatchResultListener listener 
) const
inline

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

References GTEST_DISALLOW_ASSIGN_, i, testing::internal::PrintIfNotEmpty(), and testing::StringMatchResultListener::str().

2818  {
2819  StlContainerReference stl_container = View::ConstReference(container);
2820  size_t i = 0;
2821  for (typename StlContainer::const_iterator it = stl_container.begin();
2822  it != stl_container.end(); ++it, ++i) {
2823  StringMatchResultListener inner_listener;
2824  const bool matches = inner_matcher_.MatchAndExplain(*it, &inner_listener);
2825 
2826  if (matches != all_elements_should_match) {
2827  *listener << "whose element #" << i
2828  << (matches ? " matches" : " doesn't match");
2829  PrintIfNotEmpty(inner_listener.str(), listener->stream());
2830  return !all_elements_should_match;
2831  }
2832  }
2833  return all_elements_should_match;
2834  }
static const_reference ConstReference(const RawContainer &container)
bool MatchAndExplain(T x, MatchResultListener *listener) const
void PrintIfNotEmpty(const internal::string &explanation,::std::ostream *os)
const Matcher< const Element & > inner_matcher_

Member Data Documentation

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

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


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