Open 3D Engine (O3DE), the successor to Lumberyard, is now available in Developer Preview. Download O3DE or visit the AWS Game Tech blog to learn more. |
Aggregates results returned by all handlers of an EBus event. More...
Public Member Functions |
|
AZ_FORCE_INLINE | EBusReduceResult () |
Creates an instance of the class without setting an initial value or a function object to use as the aggregator.
More...
|
|
AZ_FORCE_INLINE | EBusReduceResult (const T &initialValue, const Aggregator &aggregator=Aggregator()) |
Creates an instance of the class and sets the initial value and the function object to use as the aggregator.
More...
|
|
AZ_FORCE_INLINE void | operator= (const T &rhs) |
Overloads the assignment operator to aggregate a new value with the existing aggregated value.
More...
|
|
AZ_FORCE_INLINE void | operator= (T &rhs) |
Overloads the assignment operator to aggregate a new value with the existing aggregated value.
More...
|
|
Public Attributes |
|
T | value |
The current value, which new values will be aggregated with.
More...
|
|
Aggregator | unary |
The function object that aggregates a new value with an existing value.
More...
|
|
Detailed Description
template<class T, class Aggregator>
struct AZ::EBusReduceResult< T, Aggregator >
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.
- Template Parameters
-
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.
Constructor & Destructor Documentation
◆ EBusReduceResult() [1/2]
|
inline |
Creates an instance of the class without setting an initial value or a function object to use as the aggregator.
◆ EBusReduceResult() [2/2]
|
inline |
Creates an instance of the class and sets the initial value and the function object to use as the aggregator.
- Parameters
-
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.
Member Function Documentation
◆ operator=() [1/2]
|
inline |
Overloads the assignment operator to aggregate a new value with the existing aggregated value.
- Parameters
-
rhs A reference to the value that will be aggregated with the existing aggregated value.
◆ operator=() [2/2]
|
inline |
Overloads the assignment operator to aggregate a new value with the existing aggregated value.
- Parameters
-
rhs A reference to the value that will be aggregated with the existing aggregated value.
Member Data Documentation
◆ unary
Aggregator AZ::EBusReduceResult < T, Aggregator >::unary |
The function object that aggregates a new value with an existing value.
◆ value
T AZ::EBusReduceResult < T, Aggregator >::value |
The current value, which new values will be aggregated with.
The documentation for this struct was generated from the following file:
- C:/lumberyard-root/dev/Code/Framework/AzCore/AzCore/EBus/ Results.h