• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/language/duchain

  • KDevelop
  • FunctionDefinition
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
KDevelop::FunctionDefinition Class Reference

#include <functiondefinition.h>

Inheritance diagram for KDevelop::FunctionDefinition:
Inheritance graph
[legend]

Public Types

enum  { Identity = 21 }
 
- Public Types inherited from KDevelop::FunctionDeclaration
enum  { Identity = 12 }
 
using Base = Declaration
 

Public Member Functions

 FunctionDefinition (const RangeInRevision &range, DUContext *context)
 
 FunctionDefinition (FunctionDefinitionData &data)
 
 ~FunctionDefinition () override
 
Declaration * declaration (const TopDUContext *topContext=nullptr) const
 
bool hasDeclaration () const
 
FunctionDefinition & operator= (const FunctionDefinition &rhs)=delete
 
void setDeclaration (Declaration *declaration)
 
- Public Member Functions inherited from KDevelop::FunctionDeclaration
 FunctionDeclaration (const FunctionDeclaration &rhs)
 
 FunctionDeclaration (const RangeInRevision &range, DUContext *context)
 
 FunctionDeclaration (FunctionDeclarationData &data)
 
 FunctionDeclaration (FunctionDeclarationData &data, const KDevelop::RangeInRevision &)
 
 ~FunctionDeclaration () override
 
void addDefaultParameter (const IndexedString &str) override
 
uint additionalIdentity () const override
 
void clearDefaultParameters () override
 
const IndexedString * defaultParameters () const override
 
unsigned int defaultParametersSize () const override
 
bool isFunctionDeclaration () const override
 
FunctionDeclaration & operator= (const FunctionDeclaration &rhs)=delete
 
void setAbstractType (AbstractType::Ptr type) override
 
QString toString () const override
 

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]

KDevelop::FunctionDefinition::FunctionDefinition ( FunctionDefinitionData &  data)
explicit

Definition at line 26 of file functiondefinition.cpp.

◆ ~FunctionDefinition()

KDevelop::FunctionDefinition::~FunctionDefinition ( )
override

Definition at line 44 of file functiondefinition.cpp.

◆ FunctionDefinition() [3/3]

KDevelop::FunctionDefinition::FunctionDefinition ( const FunctionDefinition &  rhs)
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
topContextthe 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()

Declaration * 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 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=()

FunctionDefinition& KDevelop::FunctionDefinition::operator= ( const FunctionDefinition &  rhs)
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:
  • functiondefinition.h
  • functiondefinition.cpp
This file is part of the KDE documentation.
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.

kdevplatform/language/duchain

Skip menu "kdevplatform/language/duchain"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal