language/duchain
KDevelop::Importers Class Reference
Global mapping of Declaration-Ids to contexts that import the associated context, protected through DUChainLock. More...
#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 40 of file importers.h.
Constructor & Destructor Documentation
| KDevelop::Importers::Importers | ( | ) |
Constructor.
Definition at line 115 of file importers.cpp.
| KDevelop::Importers::~Importers | ( | ) |
Destructor.
Definition at line 119 of file importers.cpp.
Member Function Documentation
| 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 124 of file importers.cpp.
| KDevVarLengthArray< IndexedDUContext > KDevelop::Importers::importers | ( | const DeclarationId & | id | ) | const |
Gets the top-contexts of all users assigned to the declaration-id.
Definition at line 173 of file importers.cpp.
| void KDevelop::Importers::removeImporter | ( | const DeclarationId & | id, | |
| const IndexedDUContext & | use | |||
| ) |
Removes the given top-context from the list of uses.
Definition at line 149 of file importers.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference