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

language/duchain

functiondeclaration.h

00001 /* This file is part of KDevelop
00002     Copyright 2002-2005 Roberto Raggi <roberto@kdevelop.org>
00003     Copyright 2006 Adam Treat <treat@kde.org>
00004     Copyright 2006-2007 Hamish Rodda <rodda@kde.org>
00005     Copyright 2007-2008 David Nolden <david.nolden.kdevelop@art-master.de>
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Library General Public
00009    License version 2 as published by the Free Software Foundation.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019    Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef FUNCTIONDECLARATION_H
00023 #define FUNCTIONDECLARATION_H
00024 
00025 #include "declaration.h"
00026 #include "abstractfunctiondeclaration.h"
00027 #include "declarationdata.h"
00028 
00029 namespace KDevelop
00030 {
00031 KDEVPLATFORMLANGUAGE_EXPORT DECLARE_LIST_MEMBER_HASH(FunctionDeclarationData, m_defaultParameters, IndexedString)
00032 
00033 class KDEVPLATFORMLANGUAGE_EXPORT FunctionDeclarationData : public DeclarationData, public AbstractFunctionDeclarationData
00034 {
00035   public:
00036     FunctionDeclarationData()
00037     {
00038       initializeAppendedLists();
00039     }
00040     FunctionDeclarationData( const FunctionDeclarationData& rhs )
00041       :DeclarationData( rhs ), AbstractFunctionDeclarationData(rhs)
00042     {
00043       initializeAppendedLists();
00044       copyListsFrom(rhs);
00045     }
00046     ~FunctionDeclarationData()
00047     {
00048       freeAppendedLists();
00049     }
00050 
00051     START_APPENDED_LISTS_BASE(FunctionDeclarationData, DeclarationData);
00052     APPENDED_LIST_FIRST(FunctionDeclarationData, IndexedString, m_defaultParameters);
00053     END_APPENDED_LISTS(FunctionDeclarationData, m_defaultParameters);
00054 };
00058 typedef MergeAbstractFunctionDeclaration<Declaration, FunctionDeclarationData> FunctionDeclarationBase;
00059 class KDEVPLATFORMLANGUAGE_EXPORT FunctionDeclaration : public FunctionDeclarationBase
00060 {
00061 public:
00062   FunctionDeclaration(const FunctionDeclaration& rhs);
00063   FunctionDeclaration(const SimpleRange& range, DUContext* context);
00064   FunctionDeclaration(FunctionDeclarationData& data);
00065   FunctionDeclaration(FunctionDeclarationData& data, const KDevelop::SimpleRange&);
00066   virtual ~FunctionDeclaration();
00067 
00068   virtual void setAbstractType(AbstractType::Ptr type);
00069 
00070   virtual QString toString() const;
00071 
00072   virtual bool isFunctionDeclaration() const;
00073   
00074   virtual uint additionalIdentity() const;
00075   
00076   virtual const IndexedString* defaultParameters() const;
00077   virtual unsigned int defaultParametersSize() const;
00078   virtual void addDefaultParameter(const IndexedString& str);
00079   virtual void clearDefaultParameters();
00080   
00081   enum {
00082     Identity = 12
00083   };
00084   
00085   typedef Declaration Base;
00086 
00087 private:
00088   virtual Declaration* clonePrivate() const;
00089   DUCHAIN_DECLARE_DATA(FunctionDeclaration)
00090 };
00091 }
00092 
00093 #endif // FUNCTIONDECLARATION_H
00094 
00095 // kate: space-indent on; indent-width 2; tab-width 4; replace-tabs on; auto-insert-doxygen on

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