.TH "__gnu_debug::_Safe_iterator_base" 3 "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME __gnu_debug::_Safe_iterator_base \- Basic functionality for a \fIsafe\fP iterator\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherited by \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, map >\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, multimap >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, multimap >\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, multiset >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, multiset >\fP, \fB__gnu_debug::_Safe_iterator< _Iterator, _Sequence, iterator_category >\fP, \fB__gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::forward_iterator_tag >\fP, \fB__gnu_debug::_Safe_iterator< _OtherIterator, _Sequence, std::random_access_iterator_tag >\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, set >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, set >\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, deque >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, deque >\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, forward_list >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, forward_list >\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, list >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, list >\fP, \fB__gnu_debug::_Safe_iterator< typename _Base::__const_iterator, basic_string >\fP, \fB__gnu_debug::_Safe_iterator< typename _Base::iterator, basic_string >\fP, \fB__gnu_debug::_Safe_iterator< typename _Base::const_iterator, basic_string >\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, unordered_map >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, unordered_map >\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, unordered_multimap >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, unordered_multimap >\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, unordered_set >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, unordered_set >\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, unordered_multiset >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, unordered_multiset >\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, vector >\fP, \fB__gnu_debug::_Safe_iterator< _Base_const_iterator, vector >\fP, __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::bidirectional_iterator_tag >, __gnu_debug::_Safe_iterator< _Iterator, _Sequence, std::random_access_iterator_tag >, \fB__gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category >\fP, and \fB__gnu_debug::_Safe_local_iterator_base\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "bool \fB_M_attached_to\fP (const _Safe_sequence_base *__seq) const" .br .ti -1c .RI "bool \fB_M_can_compare\fP (const \fB_Safe_iterator_base\fP &__x) const throw ()" .br .ti -1c .RI "void \fB_M_detach_single\fP () throw ()" .br .ti -1c .RI "void \fB_M_invalidate\fP ()" .br .ti -1c .RI "void \fB_M_reset\fP () throw ()" .br .ti -1c .RI "bool \fB_M_singular\fP () const throw ()" .br .ti -1c .RI "void \fB_M_unlink\fP () throw ()" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fB_Safe_iterator_base\fP * \fB_M_next\fP" .br .ti -1c .RI "\fB_Safe_iterator_base\fP * \fB_M_prior\fP" .br .ti -1c .RI "_Safe_sequence_base * \fB_M_sequence\fP" .br .ti -1c .RI "unsigned int \fB_M_version\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "constexpr \fB_Safe_iterator_base\fP ()" .br .ti -1c .RI "constexpr \fB_Safe_iterator_base\fP (const _Safe_iterator_base &__x, bool __constant)" .br .ti -1c .RI "constexpr \fB_Safe_iterator_base\fP (const _Safe_sequence_base *__seq, bool __constant)" .br .ti -1c .RI "void \fB_M_attach\fP (_Safe_sequence_base *__seq, bool __constant)" .br .ti -1c .RI "void \fB_M_attach_single\fP (_Safe_sequence_base *__seq, bool __constant) throw ()" .br .ti -1c .RI "void \fB_M_detach\fP ()" .br .ti -1c .RI "__gnu_cxx::__mutex & \fB_M_get_mutex\fP () throw ()" .br .in -1c .SS "Friends" .in +1c .ti -1c .RI "class \fB_Safe_sequence_base\fP" .br .in -1c .SH "Detailed Description" .PP Basic functionality for a \fIsafe\fP iterator\&. The _Safe_iterator_base base class implements the functionality of a safe iterator that is not specific to a particular iterator type\&. It contains a pointer back to the sequence it references along with iterator version information and pointers to form a doubly-linked list of iterators referenced by the container\&. .PP This class must not perform any operations that can throw an exception, or the exception guarantees of derived iterators will be broken\&. .SH "Constructor & Destructor Documentation" .PP .SS "__gnu_debug::_Safe_iterator_base::_Safe_iterator_base ()\fR [inline]\fP, \fR [constexpr]\fP, \fR [protected]\fP" Initializes the iterator and makes it singular\&. .PP References \fB_M_next\fP, \fB_M_prior\fP, \fB_M_sequence\fP, and \fB_M_version\fP\&. .PP Referenced by \fB_Safe_iterator_base()\fP, and \fB_M_can_compare()\fP\&. .SS "__gnu_debug::_Safe_iterator_base::_Safe_iterator_base (const _Safe_sequence_base * __seq, bool __constant)\fR [inline]\fP, \fR [constexpr]\fP, \fR [protected]\fP" Initialize the iterator to reference the sequence pointed to by \fR__seq\fP\&. \fR__constant\fP is true when we are initializing a constant iterator, and false if it is a mutable iterator\&. Note that \fR__seq\fP may be NULL, in which case the iterator will be singular\&. Otherwise, the iterator will reference \fR__seq\fP and be nonsingular\&. .PP References \fB_M_attach()\fP, \fB_M_next\fP, \fB_M_prior\fP, \fB_M_sequence\fP, and \fB_M_version\fP\&. .SS "__gnu_debug::_Safe_iterator_base::_Safe_iterator_base (const _Safe_iterator_base & __x, bool __constant)\fR [inline]\fP, \fR [constexpr]\fP, \fR [protected]\fP" Initializes the iterator to reference the same sequence that \fR__x\fP does\&. \fR__constant\fP is true if this is a constant iterator, and false if it is mutable\&. .PP References \fB_Safe_iterator_base()\fP, \fB_M_attach()\fP, \fB_M_next\fP, \fB_M_prior\fP, \fB_M_sequence\fP, and \fB_M_version\fP\&. .SH "Member Function Documentation" .PP .SS "void __gnu_debug::_Safe_iterator_base::_M_attach (_Safe_sequence_base * __seq, bool __constant)\fR [protected]\fP" Attaches this iterator to the given sequence, detaching it from whatever sequence it was attached to originally\&. If the new sequence is the NULL pointer, the iterator is left unattached\&. .PP References \fB_M_attach()\fP\&. .PP Referenced by \fB_Safe_iterator_base()\fP, \fB_Safe_iterator_base()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::_M_attach()\fP, and \fB_M_attach()\fP\&. .SS "void __gnu_debug::_Safe_iterator_base::_M_attach_single (_Safe_sequence_base * __seq, bool __constant)\fR [protected]\fP" Likewise, but not thread-safe\&. .PP References \fB_M_attach_single()\fP\&. .PP Referenced by \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::_M_attach_single()\fP, and \fB_M_attach_single()\fP\&. .SS "bool __gnu_debug::_Safe_iterator_base::_M_attached_to (const _Safe_sequence_base * __seq) const\fR [inline]\fP" Determines if we are attached to the given sequence\&. .PP References \fB_M_attached_to()\fP, and \fB_M_sequence\fP\&. .PP Referenced by \fB_M_attached_to()\fP\&. .SS "bool __gnu_debug::_Safe_iterator_base::_M_can_compare (const \fB_Safe_iterator_base\fP & __x) const" Can we compare this iterator to the given iterator \fR__x\fP? Returns true if both iterators are nonsingular and reference the same sequence\&. .PP References \fB_Safe_iterator_base()\fP, and \fB_M_can_compare()\fP\&. .PP Referenced by \fB_M_can_compare()\fP\&. .SS "void __gnu_debug::_Safe_iterator_base::_M_detach ()\fR [protected]\fP" Detach the iterator for whatever sequence it is attached to, if any\&. .PP References \fB_M_detach()\fP\&. .PP Referenced by \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::_Safe_iterator()\fP, \fB_M_detach()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::operator=()\fP, and \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::operator=()\fP\&. .SS "void __gnu_debug::_Safe_iterator_base::_M_detach_single ()" Likewise, but not thread-safe\&. .PP References \fB_M_detach_single()\fP\&. .PP Referenced by \fB_M_detach_single()\fP\&. .SS "__gnu_cxx::__mutex & __gnu_debug::_Safe_iterator_base::_M_get_mutex ()\fR [protected]\fP" For use in _Safe_iterator\&. .PP Referenced by \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::operator++()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::operator++()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::operator=()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::operator=()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::operator=()\fP, and \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::operator=()\fP\&. .SS "void __gnu_debug::_Safe_iterator_base::_M_invalidate ()\fR [inline]\fP" Invalidate the iterator, making it singular\&. .PP References \fB_M_invalidate()\fP, and \fB_M_version\fP\&. .PP Referenced by \fB_M_invalidate()\fP\&. .SS "void __gnu_debug::_Safe_iterator_base::_M_reset ()" Reset all member variables .SS "bool __gnu_debug::_Safe_iterator_base::_M_singular () const" Is this iterator singular? .PP Referenced by \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::_Safe_iterator()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::_Safe_iterator()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::_Safe_iterator()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::_Safe_local_iterator()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::_Safe_local_iterator()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::_Safe_local_iterator()\fP, \fB__gnu_debug::__check_singular_aux()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::_M_dereferenceable()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::_M_dereferenceable()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::_M_incrementable()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::_M_incrementable()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::operator=()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::operator=()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::operator=()\fP, and \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::operator=()\fP\&. .SS "void __gnu_debug::_Safe_iterator_base::_M_unlink ()\fR [inline]\fP" Unlink itself .PP References \fB_M_next\fP, \fB_M_prior\fP, and \fB_M_unlink()\fP\&. .PP Referenced by \fB_M_unlink()\fP\&. .SH "Member Data Documentation" .PP .SS "\fB_Safe_iterator_base\fP* __gnu_debug::_Safe_iterator_base::_M_next" Pointer to the next iterator in the sequence's list of iterators\&. Only valid when _M_sequence != NULL\&. .PP Referenced by \fB_Safe_iterator_base()\fP, \fB_Safe_iterator_base()\fP, \fB_Safe_iterator_base()\fP, \fB__gnu_debug::_Safe_sequence< _SafeSequence >::_M_invalidate_if()\fP, \fB__gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_from_if()\fP, and \fB_M_unlink()\fP\&. .SS "\fB_Safe_iterator_base\fP* __gnu_debug::_Safe_iterator_base::_M_prior" Pointer to the previous iterator in the sequence's list of iterators\&. Only valid when _M_sequence != NULL\&. .PP Referenced by \fB_Safe_iterator_base()\fP, \fB_Safe_iterator_base()\fP, \fB_Safe_iterator_base()\fP, \fB__gnu_debug::_Safe_sequence< _SafeSequence >::_M_invalidate_if()\fP, \fB__gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_from_if()\fP, and \fB_M_unlink()\fP\&. .SS "_Safe_sequence_base* __gnu_debug::_Safe_iterator_base::_M_sequence" The sequence this iterator references; may be NULL to indicate a singular iterator\&. .PP Referenced by \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::_Safe_iterator()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::_Safe_iterator()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::_Safe_iterator()\fP, \fB_Safe_iterator_base()\fP, \fB_Safe_iterator_base()\fP, \fB_Safe_iterator_base()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::_Safe_local_iterator()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::_Safe_local_iterator()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::_Safe_local_iterator()\fP, \fB__gnu_debug::_Safe_local_iterator_base::_Safe_local_iterator_base()\fP, \fB_M_attached_to()\fP, \fB__gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_from_if()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::operator=()\fP, \fB__gnu_debug::_Safe_iterator< _Base_iterator, map >::operator=()\fP, \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::operator=()\fP, and \fB__gnu_debug::_Safe_local_iterator< _OtherIterator, _Sequence >::operator=()\fP\&. .SS "unsigned int __gnu_debug::_Safe_iterator_base::_M_version" The version number of this iterator\&. The sentinel value 0 is used to indicate an invalidated iterator (i\&.e\&., one that is singular because of an operation on the container)\&. This version number must equal the version number in the sequence referenced by _M_sequence for the iterator to be non-singular\&. .PP Referenced by \fB_Safe_iterator_base()\fP, \fB_Safe_iterator_base()\fP, \fB_Safe_iterator_base()\fP, \fB_M_invalidate()\fP, and \fB__gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_from_if()\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.