다음을 통해 공유


transformer Class

A transformer messaging block is a single-target, multi-source, ordered propagator_block which can accept messages of one type and is capable of storing an unbounded number of messages of a different type.

template<
   class _Input,
   class _Output
>
class transformer : public propagator_block<single_link_registry<ITarget<_Output>>, multi_link_registry<ISource<_Input>>>;

Parameters

  • _Input
    The payload type of the messages accepted by the buffer.

  • _Output
    The payload type of the messages stored and propagated out by the buffer.

Members

Public Constructors

Name

Description

transformer::transformer Constructor

Overloaded. Constructs a transformer messaging block.

transformer::~transformer Destructor

Destroys the transformer messaging block.

Protected Methods

Name

Description

transformer::accept_message Method

Accepts a message that was offered by this transformer messaging block, transferring ownership to the caller.

transformer::consume_message Method

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

transformer::link_target_notification Method

A callback that notifies that a new target has been linked to this transformer messaging block.

transformer::propagate_message Method

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.

transformer::propagate_to_any_targets Method

Executes the transformer function on the input messages.

transformer::release_message Method

Releases a previous message reservation. (Overrides source_block::release_message.)

transformer::reserve_message Method

Reserves a message previously offered by this transformer messaging block. (Overrides source_block::reserve_message.)

transformer::resume_propagation Method

Resumes propagation after a reservation has been released. (Overrides source_block::resume_propagation.)

transformer::send_message Method

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.

transformer::supports_anonymous_source Method

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.)

Remarks

For more information, see Asynchronous Message Blocks.

Inheritance Hierarchy

ISource

ITarget

source_block

propagator_block

transformer

Requirements

Header: agents.h

Namespace: concurrency

See Also

Reference

concurrency Namespace

call Class