Represents the current state of iteration over a Content array. More...
#include <Iterator.h>
Public Member Functions | |
| Iterator (const ContentPtr &content) | |
| Creates an Iterator from a full set of parameters. | |
| const ContentPtr | content () const |
| The array to iterate over. | |
| const int64_t | at () const |
| The current position of the Iterator. | |
| const bool | isdone () const |
If true, the Iterator has reached the end of the array and calling next again would raise an error. If false, the Iterator can still be moved forward. | |
| const ContentPtr | next () |
| Return the current item and then move the pointer to the next. | |
| const std::string | tostring_part (const std::string &indent, const std::string &pre, const std::string &post) const |
| Internal function to build an output string for tostring. | |
| const std::string | tostring () const |
| Returns a string representation of this array (single-line XML). | |
Represents the current state of iteration over a Content array.
An Iterator is characterized by its content (an input parameter) and where it is at (in-place mutable integer).
It can only be modified by calling next.
| Iterator | ( | const ContentPtr & | content | ) |
Creates an Iterator from a full set of parameters.
| content | The array to iterate over. |
| const int64_t at | ( | ) | const |
The current position of the Iterator.
| const ContentPtr content | ( | ) | const |
The array to iterate over.
| const bool isdone | ( | ) | const |
| const ContentPtr next | ( | ) |
Return the current item and then move the pointer to the next.
| const std::string tostring | ( | ) | const |
Returns a string representation of this array (single-line XML).
| const std::string tostring_part | ( | const std::string & | indent, |
| const std::string & | pre, | ||
| const std::string & | post | ||
| ) | const |
Internal function to build an output string for tostring.
| indent | Indentation depth as a string of spaces. |
| pre | Prefix string, usually an opening XML tag. |
| post | Postfix string, usually a closing XML tag and carriage return. |