STLdoc
STLdocumentation
|
The single_link_registry
object is a network_link_registry
that manages only a single source or target block.
More...
#include <agents.h>
Public Member Functions | |
single_link_registry () | |
Constructs a single_link_registry object. More... | |
virtual | ~single_link_registry () |
Destroys the single_link_registry object. More... | |
virtual void | add (typename network_link_registry< _Block >::_EType _Link) |
Adds a link to the single_link_registry object. More... | |
virtual bool | remove (typename network_link_registry< _Block >::_EType _Link) |
Removes a link from the single_link_registry object. More... | |
virtual bool | contains (typename network_link_registry< _Block >::_EType _Link) |
Searches the single_link_registry object for a specified block. More... | |
virtual size_t | count () |
Counts the number of items in the single_link_registry object. More... | |
virtual network_link_registry< _Block >::iterator | begin () |
Returns an iterator to the first element in the single_link_registry object. More... | |
Public Member Functions inherited from Concurrency::network_link_registry< _Block > | |
virtual void | add (_EType _Link)=0 |
When overridden in a derived class, adds a link to the network_link_registry object. More... | |
virtual bool | remove (_EType _Link)=0 |
When overridden in a derived class, removes a specified block from the network_link_registry object. More... | |
virtual bool | contains (_EType _Link)=0 |
When overridden in a derived class, searches the network_link_registry object for a specified block. More... | |
Protected Member Functions | |
virtual void | _Next_index (size_t &_Index) |
Skips empty slots and updates the index to the next non-empty slot. This is called by the iterator. More... | |
virtual network_link_registry< _Block >::_EType | _Get_element (size_t _Index) const |
Retrieves the element at the given index. If the index is out of bounds, NULL is returned. Users need to use the iterator to access the links. More... | |
Private Attributes | |
network_link_registry< _Block >::_EType | _M_connectedLink |
Additional Inherited Members | |
Public Types inherited from Concurrency::network_link_registry< _Block > | |
typedef _Block | type |
A type that represents the block type stored in the network_link_registry object. More... | |
typedef _Block * | _EType |
A type that represents an element pointer stored in the network_link_registry object. More... | |
typedef _EType const & | const_reference |
A type that provides a reference to a const element stored in a network_link_registry 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 network_link_registry object. More... | |
typedef _Network_link_iterator< _Block > | iterator |
A type that provides an iterator that can read or modify any element in a network_link_registry object. More... | |
The single_link_registry
object is a network_link_registry
that manages only a single source or target block.
_Block | The block data type being stored in the single_link_registry object. |
|
inline |
Constructs a single_link_registry
object.
|
inlinevirtual |
Destroys the single_link_registry
object.
The method throws an invalid_operation exception if it is called before the link is removed.
|
inlineprotectedvirtual |
Retrieves the element at the given index. If the index is out of bounds, NULL
is returned. Users need to use the iterator to access the links.
_Index | The index of the link to be retrieved. |
Implements Concurrency::network_link_registry< _Block >.
|
inlineprotectedvirtual |
Skips empty slots and updates the index to the next non-empty slot. This is called by the iterator.
_Index | A reference to the index that is to be updated. |
Implements Concurrency::network_link_registry< _Block >.
|
inlinevirtual |
Adds a link to the single_link_registry
object.
_Link | A pointer to a block to be added. |
The method throws an invalid_link_target exception if there is already a link in this registry.
|
inlinevirtual |
Returns an iterator to the first element in the single_link_registry
object.
The end state is indicated by a NULL
link.
single_link_registry
object. Implements Concurrency::network_link_registry< _Block >.
|
inlinevirtual |
Searches the single_link_registry
object for a specified block.
_Link | A pointer to a block that is to be searched for in the single_link_registry object. |
true
if the link was found, false
otherwise.
|
inlinevirtual |
Counts the number of items in the single_link_registry
object.
single_link_registry
object. Implements Concurrency::network_link_registry< _Block >.
|
inlinevirtual |
Removes a link from the single_link_registry
object.
_Link | A pointer to a block to be removed, if found. |
true
if the link was found and removed, false
otherwise.
|
private |