![]() |
PUMA Library Reference Manual
|
#include <Puma/UnitIterator.h>
Token unit iterator supporting iteration from the beginning of a unit or any token within that unit.
Public Member Functions | |
| UnitIterator () | |
| Construct an empty iterator. | |
| UnitIterator (Unit &unit) | |
| Constructor. | |
| UnitIterator (ListElement &token) | |
| Constructor. | |
| UnitIterator & | operator= (Unit &unit) |
| Reset the iterator to iterate a unit starting at its first token. | |
| UnitIterator & | operator= (ListElement &token) |
| Reset the iterator to iterate a unit starting at the given token. | |
| UnitIterator & | operator++ () |
| Move on to the next token in the unit. | |
| UnitIterator & | operator-- () |
| Go back to the previous token in the unit. | |
| Token * | operator* () const |
| Get the current token in the unit. | |
| Token * | operator-> () const |
| Call a member on the current token. | |
| Puma::UnitIterator::UnitIterator | ( | ) |
Construct an empty iterator.
| Puma::UnitIterator::UnitIterator | ( | Unit & | unit | ) |
Constructor.
Iterates a unit starting at its first token.
| unit | The unit to iterate. |
| Puma::UnitIterator::UnitIterator | ( | ListElement & | token | ) |
Constructor.
Iterates a unit starting at the given token.
| token | The token from which to start to iterate. |
| Token * Puma::UnitIterator::operator* | ( | ) | const |
Get the current token in the unit.
| UnitIterator & Puma::UnitIterator::operator++ | ( | ) |
Move on to the next token in the unit.
| UnitIterator & Puma::UnitIterator::operator-- | ( | ) |
Go back to the previous token in the unit.
| Token * Puma::UnitIterator::operator-> | ( | ) | const |
Call a member on the current token.
| UnitIterator & Puma::UnitIterator::operator= | ( | ListElement & | token | ) |
Reset the iterator to iterate a unit starting at the given token.
| token | The token from which to start to iterate. |
| UnitIterator & Puma::UnitIterator::operator= | ( | Unit & | unit | ) |
Reset the iterator to iterate a unit starting at its first token.
| unit | The unit to iterate. |