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

language/duchain

integraltype.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 INTEGRALTYPE_H
00022 #define INTEGRALTYPE_H
00023 
00024 #include "abstracttype.h"
00025 #include "typesystemdata.h"
00026 
00027 namespace KDevelop
00028 {
00029 class IntegralTypeData;
00030 class IndexedString;
00031 
00038 class KDEVPLATFORMLANGUAGE_EXPORT IntegralType: public AbstractType
00039 {
00040 public:
00041   typedef TypePtr<IntegralType> Ptr;
00042 
00048   enum CommonIntegralTypes {
00049     TypeVoid,
00050     TypeNone,
00051     TypeNull,
00052     TypeChar,
00053     TypeBoolean,
00054     TypeByte,
00055     TypeSbyte,
00056     TypeShort,
00057     TypeInt,
00058     TypeLong,
00059     TypeFloat,
00060     TypeDouble,
00061     TypeWchar_t,
00062     TypeString,
00063     TypeMixed,
00064     TypeLanguageSpecific = 200
00065   };
00066 
00068   IntegralType(uint type = TypeNone);
00070   IntegralType(const IntegralType& rhs);
00072   IntegralType(IntegralTypeData& data);
00074   virtual ~IntegralType();
00075 
00081   uint dataType() const;
00082 
00088   void setDataType(uint dataType);
00089 
00090   virtual QString toString() const;
00091 
00092   virtual uint hash() const;
00093 
00094   virtual WhichType whichType() const;
00095 
00096   virtual AbstractType* clone() const;
00097 
00098   virtual bool equals(const AbstractType* rhs) const;
00099 
00100   enum {
00101     Identity = 2
00102   };
00103 
00104   typedef IntegralTypeData Data;
00105 
00106 protected:
00107   virtual void accept0 (TypeVisitor *v) const;
00108 
00109   TYPE_DECLARE_DATA(IntegralType)
00110 };
00111 
00112 template<>
00113 inline IntegralType* fastCast<IntegralType*>(AbstractType* from) {
00114   if(!from || from->whichType() != AbstractType::TypeIntegral)
00115     return 0;
00116   else
00117     return static_cast<IntegralType*>(from);
00118 }
00119 
00120 }
00121 
00122 #endif
00123 
00124 // 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