18#ifndef __LIBSTD_LISTITERATOR_H
19#define __LIBSTD_LISTITERATOR_H
175 virtual void operator++(int num)
179 m_current = m_current->next;
182 m_next = m_current->next;
Abstracts an iteration process.
virtual bool remove()
Remove the current item from the List.
class List< T >::Node * m_next
Next node.
ListIterator(List< T > &list)
Class constructor.
virtual T & next()
Fetch the next item.
virtual bool hasCurrent() const
Check if there is a current item on the List.
virtual T & current()
Get current item in the List.
virtual void reset()
Reset the iterator.
virtual const T & current() const
Get current item in the List.
class List< T >::Node * m_current
Current node.
ListIterator(const List< T > &list)
Constant class constructor.
List< T > & m_list
Points to the List to iterate.
ListIterator(List< T > *list)
Class constructor.
virtual bool hasNext() const
Check if there is more on the List to iterate.
Simple linked list template class.