kdevplatform/language/editor
#include <rangeinrevision.h>
Public Types | |
enum | ContainsBehavior { Default = 0, IncludeBackEdge = 1 } |
Public Member Functions | |
RangeInRevision () | |
RangeInRevision (const CursorInRevision &_start, const CursorInRevision &_end) | |
RangeInRevision (const CursorInRevision &_start, int length) | |
RangeInRevision (int sLine, int sCol, int eLine, int eCol) | |
KTextEditor::Range | castToSimpleRange () const |
bool | contains (const CursorInRevision &position, ContainsBehavior cb=Default) const |
bool | contains (const RangeInRevision &range) const |
bool | isEmpty () const |
bool | isValid () const |
bool | operator!= (const RangeInRevision &rhs) const |
bool | operator< (const RangeInRevision &rhs) const |
bool | operator== (const RangeInRevision &rhs) const |
Static Public Member Functions | |
static RangeInRevision | castFromSimpleRange (const KTextEditor::Range &range) |
static RangeInRevision | invalid () |
Public Attributes | |
CursorInRevision | end |
CursorInRevision | start |
Friends | |
QDebug | operator<< (QDebug s, const RangeInRevision &range) |
Detailed Description
Represents a range (start- and end cursor) within a text document.
In KDevelop, this object is used when referencing a ranges that do not point into the most current document revision. Therefore, before applying such a range in the text documents, it has to be translated into the current document revision explicitly, thereby replaying eventual changes (see DUChainBase::translate...)
Definition at line 37 of file rangeinrevision.h.
Member Enumeration Documentation
◆ ContainsBehavior
Enumerator | |
---|---|
Default | |
IncludeBackEdge |
Definition at line 77 of file rangeinrevision.h.
Constructor & Destructor Documentation
◆ RangeInRevision() [1/4]
|
inline |
Definition at line 43 of file rangeinrevision.h.
◆ RangeInRevision() [2/4]
|
inline |
Definition at line 48 of file rangeinrevision.h.
◆ RangeInRevision() [3/4]
|
inline |
Definition at line 53 of file rangeinrevision.h.
◆ RangeInRevision() [4/4]
|
inline |
Definition at line 57 of file rangeinrevision.h.
Member Function Documentation
◆ castFromSimpleRange()
|
inlinestatic |
- Warning
- Using this is wrong in most cases! If you want to transform this range to the current revision, you should do a proper mapping instead through KDevelop::DUChainBase or KDevelop::RevisionReference or KDevelop::DocumentChangeTracker
Definition at line 123 of file rangeinrevision.h.
◆ castToSimpleRange()
|
inline |
- Warning
- Using this is wrong in most cases! If you want to transform this range to the current revision, you should do a proper mapping instead through KDevelop::DUChainBase or KDevelop::RevisionReference or KDevelop::DocumentChangeTracker
Definition at line 114 of file rangeinrevision.h.
◆ contains() [1/2]
|
inline |
Checks if position
is contained within this range (i.e.
>= start and < end) If cb
is IncludeBackEdge, also checks that position
== end
Definition at line 85 of file rangeinrevision.h.
◆ contains() [2/2]
|
inline |
Definition at line 90 of file rangeinrevision.h.
◆ invalid()
|
inlinestatic |
Definition at line 62 of file rangeinrevision.h.
◆ isEmpty()
|
inline |
Definition at line 72 of file rangeinrevision.h.
◆ isValid()
|
inline |
Definition at line 67 of file rangeinrevision.h.
◆ operator!=()
|
inline |
Definition at line 100 of file rangeinrevision.h.
◆ operator<()
|
inline |
Definition at line 105 of file rangeinrevision.h.
◆ operator==()
|
inline |
Definition at line 95 of file rangeinrevision.h.
Friends And Related Function Documentation
◆ operator<<
|
friend |
qDebug() stream operator. Writes this range to the debug output in a nicely formatted way.
Definition at line 128 of file rangeinrevision.h.
Member Data Documentation
◆ end
CursorInRevision KDevelop::RangeInRevision::end |
Definition at line 41 of file rangeinrevision.h.
◆ start
CursorInRevision KDevelop::RangeInRevision::start |
Definition at line 41 of file rangeinrevision.h.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 16 2021 23:35:23 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.