Share via


ISource::accept Method

When overridden in a derived class, accepts a message that was offered by this ISource block, transferring ownership to the caller.

virtual message<_Type> * accept(
   runtime_object_identity _MsgId,
   ITarget<_Type> * _PTarget
) = 0;

Parameters

  • _MsgId
    The runtime_object_identity of the offered message object.

  • _PTarget
    A pointer to the target block that is calling the accept method.

Return Value

A pointer to the message that the caller now has ownership of.

Remarks

The accept method is called by a target while a message is being offered by this ISource block. The message pointer returned may be different from the one passed into the propagate method of the ITarget block, if this source decides to make a copy of the message.

Requirements

Header: agents.h

Namespace: Concurrency

See Also

Reference

ISource Class