proxygen
|
#include <Observer.h>
Public Types | |
typedef std::function< void(const T &)> | OnNext |
typedef std::function< void(Error)> | OnError |
typedef std::function< void()> | OnCompleted |
Public Member Functions | |
template<class N = OnNext, class E = OnError, class C = OnCompleted> | |
FunctionObserver (N &&n, E &&e, C &&c) | |
void | onNext (const T &val) override |
void | onError (Error e) override |
void | onCompleted () override |
Public Member Functions inherited from wangle::Observer< T > | |
virtual | ~Observer ()=default |
Protected Attributes | |
OnNext | onNext_ |
OnError | onError_ |
OnCompleted | onCompleted_ |
Additional Inherited Members | |
Static Public Member Functions inherited from wangle::Observer< T > | |
template<class N , class E , class C > | |
static std::unique_ptr< Observer > | create (N &&onNextFn, E &&onErrorFn, C &&onCompletedFn) |
template<class N , class E > | |
static std::unique_ptr< Observer > | create (N &&onNextFn, E &&onErrorFn) |
template<class N > | |
static std::unique_ptr< Observer > | create (N &&onNextFn) |
An observer that uses std::function callbacks. You don't really want to make one of these directly - instead use the Observer::create() methods.
Definition at line 27 of file Observer.h.
typedef std::function<void()> wangle::FunctionObserver< T >::OnCompleted |
Definition at line 84 of file Observer.h.
typedef std::function<void(Error)> wangle::FunctionObserver< T >::OnError |
Definition at line 83 of file Observer.h.
typedef std::function<void(const T&)> wangle::FunctionObserver< T >::OnNext |
Definition at line 82 of file Observer.h.
|
inline |
We don't need any fancy overloads of this constructor because that's what Observer::create() is for.
Definition at line 89 of file Observer.h.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
protected |
Definition at line 110 of file Observer.h.
|
protected |
Definition at line 109 of file Observer.h.
|
protected |
Definition at line 108 of file Observer.h.