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

kdevplatform/language/backgroundparser

  • KDevelop
  • RevisionLockerAndClearer
Public Types | Public Member Functions | List of all members
KDevelop::RevisionLockerAndClearer Class Reference

#include <documentchangetracker.h>

Inheritance diagram for KDevelop::RevisionLockerAndClearer:
Inheritance graph
[legend]

Public Types

using Ptr = QExplicitlySharedDataPointer< RevisionLockerAndClearer >
 

Public Member Functions

 ~RevisionLockerAndClearer ()
 
qint64 revision () const
 
CursorInRevision transformFromCurrentRevision (const KTextEditor::Cursor &cursor, KTextEditor::MovingCursor::InsertBehavior behavior=KTextEditor::MovingCursor::StayOnInsert) const
 
RangeInRevision transformFromCurrentRevision (const KTextEditor::Range &range) const
 
CursorInRevision transformFromRevision (const CursorInRevision &cursor, const Ptr &from=Ptr(), KTextEditor::MovingCursor::InsertBehavior behavior=KTextEditor::MovingCursor::StayOnInsert) const
 
RangeInRevision transformFromRevision (const RangeInRevision &range, const Ptr &from=Ptr()) const
 
KTextEditor::Cursor transformToCurrentRevision (const CursorInRevision &cursor, KTextEditor::MovingCursor::InsertBehavior behavior=KTextEditor::MovingCursor::StayOnInsert) const
 
KTextEditor::Range transformToCurrentRevision (const RangeInRevision &range) const
 
CursorInRevision transformToRevision (const CursorInRevision &cursor, const Ptr &to, KTextEditor::MovingCursor::InsertBehavior behavior=KTextEditor::MovingCursor::StayOnInsert) const
 
RangeInRevision transformToRevision (const RangeInRevision &range, const Ptr &to) const
 
bool valid () const
 
- Public Member Functions inherited from QSharedData
 QSharedData ()
 
 QSharedData (const QSharedData &other)
 

Detailed Description

Helper class that locks a revision, and clears it on its destruction within the foreground thread.

Just delete it using deleteLater().

Definition at line 52 of file documentchangetracker.h.

Member Typedef Documentation

◆ Ptr

using KDevelop::RevisionLockerAndClearer::Ptr = QExplicitlySharedDataPointer<RevisionLockerAndClearer>

Definition at line 56 of file documentchangetracker.h.

Constructor & Destructor Documentation

◆ ~RevisionLockerAndClearer()

KDevelop::RevisionLockerAndClearer::~RevisionLockerAndClearer ( )

Definition at line 328 of file documentchangetracker.cpp.

Member Function Documentation

◆ revision()

qint64 KDevelop::RevisionLockerAndClearer::revision ( ) const

Returns the revision number.

Definition at line 383 of file documentchangetracker.cpp.

◆ transformFromCurrentRevision() [1/2]

CursorInRevision KDevelop::RevisionLockerAndClearer::transformFromCurrentRevision ( const KTextEditor::Cursor &  cursor,
KTextEditor::MovingCursor::InsertBehavior  behavior = KTextEditor::MovingCursor::StayOnInsert 
) const

Transforms the given cursor from the current revision into this revision.

◆ transformFromCurrentRevision() [2/2]

RangeInRevision KDevelop::RevisionLockerAndClearer::transformFromCurrentRevision ( const KTextEditor::Range &  range) const

Transforms the given range from the current revision into this revision.

Definition at line 470 of file documentchangetracker.cpp.

◆ transformFromRevision() [1/2]

CursorInRevision KDevelop::RevisionLockerAndClearer::transformFromRevision ( const CursorInRevision &  cursor,
const Ptr &  from = Ptr(),
KTextEditor::MovingCursor::InsertBehavior  behavior = KTextEditor::MovingCursor::StayOnInsert 
) const

Transform ranges from the given document revision from to the this one.

If a zero from revision is given, the transformation is done from the current document revision.

◆ transformFromRevision() [2/2]

RangeInRevision KDevelop::RevisionLockerAndClearer::transformFromRevision ( const RangeInRevision &  range,
const Ptr &  from = Ptr() 
) const

Transform ranges from the given document revision from to the this one.

If a zero from revision is given, the transformation is done from the current document revision.

◆ transformToCurrentRevision() [1/2]

KTextEditor::Cursor KDevelop::RevisionLockerAndClearer::transformToCurrentRevision ( const CursorInRevision &  cursor,
KTextEditor::MovingCursor::InsertBehavior  behavior = KTextEditor::MovingCursor::StayOnInsert 
) const

Transforms the given cursor from this revision into the current revision.

◆ transformToCurrentRevision() [2/2]

KTextEditor::Range KDevelop::RevisionLockerAndClearer::transformToCurrentRevision ( const RangeInRevision &  range) const

Transforms the given range from this revision into the current revision.

◆ transformToRevision() [1/2]

CursorInRevision KDevelop::RevisionLockerAndClearer::transformToRevision ( const CursorInRevision &  cursor,
const Ptr &  to,
KTextEditor::MovingCursor::InsertBehavior  behavior = KTextEditor::MovingCursor::StayOnInsert 
) const

Transform a cursor from this document revision to the given to.

If a zero target revision is given, the transformation is done to the current document revision.

◆ transformToRevision() [2/2]

RangeInRevision KDevelop::RevisionLockerAndClearer::transformToRevision ( const RangeInRevision &  range,
const Ptr &  to 
) const

Transform a range from this document revision to the given to.

◆ valid()

bool KDevelop::RevisionLockerAndClearer::valid ( ) const

Whether the revision is still being held.

It may have been lost due to document-reloads, in which case the revision must not be used.

Definition at line 481 of file documentchangetracker.cpp.


The documentation for this class was generated from the following files:
  • documentchangetracker.h
  • documentchangetracker.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Mar 8 2021 23:29:35 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/language/backgroundparser

Skip menu "kdevplatform/language/backgroundparser"
  • 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