STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
agents.h File Reference
#include <crtdefs.h>
#include <concrt.h>
#include <stdexcept>
#include <functional>
#include <tuple>
#include <type_traits>
#include <vector>
#include <concurrent_queue.h>

Go to the source code of this file.

Classes

class  Concurrency::details::_Runtime_object
 
class  Concurrency::details::_Queue< _Message >
 
class  Concurrency::details::_Dynamic_array< _Type >
 
class  Concurrency::ISource< _Type >
 The ISource class is the interface for all source blocks. Source blocks propagate messages to ITarget blocks. More...
 
class  Concurrency::ITarget< _Type >
 The ITarget class is the interface for all target blocks. Target blocks consume messages offered to them by ISource blocks. More...
 
class  Concurrency::network_link_registry< _Block >
 The network_link_registry abstract base class manages the links between source and target blocks. More...
 
class  Concurrency::_Network_link_iterator< _Block >
 Const iterator for network link registry. Message blocks should use the link_registry::iterator type for iteration. More...
 
class  Concurrency::network_link_registry< _Block >
 The network_link_registry abstract base class manages the links between source and target blocks. More...
 
class  Concurrency::single_link_registry< _Block >
 The single_link_registry object is a network_link_registry that manages only a single source or target block. More...
 
class  Concurrency::multi_link_registry< _Block >
 The multi_link_registry object is a network_link_registry that manages multiple source blocks or multiple target blocks. More...
 
class  Concurrency::source_link_manager< _LinkRegistry >
 The source_link_manager object manages messaging block network links to ISource blocks. More...
 
class  Concurrency::_Source_link_iterator< _LinkRegistry >
 Const Iterator for referenced link manager. More...
 
class  Concurrency::source_link_manager< _LinkRegistry >
 The source_link_manager object manages messaging block network links to ISource blocks. More...
 
class  Concurrency::message< _Type >
 The basic message envelope containing the data payload being passed between messaging blocks. More...
 
class  Concurrency::message_processor< _Type >
 The message_processor class is the abstract base class for processing of message objects. There is no guarantee on the ordering of the messages. More...
 
class  Concurrency::ordered_message_processor< _Type >
 An ordered_message_processor is a message_processor that allows message blocks to process messages in the order they were received. More...
 
class  Concurrency::ITarget< _Type >
 The ITarget class is the interface for all target blocks. Target blocks consume messages offered to them by ISource blocks. More...
 
class  Concurrency::ISource< _Type >
 The ISource class is the interface for all source blocks. Source blocks propagate messages to ITarget blocks. More...
 
class  Concurrency::details::_AnonymousOriginator< _Type >
 
class  Concurrency::details::_SyncOriginator< _Type >
 
class  Concurrency::details::_AsyncOriginator< _Type >
 
class  Concurrency::details::_Originator
 
class  Concurrency::target_block< _SourceLinkRegistry, _MessageProcessorType >
 The target_block class is an abstract base class that provides basic link management functionality and error checking for target only blocks. More...
 
class  Concurrency::source_block< _TargetLinkRegistry, _MessageProcessorType >
 The source_block class is an abstract base class for source-only blocks. The class provides basic link management functionality as well as common error checks. More...
 
class  Concurrency::propagator_block< _TargetLinkRegistry, _SourceLinkRegistry, _MessageProcessorType >
 The propagator_block class is an abstract base class for message blocks that are both a source and target. It combines the functionality of both the source_block and target_block classes. More...
 
class  Concurrency::unbounded_buffer< _Type >
 An unbounded_buffer messaging block is a multi-target, multi-source, ordered propagator_block capable of storing an unbounded number of messages. More...
 
class  Concurrency::overwrite_buffer< _Type >
 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. More...
 
class  Concurrency::call< _Type, _FunctorType >
 A call messaging block is a multi-source, ordered target_block that invokes a specified function when receiving a message. More...
 
class  Concurrency::transformer< _Input, _Output >
 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. More...
 
class  Concurrency::timer< _Type >
 A timer messaging block is a single-target source_block capable of sending a message to its target after a specified time period has elapsed or at specific intervals. More...
 
class  Concurrency::single_assignment< _Type >
 A single_assignment messaging block is a multi-target, multi-source, ordered propagator_block capable of storing a single, write-once message. More...
 
class  Concurrency::join< _Type, _Jtype >
 A join messaging block is a single-target, multi-source, ordered propagator_block which combines together messages of type _Type from each of its sources. More...
 
