kdevplatform/language/duchain
#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()
|
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
-
count A reference that will be filled with the count of retrieved items items A 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()
|
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:
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.