| Xavax C++ Library | Class Index FAQ Overview |
| Constructor Summary |
DListIterator(DList<T>& list)
Construct an iterator for list.
|
DListIterator(const DListIterator<T>& src)
Construct a new iterator that is a copy of src.
|
| Operator Summary | |
DListIterator<T>&
|
operator=(DListIterator<T>& src)
Modify this iterator to point to the same list and element as src.
|
T*
|
operator()()
Return the current element. |
T*
|
operator++()
Advance the cursor and return the current element (preincrement). |
T*
|
operator++(int)
Advance the cursor and return the current element (postincrement). |
T*
|
operator--()
Backup the cursor and return the current element (predecrement). |
T*
|
operator--(int)
Backup the cursor and return the current element (postdecrement). |
| Method Summary | |
bool
|
active()
Return true if the cursor is active. |
void
|
append(const T& t)
Append a new element after the current element. |
bool
|
atFirst()
Return true if the cursor is at the first element. |
bool
|
atLast()
Return true if the cursor is at the last element. |
bool
|
done()
Return true if the cursor is not active. |
void
|
insert(const T& t)
Insert a new element before the current element. |
DList<T>&
|
list()
Return the list to which this iterator is associated. |
T
|
remove()
Remove and return the current element. |
void
|
reset()
Reset the cursor to the first element in the list. |
void
|
reset(DList<T>& list)
Associate the iterator with a new list and reset the cursor to the first element in the list. |
void
|
seek(size_t p)
Move the cursor to the element at position p in the list.
|
| Related Classes | |
| DList<T>. | |
| Constructor Detail |
DListIterator<T>(DList<T>&list)
DListIterator<T>(const DListIterator<T>& src)
src - the list to copy.
| Operator Detail |
DListIterator<T>& operator=(DListIterator<T>& src)
src - the iterator to copy.T* operator()()
T* operator++()
T* operator++(int)
T* operator--()
T* operator--(int)
| Method Detail |
bool active() const
void append(const T& t)
t - the object to be appended.bool atFirst() const
bool atLast() const
bool done() const
void insert(const T& t)
t - the object to be inserted.DList<T>& list() const
T remove()
void reset()
void reset(DList<T>& list)
list - the new list.void seek(size_t p)
p - the new position for the cursor.
| Example Code |
Copyright © 2003 Xavax Inc. -- All Rights Reserved