Representation of a context pattern. Represents a context that uses a given policy to run a transformer. This pattern is intended to switch between execution policies in a pattern composition.
More...
#include <context.h>
|
| context_t (ExecutionPolicy &e, Transformer &&t) noexcept |
| Constructs a context with a execution policy and a transformer. More...
|
|
ExecutionPolicy & | execution_policy () |
| Return the execution policy used in the context. More...
|
|
Transformer & | transformer () |
| Return the transformer function. More...
|
|
template<typename I > |
auto | operator() (I &&item) const |
| Invokes the trasnformer of the context over a data item. More...
|
|
template<typename ExecutionPolicy, typename Transformer>
class grppi::context_t< ExecutionPolicy, Transformer >
Representation of a context pattern. Represents a context that uses a given policy to run a transformer. This pattern is intended to switch between execution policies in a pattern composition.
- Template Parameters
-
ExecutionPolicy | Execution policy type for the context. |
Transformer | Callable type for the context transformer. |
template<typename ExecutionPolicy , typename Transformer >
template<typename ExecutionPolicy , typename Transformer >
template<typename ExecutionPolicy , typename Transformer >
Constructs a context with a execution policy and a transformer.
- Parameters
-
e | Context to run the transformer function. |
t | Transformer to be run. |
template<typename ExecutionPolicy , typename Transformer >
ExecutionPolicy& grppi::context_t< ExecutionPolicy, Transformer >::execution_policy |
( |
| ) |
|
|
inline |
Return the execution policy used in the context.
- Returns
- The execution policy.
template<typename ExecutionPolicy , typename Transformer >
template<typename I >
auto grppi::context_t< ExecutionPolicy, Transformer >::operator() |
( |
I && |
item | ) |
const |
|
inline |
Invokes the trasnformer of the context over a data item.
template<typename ExecutionPolicy , typename Transformer >
Return the transformer function.
- Returns
- The transformer function.
The documentation for this class was generated from the following file: