.TH "__gnu_debug::_Safe_sequence< _Sequence >" 3cxx "Wed Jul 14 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME __gnu_debug::_Safe_sequence< _Sequence > \- Base class for constructing a \fIsafe\fP sequence type that tracks iterators that reference it\&. .SH SYNOPSIS .br .PP .PP Inherits \fB__gnu_debug::_Safe_sequence_base\fP\&. .PP Inherited by \fB__gnu_debug::_Safe_container< basic_string< _CharT, std::char_traits< _CharT >, std::allocator< _CharT > >, std::allocator< _CharT >, _Safe_sequence, bool(_GLIBCXX_USE_CXX11_ABI)>\fP, \fB__gnu_debug::_Safe_container< vector< _Tp, std::allocator< _Tp > >, std::allocator< _Tp >, __gnu_debug::_Safe_sequence >\fP, \fB__gnu_debug::_Safe_container< deque< _Tp, std::allocator< _Tp > >, std::allocator< _Tp >, __gnu_debug::_Safe_sequence >\fP, and \fB__gnu_debug::_Safe_node_sequence< _Sequence >\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "template void \fB_M_invalidate_if\fP (_Predicate __pred)" .br .ti -1c .RI "template void \fB_M_transfer_from_if\fP (\fB_Safe_sequence\fP &__from, _Predicate __pred)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fB_Safe_iterator_base\fP * \fB_M_const_iterators\fP" .br .RI "The list of constant iterators that reference this container\&. " .ti -1c .RI "\fB_Safe_iterator_base\fP * \fB_M_iterators\fP" .br .RI "The list of mutable iterators that reference this container\&. " .ti -1c .RI "unsigned int \fB_M_version\fP" .br .RI "The container version number\&. This number may never be 0\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "void \fB_M_detach_all\fP ()" .br .ti -1c .RI "void \fB_M_detach_singular\fP ()" .br .ti -1c .RI "__gnu_cxx::__mutex & \fB_M_get_mutex\fP () throw ()" .br .ti -1c .RI "void \fB_M_invalidate_all\fP () const" .br .ti -1c .RI "void \fB_M_revalidate_singular\fP ()" .br .ti -1c .RI "void \fB_M_swap\fP (\fB_Safe_sequence_base\fP &__x) noexcept" .br .in -1c .SH "Detailed Description" .PP .SS "template .br class __gnu_debug::_Safe_sequence< _Sequence >" Base class for constructing a \fIsafe\fP sequence type that tracks iterators that reference it\&. The class template _Safe_sequence simplifies the construction of \fIsafe\fP sequences that track the iterators that reference the sequence, so that the iterators are notified of changes in the sequence that may affect their operation, e\&.g\&., if the container invalidates its iterators or is destructed\&. This class template may only be used by deriving from it and passing the name of the derived class as its template parameter via the curiously recurring template pattern\&. The derived class must have \fCiterator\fP and \fCconst_iterator\fP types that are instantiations of class template _Safe_iterator for this sequence\&. Iterators will then be tracked automatically\&. .PP Definition at line 108 of file safe_sequence\&.h\&. .SH "Member Function Documentation" .PP .SS "void __gnu_debug::_Safe_sequence_base::_M_detach_all ()\fC [protected]\fP, \fC [inherited]\fP" Detach all iterators, leaving them singular\&. .PP Referenced by __gnu_debug::_Safe_sequence_base::~_Safe_sequence_base()\&. .SS "void __gnu_debug::_Safe_sequence_base::_M_detach_singular ()\fC [protected]\fP, \fC [inherited]\fP" Detach all singular iterators\&. .PP \fBPostcondition\fP .RS 4 for all iterators i attached to this sequence, i->_M_version == _M_version\&. .RE .PP .SS "__gnu_cxx::__mutex& __gnu_debug::_Safe_sequence_base::_M_get_mutex ()\fC [protected]\fP, \fC [inherited]\fP" For use in _Safe_sequence\&. .PP Referenced by __gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_from_if()\&. .SS "void __gnu_debug::_Safe_sequence_base::_M_invalidate_all () const\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" Invalidates all iterators\&. .PP Definition at line 256 of file safe_base\&.h\&. .PP References __gnu_debug::_Safe_sequence_base::_M_version\&. .SS "template template void \fB__gnu_debug::_Safe_sequence\fP< _Sequence >::_M_invalidate_if (_Predicate __pred)" Invalidates all iterators \fCx\fP that reference this sequence, are not singular, and for which \fC__pred(x)\fP returns \fCtrue\fP\&. \fC__pred\fP will be invoked with the normal iterators nested in the safe ones\&. .PP Definition at line 37 of file safe_sequence\&.tcc\&. .SS "void __gnu_debug::_Safe_sequence_base::_M_revalidate_singular ()\fC [protected]\fP, \fC [inherited]\fP" Revalidates all attached singular iterators\&. This method may be used to validate iterators that were invalidated before (but for some reason, such as an exception, need to become valid again)\&. .SS "void __gnu_debug::_Safe_sequence_base::_M_swap (\fB_Safe_sequence_base\fP & __x)\fC [protected]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" Swap this sequence with the given sequence\&. This operation also swaps ownership of the iterators, so that when the operation is complete all iterators that originally referenced one container now reference the other container\&. .SS "template template void \fB__gnu_debug::_Safe_sequence\fP< _Sequence >::_M_transfer_from_if (\fB_Safe_sequence\fP< _Sequence > & __from, _Predicate __pred)" Transfers all iterators \fCx\fP that reference \fCfrom\fP sequence, are not singular, and for which \fC__pred(x)\fP returns \fCtrue\fP\&. \fC__pred\fP will be invoked with the normal iterators nested in the safe ones\&. .PP Definition at line 68 of file safe_sequence\&.tcc\&. .PP References std::__addressof(), __gnu_debug::_Safe_sequence_base::_M_const_iterators, __gnu_debug::_Safe_iterator_base::_M_detach_single(), __gnu_debug::_Safe_sequence_base::_M_get_mutex(), __gnu_debug::_Safe_sequence_base::_M_iterators, __gnu_debug::_Safe_iterator_base::_M_next, __gnu_debug::_Safe_iterator_base::_M_prior, __gnu_debug::_Safe_iterator_base::_M_sequence, and __gnu_debug::_Safe_iterator_base::_M_version\&. .SH "Member Data Documentation" .PP .SS "\fB_Safe_iterator_base\fP* __gnu_debug::_Safe_sequence_base::_M_const_iterators\fC [inherited]\fP" .PP The list of constant iterators that reference this container\&. .PP Definition at line 197 of file safe_base\&.h\&. .PP Referenced by __gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_from_if()\&. .SS "\fB_Safe_iterator_base\fP* __gnu_debug::_Safe_sequence_base::_M_iterators\fC [inherited]\fP" .PP The list of mutable iterators that reference this container\&. .PP Definition at line 194 of file safe_base\&.h\&. .PP Referenced by __gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_from_if()\&. .SS "unsigned int __gnu_debug::_Safe_sequence_base::_M_version\fC [mutable]\fP, \fC [inherited]\fP" .PP The container version number\&. This number may never be 0\&. .PP Definition at line 200 of file safe_base\&.h\&. .PP Referenced by __gnu_debug::_Safe_sequence_base::_M_invalidate_all()\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.