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

kdevplatform/language/duchain

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

#include <codemodel.h>

Public Member Functions

 CodeModel ()
 
 ~CodeModel ()
 
void addItem (const IndexedString &file, const IndexedQualifiedIdentifier &id, CodeModelItem::Kind kind)
 
void items (const IndexedString &file, uint &count, const CodeModelItem *&items) const
 
void removeItem (const IndexedString &file, const IndexedQualifiedIdentifier &id)
 
void updateItem (const IndexedString &file, const IndexedQualifiedIdentifier &id, CodeModelItem::Kind kind)
 

Static Public Member Functions

static CodeModel & self ()
 

Detailed Description

Persistent store that efficiently holds a list of identifiers and their kind for each declaration-string.

Definition at line 66 of file codemodel.h.

Constructor & Destructor Documentation

◆ CodeModel()

KDevelop::CodeModel::CodeModel ( )

Definition at line 189 of file codemodel.cpp.

◆ ~CodeModel()

KDevelop::CodeModel::~CodeModel ( )
default

Member Function Documentation

◆ addItem()

void KDevelop::CodeModel::addItem ( const IndexedString &  file,
const IndexedQualifiedIdentifier &  id,
CodeModelItem::Kind  kind 
)

There can only be one item for each identifier.

If an item with this identifier already exists, the kind is updated.

Definition at line 196 of file codemodel.cpp.

◆ items()

void KDevelop::CodeModel::items ( const IndexedString &  file,
uint &  count,
const CodeModelItem *&  items 
) const

Retrieves all the global identifiers for a file-name in an efficient way.

Parameters
countA reference that will be filled with the count of retrieved items
itemsA reference to a pointer, that will represent the array of items. The array may contain items with an invalid identifier, those should be ignored. The list is sorted by identifier-index(except for the invalid identifiers in between).

Definition at line 368 of file codemodel.cpp.

◆ removeItem()

void KDevelop::CodeModel::removeItem ( const IndexedString &  file,
const IndexedQualifiedIdentifier &  id 
)

Definition at line 305 of file codemodel.cpp.

◆ self()

CodeModel & KDevelop::CodeModel::self ( )
static

Definition at line 392 of file codemodel.cpp.

◆ updateItem()

void KDevelop::CodeModel::updateItem ( const IndexedString &  file,
const IndexedQualifiedIdentifier &  id,
CodeModelItem::Kind  kind 
)

Updates the kind for the given item.

The item must already be in the code model.

Definition at line 264 of file codemodel.cpp.


The documentation for this class was generated from the following files:
  • codemodel.h
  • codemodel.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