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

language/duchain

classfunctiondeclaration.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 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 CLASSFUNCTIONDECLARATION_H
00023 #define CLASSFUNCTIONDECLARATION_H
00024 
00025 #include "classmemberdeclaration.h"
00026 #include "abstractfunctiondeclaration.h"
00027 #include "classmemberdeclarationdata.h"
00028 
00029 namespace KDevelop
00030 {
00031 
00032 enum ClassFunctionFlags
00033 {
00034   FunctionFlagNormal = 0,
00035   FunctionSignalFlag = 1 <<  1,
00036   FunctionSlotFlag = 1 << 2,
00037   AbstractFunctionFlag = 1 << 3,
00038   FinalFunctionFlag = 1 << 4
00039 };
00040 
00041 KDEVPLATFORMLANGUAGE_EXPORT DECLARE_LIST_MEMBER_HASH(ClassFunctionDeclarationData, m_defaultParameters, IndexedString)
00042 
00043 class KDEVPLATFORMLANGUAGE_EXPORT ClassFunctionDeclarationData : public ClassMemberDeclarationData, public AbstractFunctionDeclarationData
00044 {
00045 public:
00046   ClassFunctionDeclarationData() {
00047     initializeAppendedLists();
00048     m_functionFlags = FunctionFlagNormal;
00049   }
00050   ClassFunctionDeclarationData( const ClassFunctionDeclarationData& rhs )
00051       : ClassMemberDeclarationData( rhs ), AbstractFunctionDeclarationData(rhs)
00052   {
00053     initializeAppendedLists();
00054     copyListsFrom(rhs);
00055     m_functionFlags = rhs.m_functionFlags;
00056   }
00057   ~ClassFunctionDeclarationData() {
00058     freeAppendedLists();
00059   }
00060   ClassFunctionFlags m_functionFlags;
00061   START_APPENDED_LISTS_BASE(ClassFunctionDeclarationData, ClassMemberDeclarationData);
00062   APPENDED_LIST_FIRST(ClassFunctionDeclarationData, IndexedString, m_defaultParameters);
00063   END_APPENDED_LISTS(ClassFunctionDeclarationData, m_defaultParameters);
00064 };
00068 typedef MergeAbstractFunctionDeclaration<ClassMemberDeclaration, ClassFunctionDeclarationData> ClassFunctionDeclarationBase;
00069 class KDEVPLATFORMLANGUAGE_EXPORT ClassFunctionDeclaration : public ClassFunctionDeclarationBase
00070 {
00071 public:
00072   ClassFunctionDeclaration(const SimpleRange& range, DUContext* context);
00073   ClassFunctionDeclaration(ClassFunctionDeclarationData& data, const SimpleRange& range, DUContext* context);
00074   ClassFunctionDeclaration(ClassFunctionDeclarationData& data);
00075   ~ClassFunctionDeclaration();
00076 
00078   bool isSignal() const;
00079   void setIsSignal(bool);
00080   
00082   bool isSlot() const;
00083   void setIsSlot(bool);
00084   
00086   bool isAbstract() const;
00087   void setIsAbstract(bool);
00088   
00090   bool isFinal() const;
00091   void setIsFinal(bool);
00092   
00093   virtual bool isConstructor() const;
00094   virtual bool isDestructor() const;
00095   
00096   bool isConversionFunction() const;
00097 
00098   bool isFunctionDeclaration() const;
00099 
00100   void setIsExternalDefinition(bool);
00101 
00102   virtual QString toString() const;
00103 
00104   virtual void setAbstractType(AbstractType::Ptr type);
00105 
00106   virtual Declaration* clonePrivate() const;
00107   
00108   virtual uint additionalIdentity() const;
00109   
00110   virtual const IndexedString* defaultParameters() const;
00111   virtual unsigned int defaultParametersSize() const;
00112   virtual void addDefaultParameter(const IndexedString& str);
00113   virtual void clearDefaultParameters();
00114   
00115   enum {
00116     Identity = 14
00117   };
00118   
00119 protected:
00120   ClassFunctionDeclaration(const ClassFunctionDeclaration& rhs);
00121 private:
00122   DUCHAIN_DECLARE_DATA(ClassFunctionDeclaration)
00123 };
00124 }
00125 
00126 #endif // CLASSFUNCTIONDECLARATION_H
00127 
00128 // 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