Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
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 201 of file gmock-actions.h.

Member Typedef Documentation

◆ FactoryFunction

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

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

Member Function Documentation

◆ Clear()

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

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

220 {
221 delete producer_;
222 producer_ = NULL;
223 }

◆ Exists()

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

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

Here is the call graph for this function:

◆ Get()

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

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

237 {
238 return producer_ == NULL ?
239 internal::BuiltInDefaultValue<T>::Get() : producer_->Produce();
240 }
Here is the call graph for this function:

◆ IsSet()

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

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

226{ return producer_ != NULL; }
Here is the caller graph for this function:

◆ Set()

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

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

205 {
206 delete producer_;
207 producer_ = new FixedValueProducer(x);
208 }

◆ SetFactory()

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

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

214 {
215 delete producer_;
216 producer_ = new FactoryValueProducer(factory);
217 }

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