Skip to content

Commit c5bb21a

Browse files
authored
Update ConcRT transformer class reference
1 parent 695085c commit c5bb21a

File tree

1 file changed

+43
-44
lines changed

1 file changed

+43
-44
lines changed

docs/parallel/concrt/reference/transformer-class.md

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: transformer Class"
32
title: "transformer Class"
3+
description: "Learn more about: transformer Class"
44
ms.date: "11/04/2016"
55
f1_keywords: ["transformer", "AGENTS/concurrency::transformer", "AGENTS/concurrency::transformer::transformer", "AGENTS/concurrency::transformer::accept_message", "AGENTS/concurrency::transformer::consume_message", "AGENTS/concurrency::transformer::link_target_notification", "AGENTS/concurrency::transformer::propagate_message", "AGENTS/concurrency::transformer::propagate_to_any_targets", "AGENTS/concurrency::transformer::release_message", "AGENTS/concurrency::transformer::reserve_message", "AGENTS/concurrency::transformer::resume_propagation", "AGENTS/concurrency::transformer::send_message", "AGENTS/concurrency::transformer::supports_anonymous_source"]
66
helpviewer_keywords: ["transformer class"]
7-
ms.assetid: eea71925-7043-4a92-bfd4-dbc0ece5d081
87
---
98
# transformer Class
109

