#include <observable.h>
Combiners allow to combine the result of multiple observable subscribers. There are some default implementations: see ObservableCombinerRunAllComponent, ObservableCombinerRunAllBoolOrComponent.
Public Member Functions | |
MAXON_METHOD Result< void > | InitCombine (Result< Data > &combinedRes) const |
MAXON_METHOD Result< Bool > | CombineResult (Result< Data > &combinedRes, Result< Data > &&newRes) const |
Private Member Functions | |
MAXON_INTERFACE (CombinerInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.combiner", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
|
private |
MAXON_METHOD Result<void> InitCombine | ( | Result< Data > & | 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< Data > & | combinedRes, |
Result< Data > && | 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. |