Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# List< T >::Pos Class Reference

The local class implements a list iterator. More...

`#include <List.h>`

Collaboration diagram for List< T >::Pos:

[legend]
List of all members.

## Public Member Functions
| Pos ()
| Empty constructor.
| Pos (Data *p)
| Constructor.
Pos & | operator++ ()
| The pre-increment operator moves the iterator to the successor in the list.
Pos & | operator-- ()
| The pre-decrement operator moves the iterator to the predecessor in the list.
Pos | operator++ (int)
| The post-increment operator moves the iterator to the successor in the list.
Pos | operator-- (int)
| The post-decrement operator moves the iterator to the predecessor in the list.
| operator bool () const
| The operator returns whether the iterator points to a list entry.
bool | operator== (const Pos &pos) const
| The operator determines whether two iterators point to the same list element.
bool | operator!= (const Pos &pos) const
| The operator determines whether two iterators point to different list elements.
## Private Attributes
Data * | entry
| A pointer to the current list entry.
## Friends
class | List< T >

## Detailed Description

### template<class T>
class List< T >::Pos

The local class implements a list iterator.

Definition at line 48 of file List.h.

## Constructor & Destructor Documentation

template<class T>
List< T >::Pos::Pos | ( |  | ) | `[inline]`

| Empty constructor. The iterator points nowhere. Definition at line 58 of file List.h. References List< T >::Pos::entry.

template<class T>
List< T >::Pos::Pos | ( | Data * | p | ) | `[inline]`

  | Constructor. The iterator points to the given list node. Parameters:
  p | The list node.
Definition at line 65 of file List.h. References List< T >::Pos::entry.

## Member Function Documentation

template<class T>
Pos& List< T >::Pos::operator++ | ( |  | ) | `[inline]`

| The pre-increment operator moves the iterator to the successor in the list. If the iterator is moved behind the end of the list, it will point nowhere. Note that the iterator must point to a list element before this operation. Returns: A reference to the new state of the iterator. Definition at line 74 of file List.h. References List< T >::Pos::entry, and List< T >::Data::next.

template<class T>
Pos& List< T >::Pos::operator-- | ( |  | ) | `[inline]`

| The pre-decrement operator moves the iterator to the predecessor in the list. If the iterator is moved before the beginning of the list, it will point nowhere. Note that the iterator must point to a list element before this operation. Returns: A reference to the new state of the iterator. Definition at line 83 of file List.h. References List< T >::Pos::entry, and List< T >::Data::prev.

template<class T>
Pos List< T >::Pos::operator++ | ( | int |  | ) | `[inline]`

| The post-increment operator moves the iterator to the successor in the list. If the iterator is moved behind the end of the list, it will point nowhere. Note that the iterator must point to a list element before this operation. Returns: The state of the iterator before the operation. Definition at line 92 of file List.h. References List< T >::Pos::entry, and List< T >::Data::next.

template<class T>
Pos List< T >::Pos::operator-- | ( | int |  | ) | `[inline]`

| The post-decrement operator moves the iterator to the predecessor in the list. If the iterator is moved before the beginning of the list, it will point nowhere. Note that the iterator must point to a list element before this operation. Returns: The state of the iterator before the operation. Definition at line 101 of file List.h. References List< T >::Pos::entry, and List< T >::Data::prev.

template<class T>
List< T >::Pos::operator bool | ( |  | ) | const`[inline]`

| The operator returns whether the iterator points to a list entry. If it does not point to a list entry, it points "nowhere". Returns: Does it point to a list entry? Definition at line 108 of file List.h. References List< T >::Pos::entry.

template<class T>
bool List< T >::Pos::operator== | ( | const Pos & | pos | ) | const`[inline]`

  | The operator determines whether two iterators point to the same list element. Parameters:
  pos | The other iterator.
Returns: Are they equal? Definition at line 115 of file List.h. References List< T >::Pos::entry.

template<class T>
bool List< T >::Pos::operator!= | ( | const Pos & | pos | ) | const`[inline]`

  | The operator determines whether two iterators point to different list elements. Parameters:
  pos | The other iterator.
Returns: Are they unequal? Definition at line 122 of file List.h. References List< T >::Pos::entry.

## Friends And Related Function Documentation

template<class T>
friend class List< T >`[friend]`

| Definition at line 124 of file List.h.

## Member Data Documentation

template<class T>
Data* List< T >::Pos::entry`[private]`

| A pointer to the current list entry. Definition at line 51 of file List.h. Referenced by List< ImageViewBase * >::insert(), List< ImageViewBase * >::insertAfter(), List< T >::Pos::operator bool(), List< T >::Pos::operator!=(), List< T >::Pos::operator++(), List< T >::Pos::operator--(), List< T >::Pos::operator==(), and List< T >::Pos::Pos().

The documentation for this class was generated from the following file:

- Tools/List.h