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

language/duchain

enumerationtype.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-2008 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 ENUMERATIONTYPE_H
00023 #define ENUMERATIONTYPE_H
00024 
00025 #include "integraltype.h"
00026 #include "identifiedtype.h"
00027 
00028 namespace KDevelop
00029 {
00030 
00031 typedef KDevelop::MergeIdentifiedType<IntegralType> EnumerationTypeBase;
00032 
00033 typedef EnumerationTypeBase::Data EnumerationTypeData;
00034 
00035 class KDEVPLATFORMLANGUAGE_EXPORT EnumerationType : public EnumerationTypeBase
00036 {
00037 public:
00038   EnumerationType();
00039 
00040   EnumerationType(const EnumerationType& rhs);
00041 
00042   EnumerationType(EnumerationTypeData& data);
00043   typedef TypePtr<EnumerationType> Ptr;
00044 
00045   virtual uint hash() const;
00046 
00047   virtual KDevelop::AbstractType* clone() const;
00048 
00049   virtual bool equals(const KDevelop::AbstractType* rhs) const;
00050 
00051   virtual QString toString() const;
00052 
00053   virtual WhichType whichType() const;
00054 
00055   enum {
00056     Identity = 21
00057   };
00058 
00059   typedef EnumerationTypeData Data;
00060 
00061 protected:
00062   TYPE_DECLARE_DATA(EnumerationType);
00063 };
00064 
00065 template<>
00066 inline EnumerationType* fastCast<EnumerationType*>(AbstractType* from) {
00067   if(!from || from->whichType() != KDevelop::AbstractType::TypeEnumeration)
00068     return 0;
00069   else
00070     return static_cast<EnumerationType*>(from);
00071 }
00072 
00073 }
00074 
00075 
00076 #endif // CPPTYPES_H
00077 

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