language/duchain
KDevelop::CodeModel Class Reference
Persistent store that efficiently holds a list of identifiers and their kind for each declaration-string. More...
#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 59 of file codemodel.h.
Constructor & Destructor Documentation
| KDevelop::CodeModel::CodeModel | ( | ) |
Constructor.
Definition at line 163 of file codemodel.cpp.
| KDevelop::CodeModel::~CodeModel | ( | ) |
Destructor.
Definition at line 167 of file codemodel.cpp.
Member Function Documentation
| 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 172 of file codemodel.cpp.
| 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 428 of file codemodel.cpp.
| 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 symbol table.
Definition at line 275 of file codemodel.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference