Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
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)
 
template<typename Func >
 Action (const Action< Func > &action)
 
bool IsDoDefault () const
 
Result Perform (ArgumentTuple args) const
 
template<typename From >
 Action (const Action< From > &from)
 

Friends

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

Detailed Description

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

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

Member Typedef Documentation

◆ ArgumentTuple

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

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

◆ Result

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

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

Constructor & Destructor Documentation

◆ Action() [1/4]

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

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

363{}

◆ Action() [2/4]

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

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

376: impl_(impl) {}

◆ Action() [3/4]

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

◆ Action() [4/4]

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

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

1106 :
1107#if GTEST_LANG_CXX11
1108 fun_(from.fun_),
1109#endif
1110 impl_(from.impl_ == NULL ? NULL
1111 : new internal::ActionAdaptor<To, From>(from)) {
1112}

Member Function Documentation

◆ IsDoDefault()

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

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

386 {
387#if GTEST_LANG_CXX11
388 return impl_ == nullptr && fun_ == nullptr;
389#else
390 return impl_ == NULL;
391#endif
392 }
Here is the caller graph for this function:

◆ Perform()

template<typename F >
Result testing::Action< F >::Perform ( ArgumentTuple args) const
inline

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

400 {
401 if (IsDoDefault()) {
402 internal::IllegalDoDefault(__FILE__, __LINE__);
403 }
404#if GTEST_LANG_CXX11
405 if (fun_ != nullptr) {
406 return internal::Apply(fun_, ::std::move(args));
407 }
408#endif
409 return impl_->Perform(args);
410 }
bool IsDoDefault() const
GTEST_API_ void IllegalDoDefault(const char *file, int line)
Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ Action

template<typename F >
template<typename G >
friend class Action
friend

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

◆ internal::ActionAdaptor

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

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


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