__gnu_debug::safe_iterator_base(3)
NAME
- __gnu_debug::Safe_iterator_base - Basic functionality for
- a 'safe' iterator.
SYNOPSIS
#include <safe_base.h> Inherited by __gnu_debug::Safe_iterator< Iterator,
Sequence >
- Public Member Functions
- void M_attach (Safe_sequence_base *seq, bool constant)
void M_detach ()
bool M_attached_to (const Safe_sequence_base *seq) const bool M_singular () const
bool M_can_compare (const Safe_iterator_base &x) const - Public Attributes
- Safe_sequence_base * M_sequence
unsigned int M_version
Safe_iterator_base * M_prior Safe_iterator_base * M_next - Protected Member Functions
- Safe_iterator_base ()
Safe_iterator_base (const Safe_sequence_base *seq, bool - constant)
Safe_iterator_base (const Safe_iterator_base &x, bool con - stant)
~Safe_iterator_base ()
Detailed Description
Basic functionality for a 'safe' iterator.
- The Safe_iterator_base base class implements the function
- ality of a safe iterator that is not specific to a particular it
- erator type. It contains a pointer back to the sequence it refer
- ences along with iterator version information and pointers to
- form a doubly-linked list of iterators referenced by the contain
- er.
- This class must not perform any operations that can throw
- an exception, or the exception guarantees of derived iterators
- will be broken.
- Definition at line 50 of file safe_base.h.
Constructor & Destructor Documentation
- __gnu_debug::Safe_iterator_base::Safe_iterator_base ()
- [inline, protected]
- Initializes the iterator and makes it singular.
- Definition at line 76 of file safe_base.h.
- __gnu_debug::Safe_iterator_base::Safe_iterator_base (const
Safe_sequence_base * seq, bool constant) [inline, protected]
- Initialize the iterator to reference the sequence pointed
- to by . constant is true when we are initializing a constant it
- erator, and false if it is a mutable iterator. Note that seq may
- be NULL, in which case the iterator will be singular. Otherwise,
- the iterator will reference seq and be nonsingular.
- Definition at line 87 of file safe_base.h.
- __gnu_debug::Safe_iterator_base::Safe_iterator_base (const
Safe_iterator_base & x, bool constant) [inline, protected]
- Initializes the iterator to reference the same sequence
- that x does. constant is true if this is a constant iterator, and
- false if it is mutable.
- Definition at line 94 of file safe_base.h.
Member Function Documentation
- void __gnu_debug::Safe_iterator_base::M_attach
- (Safe_sequence_base * seq, bool constant)
- 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.
- Definition at line 190 of file debug.cc.
- void __gnu_debug::Safe_iterator_base::M_detach ()
- Detach the iterator for whatever sequence it is attached
- to, if any.
- Definition at line 220 of file debug.cc.
- bool __gnu_debug::Safe_iterator_base::M_attached_to (const
Safe_sequence_base * seq) const [inline]
Determines if we are attached to the given sequence.
- Definition at line 120 of file safe_base.h.
- bool __gnu_debug::Safe_iterator_base::M_singular () const
- Is this iterator singular?
- Definition at line 245 of file debug.cc.
- bool __gnu_debug::Safe_iterator_base::M_can_compare (const
Safe_iterator_base & x) const
- Can we compare this iterator to the given iterator x? Re
- turns true if both iterators are nonsingular and reference the
- same sequence.
- Definition at line 250 of file debug.cc.
Member Data Documentation
- Safe_sequence_base*
- __gnu_debug::Safe_iterator_base::M_sequence
- The sequence this iterator references; may be NULL to in
- dicate a singular iterator.
- Definition at line 55 of file safe_base.h.
- 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.
- Definition at line 64 of file safe_base.h.
- Safe_iterator_base* __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.
- Definition at line 68 of file safe_base.h.
- Safe_iterator_base* __gnu_debug::Safe_iterator_base::M_next
- Pointer to the next iterator in the sequence's list of it
- erators. Only valid when M_sequence != NULL.
- Definition at line 72 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_it