proxygen
testing::internal::FieldMatcher< Class, FieldType > Class Template Reference

#include <gmock-matchers.h>

Public Member Functions

 FieldMatcher (FieldType Class::*field, const Matcher< const FieldType & > &matcher)
 
void DescribeTo (::std::ostream *os) const
 
void DescribeNegationTo (::std::ostream *os) const
 
template<typename T >
bool MatchAndExplain (const T &value, MatchResultListener *listener) const
 
 FieldMatcher (FieldType Class::*field, const Matcher< const FieldType & > &matcher)
 
void DescribeTo (::std::ostream *os) const
 
void DescribeNegationTo (::std::ostream *os) const
 
template<typename T >
bool MatchAndExplain (const T &value, MatchResultListener *listener) const
 
 FieldMatcher (FieldType Class::*field, const Matcher< const FieldType & > &matcher)
 
void DescribeTo (::std::ostream *os) const
 
void DescribeNegationTo (::std::ostream *os) const
 
template<typename T >
bool MatchAndExplain (const T &value, MatchResultListener *listener) const
 

Private Member Functions

bool MatchAndExplainImpl (false_type, const Class &obj, MatchResultListener *listener) const
 
bool MatchAndExplainImpl (true_type, const Class *p, MatchResultListener *listener) const
 
 GTEST_DISALLOW_ASSIGN_ (FieldMatcher)
 
bool MatchAndExplainImpl (false_type, const Class &obj, MatchResultListener *listener) const
 
bool MatchAndExplainImpl (true_type, const Class *p, MatchResultListener *listener) const
 
 GTEST_DISALLOW_ASSIGN_ (FieldMatcher)
 
bool MatchAndExplainImpl (false_type, const Class &obj, MatchResultListener *listener) const
 
bool MatchAndExplainImpl (true_type, const Class *p, MatchResultListener *listener) const
 
 GTEST_DISALLOW_ASSIGN_ (FieldMatcher)
 

Private Attributes

const FieldType Class::* field_
 
const Matcher< const FieldType & > matcher_
 

Detailed Description

template<typename Class, typename FieldType>
class testing::internal::FieldMatcher< Class, FieldType >

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

Constructor & Destructor Documentation

template<typename Class , typename FieldType >
testing::internal::FieldMatcher< Class, FieldType >::FieldMatcher ( FieldType Class::*  field,
const Matcher< const FieldType & > &  matcher 
)
inline

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

2185  : field_(field), matcher_(matcher) {}
Map field(FieldType Class::*field)
Definition: Base.h:641
const Matcher< const FieldType & > matcher_
const FieldType Class::* field_
template<typename Class , typename FieldType >
testing::internal::FieldMatcher< Class, FieldType >::FieldMatcher ( FieldType Class::*  field,
const Matcher< const FieldType & > &  matcher 
)
inline

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

2185  : field_(field), matcher_(matcher) {}
Map field(FieldType Class::*field)
Definition: Base.h:641
const Matcher< const FieldType & > matcher_
const FieldType Class::* field_
template<typename Class , typename FieldType >
testing::internal::FieldMatcher< Class, FieldType >::FieldMatcher ( FieldType Class::*  field,
const Matcher< const FieldType & > &  matcher 
)
inline

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

2185  : field_(field), matcher_(matcher) {}
Map field(FieldType Class::*field)
Definition: Base.h:641
const Matcher< const FieldType & > matcher_
const FieldType Class::* field_

Member Function Documentation

template<typename Class , typename FieldType >
void testing::internal::FieldMatcher< Class, FieldType >::DescribeNegationTo ( ::std::ostream *  os) const
inline

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

2192  {
2193  *os << "is an object whose given field ";
2195  }
const Matcher< const FieldType & > matcher_
void DescribeNegationTo(::std::ostream *os) const
template<typename Class , typename FieldType >
void testing::internal::FieldMatcher< Class, FieldType >::DescribeNegationTo ( ::std::ostream *  os) const
inline

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

2192  {
2193  *os << "is an object whose given field ";
2195  }
const Matcher< const FieldType & > matcher_
void DescribeNegationTo(::std::ostream *os) const
template<typename Class , typename FieldType >
void testing::internal::FieldMatcher< Class, FieldType >::DescribeNegationTo ( ::std::ostream *  os) const
inline

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