struct  Concurrency::join< _Type, _Jtype >::_MessageArray
 
struct  Concurrency::join< _Type, _Jtype >::_SavedMessageIdArray
 
class  Concurrency::_Order_node_base< _Type >
 Base class for Helper node used in multi-type join and choice blocks Order node is a single-target, single-source ordered propagator block The main property of an order node is that it accepts a message of _Type and outputs a message of int, with some unique assigned index number. More...
 
class  Concurrency::_Reserving_node< _Type >
 Helper class used in multi-type choice blocks Ordered node is a single-target, single-source ordered propagator block More...
 
class  Concurrency::_Greedy_node< _Type >
 Helper class used in multi-type greedy join blocks Ordered node is a single-target, single-source ordered propagator block More...
 
class  Concurrency::_Non_greedy_node< _Type >
 Helper class used in multi-type non-greedy join blocks Ordered node is a single-target, single-source ordered propagator block More...
 
class  Concurrency::choice< _Type >
 A choice messaging block is a multi-source, single-target block that represents a control-flow interaction with a set of sources. The choice block will wait for any one of multiple sources to produce a message and will propagate the index of the source that produced the message. More...
 
struct  Concurrency::_Unwrap< _Tuple >
 
struct  Concurrency::_Unwrap< std::tuple< _Types...> >
 Template specialization used to unwrap the types from within a tuple. More...
 
class  Concurrency::_Join_node< _Type, _Destination_type, _Jtype >
 Defines a block allowing sources of distinct types to be joined. Join node is a single-target, multi-source ordered propagator block More...
 
class  Concurrency::multitype_join< _Type, _Jtype >
 A multitype_join messaging block is a multi-source, single-target messaging block that combines together messages of different types from each of its sources and offers a tuple of the combined messages to its targets. More...
 
class  Concurrency::agent
 A class intended to be used as a base class for all independent agents. It is used to hide state from other agents and interact using message-passing. More...
 

Namespaces

 Concurrency
 The Concurrency namespace provides classes and functions that provide access to the Concurrency Runtime, a concurrent programming framework for C++. For more information, see Concurrency Runtime.
 
 Concurrency::details
 

Macros

#define _AGENTS_H
 

Typedefs

typedef __int32 Concurrency::runtime_object_identity
 Each message instance has an identity that follows it as it is cloned and passed between messaging components. This cannot be the address of the message object. More...
 
typedef ::Concurrency::details::_NonReentrantPPLLock::_Scoped_lock Concurrency::_NR_lock
 A lock holder that acquires a non-reentrant lock on instantiation and releases it on destruction. More...
 
typedef ::Concurrency::details::_ReentrantPPLLock::_Scoped_lock Concurrency::_R_lock
 A lock holder that acquires a reentrant lock on instantiation and releases it on destruction More...
 

Enumerations

enum  Concurrency::message_status { Concurrency::accepted, Concurrency::declined, Concurrency::postponed, Concurrency::missed }
 The valid responses for an offer of a message object to a block. More...
 
enum  Concurrency::join_type { Concurrency::greedy = 0, Concurrency::non_greedy = 1 }
 The type of a join messaging block. More...
 
enum  Concurrency::agent_status {
  Concurrency::agent_created, Concurrency::agent_runnable, Concurrency::agent_started, Concurrency::agent_done,
  Concurrency::agent_canceled
}
 The valid states for an agent. More...
 

Functions

template<class _Type >
__int64 Concurrency::details::_Trace_agents_get_id (_Type *_PObject)
 
template<class _Type >
_Type Concurrency::_Receive_impl (ISource< _Type > *_Src, unsigned int _Timeout, typename ITarget< _Type >::filter_method const *_Filter_proc)
 A general receive implementation, allowing a context to wait for data from exactly one source and filter the values that are accepted. If the specified timeout is not COOPERATIVE_TIMEOUT_INFINITE, an exception (operation_timed_out) will be thrown if the specified amount of time expires before a message is received. Note that zero length timeouts should likely use try_receive as opposed to receive with a timeout of zero as it is more efficient and does not throw exceptions on timeouts. More...
 
template<class _Type >
_Type Concurrency::receive (_Inout_ ISource< _Type > *_Src, unsigned int _Timeout=COOPERATIVE_TIMEOUT_INFINITE)
 A general receive implementation, allowing a context to wait for data from exactly one source and filter the values that are accepted. More...
 
