sps::RiceSet::Iterator Class Reference

Implementation of the sps::Iterator interface for a sps::RiceSet. More...

#include <RiceSet.h>

List of all members.

Public Member Functions

 Iterator (const RiceSet &rRiceSet)
 Constructs an iterator for rRiceset.
virtual bool HasMoreElements () const
 Checks if there are elements left.
virtual void Begin ()
 Sets the iterator on the first bit in the sps::RiceSet.
virtual void Next ()
 Sets the iterator to the next bit in the sps::RiceSet.
virtual size_t operator * () const
 Returns the current value(bit) the iterator points to.
Iteratoroperator= (const Iterator &rOther)
 Overwrites this instance of Iterator with a copy of rOther.


Detailed Description

Implementation of the sps::Iterator interface for a sps::RiceSet.

Example:

                        sps::RiceSet set;
                        sps::RiceSet::Iterator it = set.GetIterator();
                        for ( it.Begin(); it.HasMoreElement(); it.Next() )
                        {
                                cout << *it << ", ";
                        }


Member Function Documentation

bool sps::RiceSet::Iterator::HasMoreElements (  )  const [inline, virtual]

Checks if there are elements left.

If this method returns true it's save to call operator*() and Next(). The runtime of this method is in O(1).

void sps::RiceSet::Iterator::Begin (  )  [inline, virtual]

Sets the iterator on the first bit in the sps::RiceSet.

This method should be called before any other method of the Iterator is called. The runtime of Begin() is in O(1).

void sps::RiceSet::Iterator::Next (  )  [inline, virtual]

Sets the iterator to the next bit in the sps::RiceSet.

Don't call this method if HasMoreElements() returned false. The runtime of Next() is in O(1).

size_t sps::RiceSet::Iterator::operator * (  )  const [inline, virtual]

Returns the current value(bit) the iterator points to.

Don't call this method if HasMoreElements() returned false. The runtime of operator*() is in O(1).

RiceSet::Iterator & sps::RiceSet::Iterator::operator= ( const Iterator rOther  )  [inline]

Overwrites this instance of Iterator with a copy of rOther.

The runtime of this method is in O(1).


The documentation for this class was generated from the following file:
Generated on Wed Jun 20 21:20:43 2007 for SparseSet by  doxygen 1.5.2