kdevplatform/language/duchain
functiondefinition.cpp
Go to the documentation of this file.
39 FunctionDefinition::FunctionDefinition(const FunctionDefinition& rhs) : FunctionDeclaration(*new FunctionDefinitionData(
96 const KDevVarLengthArray<IndexedDeclaration> allDefinitions = DUChain::definitions()->definitions(decl->id());
void addDefinition(const DeclarationId &id, const IndexedDeclaration &definition)
Assigns.
Definition: definitions.cpp:180
Declaration * declaration(const TopDUContext *topContext=nullptr) const
Find the declaration for this definition, if one exists.
Definition: functiondefinition.cpp:50
bool hasDeclaration() const
Returns true if a Declaration has been assigned to this Definition.
Definition: functiondefinition.cpp:65
REGISTER_DUCHAIN_ITEM(AliasDeclaration)
void removeDefinition(const DeclarationId &id, const IndexedDeclaration &definition)
Definition: definitions.cpp:207
virtual bool isFunctionDeclaration() const
Determine whether this declaration is a function declaration.
Definition: declaration.cpp:655
Represents a single declaration in a definition-use chain.
Definition: declaration.h:51
#define ENSURE_CHAIN_READ_LOCKED
Macros for ensuring the DUChain is locked properly.
Definition: duchainlock.h:37
Represents a declaration only by its global indices.
Definition: indexeddeclaration.h:33
#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
A FunctionDefinition represents a function-definition that is assigned to a separate function-declara...
Definition: functiondefinition.h:35
static Definitions * definitions()
Returns the structure that manages mapping between definitions and declarations.
Definition: duchain.cpp:1694
The top context in a definition-use chain for one source file.
Definition: topducontext.h:113
virtual DeclarationId id(bool forceDirect=false) const
Definition: declaration.cpp:564
KDevVarLengthArray< IndexedDeclaration > definitions(const DeclarationId &id) const
Gets all the known definitions assigned to id.
Definition: definitions.cpp:233
void setDeclaration(Declaration *declaration)
Attaches this definition to the given declaration persistently.
Definition: functiondefinition.cpp:70
Definition: abstractfunctiondeclaration.cpp:27
A single context in source code, represented as a node in a directed acyclic graph.
Definition: ducontext.h:72
static Declaration * definition(const Declaration *decl)
Find the definition for the given declaration, if one exists.
Definition: functiondefinition.cpp:85
~FunctionDefinition() override
Definition: functiondefinition.cpp:44
FunctionDefinition(const RangeInRevision &range, DUContext *context)
Definition: functiondefinition.cpp:30
bool isDefinition() const
Determine whether this declaration is also a definition.
Definition: declaration.cpp:472
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 23:31:17 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 23:31:17 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.