#include <Results.h>
Public Member Functions | |
EBusReduceResult () | |
EBusReduceResult (const T &initialValue, const Aggregator &aggregator=Aggregator()) | |
void | operator= (const T &rhs) |
void | operator= (T &&rhs) |
EBusReduceResult & | operator= (const EBusReduceResult &)=delete |
Public Attributes | |
T | value |
Aggregator | unary |
Aggregates results returned by all handlers of an EBus event. You can use this structure to add results, apply a logical AND to results, and so on.
T | The output type of the aggregator. |
Aggregator | A function object that aggregates results. The return type must match T. For examples of function objects that you can use as aggregators, see functional_basic.h. |
The following example sums the values returned by all handlers.
The following example determines whether all handlers, including the latest handler, return true.
|
inline |
Creates an instance of the class without setting an initial value or a function object to use as the aggregator.
|
inline |
Creates an instance of the class and sets the initial value and the function object to use as the aggregator.
initialValue | The initial value, which new values will be aggregated with. |
aggregator | A function object to aggregate the values. For examples of function objects that you can use as aggregators, see functional_basic.h. |
|
delete |
Disallows copying an EBusReduceResult object by reference.
|
inline |
Overloads the assignment operator to aggregate a new value with the existing aggregated value. Used ONLY when the return value of the function is const, or const&
|
inline |
Overloads the assignment operator to aggregate a new value with the existing aggregated value using rvalue-ref to move
Aggregator AZ::EBusReduceResult< T, Aggregator >::unary |
The function object that aggregates a new value with an existing value.
T AZ::EBusReduceResult< T, Aggregator >::value |
The current value, which new values will be aggregated with.