• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

language/duchain

KDevelop::FunctionDefinition

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.

List of all members.

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:
  • functiondefinition.h
  • functiondefinition.cpp

language/duchain

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

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal