STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | List of all members
_Iterator_base12 Struct Reference
Inheritance diagram for _Iterator_base12:
_Deque_const_iterator< _Mydeque > _Deque_iterator< _Mydeque >

Public Member Functions

 _Iterator_base12 ()
 
 _Iterator_base12 (const _Iterator_base12 &_Right)
 
_Iterator_base12operator= (const _Iterator_base12 &_Right)
 
 ~_Iterator_base12 () _NOEXCEPT
 
void _Adopt (const _Container_base12 *_Parent)
 
void _Clrcont ()
 
const _Container_base12_Getcont () const
 
_Iterator_base12 ** _Getpnext ()
 
void _Orphan_me ()
 

Public Attributes

_Container_proxy_Myproxy
 
_Iterator_base12_Mynextiter
 

Constructor & Destructor Documentation

_Iterator_base12::_Iterator_base12 ( )
inline
133  : _Myproxy(0), _Mynextiter(0)
134  { // construct orphaned iterator
135  }
_Iterator_base12 * _Mynextiter
Definition: xutility:233
_Container_proxy * _Myproxy
Definition: xutility:232
_Iterator_base12::_Iterator_base12 ( const _Iterator_base12 _Right)
inline
138  : _Myproxy(0), _Mynextiter(0)
139  { // copy an iterator
140  *this = _Right;
141  }
_Iterator_base12 * _Mynextiter
Definition: xutility:233
_Container_proxy * _Myproxy
Definition: xutility:232
constexpr const _Ty &() _Right
Definition: algorithm:3723
_Iterator_base12::~_Iterator_base12 ( )
inline
161  { // destroy the iterator
162  #if _ITERATOR_DEBUG_LEVEL == 2
163  _Lockit _Lock(_LOCK_DEBUG);
164  _Orphan_me();
165  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
166  }
void _Orphan_me()
Definition: xutility:212
#define _LOCK_DEBUG
Definition: yvals.h:594

Member Function Documentation

void _Iterator_base12::_Adopt ( const _Container_base12 _Parent)
inline
169  { // adopt this iterator by parent
170  if (_Parent == 0)
171  { // no future parent, just disown current parent
172  #if _ITERATOR_DEBUG_LEVEL == 2
173  _Lockit _Lock(_LOCK_DEBUG);
174  _Orphan_me();
175  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
176  }
177  else
178  { // have a parent, do adoption
179  _Container_proxy *_Parent_proxy = _Parent->_Myproxy;
180 
181  #if _ITERATOR_DEBUG_LEVEL == 2
182  if (_Myproxy != _Parent_proxy)
183  { // change parentage
184  _Lockit _Lock(_LOCK_DEBUG);
185  _Orphan_me();
186  _Mynextiter = _Parent_proxy->_Myfirstiter;
187  _Parent_proxy->_Myfirstiter = this;
188  _Myproxy = _Parent_proxy;
189  }
190 
191  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
192  _Myproxy = _Parent_proxy;
193  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
194  }
195  }
_Iterator_base12 * _Mynextiter
Definition: xutility:233
_Iterator_base12 * _Myfirstiter
Definition: xutility:92
void _Orphan_me()
Definition: xutility:212
_Container_proxy * _Myproxy
Definition: xutility:232
#define _LOCK_DEBUG
Definition: yvals.h:594
Definition: xutility:84
_Container_proxy * _Myproxy
Definition: xutility:126
void _Iterator_base12::_Clrcont ( )
inline
198  { // disown owning container
199  _Myproxy = 0;
200  }
_Container_proxy * _Myproxy
Definition: xutility:232
const _Container_base12* _Iterator_base12::_Getcont ( ) const
inline
203  { // get owning container
204  return (_Myproxy == 0 ? 0 : _Myproxy->_Mycont);
205  }
_Container_proxy * _Myproxy
Definition: xutility:232
const _Container_base12 * _Mycont
Definition: xutility:91
_Iterator_base12** _Iterator_base12::_Getpnext ( )
inline
208  { // get address of remaining iterator chain
209  return (&_Mynextiter);
210  }
_Iterator_base12 * _Mynextiter
Definition: xutility:233
void _Iterator_base12::_Orphan_me ( )
inline
213  { // cut ties with parent
214  #if _ITERATOR_DEBUG_LEVEL == 2
215  if (_Myproxy != 0)
216  { // adopted, remove self from list
218  while (*_Pnext != 0 && *_Pnext != this)
219  _Pnext = &(*_Pnext)->_Mynextiter;
220 
221  if (*_Pnext == 0)
222  {
223  _DEBUG_ERROR("ITERATOR LIST CORRUPTED!");
224  }
225 
226  *_Pnext = _Mynextiter;
227  _Myproxy = 0;
228  }
229  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
230  }
_Iterator_base12 * _Mynextiter
Definition: xutility:233
_Iterator_base12 * _Myfirstiter
Definition: xutility:92
_Container_proxy * _Myproxy
Definition: xutility:232
Definition: xutility:129
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_Iterator_base12& _Iterator_base12::operator= ( const _Iterator_base12 _Right)
inline
144  { // assign an iterator
145  if (_Myproxy == _Right._Myproxy)
146  ;
147  else if (_Right._Myproxy != 0)
148  _Adopt(_Right._Myproxy->_Mycont);
149  else
150  { // becoming invalid, disown current parent
151  #if _ITERATOR_DEBUG_LEVEL == 2
152  _Lockit _Lock(_LOCK_DEBUG);
153  _Orphan_me();
154  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
155  }
156 
157  return (*this);
158  }
void _Orphan_me()
Definition: xutility:212
_Container_proxy * _Myproxy
Definition: xutility:232
const _Container_base12 * _Mycont
Definition: xutility:91
#define _LOCK_DEBUG
Definition: yvals.h:594
void _Adopt(const _Container_base12 *_Parent)
Definition: xutility:168

Member Data Documentation

_Iterator_base12* _Iterator_base12::_Mynextiter
_Container_proxy* _Iterator_base12::_Myproxy

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