• 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
unsuretype.h
Go to the documentation of this file.
1 /*
2  Copyright 2009 David Nolden <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17  */
18 
19 #ifndef KDEVPLATFORM_UNSURETYPE_H
20 #define KDEVPLATFORM_UNSURETYPE_H
21 
22 #include "abstracttype.h"
23 #include "typesystemdata.h"
24 #include "../appendedlist.h"
25 #include <language/languageexport.h>
26 
27 namespace KDevelop {
28 KDEVPLATFORMLANGUAGE_EXPORT DECLARE_LIST_MEMBER_HASH(UnsureTypeData, m_types, IndexedType)
29 
30 struct KDEVPLATFORMLANGUAGE_EXPORT UnsureTypeData
31  : public AbstractTypeData
32 {
33  UnsureTypeData()
34  {
35  initializeAppendedLists(m_dynamic);
36  }
37 
38  ~UnsureTypeData()
39  {
40  freeAppendedLists();
41  }
42 
43  UnsureTypeData(const UnsureTypeData& rhs) : AbstractTypeData(rhs)
44  {
45  initializeAppendedLists(m_dynamic);
46  copyListsFrom(rhs);
47  }
48 
49  UnsureTypeData& operator=(const UnsureTypeData& rhs) = delete;
50 
51  START_APPENDED_LISTS_BASE(UnsureTypeData, AbstractTypeData)
52  APPENDED_LIST_FIRST(UnsureTypeData, IndexedType, m_types)
53  END_APPENDED_LISTS(UnsureTypeData, m_types)
54 };
55 
56 class KDEVPLATFORMLANGUAGE_EXPORT UnsureType
57  : public AbstractType
58 {
59 public:
60  using Ptr = TypePtr<UnsureType>;
61 
62  UnsureType(const UnsureType& rhs);
63  UnsureType();
64  explicit UnsureType(UnsureTypeData& data);
65 
66  UnsureType& operator=(const UnsureType& rhs) = delete;
67 
68  KDevelop::AbstractType* clone() const override;
69  QString toString() const override;
70  bool equals(const KDevelop::AbstractType* rhs) const override;
71  uint hash() const override;
72  KDevelop::AbstractType::WhichType whichType() const override;
73  void exchangeTypes(KDevelop::TypeExchanger* exchanger) override;
74 
75  virtual void addType(const IndexedType& type);
76  virtual void removeType(const IndexedType& type);
77 
80  const IndexedType* types() const;
82  uint typesSize() const;
83 
84  enum {
85  Identity = 39
86  };
87 
88  using Data = UnsureTypeData;
89 
90 protected:
91  TYPE_DECLARE_DATA(UnsureType)
92  void accept0(KDevelop::TypeVisitor* v) const override;
93 };
94 }
95 
96 #endif // KDEVPLATFORM_UNSURETYPE_H
APPENDED_LIST_FIRST
#define APPENDED_LIST_FIRST(container, type, name)
Definition: appendedlist.h:321
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
START_APPENDED_LISTS_BASE
#define START_APPENDED_LISTS_BASE(container, base)
Use this if one of the base-classes of the container also has the appended lists interfaces implement...
Definition: appendedlist.h:257
KDevelop::TypePtr< AbstractType >
typesystemdata.h
KDevelop::DECLARE_LIST_MEMBER_HASH
KDEVPLATFORMLANGUAGE_EXPORT DECLARE_LIST_MEMBER_HASH(DUContextData, m_childContexts, LocalIndexedDUContext) KDEVPLATFORMLANGUAGE_EXPORT DECLARE_LIST_MEMBER_HASH(DUContextData
QString
KDevelop::TypeVisitor
Definition: typesystem.h:41
END_APPENDED_LISTS
#define END_APPENDED_LISTS(container, predecessor)
Definition: appendedlist.h:358
KDevelop::TypeExchanger
A class that can be used to walk through all types that are references from one type,...
Definition: typesystem.h:103
abstracttype.h
KDevelop::IndexedType
Indexed type pointer.
Definition: indexedtype.h:36
KDevelop
Definition: abstractfunctiondeclaration.cpp:27
KDevelop::UnsureType
Definition: unsuretype.h:56
KDevelop::AbstractType::WhichType
WhichType
Enumeration of major data types.
Definition: abstracttype.h:214
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 Sat Apr 10 2021 23:30:23 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