• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/language/duchain

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • language
  • duchain
  • types
delayedtype.h
Go to the documentation of this file.
1 /* This file is part of KDevelop
2  Copyright 2006 Roberto Raggi <[email protected]>
3  Copyright 2006-2008 Hamish Rodda <[email protected]>
4  Copyright 2007-2008 David Nolden <[email protected]>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef KDEVPLATFORM_DELAYEDTYPE_H
22 #define KDEVPLATFORM_DELAYEDTYPE_H
23 
24 #include "abstracttype.h"
25 #include "../identifier.h"
26 
27 namespace KDevelop {
28 class DelayedTypeData;
29 
38 class KDEVPLATFORMLANGUAGE_EXPORT DelayedType
39  : public KDevelop::AbstractType
40 {
41 public:
42  using Ptr = TypePtr<DelayedType>;
43 
45  enum Kind : quint8 {
46  Delayed ,
47  Unresolved
48  };
49 
51  DelayedType();
53  DelayedType(const DelayedType& rhs);
55  explicit DelayedType(DelayedTypeData& data);
57  ~DelayedType() override;
58 
59  DelayedType& operator=(const DelayedType& rhs) = delete;
60 
66  KDevelop::IndexedTypeIdentifier identifier() const;
67 
73  void setIdentifier(const KDevelop::IndexedTypeIdentifier& identifier);
74 
75  QString toString() const override;
76 
77  AbstractType* clone() const override;
78 
79  bool equals(const AbstractType* rhs) const override;
80 
81  Kind kind() const;
82  void setKind(Kind kind);
83 
84  uint hash() const override;
85 
86  WhichType whichType() const override;
87 
88  enum {
89  Identity = 8
90  };
91 
92  using Data = DelayedTypeData;
93 
94 protected:
95  void accept0 (KDevelop::TypeVisitor* v) const override;
96  TYPE_DECLARE_DATA(DelayedType)
97 };
98 
99 template <>
100 inline DelayedType* fastCast<DelayedType*>(AbstractType* from)
101 {
102  if (!from || from->whichType() != AbstractType::TypeDelayed)
103  return nullptr;
104  else
105  return static_cast<DelayedType*>(from);
106 }
107 }
108 
109 #endif
KDevelop::DelayedTypeData
Private data structure for DelayedType.
Definition: typesystemdata.h:229
TYPE_DECLARE_DATA
#define TYPE_DECLARE_DATA(Class)
This macro is used to declare type-specific data-access functions within subclasses of AbstractType.
Definition: abstracttype.h:38
AbstractTypeData
KDevelop::DelayedType
A type which has not yet been resolved.
Definition: delayedtype.h:38
KDevelop::DelayedType::Kind
Kind
An enumeration of.
Definition: delayedtype.h:45
KDevelop::TypePtr< AbstractType >
KDevelop::AbstractType::whichType
virtual WhichType whichType() const
Determine which data type this abstract type represents.
Definition: abstracttype.cpp:120
KDevelop::fastCast< DelayedType * >
DelayedType * fastCast< DelayedType * >(AbstractType *from)
Definition: delayedtype.h:100
QString
KDevelop::TypeVisitor
Definition: typesystem.h:41
KDevelop::AbstractType::TypeDelayed
a delayed type
Definition: abstracttype.h:222
abstracttype.h
KDevelop
Definition: abstractfunctiondeclaration.cpp:27
KDevelop::IndexedTypeIdentifier
Extends IndexedQualifiedIdentifier by:
Definition: identifier.h:381
KDevelop::AbstractType
Base class for all types.
Definition: abstracttype.h:87
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:37:28 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/language/duchain

Skip menu "kdevplatform/language/duchain"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal