Xavax C++ Library | Class Index FAQ Overview |
Constructor Summary |
SListConstIterator(const
SList<T>& list)
Construct an iterator for list .
|
SListConstIterator(const
SListConstIterator<T>& src)
Construct a new iterator that is a copy of src .
|
Operator Summary | |
SListConstIterator<T>&
|
operator=(SListConstIterator<T>&
src)
Modify this iterator to point to the same list and element as src .
|
const T*
|
operator()()
Return the current element. |
const T*
|
operator++()
Advance the cursor and return the current element (preincrement). |
const T*
|
operator++(int)
Advance the cursor and return the current element (postincrement). |
Method Summary | |
bool
|
active()
Return true if the cursor is active. |
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. |
const
|
list()
Return the list to which this iterator is associated. |
void
|
reset()
Reset the cursor to the first element in the list. |
void
|
reset(const SList<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 | |
SList<T>. |
Constructor Detail |
SListConstIterator<T>(const SList<T>&
list)
SListConstIterator<T>(const
SListConstIterator<T>& src)
src
- the list to copy.
Operator Detail |
SListConstIterator<T>& operator=(SListConstIterator<T>& src)
src
- the iterator to copy.const T* operator()()
const T* operator++()
const 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.SList<T>& list() const
T remove()
void reset()
void reset(const SList<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