proxygen
testing::internal::ReturnAction< R > Class Template Reference

#include <gmock-actions.h>

Classes

class  Impl
 
class  Impl< ByMoveWrapper< R_ >, F >
 

Public Member Functions

 ReturnAction (R value)
 
template<typename F >
 operator Action< F > () const
 
 ReturnAction (R value)
 
template<typename F >
 operator Action< F > () const
 
 ReturnAction (R value)
 
template<typename F >
 operator Action< F > () const
 

Private Member Functions

 GTEST_DISALLOW_ASSIGN_ (ReturnAction)
 
 GTEST_DISALLOW_ASSIGN_ (ReturnAction)
 
 GTEST_DISALLOW_ASSIGN_ (ReturnAction)
 

Private Attributes

const linked_ptr< R > value_
 

Detailed Description

template<typename R>
class testing::internal::ReturnAction< R >

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

Constructor & Destructor Documentation

template<typename R >
testing::internal::ReturnAction< R >::ReturnAction ( value)
inlineexplicit

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

539 : value_(new R(internal::move(value))) {}
const linked_ptr< R > value_
static const char *const value
Definition: Conv.cpp:50
const T & move(const T &t)
Definition: gtest-port.h:1317
template<typename R >
testing::internal::ReturnAction< R >::ReturnAction ( value)
inlineexplicit

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

539 : value_(new R(internal::move(value))) {}
const linked_ptr< R > value_
static const char *const value
Definition: Conv.cpp:50
const T & move(const T &t)
Definition: gtest-port.h:1317
template<typename R >
testing::internal::ReturnAction< R >::ReturnAction ( value)
inlineexplicit

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

539 : value_(new R(internal::move(value))) {}
const linked_ptr< R > value_
static const char *const value
Definition: Conv.cpp:50
const T & move(const T &t)
Definition: gtest-port.h:1317

Member Function Documentation

template<typename R >
testing::internal::ReturnAction< R >::GTEST_DISALLOW_ASSIGN_ ( ReturnAction< R >  )
private
template<typename R >
testing::internal::ReturnAction< R >::GTEST_DISALLOW_ASSIGN_ ( ReturnAction< R >  )
private
template<typename R >
testing::internal::ReturnAction< R >::GTEST_DISALLOW_ASSIGN_ ( ReturnAction< R >  )
private
template<typename R >
template<typename F >
testing::internal::ReturnAction< R >::operator Action< F > ( ) const
inline

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

References GTEST_COMPILE_ASSERT_.

544  {
545  // Assert statement belongs here because this is the best place to verify
546  // conditions on F. It produces the clearest error messages
547  // in most compilers.
548  // Impl really belongs in this scope as a local class but can't
549  // because MSVC produces duplicate symbols in different translation units
550  // in this case. Until MS fixes that bug we put Impl into the class scope
551  // and put the typedef both here (for use in assert statement) and
552  // in the Impl class. But both definitions must be the same.
553  typedef typename Function<F>::Result Result;
556  use_ReturnRef_instead_of_Return_to_return_a_reference);
557  return Action<F>(new Impl<R, F>(value_));
558  }
A polymorphic function wrapper that is not copyable and does not require the wrapped function to be c...
#define GTEST_COMPILE_ASSERT_(expr, msg)
Definition: gtest-port.h:1032
const linked_ptr< R > value_
template<typename R >
template<typename F >
testing::internal::ReturnAction< R >::operator Action< F > ( ) const
inline

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

References GTEST_COMPILE_ASSERT_.

544  {
545  // Assert statement belongs here because this is the best place to verify
546  // conditions on F. It produces the clearest error messages
547  // in most compilers.
548  // Impl really belongs in this scope as a local class but can't
549  // because MSVC produces duplicate symbols in different translation units
550  // in this case. Until MS fixes that bug we put Impl into the class scope
551  // and put the typedef both here (for use in assert statement) and
552  // in the Impl class. But both definitions must be the same.
553  typedef typename Function<F>::Result Result;
556  use_ReturnRef_instead_of_Return_to_return_a_reference);
557  return Action<F>(new Impl<R, F>(value_));
558  }
A polymorphic function wrapper that is not copyable and does not require the wrapped function to be c...
#define GTEST_COMPILE_ASSERT_(expr, msg)
Definition: gtest-port.h:1032
const linked_ptr< R > value_
template<typename R >
template<typename F >
testing::internal::ReturnAction< R >::operator Action< F > ( ) const
inline

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

References GTEST_COMPILE_ASSERT_.

544  {
545  // Assert statement belongs here because this is the best place to verify
546  // conditions on F. It produces the clearest error messages
547  // in most compilers.
548  // Impl really belongs in this scope as a local class but can't
549  // because MSVC produces duplicate symbols in different translation units
550  // in this case. Until MS fixes that bug we put Impl into the class scope
551  // and put the typedef both here (for use in assert statement) and
552  // in the Impl class. But both definitions must be the same.
553  typedef typename Function<F>::Result Result;
556  use_ReturnRef_instead_of_Return_to_return_a_reference);
557  return Action<F>(new Impl<R, F>(value_));
558  }
A polymorphic function wrapper that is not copyable and does not require the wrapped function to be c...
#define GTEST_COMPILE_ASSERT_(expr, msg)
Definition: gtest-port.h:1032
const linked_ptr< R > value_

Member Data Documentation

template<typename R >
const linked_ptr< R > testing::internal::ReturnAction< R >::value_
private

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


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