Xavax C++ Library | Class Index FAQ Overview |
Constructor Summary |
PSListIterator(PSList<T>& list)
Construct an iterator for list .
|
PSListIterator(const PSListIterator<T>& src)
Construct a new iterator that is a copy of src .
|
Operator Summary | |
PSListIterator<T>&
|
operator=(PSListIterator<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). |
Method Summary | |
bool
|
active()
Return true if the cursor is active. |
void
|
append(T* tp)
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(T* tp)
Insert a new element before the current element. |
PSList<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(PSList<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 | |
PSList<T>. |
Constructor Detail |
PSListIterator<T>(PSList<T>&list)
PSListIterator<T>(const PSListIterator<T>& src)
src
- the list to copy.
Operator Detail |
PSListIterator<T>& operator=(PSListIterator<T>& src)
src
- the iterator to copy.T* operator()()
T* operator++()
T* operator++(int)
Method Detail |
bool active() const
void append(T* tp)
tp
- the object to be appended.bool atFirst() const
bool atLast() const
bool done() const
void insert(T* tp)
tp
- the object to be inserted.PSList<T>& list() const
T remove()
void reset()
void reset(PSList<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