2192  {
2193  *os << "is an object whose given field ";
2195  }
const Matcher< const FieldType & > matcher_
void DescribeNegationTo(::std::ostream *os) const
template<typename Class , typename FieldType >
void testing::internal::FieldMatcher< Class, FieldType >::DescribeTo ( ::std::ostream *  os) const
inline

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

2187  {
2188  *os << "is an object whose given field ";
2189  matcher_.DescribeTo(os);
2190  }
void DescribeTo(::std::ostream *os) const
const Matcher< const FieldType & > matcher_
template<typename Class , typename FieldType >
void testing::internal::FieldMatcher< Class, FieldType >::DescribeTo ( ::std::ostream *  os) const
inline

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

2187  {
2188  *os << "is an object whose given field ";
2189  matcher_.DescribeTo(os);
2190  }
void DescribeTo(::std::ostream *os) const
const Matcher< const FieldType & > matcher_
template<typename Class , typename FieldType >
void testing::internal::FieldMatcher< Class, FieldType >::DescribeTo ( ::std::ostream *  os) const
inline

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

2187  {
2188  *os << "is an object whose given field ";
2189  matcher_.DescribeTo(os);
2190  }
void DescribeTo(::std::ostream *os) const
const Matcher< const FieldType & > matcher_
template<typename Class , typename FieldType >
testing::internal::FieldMatcher< Class, FieldType >::GTEST_DISALLOW_ASSIGN_ ( FieldMatcher< Class, FieldType >  )
private
template<typename Class , typename FieldType >
testing::internal::FieldMatcher< Class, FieldType >::GTEST_DISALLOW_ASSIGN_ ( FieldMatcher< Class, FieldType >  )
private
template<typename Class , typename FieldType >
testing::internal::FieldMatcher< Class, FieldType >::GTEST_DISALLOW_ASSIGN_ ( FieldMatcher< Class, FieldType >  )
private
template<typename Class , typename FieldType >
template<typename T >
bool testing::internal::FieldMatcher< Class, FieldType >::MatchAndExplain ( const T value,
MatchResultListener listener 
) const
inline

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

References GTEST_REMOVE_CONST_, and type.

2198  {
2199  return MatchAndExplainImpl(
2200  typename ::testing::internal::
2201  is_pointer<GTEST_REMOVE_CONST_(T)>::type(),
2202  value, listener);
2203  }
#define T(v)
Definition: http_parser.c:233
PskType type
#define GTEST_REMOVE_CONST_(T)
static const char *const value
Definition: Conv.cpp:50
bool MatchAndExplainImpl(false_type, const Class &obj, MatchResultListener *listener) const
template<typename Class , typename FieldType >
template<typename T >
bool testing::internal::FieldMatcher< Class, FieldType >::MatchAndExplain ( const T value,
MatchResultListener listener 
) const
inline

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

References GTEST_REMOVE_CONST_, and type.

2198  {
2199  return MatchAndExplainImpl(
2200  typename ::testing::internal::
2201  is_pointer<GTEST_REMOVE_CONST_(T)>::type(),
2202  value, listener);
2203  }
#define T(v)
Definition: http_parser.c:233
PskType type
#define GTEST_REMOVE_CONST_(T)
static const char *const value
Definition: Conv.cpp:50
bool MatchAndExplainImpl(false_type, const Class &obj, MatchResultListener *listener) const
template<typename Class , typename FieldType >
template<typename T >
bool testing::internal::FieldMatcher< Class, FieldType >::MatchAndExplain ( const T value,
MatchResultListener listener 
) const
inline

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

References GTEST_REMOVE_CONST_, T, and type.

2198  {
2199  return MatchAndExplainImpl(
2200  typename ::testing::internal::
2201  is_pointer<GTEST_REMOVE_CONST_(T)>::type(),
2202  value, listener);
2203  }
#define T(v)
Definition: http_parser.c:233
PskType type
#define GTEST_REMOVE_CONST_(T)
static const char *const value
Definition: Conv.cpp:50
bool MatchAndExplainImpl(false_type, const Class &obj, MatchResultListener *listener) const
template<typename Class , typename FieldType >
bool testing::internal::FieldMatcher< Class, FieldType >::MatchAndExplainImpl ( false_type  ,
const Class &  obj,
MatchResultListener listener 
) const
inlineprivate

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

References testing::internal::MatchPrintAndExplain().

