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

kdevplatform/language/duchain

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

#include <importers.h>

Public Member Functions

 Importers ()
 
 ~Importers ()
 
void addImporter (const DeclarationId &id, const IndexedDUContext &use)
 
KDevVarLengthArray< IndexedDUContext > importers (const DeclarationId &id) const
 
void removeImporter (const DeclarationId &id, const IndexedDUContext &use)
 

Static Public Member Functions

static Importers & self ()
 

Detailed Description

Global mapping of Declaration-Ids to contexts that import the associated context, protected through DUChainLock.

This is used as an alternative to the local importers list within DUContext, only for indirect imports(Across different files, or with templates).

This has the advantage that imports stay valid even if the imported context is deleted temporarily, and stored top-contexts don't need to be changed just because imports were added.

To retrieve the actual uses, query the duchain for the files.

Definition at line 41 of file importers.h.

Constructor & Destructor Documentation

◆ Importers()

KDevelop::Importers::Importers ( )

Constructor.

Definition at line 129 of file importers.cpp.

◆ ~Importers()

KDevelop::Importers::~Importers ( )
default

Destructor.

Member Function Documentation

◆ addImporter()

void KDevelop::Importers::addImporter ( const DeclarationId &  id,
const IndexedDUContext &  use 
)

Adds a top-context to the users-list of the given id.

Definition at line 136 of file importers.cpp.

◆ importers()

KDevVarLengthArray< IndexedDUContext > KDevelop::Importers::importers ( const DeclarationId &  id) const

Gets the top-contexts of all users assigned to the declaration-id.

Definition at line 189 of file importers.cpp.

◆ removeImporter()

void KDevelop::Importers::removeImporter ( const DeclarationId &  id,
const IndexedDUContext &  use 
)

Removes the given top-context from the list of uses.

Definition at line 163 of file importers.cpp.

◆ self()

Importers & KDevelop::Importers::self ( )
static

Definition at line 210 of file importers.cpp.


The documentation for this class was generated from the following files:
  • importers.h
  • importers.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 23:31:18 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