PixelLightAPI
.
|
#include <Iterator.h>
Public Member Functions | |
Iterator (IteratorImpl< ValueType > &cIteratorImpl) | |
Constructor. | |
Iterator (const Iterator< ValueType > &cIterator) | |
Copy constructor. | |
~Iterator () | |
Destructor. | |
Iterator< ValueType > & | operator= (const Iterator< ValueType > &cIterator) |
Copy operator. | |
bool | HasNext () const |
Checks whether the iterator can return a next element. | |
ValueType & | Next () |
Returns the next element. | |
ValueType & | operator++ () |
Returns the next element. | |
bool | HasPrevious () const |
Checks whether the iterator can return a previous element. | |
ValueType & | Previous () |
Returns the previous element. | |
ValueType & | operator-- () |
Returns the previous element. |
Iterator class.
* Usage example: * Array<String> lstNames; // Iterable container * lstNames.Add("Lenny"); // Add "Lenny" to the iterable container * lstNames.Add("Barny"); // Add "Barny" to the iterable container * lstNames.Add("Homer"); // Add "Homer" to the iterable container * Iterator<String> cIterator = lstNames.GetIterator(); // Get an iterator instance * while (cIterator.HasNext()) // Is there a next element? * String sName = cIterator.Next(); // Return the next element, in this case, returns "Lenny", then "Barny" and then "Homer" *
PLCore::Iterator< ValueType >::Iterator | ( | IteratorImpl< ValueType > & | cIteratorImpl | ) |
[in] | cIteratorImpl | Reference to the iterator specific implementation |
PLCore::Iterator< ValueType >::Iterator | ( | const Iterator< ValueType > & | cIterator | ) |
Copy constructor.
[in] | cIterator | Source to copy from |
PLCore::Iterator< ValueType >::~Iterator | ( | ) |
Destructor.
Iterator< ValueType > & PLCore::Iterator< ValueType >::operator= | ( | const Iterator< ValueType > & | cIterator | ) |
Copy operator.
[in] | cIterator | Source to copy from |
bool PLCore::Iterator< ValueType >::HasNext | ( | ) | const |
Checks whether the iterator can return a next element.
ValueType & PLCore::Iterator< ValueType >::Next | ( | ) |
Returns the next element.
ValueType & PLCore::Iterator< ValueType >::operator++ | ( | ) |
Returns the next element.
bool PLCore::Iterator< ValueType >::HasPrevious | ( | ) | const |
Checks whether the iterator can return a previous element.
ValueType & PLCore::Iterator< ValueType >::Previous | ( | ) |
Returns the previous element.
ValueType & PLCore::Iterator< ValueType >::operator-- | ( | ) |
Returns the previous element.
|