CombinerInterface Class Reference

#include <observable.h>

Inheritance diagram for CombinerInterface:

详细描述

Combiners allow to combine the result of multiple observable subscribers. There are some default implementations: see ObservableCombinerRunAllComponent, ObservableCombinerRunAllBoolOrComponent.

公共成员函数

MAXON_METHOD Result < void >  InitCombine ( Result < 数据 > &combinedRes) const
MAXON_METHOD Result < Bool CombineResult ( Result < 数据 > &combinedRes, Result < 数据 > &&newRes) const

私有成员函数

  MAXON_INTERFACE ( CombinerInterface , MAXON_REFERENCE_NORMAL , "net.maxon.interface.combiner")

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( CombinerInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.interface.combiner"   
)
private

◆  InitCombine()

MAXON_METHOD Result <void> InitCombine ( Result < 数据 > &  combinedRes ) const

Called first before the observable notification starts. In general the start result value will be copied to the result value.

参数
[out] combinedRes Receives the start value.
返回
OK on success.

◆  CombineResult()

MAXON_METHOD Result < Bool > CombineResult ( Result < 数据 > &  combinedRes ,
Result < 数据 > &&  newRes  
) const

Called after each notification. This function defines how the results are combined together. The return value controls if following subscribers should be called.

参数
[in,out] combinedRes Contains the last result and receives the new result.
[in] newRes The new result that needs to be combined with combinedRes.
返回
True if the the next subscriber should be called. False if the notification should stop here.