__gnu_debug::Safe_sequence_base Class Reference
Base class that supports tracking of iterators that reference a sequence.
More...
#include <safe_base.h>
Inheritance diagram for __gnu_debug::Safe_sequence_base:
[legend]Collaboration diagram for __gnu_debug::Safe_sequence_base:
[legend]List of all members.
Detailed Description
Base class that supports tracking of iterators that reference a sequence.
The Safe_sequence_base class provides basic support for tracking iterators into a sequence. Sequences that track iterators 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 constant iterators and one for mutable iterators, and a version number that allows very fast invalidation of all iterators that reference 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
|
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 108 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 127 of file debug.cc. |
void __gnu_debug::Safe_sequence_base::M_invalidate_all |
( |
|
) |
const [inline] |
|
|
Invalidates all iterators. Definition at line 202 of file safe_base.h. |
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 148 of file debug.cc. |
|
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. Definition at line 166 of file debug.cc.
References std::swap(). |
Member Data Documentation
|
The list of constant iterators that reference this container.
Definition at line 156 of file safe_base.h. |
|
The list of mutable iterators that reference this container.
Definition at line 153 of file safe_base.h. |
|
The container version number. This number may never be 0.
Definition at line 159 of file safe_base.h. |
The documentation for this class was generated from the following files:
Generated on Tue Sep 7 10:06:30 2004 for libstdc++-v3 Source by
1.3.8