• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/language/editor

  • KDevelop
  • RangeInRevision
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
KDevelop::RangeInRevision Class Reference

#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

enum KDevelop::RangeInRevision::ContainsBehavior
Enumerator
Default 
IncludeBackEdge 

Definition at line 77 of file rangeinrevision.h.

Constructor & Destructor Documentation

◆ RangeInRevision() [1/4]

KDevelop::RangeInRevision::RangeInRevision ( const CursorInRevision &  _start,
const CursorInRevision &  _end 
)
inline

Definition at line 43 of file rangeinrevision.h.

◆ RangeInRevision() [2/4]

KDevelop::RangeInRevision::RangeInRevision ( const CursorInRevision &  _start,
int  length 
)
inline

Definition at line 48 of file rangeinrevision.h.

◆ RangeInRevision() [3/4]

KDevelop::RangeInRevision::RangeInRevision ( )
inline

Definition at line 53 of file rangeinrevision.h.

◆ RangeInRevision() [4/4]

KDevelop::RangeInRevision::RangeInRevision ( int  sLine,
int  sCol,
int  eLine,
int  eCol 
)
inline

Definition at line 57 of file rangeinrevision.h.

Member Function Documentation

◆ castFromSimpleRange()

static RangeInRevision KDevelop::RangeInRevision::castFromSimpleRange ( const KTextEditor::Range &  range)
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()

KTextEditor::Range KDevelop::RangeInRevision::castToSimpleRange ( ) const
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]

bool KDevelop::RangeInRevision::contains ( const CursorInRevision &  position,
ContainsBehavior  cb = Default 
) const
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]

bool KDevelop::RangeInRevision::contains ( const RangeInRevision &  range) const
inline

Definition at line 90 of file rangeinrevision.h.

◆ invalid()

static RangeInRevision KDevelop::RangeInRevision::invalid ( )
inlinestatic

Definition at line 62 of file rangeinrevision.h.

◆ isEmpty()

bool KDevelop::RangeInRevision::isEmpty ( ) const
inline

Definition at line 72 of file rangeinrevision.h.

◆ isValid()

bool KDevelop::RangeInRevision::isValid ( ) const
inline

Definition at line 67 of file rangeinrevision.h.

◆ operator!=()

bool KDevelop::RangeInRevision::operator!= ( const RangeInRevision &  rhs) const
inline

Definition at line 100 of file rangeinrevision.h.

◆ operator<()

bool KDevelop::RangeInRevision::operator< ( const RangeInRevision &  rhs) const
inline

Definition at line 105 of file rangeinrevision.h.

◆ operator==()

bool KDevelop::RangeInRevision::operator== ( const RangeInRevision &  rhs) const
inline

Definition at line 95 of file rangeinrevision.h.

Friends And Related Function Documentation

◆ operator<<

QDebug operator<< ( QDebug  s,
const RangeInRevision &  range 
)
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:
  • rangeinrevision.h
This file is part of the KDE documentation.
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.

kdevplatform/language/editor

Skip menu "kdevplatform/language/editor"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal