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
113  : _Myproxy(0), _Mynextiter(0)
114  { // construct orphaned iterator
115  }
_Iterator_base12 * _Mynextiter
Definition: xutility:209
_Container_proxy * _Myproxy
Definition: xutility:208
_Iterator_base12::_Iterator_base12 ( const _Iterator_base12 _Right)
inline
118  : _Myproxy(0), _Mynextiter(0)
119  { // copy an iterator
120  *this = _Right;
121  }
_Iterator_base12 * _Mynextiter
Definition: xutility:209
_Container_proxy * _Myproxy
Definition: xutility:208
const _Ty & _Right
Definition: algorithm:4087
_Iterator_base12::~_Iterator_base12 ( )
inline
140  { // destroy the iterator
141  #if _ITERATOR_DEBUG_LEVEL == 2
142  _Lockit _Lock(_LOCK_DEBUG);
143  _Orphan_me();
144  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
145  }
void _Orphan_me()
Definition: xutility:191
#define _LOCK_DEBUG
Definition: yvals.h:615

Member Function Documentation

void _Iterator_base12::_Adopt ( const _Container_base12 _Parent)
inline
148  { // adopt this iterator by parent
149  if (_Parent == 0)
150  { // no future parent, just 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  else
157  { // have a parent, do adoption
158  _Container_proxy *_Parent_proxy = _Parent->_Myproxy;
159 
160  #if _ITERATOR_DEBUG_LEVEL == 2
161  if (_Myproxy != _Parent_proxy)
162  { // change parentage
163  _Lockit _Lock(_LOCK_DEBUG);
164  _Orphan_me();
165  _Mynextiter = _Parent_proxy->_Myfirstiter;
166  _Parent_proxy->_Myfirstiter = this;
167  _Myproxy = _Parent_proxy;
168  }
169 
170  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
171  _Myproxy = _Parent_proxy;
172  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
173  }
174  }
_Iterator_base12 * _Mynextiter
Definition: xutility:209
_Iterator_base12 * _Myfirstiter
Definition: xutility:72
void _Orphan_me()
Definition: xutility:191
_Container_proxy * _Myproxy
Definition: xutility:208
#define _LOCK_DEBUG
Definition: yvals.h:615
Definition: xutility:64
_Container_proxy * _Myproxy
Definition: xutility:106
void _Iterator_base12::_Clrcont ( )
inline
177  { // disown owning container
178  _Myproxy = 0;
179  }
_Container_proxy * _Myproxy
Definition: xutility:208
const _Container_base12* _Iterator_base12::_Getcont ( ) const
inline
182  { // get owning container
183  return (_Myproxy == 0 ? 0 : _Myproxy->_Mycont);
184  }
_Container_proxy * _Myproxy
Definition: xutility:208
const _Container_base12 * _Mycont
Definition: xutility:71
_Iterator_base12** _Iterator_base12::_Getpnext ( )
inline
187  { // get address of remaining iterator chain
188  return (&_Mynextiter);
189  }
_Iterator_base12 * _Mynextiter
Definition: xutility:209
void _Iterator_base12::_Orphan_me ( )
inline
192  { // cut ties with parent
193  #if _ITERATOR_DEBUG_LEVEL == 2
194  if (_Myproxy != 0)
195  { // adopted, remove self from list
197  while (*_Pnext != 0 && *_Pnext != this)
198  _Pnext = &(*_Pnext)->_Mynextiter;
199 
200  if (*_Pnext == 0)
201  _DEBUG_ERROR("ITERATOR LIST CORRUPTED!");
202  *_Pnext = _Mynextiter;
203  _Myproxy = 0;
204  }
205  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
206  }
_Iterator_base12 * _Mynextiter
Definition: xutility:209
_Iterator_base12 * _Myfirstiter
Definition: xutility:72
_Container_proxy * _Myproxy
Definition: xutility:208
Definition: xutility:109
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
_Iterator_base12& _Iterator_base12::operator= ( const _Iterator_base12 _Right)
inline
124  { // assign an iterator
125  if (_Myproxy == _Right._Myproxy)
126  ;
127  else if (_Right._Myproxy != 0)
128  _Adopt(_Right._Myproxy->_Mycont);
129  else
130  { // becoming invalid, disown current parent
131  #if _ITERATOR_DEBUG_LEVEL == 2
132  _Lockit _Lock(_LOCK_DEBUG);
133  _Orphan_me();
134  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
135  }
136  return (*this);
137  }
void _Orphan_me()
Definition: xutility:191
_Container_proxy * _Myproxy
Definition: xutility:208
const _Container_base12 * _Mycont
Definition: xutility:71
#define _LOCK_DEBUG
Definition: yvals.h:615
void _Adopt(const _Container_base12 *_Parent)
Definition: xutility:147

Member Data Documentation

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

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