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

kdevplatform/language/duchain

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • language
  • duchain
functiondefinition.h
Go to the documentation of this file.
1 /* This file is part of KDevelop
2  Copyright 2008 David Nolden <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17  */
18 #ifndef KDEVPLATFORM_CLASSFUNCTIONDEFINITION_H
19 #define KDEVPLATFORM_CLASSFUNCTIONDEFINITION_H
20 
21 #include "functiondeclaration.h"
22 #include <language/languageexport.h>
23 
24 namespace KDevelop {
25 class KDEVPLATFORMLANGUAGE_EXPORT FunctionDefinitionData
26  : public FunctionDeclarationData
27 {
28 public:
29 
30  //Holds the declaration id for this definition, if this is a definition with separate declaration
31  DeclarationId m_declaration;
32 };
35 class KDEVPLATFORMLANGUAGE_EXPORT FunctionDefinition
36  : public FunctionDeclaration
37 {
38 public:
39  FunctionDefinition(const RangeInRevision& range, DUContext* context);
40  explicit FunctionDefinition(FunctionDefinitionData& data);
41  ~FunctionDefinition() override;
42 
43  FunctionDefinition& operator=(const FunctionDefinition& rhs) = delete;
44 
51  Declaration* declaration(const TopDUContext* topContext = nullptr) const;
52 
54  bool hasDeclaration() const;
55 
57  void setDeclaration(Declaration* declaration);
58 
59  enum {
60  Identity = 21
61  };
62 
68  static Declaration* definition(const Declaration* decl);
69 
70 protected:
71  FunctionDefinition (const FunctionDefinition& rhs);
72 
73 private:
74  Declaration* clonePrivate() const override;
75  DUCHAIN_DECLARE_DATA(FunctionDefinition)
76 };
77 }
78 
79 #endif
DUCHAIN_DECLARE_DATA
#define DUCHAIN_DECLARE_DATA(Class)
Use this to declare the data functions in your DUChainBase based class.
Definition: duchainbase.h:41
KDevelop::Declaration
Represents a single declaration in a definition-use chain.
Definition: declaration.h:51
functiondeclaration.h
KDevelop::FunctionDefinition
A FunctionDefinition represents a function-definition that is assigned to a separate function-declara...
Definition: functiondefinition.h:35
KDevelop::TopDUContext
The top context in a definition-use chain for one source file.
Definition: topducontext.h:113
KDevelop::DeclarationId
Allows clearly identifying a Declaration.
Definition: declarationid.h:50
KDevelop::FunctionDefinitionData
Definition: functiondefinition.h:25
KDevelop
Definition: abstractfunctiondeclaration.cpp:27
KDevelop::DUContext
A single context in source code, represented as a node in a directed acyclic graph.
Definition: ducontext.h:72
KDevelop::FunctionDeclaration
Definition: functiondeclaration.h:62
KDevelop::FunctionDefinitionData::m_declaration
DeclarationId m_declaration
Definition: functiondefinition.h:31
FunctionDeclarationData
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Apr 14 2021 23:30:27 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