__gnu_debug::safe_sequence_base(3)
NAME
- __gnu_debug::Safe_sequence_base - Base class that supports
- tracking of iterators that reference a sequence.
SYNOPSIS
#include <safe_base.h> Inherited by __gnu_debug::Safe_sequence< Sequence >, __gnu_debug::Safe_sequence< __gnu_debug::basic_string< CharT,
Traits, Allocator > >
__gnu_debug_def::deque< Type, Allocator > >, __gnu_debug::Safe_sequence< __gnu_debug_def::hash_map< Value,
Type, HashFcn, EqualKey, Alloc > >
__gnu_debug_def::hash_multimap< Value, Type, HashFcn, EqualKey,
Alloc > >
__gnu_debug_def::hash_multiset< Value, HashFcn, EqualKey, Alloc > >, __gnu_debug::Safe_sequence< __gnu_debug_def::hash_set< Value,
HashFcn, EqualKey, Alloc > >
__gnu_debug_def::list< Type, Allocator > >, __gnu_debug::Safe_sequence< __gnu_debug_def::map< Key, Type,
Compare, Allocator > >
__gnu_debug_def::multimap< Key, Type, Compare, Allocator > >, __gnu_debug::Safe_sequence< __gnu_debug_def::multiset< Key,
Compare, Allocator > >
__gnu_debug_def::set< Key, Compare, Allocator > >, __gnu_debug::Safe_sequence< __gnu_debug_def::vector< Type,
Allocator > >
- Public Member Functions
- void M_invalidate_all () const
- Public Attributes
- Safe_iterator_base * M_iterators
The list of mutable iterators that reference thiscontainer.
- Safe_iterator_base * M_const_iterators
The list of constant iterators that reference thiscontainer.
- unsigned int M_version
The container version number. This number may never be0.
- Protected Member Functions
- Safe_sequence_base ()
~Safe_sequence_base ()
void M_detach_all ()
void M_detach_singular ()
void M_revalidate_singular () void M_swap (Safe_sequence_base &x)
Detailed Description
- Base class that supports tracking of iterators that refer
- ence a sequence.
- The Safe_sequence_base class provides basic support for
- tracking iterators into a sequence. Sequences that track itera
- tors must derived from Safe_sequence_base publicly, so that safe
- iterators (which inherit Safe_iterator_base) can attach to them.
- This class contains two linked lists of iterators, one for con
- stant iterators and one for mutable iterators, and a version num
- ber that allows very fast invalidation of all iterators that ref
- erence the container.
- This class must ensure that no operation on it may throw
- an exception, otherwise 'safe' sequences may fail to provide the
- exception-safety guarantees required by the C++ standard.
- Definition at line 149 of file safe_base.h.
Constructor & Destructor Documentation
- __gnu_debug::Safe_sequence_base::~Safe_sequence_base ()
- [inline, protected]
- Notify all iterators that reference this sequence that the
- sequence is being destroyed.
- Definition at line 169 of file safe_base.h.
Member Function Documentation
- void __gnu_debug::Safe_sequence_base::M_detach_all ()
- [protected]
- Detach all iterators, leaving them singular.
- Definition at line 114 of file debug.cc.
- void __gnu_debug::Safe_sequence_base::M_detach_singular ()
- [protected]
- Detach all singular iterators.
- Postcondition:
for all iterators i attached to this sequence,i->M_version == M_version.
- Definition at line 133 of file debug.cc.
- void __gnu_debug::Safe_sequence_base::M_revalidate_singular ()
- [protected]
- Revalidates all attached singular iterators. This method
- may be used to validate iterators that were invalidated before
- (but for some reasion, such as an exception, need to become valid
- again).
- Definition at line 154 of file debug.cc.
- void __gnu_debug::Safe_sequence_base::M_swap
- (Safe_sequence_base & x) [protected]
- 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 contain
- er now reference the other container.
- Definition at line 172 of file debug.cc.
- References __gnu_debug::swap().
- void __gnu_debug::Safe_sequence_base::M_invalidate_all ()
- const [inline]
- Invalidates all iterators.
- Definition at line 202 of file safe_base.h.
Member Data Documentation
- Safe_iterator_base*
- __gnu_debug::Safe_sequence_base::M_iterators
- The list of mutable iterators that reference this contain
- er.
- Definition at line 153 of file safe_base.h.
- Safe_iterator_base*
- __gnu_debug::Safe_sequence_base::M_const_iterators
- The list of constant iterators that reference this con
- tainer.
- Definition at line 156 of file safe_base.h.
- unsigned int __gnu_debug::Safe_sequence_base::M_version
- [mutable]
- The container version number. This number may never be 0.
- Definition at line 159 of file safe_base.h.
Author
- Generated automatically by Doxygen for libstdc++-v3 Source
- from the source code.
- libstdc++-v3 Source 1 Jan 2007__gnu_debug::Safe_se