proxygen
folly::DestructorCheck::Safety Class Reference

#include <DestructorCheck.h>

Inheritance diagram for folly::DestructorCheck::Safety:
folly::DestructorCheck::ForwardLink

Public Member Functions

 Safety (DestructorCheck &destructorCheck)
 
 ~Safety ()
 
 Safety (const Safety &)=delete
 
 Safety (Safety &&goner)=delete
 
Safetyoperator= (const Safety &)=delete
 
Safetyoperator= (Safety &&)=delete
 
bool destroyed () const
 

Private Member Functions

void setDestroyed ()
 

Private Attributes

ForwardLinkprev_
 

Friends

class ForwardLink
 

Detailed Description

Definition at line 89 of file DestructorCheck.h.

Constructor & Destructor Documentation

folly::DestructorCheck::Safety::Safety ( DestructorCheck destructorCheck)
inlineexplicit

Definition at line 91 of file DestructorCheck.h.

References folly::DestructorCheck::ForwardLink::next_, prev_, and folly::DestructorCheck::rootGuard_.

91  {
92  // Insert this node at the head of the list.
93  prev_ = &destructorCheck.rootGuard_;
94  next_ = prev_->next_;
95  if (next_ != nullptr) {
96  next_->prev_ = this;
97  }
98  prev_->next_ = this;
99  }
folly::DestructorCheck::Safety::~Safety ( )
inline

Definition at line 101 of file DestructorCheck.h.

References folly::DestructorCheck::ForwardLink::next_, prev_, and folly::DestructorCheck::ForwardLink::Safety.

101  {
102  if (!destroyed()) {
103  // Remove this node from the list.
104  prev_->next_ = next_;
105  if (next_ != nullptr) {
106  next_->prev_ = prev_;
107  }
108  }
109  }
folly::DestructorCheck::Safety::Safety ( const Safety )
delete
folly::DestructorCheck::Safety::Safety ( Safety &&  goner)
delete

Member Function Documentation

bool folly::DestructorCheck::Safety::destroyed ( ) const
inline
Safety& folly::DestructorCheck::Safety::operator= ( const Safety )
delete
Safety& folly::DestructorCheck::Safety::operator= ( Safety &&  )
delete
void folly::DestructorCheck::Safety::setDestroyed ( )
inlineprivate

Definition at line 121 of file DestructorCheck.h.

121  {
122  prev_ = nullptr;
123  }

Friends And Related Function Documentation

friend class ForwardLink
friend

Definition at line 129 of file DestructorCheck.h.

Member Data Documentation

ForwardLink* folly::DestructorCheck::Safety::prev_
private

Definition at line 127 of file DestructorCheck.h.

Referenced by Safety(), and ~Safety().


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