载入中...
搜索中...
未找到
eve::rx::Observer< T > 模板类 参考

Callback bundle pushed to a subscriber. Once error() or completed() fires the observer is stopped and later notifications are ignored. 更多...

#include <Rx.h>

Public 类型

using NextFn = std::function< void(const T &)>
 
using ErrorFn = std::function< void(const std::string &)>
 
using CompletedFn = std::function< void()>
 

Public 成员函数

bool isStopped () const
 True after error()/completed() (or setStopped()).
 
void setStopped () const
 Manually marks the observer stopped (used by operators).
 
void next (const T &v) const
 Delivers a value unless stopped.
 
void error (const std::string &e) const
 Delivers a terminal error and stops.
 
void completed () const
 Delivers a terminal completion and stops.
 

Public 属性

NextFn onNext
 Value callback.
 
ErrorFn onError
 Error callback (terminal).
 
CompletedFn onCompleted
 Completion callback (terminal).
 

详细描述

template<typename T>
class eve::rx::Observer< T >

Callback bundle pushed to a subscriber. Once error() or completed() fires the observer is stopped and later notifications are ignored.

在文件 Rx.h136 行定义.

成员类型定义说明

◆ CompletedFn

template<typename T >
using eve::rx::Observer< T >::CompletedFn = std::function<void()>

在文件 Rx.h140 行定义.

◆ ErrorFn

template<typename T >
using eve::rx::Observer< T >::ErrorFn = std::function<void(const std::string&)>

在文件 Rx.h139 行定义.

◆ NextFn

template<typename T >
using eve::rx::Observer< T >::NextFn = std::function<void(const T&)>

在文件 Rx.h138 行定义.

成员函数说明

◆ completed()

◆ error()

◆ isStopped()

template<typename T >
bool eve::rx::Observer< T >::isStopped ( ) const
inline

True after error()/completed() (or setStopped()).

在文件 Rx.h150 行定义.

被这些函数引用 eve::rx::ReplaySubject< T >::subscribe().

◆ next()

◆ setStopped()

template<typename T >
void eve::rx::Observer< T >::setStopped ( ) const
inline

Manually marks the observer stopped (used by operators).

在文件 Rx.h152 行定义.

类成员变量说明

◆ onCompleted

◆ onError

◆ onNext


该类的文档由以下文件生成:
  • src/modules/rx/Rx.h