tesseract v5.3.3.20231005
testing::DefaultValue< T & > Class Template Reference

#include <gmock-actions.h>

Static Public Member Functions

static void Set (T &x)
 
static void Clear ()
 
static bool IsSet ()
 
static bool Exists ()
 
static T & Get ()
 

Detailed Description

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

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

Member Function Documentation

◆ Clear()

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

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

370{ address_ = nullptr; }

◆ Exists()

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

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

◆ Get()

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

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

384 {
385 return address_ == nullptr ? internal::BuiltInDefaultValue<T&>::Get()
386 : *address_;
387 }

◆ IsSet()

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

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

373{ return address_ != nullptr; }

◆ Set()

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

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

365 { // NOLINT
366 address_ = &x;
367 }

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