Pegmatite
|
Iterator, refers back into the input stream. More...
#include <parser.hh>
Public Member Functions | |
iterator () | |
Default constructor, constructs an invalid iterator into no buffer. | |
const std::string & | filename () const |
Filename given by Input this iterator is derived from. More... | |
char32_t | operator* () const |
Dereference operator, returns the character represented by this index. | |
iterator & | operator++ () |
Move the iterator on to the next location. More... | |
iterator | operator++ (int) |
iterator & | operator+= (size_t amount) |
Move the iterator forward by the specified amount. | |
iterator & | operator-- () |
Move the iterator to the previous location. More... | |
bool | operator== (const iterator &other) const |
Compares iterators for equality. More... | |
bool | operator!= (const iterator &other) const |
Compares iterators for inequality. | |
bool | operator> (const iterator &other) const |
Compares locations of iterators in the input. | |
bool | operator< (const iterator &other) const |
Compares locations of iterators in the input. | |
Index | operator- (const iterator &other) const |
Subtracts one iterator from another,. | |
Index | index () const |
Returns the index into the input stream. | |
Iterator, refers back into the input stream.
const std::string& pegmatite::Input::iterator::filename | ( | ) | const |
Filename given by Input this iterator is derived from.
Typically a real filename, but not guaranteed (e.g., could be "-" when input is derived from stdin).
|
inline |
Move the iterator on to the next location.
Note that this does not check for validity, so will allow constructing iterators past the end of the permitted. They will fail on dereference (this check is performed in the Input
class - iterators perform no validation.
|
inline |
Move the iterator to the previous location.
Note that this does not check validity.
|
inline |
Compares iterators for equality.
Iterators are equal if they are the same index in the same buffer.