• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

language/duchain

KDevelop::Use

KDevelop::Use Class Reference

Represents a position in a document where a specific declaration is used. More...

#include <use.h>

List of all members.

Public Member Functions

 Use (const SimpleRange &range=SimpleRange::invalid(), int declarationIndex=std::numeric_limits< int >::max())
Declaration * usedDeclaration (TopDUContext *topContext)

Public Attributes

int m_declarationIndex
SimpleRange m_range

Detailed Description

Represents a position in a document where a specific declaration is used.

Since we want to build uses for all files, and every single function may contain tens to hundreds of uses, uses must be extremely light-weight.

For that reason they are built in a way that a use can completely be stored in a simple vector, and they only contain indices that represent the actual declaration used. Since the same Declarations are used over and over again, the actual declarations are stored and indexed centrally in the enclosing top-context. Additionally, because a use may refer to a not globally adressable item, each top-context contains a local map that maps declaration-indices to local decarations.

Since only a small fraction of all files is loaded as document at any time, only few documents actually need smart-ranges. For that reason we do not store them here, but instead only map them to the uses when there actually IS smart-ranges for them.

Definition at line 48 of file use.h.


The documentation for this class was generated from the following files:
  • use.h
  • use.cpp

language/duchain

Skip menu "language/duchain"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal