JUCE
Public Member Functions | List of all members
CodeDocument::Iterator Class Reference

Iterates the text in a CodeDocument. More...

Public Member Functions

 Iterator (const CodeDocument &document) noexcept
 
 Iterator (const Iterator &) noexcept
 
Iteratoroperator= (const Iterator &) noexcept
 
 ~Iterator () noexcept
 
juce_wchar nextChar () noexcept
 Reads the next character and returns it. More...
 
juce_wchar peekNextChar () const noexcept
 Reads the next character without advancing the current position. More...
 
void skip () noexcept
 Advances the position by one character. More...
 
int getPosition () const noexcept
 Returns the position as the number of characters from the start of the document. More...
 
void skipWhitespace () noexcept
 Skips over any whitespace characters until the next character is non-whitespace. More...
 
void skipToEndOfLine () noexcept
 Skips forward until the next character will be the first character on the next line. More...
 
int getLine () const noexcept
 Returns the line number of the next character. More...
 
bool isEOF () const noexcept
 Returns true if the iterator has reached the end of the document. More...
 

Detailed Description

Iterates the text in a CodeDocument.

This class lets you read characters from a CodeDocument. It's designed to be used by a CodeTokeniser object.

See also
CodeDocument

Constructor & Destructor Documentation

CodeDocument::Iterator::Iterator ( const CodeDocument document)
noexcept
CodeDocument::Iterator::Iterator ( const Iterator )
noexcept
CodeDocument::Iterator::~Iterator ( )
noexcept

Member Function Documentation

Iterator& CodeDocument::Iterator::operator= ( const Iterator )
noexcept
juce_wchar CodeDocument::Iterator::nextChar ( )
noexcept

Reads the next character and returns it.

See also
peekNextChar
juce_wchar CodeDocument::Iterator::peekNextChar ( ) const
noexcept

Reads the next character without advancing the current position.

void CodeDocument::Iterator::skip ( )
noexcept

Advances the position by one character.

int CodeDocument::Iterator::getPosition ( ) const
noexcept

Returns the position as the number of characters from the start of the document.

void CodeDocument::Iterator::skipWhitespace ( )
noexcept

Skips over any whitespace characters until the next character is non-whitespace.

void CodeDocument::Iterator::skipToEndOfLine ( )
noexcept

Skips forward until the next character will be the first character on the next line.

int CodeDocument::Iterator::getLine ( ) const
noexcept

Returns the line number of the next character.

bool CodeDocument::Iterator::isEOF ( ) const
noexcept

Returns true if the iterator has reached the end of the document.


The documentation for this class was generated from the following file: