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

kdevplatform/language/duchain

  • KDevelop
  • DUChainPointer
Public Member Functions | List of all members
KDevelop::DUChainPointer< Type > Class Template Reference

#include <duchainpointer.h>

Inheritance diagram for KDevelop::DUChainPointer< Type >:
Inheritance graph
[legend]

Public Member Functions

 DUChainPointer ()
 
 DUChainPointer (const DUChainPointer &)=default
 
 DUChainPointer (DUChainPointer &&)=default
 
template<class OtherType >
 DUChainPointer (DUChainPointer< OtherType > rhs)
 
template<class OtherType >
 DUChainPointer (OtherType *rhs)
 
 DUChainPointer (QExplicitlySharedDataPointer< DUChainPointerData > rhs)
 
 DUChainPointer (Type *rhs)
 
 ~DUChainPointer ()=default
 
Type * data () const
 
template<class NewType >
DUChainPointer< NewType > dynamicCast () const
 
 operator bool () const
 
bool operator!= (const DUChainPointer< Type > &rhs) const
 
Type & operator* () const
 
Type * operator-> () const
 
bool operator< (const DUChainPointer< Type > &rhs) const
 
DUChainPointer< Type > & operator= (const DUChainPointer< Type > &)=default
 
DUChainPointer< Type > & operator= (DUChainPointer< Type > &&)=default
 
DUChainPointer< Type > & operator= (Type *rhs)
 
bool operator== (const DUChainPointer< Type > &rhs) const
 

Detailed Description

template<class Type>
class KDevelop::DUChainPointer< Type >

A smart-pointer similar class that conveniently wraps around DUChainPointerData without too many dynamic casts.

It can be used like a normal pointer. In order to cast between pointer types, you should use the staticCast() and dynamicCast() functions as appropriate.

Access must be serialized by holding the KDevelop::DUChain::lock() as appropriate for the function(s) being called.

Definition at line 90 of file duchainpointer.h.

Constructor & Destructor Documentation

◆ DUChainPointer() [1/7]

template<class Type>
KDevelop::DUChainPointer< Type >::DUChainPointer ( )
inline

Definition at line 96 of file duchainpointer.h.

◆ DUChainPointer() [2/7]

template<class Type>
KDevelop::DUChainPointer< Type >::DUChainPointer ( const DUChainPointer< Type > &  )
default

◆ DUChainPointer() [3/7]

template<class Type>
KDevelop::DUChainPointer< Type >::DUChainPointer ( DUChainPointer< Type > &&  )
default

◆ DUChainPointer() [4/7]

template<class Type>
template<class OtherType >
KDevelop::DUChainPointer< Type >::DUChainPointer ( OtherType *  rhs)
inlineexplicit

This constructor includes dynamic casting. If the object cannot be casted to the type, the constructed DUChainPointer will have value zero.

Definition at line 105 of file duchainpointer.h.

◆ DUChainPointer() [5/7]

template<class Type>
template<class OtherType >
KDevelop::DUChainPointer< Type >::DUChainPointer ( DUChainPointer< OtherType >  rhs)
inlineexplicit

Definition at line 112 of file duchainpointer.h.

◆ DUChainPointer() [6/7]

template<class Type>
KDevelop::DUChainPointer< Type >::DUChainPointer ( QExplicitlySharedDataPointer< DUChainPointerData >  rhs)
inlineexplicit

Definition at line 118 of file duchainpointer.h.

◆ DUChainPointer() [7/7]

template<class Type>
KDevelop::DUChainPointer< Type >::DUChainPointer ( Type *  rhs)
inlineexplicit

Definition at line 124 of file duchainpointer.h.

◆ ~DUChainPointer()

template<class Type>
KDevelop::DUChainPointer< Type >::~DUChainPointer ( )
default

Member Function Documentation

◆ data()

template<class Type>
Type* KDevelop::DUChainPointer< Type >::data ( ) const
inline

Definition at line 173 of file duchainpointer.h.

◆ dynamicCast()

template<class Type>
template<class NewType >
DUChainPointer<NewType> KDevelop::DUChainPointer< Type >::dynamicCast ( ) const
inline

Definition at line 165 of file duchainpointer.h.

◆ operator bool()

template<class Type>
KDevelop::DUChainPointer< Type >::operator bool ( ) const
inline

Returns whether the pointed object is still existing.

Definition at line 143 of file duchainpointer.h.

◆ operator!=()

template<class Type>
bool KDevelop::DUChainPointer< Type >::operator!= ( const DUChainPointer< Type > &  rhs) const
inline

Definition at line 137 of file duchainpointer.h.

◆ operator*()

template<class Type>
Type& KDevelop::DUChainPointer< Type >::operator* ( ) const
inline

Definition at line 147 of file duchainpointer.h.

◆ operator->()

template<class Type>
Type* KDevelop::DUChainPointer< Type >::operator-> ( ) const
inline

Definition at line 153 of file duchainpointer.h.

◆ operator<()

template<class Type>
bool KDevelop::DUChainPointer< Type >::operator< ( const DUChainPointer< Type > &  rhs) const
inline

Definition at line 159 of file duchainpointer.h.

◆ operator=() [1/3]

template<class Type>
DUChainPointer<Type>& KDevelop::DUChainPointer< Type >::operator= ( const DUChainPointer< Type > &  )
default

◆ operator=() [2/3]

template<class Type>
DUChainPointer<Type>& KDevelop::DUChainPointer< Type >::operator= ( DUChainPointer< Type > &&  )
default

◆ operator=() [3/3]

template<class Type>
DUChainPointer<Type>& KDevelop::DUChainPointer< Type >::operator= ( Type *  rhs)
inline

Definition at line 183 of file duchainpointer.h.

◆ operator==()

template<class Type>
bool KDevelop::DUChainPointer< Type >::operator== ( const DUChainPointer< Type > &  rhs) const
inline

Definition at line 132 of file duchainpointer.h.


The documentation for this class was generated from the following file:
  • duchainpointer.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 16 2021 23:35:06 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