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

kdevplatform/language/duchain

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

#include <duchainpointer.h>

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

Public Member Functions

 DUChainPointerData ()
 
 ~DUChainPointerData ()
 
DUChainBase * base ()
 
DUChainBase * base () const
 
- Public Member Functions inherited from QSharedData
 QSharedData ()
 
 QSharedData (const QSharedData &other)
 

Detailed Description

Whenever the du-chain is unlocked and locked again, any du-chain item may have been deleted in between.

For that reason, the following class should be used to make sure that no deleted objects are accessed. It contains a pointer that will be reset to zero once the pointed object is deleted.

Access to the data must still be serialized through duchain-locking. Using this comes with no additional cost.

In practice this means: Store an instance of DUChainPointer instead of a pointer to the du-chain object. Then, access the eventually still existing object by calling pointer->base().

To make it even more convenient see DUChainPointer

Definition at line 50 of file duchainpointer.h.

Constructor & Destructor Documentation

◆ DUChainPointerData()

KDevelop::DUChainPointerData::DUChainPointerData ( )

Default-initialization of an invalid reference.

Definition at line 33 of file duchainpointer.cpp.

◆ ~DUChainPointerData()

KDevelop::DUChainPointerData::~DUChainPointerData ( )

Definition at line 37 of file duchainpointer.cpp.

Member Function Documentation

◆ base() [1/2]

DUChainBase * KDevelop::DUChainPointerData::base ( )

Will return zero once the pointed-to object was deleted.

Definition at line 23 of file duchainpointer.cpp.

◆ base() [2/2]

DUChainBase * KDevelop::DUChainPointerData::base ( ) const

Will return zero once the pointed-to object was deleted.

Definition at line 28 of file duchainpointer.cpp.


The documentation for this class was generated from the following files:
  • duchainpointer.h
  • duchainpointer.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:37:28 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/language/duchain

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