Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
An overwrite_buffer messaging block is a multi-target, multi-source, ordered propagator_block capable of storing a single message at a time. New messages overwrite previously held ones.
template<
   class _Type
>
class overwrite_buffer : public propagator_block<multi_link_registry<ITarget<_Type>>, multi_link_registry<ISource<_Type>>>;
Parameters
- _Type
 The payload type of the messages stored and propagated by the buffer.
Members
Public Constructors
| Name | Description | 
|---|---|
| Overloaded. Constructs an overwrite_buffer messaging block. | |
| Destroys the overwrite_buffer messaging block. | 
Public Methods
| Name | Description | 
|---|---|
| Checks whether this overwrite_buffer messaging block has a value yet. | |
| Gets a reference to the current payload of the message being stored in the overwrite_buffer messaging block. | 
Protected Methods
| Name | Description | 
|---|---|
| Accepts a message that was offered by this overwrite_buffer messaging block, returning a copy of the message to the caller. | |
| Consumes a message previously offered by the overwrite_buffer messaging block and reserved by the target, returning a copy of the message to the caller. | |
| A callback that notifies that a new target has been linked to this overwrite_buffer messaging block. | |
| Asynchronously passes a message from an ISource block to this overwrite_buffer messaging block. It is invoked by the propagate method, when called by a source block. | |
| Places the message_PMessage in this overwrite_buffer messaging block and offers it to all of the linked targets. | |
| Releases a previous message reservation. (Overrides source_block::release_message.) | |
| Reserves a message previously offered by this overwrite_buffer messaging block. (Overrides source_block::reserve_message.) | |
| Resumes propagation after a reservation has been released. (Overrides source_block::resume_propagation.) | |
| Synchronously passes a message from an ISource block to this overwrite_buffer messaging block. It is invoked by the send method, when called by a source block. | |
| 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
An overwrite_buffer messaging block propagates out copies of its stored message to each of its targets.
For more information, see Asynchronous Message Blocks.
Inheritance Hierarchy
overwrite_buffer
Requirements
Header: agents.h
Namespace: concurrency