Representation of farm pattern. Represents a farm of n replicas from a transformer.
More...
#include <farm_pattern.h>
|
| farm_t (int n, Transformer &&t) noexcept |
| Constructs a farm with a cardinality and a transformer. More...
|
|
int | cardinality () const noexcept |
| Farm's cardinality or number of replicas. More...
|
|
Transformer & | transformer () |
| Return the transformer function stored in the farm pattern. More...
|
|
template<typename I > |
auto | operator() (I &&item) const |
| Invokes the transformer of the farm over a data item. More...
|
|
template<typename Transformer>
class grppi::farm_t< Transformer >
Representation of farm pattern. Represents a farm of n replicas from a transformer.
- Template Parameters
-
Transformer | Callable type for the farm transformer. |
◆ transformer_type
template<typename Transformer >
◆ farm_t()
template<typename Transformer >
Constructs a farm with a cardinality and a transformer.
- Parameters
-
n | Number of replicas for the farm. |
t | Transformer for the farm. |
◆ cardinality()
template<typename Transformer >
Farm's cardinality or number of replicas.
- Returns
- The farm's cardinality.
◆ operator()()
template<typename Transformer >
template<typename I >
Invokes the transformer of the farm over a data item.
◆ transformer()
template<typename Transformer >
Return the transformer function stored in the farm pattern.
- Returns
- The transformer function.
The documentation for this class was generated from the following file: