#include <observable.h>
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") |
|
private |
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. |
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. |