#include <RiceSet.h>
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. | |
| Iterator & | operator= (const Iterator &rOther) |
Overwrites this instance of Iterator with a copy of rOther. | |
Example:
sps::RiceSet set; sps::RiceSet::Iterator it = set.GetIterator(); for ( it.Begin(); it.HasMoreElement(); it.Next() ) { cout << *it << ", "; }
| 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).
1.5.2