proxygen
Watchdog Struct Reference

#include <SingletonTestStructs.h>

Inheritance diagram for Watchdog:
ChildWatchdog GlobalWatchdog Slowpoke UnregisteredWatchdog

Public Member Functions

 Watchdog ()
 
 ~Watchdog ()
 
size_t livingWatchdogCount () const
 
 Watchdog (const Watchdog &)=delete
 
Watchdogoperator= (const Watchdog &)=delete
 
 Watchdog (Watchdog &&) noexcept=default
 
Watchdogoperator= (Watchdog &&) noexcept=default
 

Static Public Member Functions

static std::vector< Watchdog * > & creation_order ()
 

Public Attributes

const size_t serial_number
 

Detailed Description

Definition at line 26 of file SingletonTestStructs.h.

Constructor & Destructor Documentation

Watchdog::Watchdog ( )

Definition at line 33 of file SingletonTestStructs.cpp.

References creation_order().

Referenced by livingWatchdogCount().

34  creation_order().push_back(this);
35 }
const size_t serial_number
static std::vector< Watchdog * > & creation_order()
Watchdog::~Watchdog ( )
inline

Definition at line 31 of file SingletonTestStructs.h.

References creation_order().

31  {
32  if (creation_order().back() != this) {
33  LOG(FATAL) << "Watchdog destruction order mismatch";
34  }
35  creation_order().pop_back();
36  }
static std::vector< Watchdog * > & creation_order()
Watchdog::Watchdog ( const Watchdog )
delete
Watchdog::Watchdog ( Watchdog &&  )
defaultnoexcept

Member Function Documentation

std::vector< Watchdog * > & Watchdog::creation_order ( )
static

Definition at line 28 of file SingletonTestStructs.cpp.

Referenced by livingWatchdogCount(), TEST(), Watchdog(), and ~Watchdog().

28  {
29  static std::vector<Watchdog*> ret;
30  return ret;
31 }
size_t Watchdog::livingWatchdogCount ( ) const
inline

Definition at line 39 of file SingletonTestStructs.h.

References creation_order(), folly::pushmi::__adl::noexcept(), operator=(), and Watchdog().

39  {
40  return creation_order().size();
41  }
static std::vector< Watchdog * > & creation_order()
Watchdog& Watchdog::operator= ( const Watchdog )
delete

Referenced by livingWatchdogCount().

Watchdog& Watchdog::operator= ( Watchdog &&  )
defaultnoexcept

Member Data Documentation

const size_t Watchdog::serial_number

Definition at line 38 of file SingletonTestStructs.h.


The documentation for this struct was generated from the following files: