edbee - Qt Editor Library
rangelineiterator.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 
9 namespace edbee {
10 
11 
12 class TextDocument;
13 class TextRange;
14 
31 {
32 public:
33  RangeLineIterator( TextDocument* doc, const TextRange& range );
34  RangeLineIterator( TextDocument* doc, int start, int end );
35 
36  bool hasNext() const;
37  int next();
38 
39 private:
40  int curLine_;
41  int endLine_;
42 };
43 
44 
45 } // edbee
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition: textdocument.h:40
bool hasNext() const
Checks if there's a next line number available.
Definition: rangelineiterator.cpp:38
Implements a line iterator for a single range It iterates over all affected lines that are inside the...
Definition: rangelineiterator.h:30
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
int next()
returns the next line number
Definition: rangelineiterator.cpp:45
RangeLineIterator(TextDocument *doc, const TextRange &range)
Constructs the range line iterator.
Definition: rangelineiterator.cpp:19
A single text region A region constists of an anchor and a caret: The anchor defines the 'start' of t...
Definition: textrange.h:29