FreeNOS
Public Member Functions
ConstIterator< T > Class Template Referenceabstract

Abstracts an iteration process for a constant. More...

#include <ConstIterator.h>

Public Member Functions

virtual ~ConstIterator ()
 Destructor. More...
 
virtual void reset ()=0
 Restart iteration from the beginning. More...
 
virtual bool hasNext () const =0
 Check if there is more to iterate. More...
 
virtual bool hasCurrent () const =0
 Check if there is a current item. More...
 
virtual const T & current () const =0
 Get the current item read-only. More...
 
virtual const T & next ()=0
 Fetch the next item. More...
 
virtual void operator++ (int num)=0
 Increment operator. More...
 

Detailed Description

template<class T>
class ConstIterator< T >

Abstracts an iteration process for a constant.

Definition at line 34 of file ConstIterator.h.

Constructor & Destructor Documentation

◆ ~ConstIterator()

template<class T >
virtual ConstIterator< T >::~ConstIterator ( )
inlinevirtual

Destructor.

Definition at line 41 of file ConstIterator.h.

Member Function Documentation

◆ current()

template<class T >
virtual const T& ConstIterator< T >::current ( ) const
pure virtual

Get the current item read-only.

Returns
Reference to the next item.

◆ hasCurrent()

template<class T >
virtual bool ConstIterator< T >::hasCurrent ( ) const
pure virtual

Check if there is a current item.

Returns
True if the iterator has a current item, false otherwise.

◆ hasNext()

template<class T >
virtual bool ConstIterator< T >::hasNext ( ) const
pure virtual

Check if there is more to iterate.

Returns
true if more items, false if not.

◆ next()

template<class T >
virtual const T& ConstIterator< T >::next ( )
pure virtual

Fetch the next item.

This function first fetches the next item and then updates the current item pointer to that item.

Returns
Reference to the next item.

Implemented in ConstHashIterator< K, V >.

◆ operator++()

template<class T >
virtual void ConstIterator< T >::operator++ ( int  num)
pure virtual

Increment operator.

This function first increment the current item and then updates the next item pointer.

Parameters
numIgnored

Implemented in ConstHashIterator< K, V >.

◆ reset()

template<class T >
virtual void ConstIterator< T >::reset ( )
pure virtual

Restart iteration from the beginning.

Implemented in ConstHashIterator< K, V >.


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