proxygen
testing::Action< F > Class Template Reference

#include <gmock-actions.h>

Public Types

typedef internal::Function< F >::Result Result
 
typedef internal::Function< F >::ArgumentTuple ArgumentTuple
 
typedef internal::Function< F >::Result Result
 
typedef internal::Function< F >::ArgumentTuple ArgumentTuple
 
typedef internal::Function< F >::Result Result
 
typedef internal::Function< F >::ArgumentTuple ArgumentTuple
 

Public Member Functions

 Action ()
 
 Action (ActionInterface< F > *impl)
 
 Action (const Action &action)
 
template<typename Func >
 Action (const Action< Func > &action)
 
bool IsDoDefault () const
 
Result Perform (const ArgumentTuple &args) const
 
 Action ()
 
 Action (ActionInterface< F > *impl)
 
 Action (const Action &action)
 
template<typename Func >
 Action (const Action< Func > &action)
 
bool IsDoDefault () const
 
Result Perform (const ArgumentTuple &args) const
 
 Action ()
 
 Action (ActionInterface< F > *impl)
 
 Action (const Action &action)
 
template<typename Func >
 Action (const Action< Func > &action)
 
bool IsDoDefault () const
 
Result Perform (const ArgumentTuple &args) const
 
template<typename From >
 Action (const Action< From > &from)
 

Private Attributes

internal::linked_ptr< ActionInterface< F > > impl_
 

Friends

template<typename F1 , typename F2 >
class internal::ActionAdaptor
 
template<typename F1 , typename F2 >
class internal::ActionAdaptor
 
template<typename F1 , typename F2 >
class internal::ActionAdaptor
 

Detailed Description

template<typename F>
class testing::Action< F >

Definition at line 355 of file gmock-actions.h.

Member Typedef Documentation

template<typename F>
typedef internal::Function<F>::ArgumentTuple testing::Action< F >::ArgumentTuple

Definition at line 358 of file gmock-actions.h.

template<typename F>
typedef internal::Function<F>::ArgumentTuple testing::Action< F >::ArgumentTuple

Definition at line 358 of file gmock-actions.h.

template<typename F>
typedef internal::Function<F>::ArgumentTuple testing::Action< F >::ArgumentTuple

Definition at line 358 of file gmock-actions.h.

template<typename F>
typedef internal::Function<F>::Result testing::Action< F >::Result

Definition at line 357 of file gmock-actions.h.

template<typename F>
typedef internal::Function<F>::Result testing::Action< F >::Result

Definition at line 357 of file gmock-actions.h.

template<typename F>
typedef internal::Function<F>::Result testing::Action< F >::Result

Definition at line 357 of file gmock-actions.h.

Constructor & Destructor Documentation

template<typename F>
testing::Action< F >::Action ( )
inline

Definition at line 362 of file gmock-actions.h.

Referenced by testing::internal::DoBothAction< Action1, Action2 >::Impl< F >::Perform().

362 : impl_(NULL) {}
internal::linked_ptr< ActionInterface< F > > impl_
template<typename F>
testing::Action< F >::Action ( ActionInterface< F > *  impl)
inlineexplicit

Definition at line 366 of file gmock-actions.h.

366 : impl_(impl) {}
internal::linked_ptr< ActionInterface< F > > impl_
template<typename F>
testing::Action< F >::Action ( const Action< F > &  action)
inline

Definition at line 369 of file gmock-actions.h.

369 : impl_(action.impl_) {}
internal::linked_ptr< ActionInterface< F > > impl_
action
Definition: upload.py:393
template<typename F>
template<typename Func >
testing::Action< F >::Action ( const Action< Func > &  action)
explicit
template<typename F>
testing::Action< F >::Action ( )
inline

Definition at line 362 of file gmock-actions.h.

362 : impl_(NULL) {}
internal::linked_ptr< ActionInterface< F > > impl_
template<typename F>
testing::Action< F >::Action ( ActionInterface< F > *  impl)
inlineexplicit

Definition at line 366 of file gmock-actions.h.

366 : impl_(impl) {}
internal::linked_ptr< ActionInterface< F > > impl_
template<typename F>
testing::Action< F >::Action ( const Action< F > &  action)
inline

Definition at line 369 of file gmock-actions.h.

369 : impl_(action.impl_) {}
internal::linked_ptr< ActionInterface< F > > impl_
action
Definition: upload.py:393
template<typename F>
template<typename Func >
testing::Action< F >::Action ( const Action< Func > &  action)
explicit
template<typename F>
testing::Action< F >::Action ( )
inline

Definition at line 362 of file gmock-actions.h.

362 : impl_(NULL) {}
internal::linked_ptr< ActionInterface< F > > impl_
template<typename F>
testing::Action< F >::Action ( ActionInterface< F > *  impl)
inlineexplicit

Definition at line 366 of file gmock-actions.h.

366 : impl_(impl) {}
internal::linked_ptr< ActionInterface< F > > impl_
template<typename F>
testing::Action< F >::Action ( const Action< F > &  action)
inline

Definition at line 369 of file gmock-actions.h.

