File indexing completed on 2024-05-05 16:42:25

0001 /*
0002     SPDX-FileCopyrightText: 2011 Sven Brauch <svenbrauch@googlemail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef PYTHON_UNSURETYPE_H
0008 #define PYTHON_UNSURETYPE_H
0009 
0010 #include "pythonduchainexport.h"
0011 #include "hintedtype.h"
0012 
0013 #include <language/duchain/types/structuretype.h>
0014 #include <language/duchain/types/typesystemdata.h>
0015 #include <language/duchain/use.h>
0016 #include <language/editor/modificationrevision.h>
0017 #include <language/duchain/topducontext.h>
0018 #include <language/duchain/types/typesystem.h>
0019 #include <language/duchain/types/typealiastype.h>
0020 #include <language/duchain/types/unsuretype.h>
0021 #include <language/duchain/types/indexedtype.h>
0022 #include <language/duchain/types/typepointer.h>
0023 
0024 namespace Python {
0025 
0026 class KDEVPYTHONDUCHAIN_EXPORT UnsureType : public KDevelop::UnsureType
0027 {
0028 public:
0029     typedef KDevelop::TypePtr<UnsureType> Ptr;
0030 
0031     UnsureType();
0032     UnsureType(const UnsureType& rhs);
0033     UnsureType(KDevelop::UnsureTypeData& data);
0034 
0035     WhichType whichType() const override;
0036 
0037     AbstractType* clone() const override;
0038     uint hash() const override;
0039     QString toString() const override;
0040 
0041     void addType(const IndexedType& type) override;
0042 
0043     const QList<AbstractType::Ptr> typesRecursive() const;
0044 
0045     bool equals(const AbstractType* rhs) const override;
0046 
0047     enum {
0048 // #warning check identity value (63)
0049         Identity = 63
0050     };
0051 
0052     typedef KDevelop::UnsureTypeData Data;
0053 
0054 protected:
0055     TYPE_DECLARE_DATA(KDevelop::UnsureType);
0056 };
0057 
0058 }
0059 
0060 #endif // UNSURETYPE_H