language/duchain
KDevelop::FunctionDefinition Class Reference
A FunctionDefinition represents a function-definition that is assigned to a separate function-declaration. More...
#include <functiondefinition.h>
Inherits KDevelop::FunctionDeclaration.
Public Types | |
| enum | { Identity = 21 } |
Public Member Functions | |
| FunctionDefinition (FunctionDefinitionData &data) | |
| FunctionDefinition (const SimpleRange &range, DUContext *context) | |
| Declaration * | declaration (TopDUContext *topContext=0) const |
| bool | hasDeclaration () const |
| void | setDeclaration (Declaration *declaration) |
Static Public Member Functions | |
| static FunctionDefinition * | 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 Function Documentation
| Declaration * KDevelop::FunctionDefinition::declaration | ( | TopDUContext * | topContext = 0 |
) | 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 46 of file functiondefinition.cpp.
| FunctionDefinition * KDevelop::FunctionDefinition::definition | ( | const Declaration * | decl | ) | [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 80 of file functiondefinition.cpp.
| bool KDevelop::FunctionDefinition::hasDeclaration | ( | ) | const |
Returns true if a Declaration has been assigned to this Definition.
Definition at line 60 of file functiondefinition.cpp.
| void KDevelop::FunctionDefinition::setDeclaration | ( | Declaration * | declaration | ) |
Attaches this definition to the given declaration persistently.
Definition at line 65 of file functiondefinition.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference