MCPcopy Create free account
hub / github.com/KDE/kdevelop / setInSymbolTable

Method setInSymbolTable

kdevplatform/language/duchain/declaration.cpp:614–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612}
613
614void Declaration::setInSymbolTable(bool inSymbolTable)
615{
616 DUCHAIN_D_DYNAMIC(Declaration);
617 if (!d->m_identifier.isEmpty()) {
618 if (!d->m_inSymbolTable && inSymbolTable) {
619 QualifiedIdentifier id(qualifiedIdentifier());
620 PersistentSymbolTable::self().addDeclaration(id, this);
621
622 CodeModel::self().addItem(url(), id, kindForDeclaration(this));
623 } else if (d->m_inSymbolTable && !inSymbolTable) {
624 QualifiedIdentifier id(qualifiedIdentifier());
625 PersistentSymbolTable::self().removeDeclaration(id, this);
626
627 CodeModel::self().removeItem(url(), id);
628 }
629 }
630 d->m_inSymbolTable = inSymbolTable;
631}
632
633TopDUContext* Declaration::topContext() const
634{

Callers

nothing calls this directly

Calls 7

urlFunction · 0.85
kindForDeclarationFunction · 0.85
removeItemMethod · 0.80
isEmptyMethod · 0.45
addDeclarationMethod · 0.45
addItemMethod · 0.45
removeDeclarationMethod · 0.45

Tested by

no test coverage detected