369 : impl_(action.impl_) {}
internal::linked_ptr< ActionInterface< F > > impl_
action
Definition: upload.py:393
template<typename F>
template<typename Func >
testing::Action< F >::Action ( const Action< Func > &  action)
explicit
template<typename To >
template<typename From >
testing::Action< To >::Action ( const Action< From > &  from)

Definition at line 1054 of file gmock-actions.h.

1055  : impl_(new internal::ActionAdaptor<To, From>(from)) {}
PUSHMI_INLINE_VAR constexpr struct folly::pushmi::operators::from_fn from
internal::linked_ptr< ActionInterface< F > > impl_

Member Function Documentation

template<typename F>
bool testing::Action< F >::IsDoDefault ( ) const
inline

Definition at line 379 of file gmock-actions.h.

Referenced by testing::internal::FunctionMockerBase< R(A1, A2)>::UntypedFindMatchingExpectation(), and testing::internal::OnCallSpec< F >::WillByDefault().

379 { return impl_.get() == NULL; }
internal::linked_ptr< ActionInterface< F > > impl_
template<typename F>
bool testing::Action< F >::IsDoDefault ( ) const
inline

Definition at line 379 of file gmock-actions.h.

379 { return impl_.get() == NULL; }
internal::linked_ptr< ActionInterface< F > > impl_
template<typename F>
bool testing::Action< F >::IsDoDefault ( ) const
inline

Definition at line 379 of file gmock-actions.h.

379 { return impl_.get() == NULL; }
internal::linked_ptr< ActionInterface< F > > impl_
template<typename F>
Result testing::Action< F >::Perform ( const ArgumentTuple args) const
inline

Definition at line 387 of file gmock-actions.h.

387  {
389  !IsDoDefault(), __FILE__, __LINE__,
390  "You are using DoDefault() inside a composite action like "
391  "DoAll() or WithArgs(). This is not supported for technical "
392  "reasons. Please instead spell out the default action, or "
393  "assign the default action to an Action variable and use "
394  "the variable in various places.");
395  return impl_->Perform(args);
396  }
bool IsDoDefault() const
void Assert(bool condition, const char *file, int line)
internal::linked_ptr< ActionInterface< F > > impl_
template<typename F>
Result testing::Action< F >::Perform ( const ArgumentTuple args) const
inline

Definition at line 387 of file gmock-actions.h.

Referenced by testing::gmock_more_actions_test::Foo::Concat10(), testing::gmock_generated_actions_test::GiantTemplate< T1, T2, T3, k4, k5, k6, T7, T8, T9 >::GiantTemplate(), testing::gmock_generated_actions_test::NullaryConstructorClass::NullaryConstructorClass(), testing::gmock_generated_actions_test::SumOf6Functor::operator()(), testing::gmock_generated_actions_test::SubstractAction::Perform(), testing::internal::ActionResultHolder< T >::PerformAction(), testing::internal::ActionResultHolder< void >::PerformAction(), testing::gmock_generated_actions_test::TenArgConstructorClass::TenArgConstructorClass(), testing::gmock_generated_actions_test::TEST(), testing::gmock_more_actions_test::TEST(), testing::gmock_generated_actions_test::UnaryConstructorClass::UnaryConstructorClass(), testing::gmock_generated_actions_test::BoolResetter::~BoolResetter(), and testing::gmock_more_actions_test::DeletionTester::~DeletionTester().

387  {
389  !IsDoDefault(), __FILE__, __LINE__,
390  "You are using DoDefault() inside a composite action like "
391  "DoAll() or WithArgs(). This is not supported for technical "
392  "reasons. Please instead spell out the default action, or "
393  "assign the default action to an Action variable and use "
394  "the variable in various places.");
395  return impl_->Perform(args);
396  }
bool IsDoDefault() const
void Assert(bool condition, const char *file, int line)
internal::linked_ptr< ActionInterface< F > > impl_
template<typename F>
Result testing::Action< F >::Perform ( const ArgumentTuple args) const
inline

Definition at line 387 of file gmock-actions.h.

387  {
389  !IsDoDefault(), __FILE__, __LINE__,
390  "You are using DoDefault() inside a composite action like "
391  "DoAll() or WithArgs(). This is not supported for technical "
392  "reasons. Please instead spell out the default action, or "
393  "assign the default action to an Action variable and use "
394  "the variable in various places.");
395  return impl_->Perform(args);
396  }
bool IsDoDefault() const
void Assert(bool condition, const char *file, int line)
internal::linked_ptr< ActionInterface< F > > impl_

Friends And Related Function Documentation

template<typename F>
template<typename F1 , typename F2 >
friend class internal::ActionAdaptor
friend

Definition at line 400 of file gmock-actions.h.

template<typename F>
template<typename F1 , typename F2 >
class internal::ActionAdaptor ( )
friend

Definition at line 400 of file gmock-actions.h.

template<typename F>
template<typename F1 , typename F2 >
class internal::ActionAdaptor ( )
friend

Definition at line 400 of file gmock-actions.h.

Member Data Documentation

template<typename F>
internal::linked_ptr< ActionInterface< F > > testing::Action< F >::impl_
private

Definition at line 402 of file gmock-actions.h.


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