single_link_registry Class

 

The single_link_registry object is a network_link_registry that manages only a single source or target block.

template<class _Block>
class single_link_registry : public network_link_registry<_Block>;

Parameters

_Block
The block data type being stored in the single_link_registry object.

Public Constructors

NameDescription
single_link_registry::single_link_registry ConstructorConstructs a single_link_registry object.
single_link_registry::~single_link_registry DestructorDestroys the single_link_registry object.

Public Methods

NameDescription
single_link_registry::add MethodAdds a link to the single_link_registry object. (Overrides network_link_registry::add.)
single_link_registry::begin MethodReturns an iterator to the first element in the single_link_registry object. (Overrides network_link_registry::begin.)
single_link_registry::contains MethodSearches the single_link_registry object for a specified block. (Overrides network_link_registry::contains.)
single_link_registry::count MethodCounts the number of items in the single_link_registry object. (Overrides network_link_registry::count.)
single_link_registry::remove MethodRemoves a link from the single_link_registry object. (Overrides network_link_registry::remove.)

network_link_registry

single_link_registry

Header: agents.h

Namespace: concurrency

Adds a link to the single_link_registry object.

virtual void add(_EType _Link);

Parameters

_Link
A pointer to a block to be added.

Remarks

The method throws an invalid_link_target exception if there is already a link in this registry.

Returns an iterator to the first element in the single_link_registry object.

virtual iterator begin();

Return Value

An iterator addressing the first element in the single_link_registry object.

Remarks

The end state is indicated by a NULL link.

Searches the single_link_registry object for a specified block.

virtual bool contains(_EType _Link);

Parameters

_Link
A pointer to a block that is to be searched for in the single_link_registry object.

Return Value

true if the link was found, false otherwise.

Counts the number of items in the single_link_registry object.

virtual size_t count();

Return Value

The number of items in the single_link_registry object.

Removes a link from the single_link_registry object.

virtual bool remove(_EType _Link);

Parameters

_Link
A pointer to a block to be removed, if found.

Return Value

true if the link was found and removed, false otherwise.

Constructs a single_link_registry object.

single_link_registry();

Destroys the single_link_registry object.

virtual ~single_link_registry();

Remarks

The method throws an invalid_operation exception if it is called before the link is removed.

concurrency Namespace
multi_link_registry Class

Show: