Xmipp  v3.23.11-Nereus
Classes | Public Types | Static Public Member Functions | List of all members
testing::DefaultValue< T > Class Template Reference

#include <gmock-actions.h>

Public Types

typedef T(* FactoryFunction) ()
 

Static Public Member Functions

static void Set (T x)
 
static void SetFactory (FactoryFunction factory)
 
static void Clear ()
 
static bool IsSet ()
 
static bool Exists ()
 
static T Get ()
 

Detailed Description

template<typename T>
class testing::DefaultValue< T >

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

Member Typedef Documentation

◆ FactoryFunction

template<typename T>
typedef T(* testing::DefaultValue< T >::FactoryFunction) ()

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

Member Function Documentation

◆ Clear()

template<typename T>
static void testing::DefaultValue< T >::Clear ( )
inlinestatic

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

592  {
593  delete producer_;
594  producer_ = nullptr;
595  }

◆ Exists()

template<typename T>
static bool testing::DefaultValue< T >::Exists ( )
inlinestatic

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

◆ Get()

template<typename T>
static T testing::DefaultValue< T >::Get ( )
inlinestatic

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

609  {
610  return producer_ == nullptr ? internal::BuiltInDefaultValue<T>::Get()
611  : producer_->Produce();
612  }

◆ IsSet()

template<typename T>
static bool testing::DefaultValue< T >::IsSet ( )
inlinestatic

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

598 { return producer_ != nullptr; }

◆ Set()

template<typename T>
static void testing::DefaultValue< T >::Set ( x)
inlinestatic

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

577  {
578  delete producer_;
579  producer_ = new FixedValueProducer(x);
580  }
doublereal * x

◆ SetFactory()

template<typename T>
static void testing::DefaultValue< T >::SetFactory ( FactoryFunction  factory)
inlinestatic

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

586  {
587  delete producer_;
588  producer_ = new FactoryValueProducer(factory);
589  }

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