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

language/duchain

arraytype.h

00001 /* This file is part of KDevelop
00002     Copyright 2006 Roberto Raggi <roberto@kdevelop.org>
00003     Copyright 2006-2008 Hamish Rodda <rodda@kde.org>
00004     Copyright 2007-2008 David Nolden <david.nolden.kdevelop@art-master.de>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef ARRAYTYPE_H
00022 #define ARRAYTYPE_H
00023 
00024 #include "abstracttype.h"
00025 
00026 namespace KDevelop
00027 {
00028 class ArrayTypeData;
00029 
00030 class KDEVPLATFORMLANGUAGE_EXPORT ArrayType : public AbstractType
00031 {
00032 public:
00033   typedef TypePtr<ArrayType> Ptr;
00034 
00036   ArrayType();
00038   ArrayType(const ArrayType& rhs);
00040   ArrayType(ArrayTypeData& data);
00042   virtual ~ArrayType();
00043 
00044   virtual AbstractType* clone() const;
00045 
00046   virtual bool equals(const AbstractType* rhs) const;
00047 
00054   int dimension () const;
00055 
00061   void setDimension(int dimension);
00062 
00068   AbstractType::Ptr elementType () const;
00069 
00075   void setElementType(AbstractType::Ptr type);
00076 
00077   virtual QString toString() const;
00078 
00079   virtual uint hash() const;
00080 
00081   virtual WhichType whichType() const;
00082 
00083   virtual void exchangeTypes( TypeExchanger* exchanger );
00084 
00085   enum {
00086     Identity = 7
00087   };
00088 
00089   typedef ArrayTypeData Data;
00090 
00091 protected:
00092   virtual void accept0 (TypeVisitor *v) const;
00093 
00094   TYPE_DECLARE_DATA(ArrayType)
00095 };
00096 
00097 template<>
00098 inline ArrayType* fastCast<ArrayType*>(AbstractType* from) {
00099   if(!from || from->whichType() != AbstractType::TypeArray)
00100     return 0;
00101   else
00102     return static_cast<ArrayType*>(from);
00103 }
00104 
00105 }
00106 
00107 #endif // TYPESYSTEM_H
00108 
00109 // 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