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

kdevplatform/language/editor

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

#include <cursorinrevision.h>

Public Member Functions

 CursorInRevision ()
 
 CursorInRevision (int _line, int _column)
 
KTextEditor::Cursor castToSimpleCursor () const
 
bool isValid () const
 
bool operator!= (const CursorInRevision &rhs) const
 
CursorInRevision operator+ (const CursorInRevision &rhs) const
 
bool operator< (const CursorInRevision &rhs) const
 
bool operator<= (const CursorInRevision &rhs) const
 
bool operator== (const CursorInRevision &rhs) const
 
bool operator> (const CursorInRevision &rhs) const
 
bool operator>= (const CursorInRevision &rhs) const
 

Static Public Member Functions

static CursorInRevision castFromSimpleCursor (const KTextEditor::Cursor &cursor)
 
static CursorInRevision invalid ()
 

Public Attributes

int column = 0
 
int line = 0
 

Friends

QDebug operator<< (QDebug s, const CursorInRevision &cursor)
 

Detailed Description

Represents a cursor (line-number and column-number) within a text document.

In KDevelop, this object is used when referencing a cursor that does not point into the most current document revision. Therefore, before applying such a cursor 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 35 of file cursorinrevision.h.

Constructor & Destructor Documentation

◆ CursorInRevision() [1/2]

KDevelop::CursorInRevision::CursorInRevision ( )
inline

Definition at line 41 of file cursorinrevision.h.

◆ CursorInRevision() [2/2]

KDevelop::CursorInRevision::CursorInRevision ( int  _line,
int  _column 
)
inline

Definition at line 45 of file cursorinrevision.h.

Member Function Documentation

◆ castFromSimpleCursor()

static CursorInRevision KDevelop::CursorInRevision::castFromSimpleCursor ( const KTextEditor::Cursor &  cursor)
inlinestatic
Warning
Using this is wrong in most cases! If you want to transform this cursor to the current revision, you should do a proper mapping instead through KDevelop::DUChainBase or KDevelop::RevisionReference or KDevelop::DocumentChangeTracker

Definition at line 108 of file cursorinrevision.h.

◆ castToSimpleCursor()

KTextEditor::Cursor KDevelop::CursorInRevision::castToSimpleCursor ( ) const
inline
Warning
Using this is wrong in most cases! If you want to transform this cursor to the current revision, you should do a proper mapping instead through KDevelop::DUChainBase or KDevelop::RevisionReference or KDevelop::DocumentChangeTracker

Definition at line 99 of file cursorinrevision.h.

◆ invalid()

static CursorInRevision KDevelop::CursorInRevision::invalid ( )
inlinestatic

Definition at line 50 of file cursorinrevision.h.

◆ isValid()

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

Definition at line 55 of file cursorinrevision.h.

◆ operator!=()

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

Definition at line 85 of file cursorinrevision.h.

◆ operator+()

CursorInRevision KDevelop::CursorInRevision::operator+ ( const CursorInRevision &  rhs) const
inline

Definition at line 90 of file cursorinrevision.h.

◆ operator<()

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

Definition at line 60 of file cursorinrevision.h.

◆ operator<=()

bool KDevelop::CursorInRevision::operator<= ( const CursorInRevision &  rhs) const
inline

Definition at line 65 of file cursorinrevision.h.

◆ operator==()

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

Definition at line 80 of file cursorinrevision.h.

◆ operator>()

bool KDevelop::CursorInRevision::operator> ( const CursorInRevision &  rhs) const
inline

Definition at line 70 of file cursorinrevision.h.

◆ operator>=()

bool KDevelop::CursorInRevision::operator>= ( const CursorInRevision &  rhs) const
inline

Definition at line 75 of file cursorinrevision.h.

Friends And Related Function Documentation

◆ operator<<

QDebug operator<< ( QDebug  s,
const CursorInRevision &  cursor 
)
friend

qDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.

Definition at line 114 of file cursorinrevision.h.

Member Data Documentation

◆ column

int KDevelop::CursorInRevision::column = 0

Definition at line 39 of file cursorinrevision.h.

◆ line

int KDevelop::CursorInRevision::line = 0

Definition at line 39 of file cursorinrevision.h.


The documentation for this class was generated from the following file:
  • cursorinrevision.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