language/duchain
functiondefinition.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef CLASSFUNCTIONDEFINITION_H
00019 #define CLASSFUNCTIONDEFINITION_H
00020
00021 #include "functiondeclaration.h"
00022 #include "../languageexport.h"
00023
00024 using namespace KDevelop;
00025
00026 namespace KDevelop {
00027 class KDEVPLATFORMLANGUAGE_EXPORT FunctionDefinitionData : public FunctionDeclarationData {
00028 public:
00029
00030
00031 DeclarationId m_declaration;
00032 };
00035 class KDEVPLATFORMLANGUAGE_EXPORT FunctionDefinition : public FunctionDeclaration {
00036 public:
00037 FunctionDefinition(const SimpleRange& range, DUContext* context);
00038 FunctionDefinition(FunctionDefinitionData& data);
00039 ~FunctionDefinition();
00040
00047 Declaration* declaration(TopDUContext* topContext = 0) const;
00048
00050 bool hasDeclaration() const;
00051
00053 void setDeclaration(Declaration* declaration);
00054
00055 enum {
00056 Identity = 21
00057 };
00058
00064 static FunctionDefinition* definition(const Declaration* decl);
00065
00066 protected:
00067 FunctionDefinition (const FunctionDefinition& rhs);
00068 private:
00069 virtual Declaration* clonePrivate() const;
00070 DUCHAIN_DECLARE_DATA(FunctionDefinition)
00071 };
00072 }
00073
00074 #endif