An iterator over the contents of a stream of text.
More...
#include <bond/compiler/charstream.h>
An iterator over the contents of a stream of text.
CharStream is used internally by Lexer; it is unlikely that someone integrating Bond into their application will have to make direct use of it.
◆ CharStream()
Constructs a CharStream object.
- Parameters
-
stream | The underlying stream of characters over which this stream iterates. |
◆ GetStreamPos()
const StreamPos & Bond::CharStream::GetStreamPos |
( |
| ) |
const |
|
inline |
Returns the stream's current position.
◆ HasNext()
bool Bond::CharStream::HasNext |
( |
| ) |
const |
Returns whether any characters remain in the stream.
◆ Next()
char Bond::CharStream::Next |
( |
| ) |
|
Returns the next character in the stream and advances the stream's position.
◆ Reset() [1/2]
void Bond::CharStream::Reset |
( |
| ) |
|
|
inline |
Resets the position of the stream back to the beginning.
◆ Reset() [2/2]
void Bond::CharStream::Reset |
( |
const StreamPos & |
pos | ) |
|
Resets the position of the stream back to the specified position.
◆ Sync()
void Bond::CharStream::Sync |
( |
| ) |
|
|
inline |
Ensures that the underlying InputStream is seeked to the same position as this stream.
The documentation for this class was generated from the following file:
- include/bond/compiler/charstream.h