edbee - Qt Editor Library
|
Implements a line iterator for a single range It iterates over all affected lines that are inside the given textrange. More...
#include <rangelineiterator.h>
Public Member Functions | |
RangeLineIterator (TextDocument *doc, const TextRange &range) | |
Constructs the range line iterator. More... | |
RangeLineIterator (TextDocument *doc, int start, int end) | |
Constructs a line iterator by supplying two offsets. More... | |
bool | hasNext () const |
Checks if there's a next line number available. More... | |
int | next () |
returns the next line number More... | |
Implements a line iterator for a single range It iterates over all affected lines that are inside the given textrange.
Warning you should not change the document in such way that the linecount changes Doing this will result in incorrect behavior of this iterator
Usage sample:
edbee::RangeLineIterator::RangeLineIterator | ( | TextDocument * | doc, |
const TextRange & | range | ||
) |
Constructs the range line iterator.
doc | the textdocument this iterator is used for |
range | the range to iterate over the lines |
edbee::RangeLineIterator::RangeLineIterator | ( | TextDocument * | doc, |
int | startOffset, | ||
int | endOffset | ||
) |
Constructs a line iterator by supplying two offsets.
doc | the textdocument for this iterator |
startOffset | the start offset for iterating |
endOffset | the endOffset for iterating |
bool edbee::RangeLineIterator::hasNext | ( | ) | const |
Checks if there's a next line number available.
int edbee::RangeLineIterator::next | ( | ) |
returns the next line number