Concurrency Namespace


Visual Studio 2010 - Visual C++
overwrite_buffer Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The class implementation for a overwrite buffer. Overwrite buffer is a multi-target, multi-source, ordered propagator

template<
   class _Type
>
class overwrite_buffer : public propagator_block<multi_link_registry<ITarget<_Type>>, multi_link_registry<ISource<_Type>>>;
Parameters

_Type
Members

Public Constructors

Name

Description

overwrite_buffer::~overwrite_buffer Destructor

Cleans up any resources that may have been created by the overwrite_buffer.

overwrite_buffer::overwrite_buffer Constructor

Overloaded. Create an overwrite_buffer within the specified schedule group. The scheduler is implied by the schedule group.

Public Methods

Name

Description

overwrite_buffer::has_value Method

Checks whether this block has been initialized yet.

overwrite_buffer::value Method

Gets a reference to the current payload of the message being stored.

Protected Methods

Name

Description

overwrite_buffer::accept_message Method

Accept the message by making a copy of the payload.

overwrite_buffer::consume_message Method

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

overwrite_buffer::link_target_notification Method

Notification that a target was linked to this source.

overwrite_buffer::propagate_message Method

The main propagate() function for ITarget blocks. Called by a source block, generally within an asynchronous task to send messages to its targets.

overwrite_buffer::propagate_to_any_targets Method

Takes the message and propagates it to all the targets of this overwrite_buffer

overwrite_buffer::release_message Method

Releases a previous message reservation. (Overrides Concurrency::source_block<_TargetLinkRegistry, _MessageProcessorType>::release_message).

overwrite_buffer::reserve_message Method

Reserves a message previously offered by the source. (Overrides Concurrency::source_block<_TargetLinkRegistry, _MessageProcessorType>::reserve_message).

overwrite_buffer::resume_propagation Method

Resumes propagation after a reservation has been released (Overrides Concurrency::source_block<_TargetLinkRegistry, _MessageProcessorType>::resume_propagation).

overwrite_buffer::send_message Method

Synchronously sends a message to this block. When this function completes the message will already have propagated into the block.

Remarks

For more information, see Asynchronous Message Blocks.

Inheritance Hierarchy

ISource<typename _TargetLinkRegistry::type::type>

   source_block<_TargetLinkRegistry, _MessageProcessorType>

   ITarget<typename _SourceLinkRegistry::type::source_type>

      propagator_block<multi_link_registry<ITarget<_Type>>, multi_link_registry<ISource<_Type>>>

         Concurrency::overwrite_buffer<_Type>

Requirements

Header: agents.h

See Also

Reference

Page view tracker