language/duchain
KDevelop::SpecializationStore Class Reference
This class allows dynamic management of "current" specializations for declarations. More...
#include <specializationstore.h>
Public Member Functions | |
| DUContext * | applySpecialization (KDevelop::DUContext *context, KDevelop::TopDUContext *source, bool recursive=true) |
| KDevelop::Declaration * | applySpecialization (KDevelop::Declaration *declaration, KDevelop::TopDUContext *source, bool recursive=true) |
| void | clear () |
| void | clear (DeclarationId declaration) |
| IndexedInstantiationInformation | get (DeclarationId declaration) |
| void | set (DeclarationId declaration, IndexedInstantiationInformation specialization) |
Static Public Member Functions | |
| static SpecializationStore & | self () |
Detailed Description
This class allows dynamic management of "current" specializations for declarations.
The specializations will be applied in editors, and wherever it makes sense. For example, this is used in C++ to get code-completion and use-building within instantiated template-classes/functions.
Definition at line 39 of file specializationstore.h.
Member Function Documentation
| DUContext * KDevelop::SpecializationStore::applySpecialization | ( | KDevelop::DUContext * | context, | |
| KDevelop::TopDUContext * | source, | |||
| bool | recursive = true | |||
| ) |
Applies the known specializations for the given context using the DUContext::specialize() function.
If no specializations are known, returns the original context.
- Parameters:
-
context The context to specialize source The top-context from where to start searching recursive Whether parent-contexts should be checked for known specializations, and those applied. This is a bit more expensive then just doing a local check.
Definition at line 88 of file specializationstore.cpp.
| Declaration * KDevelop::SpecializationStore::applySpecialization | ( | KDevelop::Declaration * | declaration, | |
| KDevelop::TopDUContext * | source, | |||
| bool | recursive = true | |||
| ) |
Applies the known specializations for the given declaration using the Declaration::specialize() function.
If no specializations are known, the original declaration is returned.
- Parameters:
-
declaration The declaration to specialize source The top-context from where to start searching recursive Whether parent-contexts should be checked for known specializations, and those applied. This is a bit more expensive then just doing a local check.
Definition at line 60 of file specializationstore.cpp.
| void KDevelop::SpecializationStore::clear | ( | ) |
Clears all registered specializations.
Definition at line 56 of file specializationstore.cpp.
| void KDevelop::SpecializationStore::clear | ( | DeclarationId | declaration | ) |
Clears the specialization registered for the given declaration-id.
Definition at line 50 of file specializationstore.cpp.
| IndexedInstantiationInformation KDevelop::SpecializationStore::get | ( | DeclarationId | declaration | ) |
Gets the registered specialization for the given declaration-id, or zero.
Definition at line 42 of file specializationstore.cpp.
| void KDevelop::SpecializationStore::set | ( | DeclarationId | declaration, | |
| IndexedInstantiationInformation | specialization | |||
| ) |
Adds/updates the current specialization for the given declaration-id.
Definition at line 37 of file specializationstore.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference