proxygen
|
#include <Observable-inl.h>
Public Member Functions | |
template<typename... Args> | |
ObserverCreatorContext (Args &&...args) | |
~ObserverCreatorContext () | |
void | setCore (observer_detail::Core::WeakPtr coreWeak) |
std::shared_ptr< const T > | get () |
void | update () |
template<typename F > | |
void | subscribe (F &&callback) |
Private Types | |
using | T = typename Traits::element_type |
Private Member Functions | |
bool | updateValue () |
Private Attributes | |
folly::Synchronized< std::shared_ptr< const T > > | value_ |
std::atomic< bool > | updateRequested_ {false} |
observer_detail::Core::WeakPtr | coreWeak_ |
Observable | observable_ |
std::mutex | updateMutex_ |
Definition at line 24 of file Observable-inl.h.
|
private |
Definition at line 25 of file Observable-inl.h.
|
inline |
Definition at line 29 of file Observable-inl.h.
References folly::observer::detail::ObserverCreatorContext< Observable, Traits >::updateValue().
|
inline |
Definition at line 34 of file Observable-inl.h.
References folly::Synchronized< T, Mutex >::copy(), folly::observer::detail::ObserverCreatorContext< Observable, Traits >::observable_, and folly::observer::detail::ObserverCreatorContext< Observable, Traits >::value_.
|
inline |
Definition at line 44 of file Observable-inl.h.
References folly::Synchronized< T, Mutex >::copy(), folly::observer::detail::ObserverCreatorContext< Observable, Traits >::updateRequested_, and folly::observer::detail::ObserverCreatorContext< Observable, Traits >::value_.
Referenced by folly::observer::ObserverCreator< Observable, Traits >::getObserver().
|
inline |
Definition at line 40 of file Observable-inl.h.
References folly::observer::detail::ObserverCreatorContext< Observable, Traits >::coreWeak_, and folly::gen::move.
|
inline |
Definition at line 69 of file Observable-inl.h.
References folly::observer::detail::ObserverCreatorContext< Observable, Traits >::observable_, and subscribe().
|
inline |
Definition at line 49 of file Observable-inl.h.
References folly::observer::detail::ObserverCreatorContext< Observable, Traits >::coreWeak_, folly::observer_detail::ObserverManager::scheduleRefreshNewVersion(), folly::observer::detail::ObserverCreatorContext< Observable, Traits >::updateMutex_, folly::observer::detail::ObserverCreatorContext< Observable, Traits >::updateRequested_, and folly::observer::detail::ObserverCreatorContext< Observable, Traits >::updateValue().
|
inlineprivate |
Definition at line 74 of file Observable-inl.h.
References folly::pushmi::operators::get, folly::observer::detail::ObserverCreatorContext< Observable, Traits >::observable_, folly::Synchronized< T, Mutex >::swap(), and folly::observer::detail::ObserverCreatorContext< Observable, Traits >::value_.
Referenced by folly::observer::detail::ObserverCreatorContext< Observable, Traits >::ObserverCreatorContext(), and folly::observer::detail::ObserverCreatorContext< Observable, Traits >::update().
|
private |
Definition at line 87 of file Observable-inl.h.
Referenced by folly::observer::detail::ObserverCreatorContext< Observable, Traits >::setCore(), and folly::observer::detail::ObserverCreatorContext< Observable, Traits >::update().
|
private |
Definition at line 89 of file Observable-inl.h.
Referenced by folly::observer::detail::ObserverCreatorContext< Observable, Traits >::subscribe(), folly::observer::detail::ObserverCreatorContext< Observable, Traits >::updateValue(), and folly::observer::detail::ObserverCreatorContext< Observable, Traits >::~ObserverCreatorContext().
|
private |
Definition at line 91 of file Observable-inl.h.
Referenced by folly::observer::detail::ObserverCreatorContext< Observable, Traits >::update().
|
private |
Definition at line 85 of file Observable-inl.h.
Referenced by folly::observer::detail::ObserverCreatorContext< Observable, Traits >::get(), and folly::observer::detail::ObserverCreatorContext< Observable, Traits >::update().
|
private |
Definition at line 84 of file Observable-inl.h.
Referenced by folly::observer::detail::ObserverCreatorContext< Observable, Traits >::get(), folly::observer::detail::ObserverCreatorContext< Observable, Traits >::updateValue(), and folly::observer::detail::ObserverCreatorContext< Observable, Traits >::~ObserverCreatorContext().