kdevplatform/language/duchain
ducontext.cpp
Go to the documentation of this file.
76 DUChainVisitor::~DUChainVisitor()
170 void DUContextDynamicData::scopeIdentifier(bool includeClasses, QualifiedIdentifier& target) const
192 if (import == context || (import && import->m_dynamicData->imports(context, source, recursionGuard)))
210 Q_ASSERT(isContextTemporary(m_indexInTopContext) == isContextTemporary(newDeclaration->ownIndex()));
250 Q_ASSERT(d_func_dynamic()->m_localDeclarationsList().indexOf(LocalIndexedDeclaration(declaration)) == -1);
302 Q_ASSERT(d_func_dynamic()->m_childContextsList().indexOf(LocalIndexedDUContext(context)) == -1);
315 qCDebug(LANGUAGE) << m_context->scopeIdentifier(true).toString() << "importer added multiple times:" <<
373 m_dynamicData->m_indexInTopContext = parent->topContext()->m_dynamicData->allocateContextIndex(this,
400 DUContext::DUContext(DUContextData& dd, const RangeInRevision& range, DUContext* parent, bool anonymous)
414 m_dynamicData->m_indexInTopContext = parent->topContext()->m_dynamicData->allocateContextIndex(this,
463 //If the top-context is being delete, we don't need to spend time rebuilding the inner structure.
556 return findLocalDeclarations(IndexedIdentifier(identifier), position, topContext, dataType, flags);
600 if (declaration->kind() == Declaration::NamespaceAlias && !(m_flags & DUContext::NoFiltering)) {
622 void DUContext::findLocalDeclarationsInternal(const Identifier& identifier, const CursorInRevision& position,
626 findLocalDeclarationsInternal(IndexedIdentifier(identifier), position, dataType, ret, source, flags);
695 // If we're in a namespace, delay all the searching into the top-context, because only that has the overview to pick the correct declarations.
699 findLocalDeclarationsInternal(baseIdentifier->identifier, position, dataType, ret, source, flags);
710 //Because of namespace-imports and aliases, this identifier may need to be searched under multiple names
755 if (!(flags & DontSearchInParent) && shouldSearchInParent(flags) && m_dynamicData->m_parentContext) {
758 url() == m_dynamicData->m_parentContext->url() ? position : m_dynamicData->m_parentContext->range().end,
778 current->applyAliases(identifiers, aliasedIdentifiers, CursorInRevision::invalid(), true, false);
842 void DUContext::addImportedParentContext(DUContext* context, const CursorInRevision& position, bool anonymous,
909 const KDevVarLengthArray<IndexedDUContext> indirect = Importers::self().importers(owner()->id());
961 mergeDeclarationsInternal(ret, position, hadContexts, topContext ? topContext : this->topContext(),
1039 parentContext()->type() == DUContext::Class ? parentContext()->range().end : position, hadContexts, source, searchInParents,
1065 // note: operate on copy here because child ctx deletion changes m_dynamicData->m_childContexts
1136 //ENSURE_CAN_READ This is disabled, because type() is called very often while searching, and it costs us performance
1148 QList<Declaration*> DUContext::findDeclarations(const Identifier& identifier, const CursorInRevision& position,
1154 QList<Declaration*> DUContext::findDeclarations(const IndexedIdentifier& identifier, const CursorInRevision& position,
1230 void DUContext::applyAliases(const SearchItem::PtrList& baseIdentifiers, SearchItem::PtrList& identifiers,
1234 findLocalDeclarationsInternal(globalIndexedImportIdentifier(), position, AbstractType::Ptr(), imports,
1272 addUnmodified = false; //The un-modified identifier can be ignored, because it will be replaced with the resolved alias
1288 void DUContext::applyUpwardsAliases(SearchItem::PtrList& identifiers, const TopDUContext* /*source*/) const
1294 //Make sure we search for the items in all namespaces of the same name, by duplicating each one with the namespace-identifier prepended.
1295 //We do this by prepending items to the current identifiers that equal the local scope identifier.
1317 return (parentContext() && parentContext()->type() == DUContext::Helper && (flags & InImportedParentContext))
1381 DUContext* DUContext::findContextAt(const CursorInRevision& position, bool includeRightBorder) const
1385 // qCDebug(LANGUAGE) << "searching" << position << "in:" << scopeIdentifier(true).toString() << range() << includeRightBorder;
1504 AbstractNavigationWidget* DUContext::createNavigationWidget(Declaration* decl, TopDUContext* topContext,
1535 DUContext::SearchItem::SearchItem(const QualifiedIdentifier& id, const Ptr& nextItem, int start)
1554 DUContext::SearchItem::SearchItem(const QualifiedIdentifier& id, const PtrList& nextItems, int start)
1566 DUContext::SearchItem::SearchItem(bool explicitlyGlobal, const IndexedIdentifier& id, const PtrList& nextItems)
1573 DUContext::SearchItem::SearchItem(bool explicitlyGlobal, const IndexedIdentifier& id, const Ptr& nextItem)
1616 QVector<QualifiedIdentifier> DUContext::SearchItem::toList(const QualifiedIdentifier& prefix) const
1664 DUContext::Import::Import(DUContext* _context, const DUContext* importer, const CursorInRevision& _position)
1682 DUContext* DUContext::Import::context(const TopDUContext* topContext, bool instantiateIfRequired) const
1686 //This first case rests on the assumption that no context will ever import a function's expression context
1687 //More accurately, that no specialized or cross-topContext imports will, but if the former assumption fails the latter will too
1692 qCWarning(LANGUAGE) << "Import of function declaration without internal function context encountered!";
1733 std::sort(m_dynamicData->m_localDeclarations.begin(), m_dynamicData->m_localDeclarations.end(), sortByRange);
1747 std::sort(m_dynamicData->m_childContexts.begin(), m_dynamicData->m_childContexts.end(), sortByRange);
uint m_indexInTopContext
Definition: ducontextdynamicdata.h:78
void append(const T &value)
void resortLocalDeclarations()
Resort the local declarations by their range.
Definition: ducontext.cpp:1729
bool isTemporaryContextIndex(uint index) const
Definition: topducontextdynamicdata.cpp:826
bool inSymbolTable() const
Returns whether this context is listed in the symbol table (Namespaces and classes)
Definition: ducontext.cpp:1448
QList< Declaration * > findDeclarations(const QualifiedIdentifier &identifier, const CursorInRevision &position=CursorInRevision::invalid(), const AbstractType::Ptr &dataType=AbstractType::Ptr(), const TopDUContext *topContext=nullptr, SearchFlags flags=NoSearchFlags) const
Searches for and returns a declaration with a given identifier in this context, which is currently ac...
Definition: ducontext.cpp:792
QExplicitlySharedDataPointer< SearchItem > Ptr
Definition: ducontext.h:705
KDevVarLengthArray< IndexedDUContext > indexedImporters() const
Returns the list of indexed importers.
Definition: ducontext.cpp:886
QDebug operator<<(QDebug dbg, const KDevelop::DUContext::Import &import)
Definition: ducontext.cpp:60
A context that declares functions, namespaces or classes.
Definition: ducontext.h:103
static PersistentSymbolTable & self()
Definition: persistentsymboltable.cpp:494
void addNext(const Ptr &other)
Definition: ducontext.cpp:1635
bool removeChildContext(DUContext *context)
Removes the context from childContexts.
Definition: ducontext.cpp:291
void setUseDeclaration(int useIndex, int declarationIndex)
Assigns the declaration represented by declarationIndex to the use with index useIndex.
Definition: ducontext.cpp:1375
virtual bool imports(const DUContext *origin, const CursorInRevision &position=CursorInRevision::invalid()) const
Returns true if this context imports.
Definition: ducontext.cpp:814
Disables the resolution of alias declarations in the returned list.
Definition: ducontext.h:134
int depth() const
Calculate the depth of this context, from the top level context in the file.
Definition: ducontext.cpp:341
SearchItem(const QualifiedIdentifier &id, const Ptr &nextItem=Ptr(), int start=0)
Constructs a representation of the given id qualified identifier, starting at its index start.
Definition: ducontext.cpp:1535
static bool declarationHasUses(Declaration *decl)
Determines whether the given declaration has uses or not.
Definition: ducontext.cpp:1328
KDevVarLengthArray< Ptr, 256 > PtrList
Definition: ducontext.h:706
void setInSymbolTable(bool inSymbolTable)
Move this object into/out of the symbol table.
Definition: ducontext.cpp:1453
#define DEFINE_LIST_MEMBER_HASH(container, member, type)
Definition: appendedlist.h:218
DUContext * findContextAt(const CursorInRevision &position, bool includeBorders=false) const
Find the context which most specifically covers position.
Definition: ducontext.cpp:1381
const IndexedIdentifier & indexedIdentifier() const
Access this declaration's identifier.
Definition: declaration.cpp:210
QDebug & nospace()
virtual void addImportedParentContext(DUContext *context, const CursorInRevision &position=CursorInRevision::invalid(), bool anonymous=false, bool temporary=false)
Adds an imported context.
Definition: ducontext.cpp:842
void reserve(int size)
virtual void deleteUsesRecursively()
Recursively delete all uses in this context and all its child-contexts.
Definition: ducontext.cpp:1182
int createUse(int declarationIndex, const RangeInRevision &range, int insertBefore=-1)
Creates a new use of the declaration given through declarationIndex.
Definition: ducontext.cpp:1343
QVector< DUContext * > m_childContexts
Definition: ducontextdynamicdata.h:83
void changeUseRange(int useIndex, const RangeInRevision &range)
Definition: ducontext.cpp:1369
virtual bool shouldSearchInParent(SearchFlags flags) const
This is called whenever the search needs to do the decision whether it should be continued in the par...
Definition: ducontext.cpp:1315
Represents multiple qualified identifiers in a way that is better to manipulate and allows applying n...
Definition: ducontext.h:702
bool parentContextOf(DUContext *context) const
Iterates the tree to see if the provided context is a subcontext of this context.
Definition: ducontext.cpp:940
void addToEachNode(const Ptr &item)
Appends the given item to every item that can be reached from this item, and not only to the end item...
Definition: ducontext.cpp:1640
A helper-class to store an identifier by index in a type-safe way.
Definition: identifier.h:55
Declaration * data(TopDUContext *top) const
Definition: localindexeddeclaration.cpp:37
A context that declares template-parameters.
Definition: ducontext.h:107
virtual AbstractNavigationWidget * createNavigationWidget(Declaration *decl=nullptr, TopDUContext *topContext=nullptr, AbstractNavigationWidget::DisplayHints hints=AbstractNavigationWidget::NoHints) const
Can be specialized by languages to create a navigation/information-widget.
Definition: ducontext.cpp:1504
virtual bool findDeclarationsInternal(const SearchItem::PtrList &identifiers, const CursorInRevision &position, const AbstractType::Ptr &dataType, DeclarationList &ret, const TopDUContext *source, SearchFlags flags, uint depth) const
This is a more complex interface to the declaration search engine.
Definition: ducontext.cpp:682
virtual void clearImportedParentContexts()
Clear all imported parent contexts.
Definition: ducontext.cpp:1458
A helper-class to store an identifier by index in a type-safe way.
Definition: identifier.h:95
Represents a single declaration in a definition-use chain.
Definition: declaration.h:51
void setOwner(Declaration *decl)
Sets the declaration/definition, and also updates it's internal context (they are strictly paired tog...
Definition: ducontext.cpp:492
bool hasUses(const DeclarationId &id) const
Checks whether the given DeclarationID is is used.
Definition: uses.cpp:189
bool equalScopeIdentifier(const DUContext *rhs) const
Returns true if this context has the same scope identifier as the given one.
Definition: ducontext.cpp:1092
virtual DUContext * specialize(const IndexedInstantiationInformation &specialization, const TopDUContext *topContext, int upDistance=0)
Retrieve the context which is specialized with the given specialization as seen from the given topCon...
Definition: ducontext.cpp:1200
void declarations(const IndexedQualifiedIdentifier &id, uint &count, const IndexedDeclaration *&declarations) const
Retrieves all the declarations for a given IndexedQualifiedIdentifier in an efficient way.
Definition: persistentsymboltable.cpp:399
virtual void removeImportedParentContext(DUContext *context)
Removes a child context.
Definition: ducontext.cpp:866
Represents a position in a document where a specific declaration is used.
Definition: use.h:47
void setLocalScopeIdentifier(const QualifiedIdentifier &identifier)
Scope identifier, used to qualify the identifiers occurring in each context This must not be called o...
Definition: ducontext.cpp:1113
Represents a DUContext within a TopDUContext, without storing the TopDUContext(It must be given to da...
Definition: localindexedducontext.h:33
virtual QVector< Import > importedParentContexts() const
Returns the list of imported parent contexts for this context.
Definition: ducontext.cpp:1220
void setExplicitlyGlobal(bool eg)
Definition: identifier.cpp:893
QVector< Declaration * > m_localDeclarations
Definition: ducontextdynamicdata.h:85
const IndexedIdentifier & globalIndexedImportIdentifier()
This is the identifier that can be used to search namespace-import declarations, and should be used t...
Definition: ducontext.cpp:96
DUContext * data(TopDUContext *top) const
Definition: localindexedducontext.cpp:52
Represents a declaration only by its global indices.
Definition: indexeddeclaration.h:33
int findUseAt(const CursorInRevision &position) const
Find the use which encompasses position, if one exists.
Definition: ducontext.cpp:1434
#define ENSURE_CAN_WRITE
Like the ENSURE_CHAIN_WRITE_LOCKED and .._READ_LOCKED, except that this should be used in items that ...
Definition: duchainlock.h:184
QVector< RangeInRevision > allUses(DUContext *context, int declarationIndex, bool noEmptyUses)
Collects all uses of the given declarationIndex.
Definition: ducontext.cpp:1519
DUContext * context(const TopDUContext *topContext, bool instantiateIfRequired=true) const
Definition: ducontext.cpp:1682
#define FOREACH_FUNCTION(item, container)
Foreach macro that takes a container and a function-name, and will iterate through the vector returne...
Definition: appendedlist.h:213
void deleteChildContextsRecursively()
Clears and deletes all child contexts recursively.
Definition: ducontext.cpp:1061
void addDeclaration(Declaration *declaration)
Definition: ducontext.cpp:204
virtual bool inDUChain() const
Returns true if this declaration is accessible through the du-chain, and thus cannot be edited withou...
Definition: ducontext.cpp:1191
uint allocateContextIndex(DUContext *ctx, bool temporary)
Allocates an index for the given context in this top-context.
Definition: topducontextdynamicdata.cpp:806
virtual QVector< DUContext * > importers() const
Returns the list of contexts importing this context.
Definition: ducontext.cpp:898
Internal, do not use from outside.
Definition: ducontext.h:118
DUContext * findContextIncluding(const RangeInRevision &range) const
Find the context which most specifically covers range.
Definition: ducontext.cpp:1418
KDevVarLengthArray< IndexedDUContext > importers(const DeclarationId &id) const
Gets the top-contexts of all users assigned to the declaration-id.
Definition: importers.cpp:189
RangeInRevision range() const
Returns the range assigned to this object, in the document revision when this document was last parse...
Definition: duchainbase.cpp:152
When this is given, only function-declarations are returned.
Definition: ducontext.h:128
QVector< Declaration * > clearLocalDeclarations()
Clears all local declarations.
Definition: ducontext.cpp:1072
KDEVPLATFORMLANGUAGE_EXPORT IndexedDUContext KDEVPLATFORMLANGUAGE_EXPORT m_localDeclarations
Definition: ducontextdata.h:58
Should be set when no filtering at all is wished, not even filtering that is natural for the underlyi...
Definition: ducontext.h:126
The top context in a definition-use chain for one source file.
Definition: topducontext.h:113
virtual IndexedInstantiationInformation specialization() const
TODO document.
Definition: declaration.cpp:550
static Uses * uses()
Returns the structure that manages mapping between declarations, and which top level contexts contain...
Definition: duchain.cpp:1689
QualifiedIdentifier localScopeIdentifier() const
Scope identifier, used to qualify the identifiers occurring in each context.
Definition: ducontext.cpp:1122
Declaration * declaration() const
Definition: indexeddeclaration.cpp:44
void removeImporter(const DeclarationId &id, const IndexedDUContext &use)
Removes the given top-context from the list of uses.
Definition: importers.cpp:163
DUContext * context() const
Access the parent context of this declaration.
Definition: declaration.cpp:279
bool isEmpty() const
Represents executable code, like for example within a compound-statement.
Definition: ducontext.h:113
IndexedQualifiedIdentifier indexedLocalScopeIdentifier() const
Same as localScopeIdentifier(), but faster.
Definition: ducontext.cpp:1129
void clearContextIndex(DUContext *ctx)
Definition: topducontextdynamicdata.cpp:869
DUContextPointer m_parentContext
Definition: ducontextdynamicdata.h:74
virtual void mergeDeclarationsInternal(QVector< QPair< Declaration *, int >> &definitions, const CursorInRevision &position, QHash< const DUContext *, bool > &hadContexts, const TopDUContext *source, bool searchInParents=true, int currentDepth=0) const
Merges definitions and their inheritance-depth up all branches of the definition-use chain into one h...
Definition: ducontext.cpp:975
void setInternalContext(DUContext *context)
Set the internal context for this declaration.
Definition: declaration.cpp:431
QVector< QualifiedIdentifier > fullyApplyAliases(const QualifiedIdentifier &id, const TopDUContext *source) const
Returns the qualified identifier id with all aliases (for example namespace imports) applied.
Definition: ducontext.cpp:764
void reserve(int size)
Definition: duchainbase.h:29
IF this flag is set, findDeclarations(..) will not search for the identifier in parent-contexts(which...
Definition: ducontext.h:120
QExplicitlySharedDataPointer< AbstractNavigationContext > NavigationContextPointer
Definition: abstractnavigationcontext.h:62
Declaration * findDeclarationAt(const CursorInRevision &position) const
Find a child declaration that has a rang that covers the given position.
Definition: ducontext.cpp:1402
bool isAnonymous() const
Whether this context, or any of its parent contexts, has been inserte anonymously into the du-chain.
Definition: ducontext.cpp:388
const Identifier & globalImportIdentifier()
We leak here, to prevent a possible crash during destruction, as the destructor of Identifier is not ...
Definition: ducontext.cpp:84
bool contains(const T &value) const
virtual DeclarationId id(bool forceDirect=false) const
Definition: declaration.cpp:564
QString toString(IdentifierStringFormattingOptions options=NoOptions) const
Definition: identifier.cpp:798
QVector< DUContext * > childContexts() const
Returns the list of immediate child contexts for this context.
Definition: ducontext.cpp:479
virtual void visit(DUContext *context)=0
virtual CursorInRevision importPosition(const DUContext *target) const
If the given context is directly imported into this one, and addImportedParentContext(....
Definition: ducontext.cpp:1208
bool inDUChain() const override
Returns true if this object is registered in the du-chain. If it is not, all sub-objects(context,...
Definition: topducontext.cpp:1114
uint ownIndex() const
Returns an index that uniquely identifies this declaration within its surrounding top-context.
Definition: declaration.cpp:114
#define REGISTER_DUCHAIN_ITEM(Class)
You must add this into your source-files for every DUChainBase based class For this to work,...
Definition: duchainregister.h:235
QList< Declaration * > findLocalDeclarations(const IndexedIdentifier &identifier, const CursorInRevision &position=CursorInRevision::invalid(), const TopDUContext *topContext=nullptr, const AbstractType::Ptr &dataType=AbstractType::Ptr(), SearchFlags flags=NoSearchFlags) const
Returns the type of any identifier defined in this context, or null if one is not found.
Definition: ducontext.cpp:535
bool usesRangeLessThan(const Use &left, const Use &right)
Definition: ducontext.cpp:1338
Represents a declaration only by its index within the top-context.
Definition: localindexeddeclaration.h:32
This class contains data that is only runtime-dependent and does not need to be stored to disk.
Definition: ducontextdynamicdata.h:46
Definition: ducontext.h:49
virtual void visit(DUChainVisitor &visitor)
Visits all duchain objects in the whole duchain.
Definition: ducontext.cpp:1709
void findLocalDeclarationsInternal(const Identifier &identifier, const CursorInRevision &position, const AbstractType::Ptr &dataType, DeclarationList &ret, const TopDUContext *source, SearchFlags flags) const
Definition: ducontext.cpp:622
void cleanIfNotEncountered(const QSet< DUChainBase * > &encountered)
Delete and remove all slaves (uses, declarations, definitions, contexts) that are not in the given se...
Definition: ducontext.cpp:1472
bool addIndirectImport(const DUContext::Import &import)
Adds an imported context, which may be indirect.
Definition: ducontext.cpp:823
virtual DUContext * logicalInternalContext(const TopDUContext *topContext) const
Determine the logical internal context for the resolved form of this declaration.
Definition: declaration.cpp:396
DUChainPointer< DUContext > DUContextPointer
Definition: duchainpointer.h:198
DUChainPointer< TopDUContext > TopDUContextPointer
Definition: duchainpointer.h:199
Definition: abstractfunctiondeclaration.cpp:27
static bool sortByRange(const DUChainBase *lhs, const DUChainBase *rhs)
Definition: ducontext.cpp:1724
const_iterator insert(const T &value)
QVector< QPair< Declaration *, int > > allDeclarations(const CursorInRevision &position, const TopDUContext *topContext, bool searchInParents=true) const
Return a list of all reachable declarations for a given cursor position in a given url.
Definition: ducontext.cpp:951
A single context in source code, represented as a node in a directed acyclic graph.
Definition: ducontext.h:72
bool deleting() const
Returns true if this object is being deleted, otherwise false.
Definition: topducontext.cpp:958
const Identifier & globalAliasIdentifier()
This is the identifier that can be used to search namespace-alias declarations.
Definition: ducontext.cpp:90
int usesCount() const
Returns the count of uses that can be accessed through uses()
Definition: ducontext.cpp:1333
virtual bool foundEnough(const DeclarationList &decls, SearchFlags flags) const
After one scope was searched, this function is asked whether more results should be collected.
Definition: ducontext.cpp:674
bool isPropagateDeclarations() const
Definition: ducontext.cpp:530
QList< T > toList() const
DUContext * internalContext() const
Retrieve the context that is opened by this declaration, if one exists.
Definition: declaration.cpp:425
DUContext(const RangeInRevision &range, DUContext *parent=nullptr, bool anonymous=false)
Constructor.
Definition: ducontext.cpp:356
QVector< QualifiedIdentifier > toList(const QualifiedIdentifier &prefix=QualifiedIdentifier()) const
Definition: ducontext.cpp:1616
Declaration * owner() const
If this context was opened by a declaration or definition, this returns that item.
Definition: ducontext.cpp:486
const Use * uses() const
Uses: A "Use" represents any position in a document where a Declaration is used literally.
Definition: ducontext.cpp:1321
TopDUContext * m_topContext
Definition: ducontextdynamicdata.h:76
void scopeIdentifier(bool includeClasses, QualifiedIdentifier &target) const
Definition: ducontext.cpp:170
bool contains(const Key &key) const
const IndexedIdentifier & globalIndexedAliasIdentifier()
This is the identifier that can be used to search namespace-alias declarations.
Definition: ducontext.cpp:102
void addImporter(const DeclarationId &id, const IndexedDUContext &use)
Adds a top-context to the users-list of the given id.
Definition: importers.cpp:136
virtual QVector< Declaration * > localDeclarations(const TopDUContext *source=nullptr) const
Returns all local declarations.
Definition: ducontext.cpp:967
bool imports(const DUContext *context, const TopDUContext *source, QSet< const DUContextDynamicData * > *recursionGuard) const
Returns true if this context is imported by the given one, on any level.
Definition: ducontext.cpp:179
DUChainPointer< Declaration > DeclarationPointer
Definition: duchainpointer.h:200
bool isOnDisk() const
Whether this top-context has a stored version on disk.
Definition: topducontext.cpp:1125
virtual void applyUpwardsAliases(SearchItem::PtrList &identifiers, const TopDUContext *source) const
Applies the aliases that need to be applied when moving the search from this context up to the parent...
Definition: ducontext.cpp:1288
class TopDUContextDynamicData * m_dynamicData
Definition: topducontext.h:381
void applyAliases(const SearchItem::PtrList &identifiers, SearchItem::PtrList &targetIdentifiers, const CursorInRevision &position, bool canBeNamespace, bool onlyImports=false) const
Applies namespace-imports and namespace-aliases and returns possible absolute identifiers that need t...
Definition: ducontext.cpp:1230
void addImportedChildContext(DUContext *context)
Definition: ducontext.cpp:307
bool isExplicitlyGlobal
Definition: ducontext.h:759
bool match(const QualifiedIdentifier &id, int offset=0) const
Returns true if the given identifier matches one of the identifiers represented by this SearchItem.
Definition: ducontext.cpp:1580
DUContext * parentContext() const
Returns the immediate parent context of this context.
Definition: ducontext.cpp:512
void removeImportedChildContext(DUContext *context)
Definition: ducontext.cpp:328
QualifiedIdentifier scopeIdentifier(bool includeClasses=false) const
Calculate the fully qualified scope identifier.
Definition: ducontext.cpp:1082
void setPropagateDeclarations(bool propagate)
If this is set to true, all declarations that are added to this context will also be visible in the p...
Definition: ducontext.cpp:519
DUContext * findContext(const CursorInRevision &position, DUContext *parent=nullptr) const
Searches for the most specific context for the given cursor position in the given url.
Definition: ducontext.cpp:919
bool removeDeclaration(Declaration *declaration)
Removes the declaration from localDeclarations.
Definition: ducontext.cpp:241
Represents a context only by its global indices.
Definition: indexedducontext.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Mar 7 2021 23:29:30 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Mar 7 2021 23:29:30 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.