proxygen
folly::futures::detail::Core< T >::CoreAndCallbackReference Class Reference

Public Member Functions

 CoreAndCallbackReference (Core *core) noexcept
 
 ~CoreAndCallbackReference () noexcept
 
 CoreAndCallbackReference (CoreAndCallbackReference const &o)=delete
 
CoreAndCallbackReferenceoperator= (CoreAndCallbackReference const &o)=delete
 
CoreAndCallbackReferenceoperator= (CoreAndCallbackReference &&)=delete
 
 CoreAndCallbackReference (CoreAndCallbackReference &&o) noexcept
 
CoregetCore () const noexcept
 

Private Member Functions

void detach () noexcept
 

Private Attributes

Corecore_ {nullptr}
 

Detailed Description

template<typename T>
class folly::futures::detail::Core< T >::CoreAndCallbackReference

Definition at line 538 of file Core.h.

Constructor & Destructor Documentation

template<typename T>
folly::futures::detail::Core< T >::CoreAndCallbackReference::CoreAndCallbackReference ( Core core)
inlineexplicitnoexcept

Definition at line 540 of file Core.h.

template<typename T>
folly::futures::detail::Core< T >::CoreAndCallbackReference::~CoreAndCallbackReference ( )
inlinenoexcept

Definition at line 542 of file Core.h.

542  {
543  detach();
544  }
template<typename T>
folly::futures::detail::Core< T >::CoreAndCallbackReference::CoreAndCallbackReference ( CoreAndCallbackReference const &  o)
delete
template<typename T>
folly::futures::detail::Core< T >::CoreAndCallbackReference::CoreAndCallbackReference ( CoreAndCallbackReference &&  o)
inlinenoexcept

Definition at line 551 of file Core.h.

552  : core_(exchange(o.core_, nullptr)) {}
T exchange(T &obj, U &&new_value)
Definition: Utility.h:120

Member Function Documentation

template<typename T>
void folly::futures::detail::Core< T >::CoreAndCallbackReference::detach ( )
inlineprivatenoexcept

Definition at line 559 of file Core.h.

559  {
560  if (core_) {
561  core_->derefCallback();
562  core_->detachOne();
563  }
564  }
void detachOne() noexcept
Definition: Core.h:642
void derefCallback() noexcept
Definition: Core.h:650
template<typename T>
Core* folly::futures::detail::Core< T >::CoreAndCallbackReference::getCore ( ) const
inlinenoexcept

Definition at line 554 of file Core.h.

554  {
555  return core_;
556  }
template<typename T>
CoreAndCallbackReference& folly::futures::detail::Core< T >::CoreAndCallbackReference::operator= ( CoreAndCallbackReference const &  o)
delete
template<typename T>
CoreAndCallbackReference& folly::futures::detail::Core< T >::CoreAndCallbackReference::operator= ( CoreAndCallbackReference &&  )
delete

Member Data Documentation

template<typename T>
Core* folly::futures::detail::Core< T >::CoreAndCallbackReference::core_ {nullptr}
private

Definition at line 566 of file Core.h.


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