2210  {
2211  *listener << "whose given field is ";
2212  return MatchPrintAndExplain(obj.*field_, matcher_, listener);
2213  }
bool MatchPrintAndExplain(Value &value, const Matcher< T > &matcher, MatchResultListener *listener)
const Matcher< const FieldType & > matcher_
const FieldType Class::* field_
template<typename Class , typename FieldType >
bool testing::internal::FieldMatcher< Class, FieldType >::MatchAndExplainImpl ( false_type  ,
const Class &  obj,
MatchResultListener listener 
) const
inlineprivate

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

References testing::internal::MatchPrintAndExplain().

2210  {
2211  *listener << "whose given field is ";
2212  return MatchPrintAndExplain(obj.*field_, matcher_, listener);
2213  }
bool MatchPrintAndExplain(Value &value, const Matcher< T > &matcher, MatchResultListener *listener)
const Matcher< const FieldType & > matcher_
const FieldType Class::* field_
template<typename Class , typename FieldType >
bool testing::internal::FieldMatcher< Class, FieldType >::MatchAndExplainImpl ( false_type  ,
const Class &  obj,
MatchResultListener listener 
) const
inlineprivate

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

References testing::internal::MatchPrintAndExplain().

2210  {
2211  *listener << "whose given field is ";
2212  return MatchPrintAndExplain(obj.*field_, matcher_, listener);
2213  }
bool MatchPrintAndExplain(Value &value, const Matcher< T > &matcher, MatchResultListener *listener)
const Matcher< const FieldType & > matcher_
const FieldType Class::* field_
template<typename Class , typename FieldType >
bool testing::internal::FieldMatcher< Class, FieldType >::MatchAndExplainImpl ( true_type  ,
const Class *  p,
MatchResultListener listener 
) const
inlineprivate

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

2216  {
2217  if (p == NULL)
2218  return false;
2219 
2220  *listener << "which points to an object ";
2221  // Since *p has a field, it must be a class/struct/union type and
2222  // thus cannot be a pointer. Therefore we pass false_type() as
2223  // the first argument.
2224  return MatchAndExplainImpl(false_type(), *p, listener);
2225  }
bool_constant< false > false_type
Definition: gtest-port.h:2209
bool MatchAndExplainImpl(false_type, const Class &obj, MatchResultListener *listener) const
template<typename Class , typename FieldType >
bool testing::internal::FieldMatcher< Class, FieldType >::MatchAndExplainImpl ( true_type  ,
const Class *  p,
MatchResultListener listener 
) const
inlineprivate

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

References GTEST_DISALLOW_ASSIGN_, and GTEST_REFERENCE_TO_CONST_.

2216  {
2217  if (p == NULL)
2218  return false;
2219 
2220  *listener << "which points to an object ";
2221  // Since *p has a field, it must be a class/struct/union type and
2222  // thus cannot be a pointer. Therefore we pass false_type() as
2223  // the first argument.
2224  return MatchAndExplainImpl(false_type(), *p, listener);
2225  }
bool_constant< false > false_type
Definition: gtest-port.h:2209
bool MatchAndExplainImpl(false_type, const Class &obj, MatchResultListener *listener) const
template<typename Class , typename FieldType >
bool testing::internal::FieldMatcher< Class, FieldType >::MatchAndExplainImpl ( true_type  ,
const Class *  p,
MatchResultListener listener 
) const
inlineprivate

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

References GTEST_DISALLOW_ASSIGN_, and GTEST_REFERENCE_TO_CONST_.

2216  {
2217  if (p == NULL)
2218  return false;
2219 
2220  *listener << "which points to an object ";
2221  // Since *p has a field, it must be a class/struct/union type and
2222  // thus cannot be a pointer. Therefore we pass false_type() as
2223  // the first argument.
2224  return MatchAndExplainImpl(false_type(), *p, listener);
2225  }
bool_constant< false > false_type
Definition: gtest-port.h:2209
bool MatchAndExplainImpl(false_type, const Class &obj, MatchResultListener *listener) const

Member Data Documentation

template<typename Class , typename FieldType >
const FieldType Class::* testing::internal::FieldMatcher< Class, FieldType >::field_
private

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

template<typename Class , typename FieldType >
const Matcher< const FieldType & > testing::internal::FieldMatcher< Class, FieldType >::matcher_
private

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


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