kdevplatform/language/duchain
#include <functiondefinition.h>

Public Types | |
enum | { Identity = 21 } |
![]() | |
enum | { Identity = 12 } |
using | Base = Declaration |
Static Public Member Functions | |
static Declaration * | definition (const Declaration *decl) |
Protected Member Functions | |
FunctionDefinition (const FunctionDefinition &rhs) | |
Detailed Description
A FunctionDefinition represents a function-definition that is assigned to a separate function-declaration.
It allows mapping from definition to declaration and from declaration to definition.
Definition at line 35 of file functiondefinition.h.
Member Enumeration Documentation
◆ anonymous enum
anonymous enum |
Enumerator | |
---|---|
Identity |
Definition at line 59 of file functiondefinition.h.
Constructor & Destructor Documentation
◆ FunctionDefinition() [1/3]
KDevelop::FunctionDefinition::FunctionDefinition | ( | const RangeInRevision & | range, |
DUContext * | context | ||
) |
Definition at line 30 of file functiondefinition.cpp.
◆ FunctionDefinition() [2/3]
|
explicit |
Definition at line 26 of file functiondefinition.cpp.
◆ ~FunctionDefinition()
|
override |
Definition at line 44 of file functiondefinition.cpp.
◆ FunctionDefinition() [3/3]
|
protected |
Definition at line 39 of file functiondefinition.cpp.
Member Function Documentation
◆ declaration()
Declaration * KDevelop::FunctionDefinition::declaration | ( | const TopDUContext * | topContext = nullptr | ) | const |
Find the declaration for this definition, if one exists.
- Parameters
-
topContext the top-context from which to search
- Returns
- the declaration matching this definition, otherwise null if no matching declaration has been found.
Definition at line 50 of file functiondefinition.cpp.
◆ definition()
|
static |
Find the definition for the given declaration, if one exists.
- Returns
- the definition matching this declaration, otherwise null if no matching definition has been found.
- Todo:
- Find better ways of deciding which definition to use
Definition at line 85 of file functiondefinition.cpp.
◆ hasDeclaration()
bool KDevelop::FunctionDefinition::hasDeclaration | ( | ) | const |
Returns true if a Declaration has been assigned to this Definition.
Definition at line 65 of file functiondefinition.cpp.
◆ operator=()
|
delete |
◆ setDeclaration()
void KDevelop::FunctionDefinition::setDeclaration | ( | Declaration * | declaration | ) |
Attaches this definition to the given declaration persistently.
Definition at line 70 of file functiondefinition.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 16 2021 23:30:10 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.