@@ -13,17 +12,17 @@ A `transformer` messaging block is a single-target, multi-source, ordered `propa
1312
## Syntax
1413

1514
```cpp
16-
template<class _Input, class _Output>
15+
template <class _Input, class _Output>
1716
class transformer : public propagator_block<single_link_registry<ITarget<_Output>>,
1817
multi_link_registry<ISource<_Input>>>;
1918
```
2019
2120
### Parameters
2221
23-
*_Input*<br/>
22+
*`_Input`*\
2423
The payload type of the messages accepted by the buffer.
2524
26-
*_Output*<br/>
25+
*`_Output`*\
2726
The payload type of the messages stored and propagated out by the buffer.
2827
2928
## Members
@@ -32,27 +31,27 @@ The payload type of the messages stored and propagated out by the buffer.
3231
3332
|Name|Description|
3433
|----------|-----------------|
35-
|[transformer](#ctor)|Overloaded. Constructs a `transformer` messaging block.|
36-
|[~transformer Destructor](#dtor)|Destroys the `transformer` messaging block.|
34+
|[`transformer`](#ctor)|Overloaded. Constructs a `transformer` messaging block.|
35+
|[`~transformer`](#dtor)|Destroys the `transformer` messaging block.|
3736
3837
### Protected Methods
3938
4039
|Name|Description|
4140
|----------|-----------------|
42-
|[accept_message](#accept_message)|Accepts a message that was offered by this `transformer` messaging block, transferring ownership to the caller.|
43-
|[consume_message](#consume_message)|Consumes a message previously offered by the `transformer` and reserved by the target, transferring ownership to the caller.|
44-
|[link_target_notification](#link_target_notification)|A callback that notifies that a new target has been linked to this `transformer` messaging block.|
45-
|[propagate_message](#propagate_message)|Asynchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `propagate` method, when called by a source block.|
46-
|[propagate_to_any_targets](#propagate_to_any_targets)|Executes the transformer function on the input messages.|
47-
|[release_message](#release_message)|Releases a previous message reservation. (Overrides [source_block::release_message](source-block-class.md#release_message).)|
48-
|[reserve_message](#reserve_message)|Reserves a message previously offered by this `transformer` messaging block. (Overrides [source_block::reserve_message](source-block-class.md#reserve_message).)|
49-
|[resume_propagation](#resume_propagation)|Resumes propagation after a reservation has been released. (Overrides [source_block::resume_propagation](source-block-class.md#resume_propagation).)|
50-
|[send_message](#send_message)|Synchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `send` method, when called by a source block.|
51-
|[supports_anonymous_source](#supports_anonymous_source)|Overrides the `supports_anonymous_source` method to indicate that this block can accept messages offered to it by a source that is not linked. (Overrides [ITarget::supports_anonymous_source](itarget-class.md#supports_anonymous_source).)|
41+
|[`accept_message`](#accept_message)|Accepts a message that was offered by this `transformer` messaging block, transferring ownership to the caller.|
42+
|[`consume_message`](#consume_message)|Consumes a message previously offered by the `transformer` and reserved by the target, transferring ownership to the caller.|
43+
|[`link_target_notification`](#link_target_notification)|A callback that notifies that a new target has been linked to this `transformer` messaging block.|
44+
|[`propagate_message`](#propagate_message)|Asynchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `propagate` method, when called by a source block.|
45+
|[`propagate_to_any_targets`](#propagate_to_any_targets)|Executes the transformer function on the input messages.|
46+
|[`release_message`](#release_message)|Releases a previous message reservation. (Overrides [`source_block::release_message`](source-block-class.md#release_message).)|
47+
|[`reserve_message`](#reserve_message)|Reserves a message previously offered by this `transformer` messaging block. (Overrides [`source_block::reserve_message`](source-block-class.md#reserve_message).)|
48+
|[`resume_propagation`](#resume_propagation)|Resumes propagation after a reservation has been released. (Overrides [`source_block::resume_propagation`](source-block-class.md#resume_propagation).)|
49+
|[`send_message`](#send_message)|Synchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `send` method, when called by a source block.|
50+
|[`supports_anonymous_source`](#supports_anonymous_source)|Overrides the `supports_anonymous_source` method to indicate that this block can accept messages offered to it by a source that is not linked. (Overrides [`ITarget::supports_anonymous_source`](itarget-class.md#supports_anonymous_source).)|
5251
5352
## Remarks
5453
55-
For more information, see [Asynchronous Message Blocks](../../../parallel/concrt/asynchronous-message-blocks.md).
54+
For more information, see [Asynchronous Message Blocks](../asynchronous-message-blocks.md).
5655
5756
## Inheritance Hierarchy
5857
@@ -72,7 +71,7 @@ For more information, see [Asynchronous Message Blocks](../../../parallel/concrt
7271
7372
**Namespace:** concurrency
7473
75-
## <a name="accept_message"></a> accept_message
74+
## <a name="accept_message"></a> `accept_message`
7675
7776
Accepts a message that was offered by this `transformer` messaging block, transferring ownership to the caller.
7877
@@ -82,14 +81,14 @@ virtual message<_Output>* accept_message(runtime_object_identity _MsgId);
8281

8382
### Parameters
8483

85-
*_MsgId*<br/>
84+
*`_MsgId`*\
8685
The `runtime_object_identity` of the offered `message` object.
8786

8887
### Return Value
8988

9089
A pointer to the `message` object that the caller now has ownership of.
9190

92-
## <a name="consume_message"></a> consume_message
91+
## <a name="consume_message"></a> `consume_message`
9392

9493
Consumes a message previously offered by the `transformer` and reserved by the target, transferring ownership to the caller.
9594

@@ -99,7 +98,7 @@ virtual message<_Output>* consume_message(runtime_object_identity _MsgId);
9998
10099
### Parameters
101100
102-
*_MsgId*<br/>
101+
*`_MsgId`*\
103102
The `runtime_object_identity` of the `message` object being consumed.
104103
105104
### Return Value
@@ -110,15 +109,15 @@ A pointer to the `message` object that the caller now has ownership of.
110109
111110
Similar to `accept`, but is always preceded by a call to `reserve`.
112111
113-
## <a name="link_target_notification"></a> link_target_notification
112+
## <a name="link_target_notification"></a> `link_target_notification`
114113
115114
A callback that notifies that a new target has been linked to this `transformer` messaging block.
116115
117116
```cpp
118117
virtual void link_target_notification(_Inout_ ITarget<_Output> *);
119118
```
120119

121-
## <a name="propagate_message"></a> propagate_message
120+
## <a name="propagate_message"></a> `propagate_message`
122121

123122
Asynchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `propagate` method, when called by a source block.
124123

@@ -130,25 +129,25 @@ virtual message_status propagate_message(
130129
131130
### Parameters
132131
133-
*_PMessage*<br/>
132+
*`_PMessage`*\
134133
A pointer to the `message` object.
135134
136-
*_PSource*<br/>
135+
*`_PSource`*\
137136
A pointer to the source block offering the message.
138137
139138
### Return Value
140139
141140
A [message_status](concurrency-namespace-enums.md) indication of what the target decided to do with the message.
142141
143-
## <a name="propagate_to_any_targets"></a> propagate_to_any_targets
142+
## <a name="propagate_to_any_targets"></a> `propagate_to_any_targets`
144143
145144
Executes the transformer function on the input messages.
146145
147146
```cpp
148147
virtual void propagate_to_any_targets(_Inout_opt_ message<_Output> *);
149148
```
150149

151-
## <a name="release_message"></a> release_message
150+
## <a name="release_message"></a> `release_message`
152151

153152
Releases a previous message reservation.
154153

@@ -158,10 +157,10 @@ virtual void release_message(runtime_object_identity _MsgId);
158157
159158
### Parameters
160159
161-
*_MsgId*<br/>
160+
*`_MsgId`*\
162161
The `runtime_object_identity` of the `message` object being released.
163162
164-
## <a name="reserve_message"></a> reserve_message
163+
## <a name="reserve_message"></a> `reserve_message`
165164
166165
Reserves a message previously offered by this `transformer` messaging block.
167166
@@ -171,7 +170,7 @@ virtual bool reserve_message(runtime_object_identity _MsgId);
171170

172171
### Parameters
173172

174-
*_MsgId*<br/>
173+
*`_MsgId`*\
175174
The `runtime_object_identity` of the `message` object being reserved.
176175

177176
### Return Value
@@ -182,15 +181,15 @@ The `runtime_object_identity` of the `message` object being reserved.
182181

183182
After `reserve` is called, if it returns **`true`**, either `consume` or `release` must be called to either take or release ownership of the message.
184183

185-
## <a name="resume_propagation"></a> resume_propagation
184+
## <a name="resume_propagation"></a> `resume_propagation`
186185

187186
Resumes propagation after a reservation has been released.
188187

189188
```cpp
190189
virtual void resume_propagation();
191190
```
192191

193-
## <a name="send_message"></a> send_message
192+
## <a name="send_message"></a> `send_message`
194193

195194
Synchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `send` method, when called by a source block.
196195

@@ -202,17 +201,17 @@ virtual message_status send_message(
202201
203202
### Parameters
204203
205-
*_PMessage*<br/>
204+
*`_PMessage`*\
206205
A pointer to the `message` object.
207206
208-
*_PSource*<br/>
207+
*`_PSource`*\
209208
A pointer to the source block offering the message.
210209
211210
### Return Value
212211
213212
A [message_status](concurrency-namespace-enums.md) indication of what the target decided to do with the message.
214213
215-
## <a name="supports_anonymous_source"></a> supports_anonymous_source
214+
## <a name="supports_anonymous_source"></a> `supports_anonymous_source`
216215
217216
Overrides the `supports_anonymous_source` method to indicate that this block can accept messages offered to it by a source that is not linked.
218217
@@ -224,7 +223,7 @@ virtual bool supports_anonymous_source();
224223

225224
**`true`** because the block does not postpone offered messages.
226225

227-
## <a name="ctor"></a> transformer
226+
## <a name="ctor"></a> `transformer`
228227

229228
Constructs a `transformer` messaging block.
230229

@@ -263,19 +262,19 @@ transformer(
263262
264263
### Parameters
265264
266-
*_Func*<br/>
265+
*`_Func`*\
267266
A function that will be invoked for each accepted message.
268267
269-
*_PTarget*<br/>
268+
*`_PTarget`*\
270269
A pointer to a target block to link with the transformer.
271270
272-
*_Filter*<br/>
271+
*`_Filter`*\
273272
A filter function which determines whether offered messages should be accepted.
274273
275-
*_PScheduler*<br/>
274+
*`_PScheduler`*\
276275
The `Scheduler` object within which the propagation task for the `transformer` messaging block is scheduled.
277276
278-
*_PScheduleGroup*<br/>
277+
*`_PScheduleGroup`*\
279278
The `ScheduleGroup` object within which the propagation task for the `transformer` messaging block is scheduled. The `Scheduler` object used is implied by the schedule group.
280279
281280
### Remarks
@@ -286,7 +285,7 @@ The type `_Transform_method` is a functor with signature `_Output (_Input const
286285
287286
The type `filter_method` is a functor with signature `bool (_Input const &)` which is invoked by this `transformer` messaging block to determine whether or not it should accept an offered message.
288287
289-
## <a name="dtor"></a> ~transformer
288+
## <a name="dtor"></a> `~transformer`
290289
291290
Destroys the `transformer` messaging block.
292291
@@ -296,5 +295,5 @@ Destroys the `transformer` messaging block.
296295

297296
## See also
298297

299-
[concurrency Namespace](concurrency-namespace.md)<br/>
298+
[concurrency Namespace](concurrency-namespace.md)\
300299
[call Class](call-class.md)

0 commit comments

Comments
 (0)