STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
Concurrency::network_link_registry< _Block > Class Template Referenceabstract

The network_link_registry abstract base class manages the links between source and target blocks. More...

#include <agents.h>

Inheritance diagram for Concurrency::network_link_registry< _Block >:
Concurrency::multi_link_registry< _Block > Concurrency::single_link_registry< _Block >

Public Types

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...
 

Public Member Functions

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...
 
virtual size_t count ()=0
 When overridden in a derived class, returns the number of items in the network_link_registry object. More...
 
virtual iterator begin ()=0
 When overridden in a derived class, returns an iterator to the first element in the network_link_registry object. More...
 

Protected Member Functions

virtual void _Next_index (size_t &_Index)=0
 Skips empty slots and updates the index to the next non-empty slot. This is called by the iterator. More...
 
virtual _EType _Get_element (size_t _Index) const =0
 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...
 

Friends

class _Network_link_iterator< _Block >
 

Detailed Description

template<class _Block>
class Concurrency::network_link_registry< _Block >

The network_link_registry abstract base class manages the links between source and target blocks.

Template Parameters
_BlockThe block data type being stored in the network_link_registry.

The network link registry is not safe for concurrent access.

See also
single_link_registry Class, multi_link_registry Class

Member Typedef Documentation

template<class _Block>
typedef _Block* Concurrency::network_link_registry< _Block >::_EType

A type that represents an element pointer stored in the network_link_registry object.

template<class _Block>
typedef _EType const* Concurrency::network_link_registry< _Block >::const_pointer

A type that provides a pointer to a const element in a network_link_registry object.

template<class _Block>
typedef _EType const& Concurrency::network_link_registry< _Block >::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.

template<class _Block>
typedef _Network_link_iterator<_Block> Concurrency::network_link_registry< _Block >::iterator

A type that provides an iterator that can read or modify any element in a network_link_registry object.

template<class _Block>
typedef _Block Concurrency::network_link_registry< _Block >::type

A type that represents the block type stored in the network_link_registry object.

Member Function Documentation

template<class _Block>
virtual _EType Concurrency::network_link_registry< _Block >::_Get_element ( size_t  _Index) const
protectedpure virtual
template<class _Block>
virtual void Concurrency::network_link_registry< _Block >::_Next_index ( size_t _Index)
protectedpure virtual
template<class _Block>
virtual void Concurrency::network_link_registry< _Block >::add ( _EType  _Link)
pure virtual

When overridden in a derived class, adds a link to the network_link_registry object.

Parameters
_LinkA pointer to a block to be added.
template<class _Block>
virtual iterator Concurrency::network_link_registry< _Block >::begin ( )
pure virtual
template<class _Block>
virtual bool Concurrency::network_link_registry< _Block >::contains ( _EType  _Link)
pure virtual

When overridden in a derived class, searches the network_link_registry object for a specified block.

Parameters
_LinkA pointer to a block that is being searched for in the network_link_registry object.
Returns
true if the block was found, false otherwise.
template<class _Block>
virtual size_t Concurrency::network_link_registry< _Block >::count ( )
pure virtual
template<class _Block>
virtual bool Concurrency::network_link_registry< _Block >::remove ( _EType  _Link)
pure virtual

When overridden in a derived class, removes a specified block from the network_link_registry object.

Parameters
_LinkA pointer to a block to be removed, if found.
Returns
true if the link was found and removed, false otherwise.

Friends And Related Function Documentation

template<class _Block>
friend class _Network_link_iterator< _Block >
friend

The documentation for this class was generated from the following file: