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

language/duchain

enumeratortype.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 ENUMERATORTYPE_H
00023 #define ENUMERATORTYPE_H
00024 
00025 #include "identifiedtype.h"
00026 #include "constantintegraltype.h"
00027 
00028 namespace KDevelop
00029 {
00030 
00031 typedef KDevelop::MergeIdentifiedType<ConstantIntegralType> EnumeratorTypeBase;
00032 
00033 typedef EnumeratorTypeBase::Data EnumeratorTypeData;
00034 
00035 //The same as EnumerationType, with the difference that here the value is also known
00036 class KDEVPLATFORMLANGUAGE_EXPORT EnumeratorType : public EnumeratorTypeBase
00037 {
00038 public:
00039   EnumeratorType(const EnumeratorType& rhs);
00040 
00041   EnumeratorType(EnumeratorTypeData& data);
00042 
00043   EnumeratorType();
00044 
00045   typedef TypePtr<EnumeratorType> Ptr;
00046 
00047   virtual bool equals(const KDevelop::AbstractType* rhs) const;
00048 
00049   virtual KDevelop::AbstractType* clone() const;
00050 
00051   virtual uint hash() const;
00052 
00053   virtual WhichType whichType() const;
00054 
00055   virtual QString toString() const;
00056 
00057   enum {
00058     Identity = 20
00059   };
00060 
00061   typedef EnumeratorTypeData Data;
00062 
00063 protected:
00064   TYPE_DECLARE_DATA(EnumeratorType);
00065 };
00066 
00067 template<>
00068 inline EnumeratorType* fastCast<EnumeratorType*>(AbstractType* from) {
00069   if(!from || from->whichType() != KDevelop::AbstractType::TypeEnumerator)
00070     return 0;
00071   else
00072     return static_cast<EnumeratorType*>(from);
00073 }
00074 
00075 }
00076 
00077 
00078 #endif // CPPTYPES_H
00079 

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