template<class _Type >
_Type Concurrency::receive (_Inout_ ISource< _Type > *_Src, typename ITarget< _Type >::filter_method const &_Filter_proc, unsigned int _Timeout=COOPERATIVE_TIMEOUT_INFINITE)
 A general receive implementation, allowing a context to wait for data from exactly one source and filter the values that are accepted. More...
 
template<class _Type >
_Type Concurrency::receive (ISource< _Type > &_Src, unsigned int _Timeout=COOPERATIVE_TIMEOUT_INFINITE)
 A general receive implementation, allowing a context to wait for data from exactly one source and filter the values that are accepted. More...
 
template<class _Type >
_Type Concurrency::receive (ISource< _Type > &_Src, typename ITarget< _Type >::filter_method const &_Filter_proc, unsigned int _Timeout=COOPERATIVE_TIMEOUT_INFINITE)
 A general receive implementation, allowing a context to wait for data from exactly one source and filter the values that are accepted. More...
 
template<class _Type >
bool Concurrency::_Try_receive_impl (ISource< _Type > *_Src, _Type &_value, typename ITarget< _Type >::filter_method const *_Filter_proc)
 Helper function that implements try_receive A general try-receive implementation, allowing a context to look for data from exactly one source and filter the values that are accepted. If the data is not ready, try_receive will return false. More...
 
template<class _Type >
bool Concurrency::try_receive (_Inout_ ISource< _Type > *_Src, _Type &_value)
 A general try-receive implementation, allowing a context to look for data from exactly one source and filter the values that are accepted. If the data is not ready, the method will return false. More...
 
template<class _Type >
bool Concurrency::try_receive (_Inout_ ISource< _Type > *_Src, _Type &_value, typename ITarget< _Type >::filter_method const &_Filter_proc)
 A general try-receive implementation, allowing a context to look for data from exactly one source and filter the values that are accepted. If the data is not ready, the method will return false. More...
 
template<class _Type >
bool Concurrency::try_receive (ISource< _Type > &_Src, _Type &_value)
 A general try-receive implementation, allowing a context to look for data from exactly one source and filter the values that are accepted. If the data is not ready, the method will return false. More...
 
template<class _Type >
bool Concurrency::try_receive (ISource< _Type > &_Src, _Type &_value, typename ITarget< _Type >::filter_method const &_Filter_proc)
 A general try-receive implementation, allowing a context to look for data from exactly one source and filter the values that are accepted. If the data is not ready, the method will return false. More...
 
template<class _Type >
bool Concurrency::send (_Inout_ ITarget< _Type > *_Trg, const _Type &_Data)
 A synchronous send operation, which waits until the target either accepts or declines the message. More...
 
template<class _Type >
bool Concurrency::send (ITarget< _Type > &_Trg, const _Type &_Data)
 A synchronous send operation, which waits until the target either accepts or declines the message. More...
 
template<class _Type >
bool Concurrency::asend (_Inout_ ITarget< _Type > *_Trg, const _Type &_Data)
 An asynchronous send operation, which schedules a task to propagate the data to the target block. More...
 
template<class _Type >
bool Concurrency::asend (ITarget< _Type > &_Trg, const _Type &_Data)
 An asynchronous send operation, which schedules a task to propagate the value to the target block. More...
 
template<typename _Type1 , typename _Type2 , typename... _Types>
choice< std::tuple< _Type1, _Type2, _Types...> > Concurrency::make_choice (_Type1 _Item1, _Type2 _Item2, _Types..._Items)
 Constructs a choice messaging block from an optional Scheduler or ScheduleGroup and two or more input sources. More...
 
template<typename _Type1 , typename _Type2 , typename... _Types>
multitype_join< std::tuple< _Type1, _Type2, _Types...> > Concurrency::make_join (_Type1 _Item1, _Type2 _Item2, _Types..._Items)
 Constructs a non_greedy multitype_join messaging block from an optional Scheduler or ScheduleGroup and two or more input sources. More...
 
template<typename _Type1 , typename _Type2 , typename... _Types>
multitype_join< std::tuple< _Type1, _Type2, _Types...>, greedy > Concurrency::make_greedy_join (_Type1 _Item1, _Type2 _Item2, _Types..._Items)
 Constructs a greedy multitype_join messaging block from an optional Scheduler or ScheduleGroup and two or more input sources. More...
 
template<class _Type >
void Concurrency::Trace_agents_register_name (_Inout_ _Type *_PObject, _In_z_ const wchar_t *_Name)
 Associates the given name to the message block or agent in the ETW trace. More...
 

Macro Definition Documentation

#define _AGENTS_H