Electroneum
testing::Action< F > Class Template Reference

#include <gmock-actions.h>

Public Types

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
 
template<typename From >
 Action (const Action< From > &from)
 

Friends

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

◆ ArgumentTuple

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

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

◆ Result

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

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

Constructor & Destructor Documentation

◆ Action() [1/5]

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

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

362 : impl_(NULL) {}

◆ Action() [2/5]

template<typename F>
testing::Action< F >::Action ( ActionInterface< F > *  impl)
inlineexplicit

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

366 : impl_(impl) {}

◆ Action() [3/5]

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_) {}

◆ Action() [4/5]

template<typename F>
template<typename Func >
testing::Action< F >::Action ( const Action< Func > &  action)
explicit

◆ Action() [5/5]

template<typename F>
template<typename From >
testing::Action< F >::Action ( const Action< From > &  from)

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

1055  : impl_(new internal::ActionAdaptor<To, From>(from)) {}

Member Function Documentation

◆ IsDoDefault()

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

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

379 { return impl_.get() == NULL; }
Here is the caller graph for this function:

◆ Perform()

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)

Friends And Related Function Documentation

◆ internal::ActionAdaptor

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

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


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