#include <safe_sequence.h>
Inheritance diagram for __gnu_debug::Safe_sequence< Sequence >:
Public Member Functions | |
template<typename Predicate> | |
void | M_invalidate_if (Predicate pred) |
template<typename Iterator> | |
void | M_transfer_iter (const Safe_iterator< Iterator, Sequence > &x) |
void | M_invalidate_all () const |
Public Attributes | |
Safe_iterator_base * | M_iterators |
The list of mutable iterators that reference this container. | |
Safe_iterator_base * | M_const_iterators |
The list of constant iterators that reference this container. | |
unsigned int | M_version |
The container version number. This number may never be 0. | |
Protected Member Functions | |
void | M_detach_all () |
void | M_detach_singular () |
void | M_revalidate_singular () |
void | M_swap (Safe_sequence_base &x) |
The class template Safe_sequence simplifies the construction of "safe" 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 iterator
and types that are instantiations of class template Safe_iterator for this sequence. Iterators will then be tracked automatically.
Definition at line 96 of file safe_sequence.h.
|
Detach all iterators, leaving them singular. |
|
Detach all singular iterators.
|
|
Invalidates all iterators. Definition at line 202 of file safe_base.h. |
|
Invalidates all iterators Definition at line 120 of file safe_sequence.h. |
|
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). |
|
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 172 of file debug.cc. References std::swap(). |
|
Transfers all iterators that reference this memory location to this sequence from whatever sequence they are attached to. Definition at line 152 of file safe_sequence.h. |
|
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. |