STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Concurrency::_Source_link_iterator< _LinkRegistry > Class Template Reference

Const Iterator for referenced link manager. More...

#include <agents.h>

Public Types

typedef _LinkRegistry::type _Block
 
typedef _Source_link_iterator< _LinkRegistry > _Myt
 
typedef source_link_manager< _LinkRegistry > _MyContainer
 
typedef _Block_EType
 
typedef _EType const & const_reference
 
typedef _EType const * const_pointer
 

Public Member Functions

 _Source_link_iterator (_MyContainer *_PNetwork_link, size_t _Index)
 Construct iterator More...
 
virtual ~_Source_link_iterator ()
 Destruct iterator More...
 
 _Source_link_iterator (_Myt const &_Right)
 Copy construct an iterator More...
 
_Myt const & operator= (_Myt const &_Right)
 Copy assign an iterator More...
 
const_reference operator* ()
 Returns the object pointed to by the iterator More...
 
const_pointer operator-> () const
 Returns a pointer to the class object More...
 
const_reference operator[] (size_t _Pos) const
 Index operation. Retrieve an element at the specified index. More...
 
_Mytoperator++ ()
 Pre-increment the iterator to point to the next element More...
 
_Myt operator++ (int)
 Post-increment the iterator to point to the next element More...
 

Private Member Functions

const_reference _Get (size_t _Pos) const
 

Private Attributes

::Concurrency::details::_Dynamic_array< _EType_M_array
 
_MyContainer_M_pNetwork_link
 
size_t _M_index
 
_EType _M_sentinel
 

Detailed Description

template<class _LinkRegistry>
class Concurrency::_Source_link_iterator< _LinkRegistry >

Const Iterator for referenced link manager.

Template Parameters
_LinkRegistryThe underlying network link registry

Member Typedef Documentation

template<class _LinkRegistry >
typedef _LinkRegistry::type Concurrency::_Source_link_iterator< _LinkRegistry >::_Block
template<class _LinkRegistry >
typedef _Block* Concurrency::_Source_link_iterator< _LinkRegistry >::_EType
template<class _LinkRegistry >
typedef source_link_manager<_LinkRegistry> Concurrency::_Source_link_iterator< _LinkRegistry >::_MyContainer
template<class _LinkRegistry >
typedef _Source_link_iterator<_LinkRegistry> Concurrency::_Source_link_iterator< _LinkRegistry >::_Myt
template<class _LinkRegistry >
typedef _EType const* Concurrency::_Source_link_iterator< _LinkRegistry >::const_pointer
template<class _LinkRegistry >
typedef _EType const& Concurrency::_Source_link_iterator< _LinkRegistry >::const_reference

Constructor & Destructor Documentation

template<class _LinkRegistry >
Concurrency::_Source_link_iterator< _LinkRegistry >::_Source_link_iterator ( _MyContainer _PNetwork_link,
size_t  _Index 
)
inline

Construct iterator

1262  : _M_pNetwork_link(_PNetwork_link), _M_index(_Index), _M_sentinel(NULL)
1263  {
1264  // Take a snapshot of the link registry. This will reference the registry.
1266  }
_In_ size_t _In_ int _Index
Definition: time.h:102
#define NULL
Definition: corecrt.h:158
template<class _LinkRegistry >
virtual Concurrency::_Source_link_iterator< _LinkRegistry >::~_Source_link_iterator ( )
inlinevirtual

Destruct iterator

1273  {
1274  if (_M_pNetwork_link != NULL)
1275  {
1277  }
1278  }
#define NULL
Definition: corecrt.h:158
template<class _LinkRegistry >
Concurrency::_Source_link_iterator< _LinkRegistry >::_Source_link_iterator ( _Myt const &  _Right)
inline

Copy construct an iterator

1284  {
1285  _M_pNetwork_link = _Right._M_pNetwork_link;
1286  _M_index = _Right._M_index;
1287  _M_array = _Right._M_array;
1288 
1290  }
constexpr const _Ty &() _Right
Definition: algorithm:3723

Member Function Documentation

template<class _LinkRegistry >
const_reference Concurrency::_Source_link_iterator< _LinkRegistry >::_Get ( size_t  _Pos) const
inlineprivate
1378  {
1379  size_t _Index = _M_index + _Pos;
1380  if (_Index >= _M_array._Size())
1381  {
1382  return _M_sentinel;
1383  }
1384 
1385  return _M_array[_Index];
1386  }
_In_ size_t _In_ int _Index
Definition: time.h:102
size_t _Size() const
Definition: agents.h:354
template<class _LinkRegistry >
const_reference Concurrency::_Source_link_iterator< _LinkRegistry >::operator* ( )
inline

Returns the object pointed to by the iterator

Returns
Reference to the object pointed to by the iterator
1322  {
1323  return _Get(0);
1324  }
template<class _LinkRegistry >
_Myt& Concurrency::_Source_link_iterator< _LinkRegistry >::operator++ ( )
inline

Pre-increment the iterator to point to the next element

Returns
Reference to the object pointer to by the iterator after incrementing it
1355  {
1356  ++_M_index;
1357  return (*this);
1358  }
template<class _LinkRegistry >
_Myt Concurrency::_Source_link_iterator< _LinkRegistry >::operator++ ( int  )
inline

Post-increment the iterator to point to the next element

Returns
Reference to the object pointer to by the iterator before incrementing it
1368  {
1369  _Myt _Tmp = *this;
1370  ++*this;
1371  return (_Tmp);
1372  }
template<class _LinkRegistry >
const_pointer Concurrency::_Source_link_iterator< _LinkRegistry >::operator-> ( ) const
inline

Returns a pointer to the class object

Returns
Returns a pointer to the class object
1334  {
1335  return (&**this);
1336  }
template<class _LinkRegistry >
_Myt const& Concurrency::_Source_link_iterator< _LinkRegistry >::operator= ( _Myt const &  _Right)
inline

Copy assign an iterator

1297  {
1298  _MyContainer * _OldContainer = _M_pNetwork_link;
1299  _CONCRT_ASSERT(_OldContainer != NULL);
1300 
1301  _M_pNetwork_link = _Right._M_pNetwork_link;
1302  _M_index = _Right._M_index;
1303  _M_array = _Right._M_array;
1304 
1305  if (_OldContainer != _M_pNetwork_link)
1306  {
1307  _OldContainer->release();
1309  }
1310 
1311  return *this;
1312  }
#define _CONCRT_ASSERT(x)
Definition: concrt.h:123
constexpr const _Ty &() _Right
Definition: algorithm:3723
#define NULL
Definition: corecrt.h:158
template<class _LinkRegistry >
const_reference Concurrency::_Source_link_iterator< _LinkRegistry >::operator[] ( size_t  _Pos) const
inline

Index operation. Retrieve an element at the specified index.

1343  {
1344  return _Get(_Pos);
1345  }

Member Data Documentation

template<class _LinkRegistry >
::Concurrency::details::_Dynamic_array<_EType> Concurrency::_Source_link_iterator< _LinkRegistry >::_M_array
private
template<class _LinkRegistry >
size_t Concurrency::_Source_link_iterator< _LinkRegistry >::_M_index
private
template<class _LinkRegistry >
_MyContainer* Concurrency::_Source_link_iterator< _LinkRegistry >::_M_pNetwork_link
private
template<class _LinkRegistry >
_EType Concurrency::_Source_link_iterator< _LinkRegistry >::_M_sentinel
private

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