|
STLdoc
STLdocumentation
|
The source_link_manager object manages messaging block network links to ISource blocks.
More...
#include <agents.h>
Public Types | |
| typedef _LinkRegistry | type |
The type of link registry being managed by the source_link_manager object. More... | |
| typedef _LinkRegistry::type | _Block |
The type of the blocks being managed by the source_link_manager object. More... | |
| typedef std::function< void(_Block *, bool)> | _Callback_method |
The method signature for a callback method for this source_link_manager object. More... | |
| typedef _Block * | _EType |
A type that represents a pointer to an element stored in the source_link_manager object. More... | |
| typedef _EType const & | const_reference |
A type that provides a reference to a const element stored in a source_link_manager object for reading and performing const operations. More... | |
| typedef _EType const * | const_pointer |
A type that provides a pointer to a const element in a source_link_manager object. More... | |
| typedef _Source_link_iterator< _LinkRegistry > | iterator |
A type that provides an iterator that can read or modify any element in the source_link_manager object. More... | |
| typedef ::Concurrency::details::_ReentrantPPLLock | _LockType |
A type that provides a reentrant lock for the source_link_manager object. More... | |
| typedef _LockType::_Scoped_lock | _LockHolder |
| A type that provides a RAII scoped lock holder for a lock. More... | |
Public Member Functions | |
| source_link_manager () | |
Constructs a source_link_manager object. More... | |
| ~source_link_manager () | |
Destroys the source_link_manager object. More... | |
| void | register_target_block (_Inout_ ITarget< typename _Block::source_type > *_PTarget) |
Registers the target block that holds this source_link_manager object. More... | |
| void | set_bound (size_t _MaxLinks) |
Sets the maximum number of source links that can be added to this source_link_manager object. More... | |
| void | add (_EType _Link) |
Adds a source link to the source_link_manager object. More... | |
| bool | remove (_EType _Link) |
Removes a link from the source_link_manager object. More... | |
| void | reference () |
Acquires a reference on the source_link_manager object. More... | |
| void | release () |
Releases the reference on the source_link_manager object. More... | |
| bool | contains (_EType _Link) |
Searches the network_link_registry within this source_link_manager object for a specified block. More... | |
| size_t | count () |
Counts the number of linked blocks in the source_link_manager object. More... | |
| iterator | begin () |
Returns an iterator to the first element in the source_link_manager object. More... | |
Private Member Functions | |
| void | _To_array (::Concurrency::details::_Dynamic_array< _EType > &_Array) |
Private Attributes | |
| _LockType | _M_lock |
| volatile long | _M_iteratorCount |
| ::Concurrency::details::_Dynamic_array< _EType > | _M_pendingRemove |
| _LinkRegistry | _M_links |
| ITarget< typename _Block::source_type > *volatile | _M_pLinkedTarget |
Friends | |
| class | _Source_link_iterator< _LinkRegistry > |
The source_link_manager object manages messaging block network links to ISource blocks.
| _LinkRegistry | The network link registry. |
Currently, the source blocks are reference counted. This is a wrapper on a network_link_registry object that allows concurrent access to the links and provides the ability to reference the links through callbacks. Message blocks (target_blocks or propagator_blocks) should use this class for their source links.
| typedef _LinkRegistry::type Concurrency::source_link_manager< _LinkRegistry >::_Block |
The type of the blocks being managed by the source_link_manager object.
| typedef std::function<void(_Block *, bool)> Concurrency::source_link_manager< _LinkRegistry >::_Callback_method |
The method signature for a callback method for this source_link_manager object.
| typedef _Block* Concurrency::source_link_manager< _LinkRegistry >::_EType |
A type that represents a pointer to an element stored in the source_link_manager object.
| typedef _LockType::_Scoped_lock Concurrency::source_link_manager< _LinkRegistry >::_LockHolder |
A type that provides a RAII scoped lock holder for a lock.
| typedef ::Concurrency::details::_ReentrantPPLLock Concurrency::source_link_manager< _LinkRegistry >::_LockType |
A type that provides a reentrant lock for the source_link_manager object.
| typedef _EType const* Concurrency::source_link_manager< _LinkRegistry >::const_pointer |
A type that provides a pointer to a const element in a source_link_manager object.
| typedef _EType const& Concurrency::source_link_manager< _LinkRegistry >::const_reference |
A type that provides a reference to a const element stored in a source_link_manager object for reading and performing const operations.
| typedef _Source_link_iterator<_LinkRegistry> Concurrency::source_link_manager< _LinkRegistry >::iterator |
A type that provides an iterator that can read or modify any element in the source_link_manager object.
| typedef _LinkRegistry Concurrency::source_link_manager< _LinkRegistry >::type |
The type of link registry being managed by the source_link_manager object.
|
inline |
Constructs a source_link_manager object.
|
inline |
Destroys the source_link_manager object.
|
inlineprivate |
|
inline |
Adds a source link to the source_link_manager object.
| _Link | A pointer to a block to be added. |
|
inline |
Returns an iterator to the first element in the source_link_manager object.
The end state of the iterator is indicated by a NULL link.
source_link_manager object.
|
inline |
Searches the network_link_registry within this source_link_manager object for a specified block.
| _Link | A pointer to a block that is to be searched for in the source_link_manager object. |
true if the specified block was found, false otherwise.
|
inline |
Counts the number of linked blocks in the source_link_manager object.
source_link_manager object.
|
inline |
Acquires a reference on the source_link_manager object.
|
inline |
Registers the target block that holds this source_link_manager object.
| _PTarget | The target block holding this source_link_manager object. |
|
inline |
Releases the reference on the source_link_manager object.
|
inline |
Removes a link from the source_link_manager object.
| _Link | A pointer to a block to be removed, if found. |
true if the link was found and removed, false otherwise.
|
inline |
Sets the maximum number of source links that can be added to this source_link_manager object.
| _MaxLinks | The maximum number of links. |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.8