File indexing completed on 2024-05-19 15:46:44
0001 /* 0002 SPDX-FileCopyrightText: 2014 Denis Steckelmacher <steckdenis@yahoo.fr> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #ifndef __FUNCTIONTYPE_H__ 0008 #define __FUNCTIONTYPE_H__ 0009 0010 #include "duchainexport.h" 0011 0012 #include <language/duchain/types/functiontype.h> 0013 #include <language/duchain/types/identifiedtype.h> 0014 #include <language/duchain/types/typepointer.h> 0015 #include <language/duchain/types/typesystemdata.h> 0016 0017 namespace QmlJS { 0018 0019 using FunctionTypeBase = KDevelop::MergeIdentifiedType<KDevelop::FunctionType>; 0020 0021 /** 0022 * Function type bound to a function declaration, so that the name of its parameters 0023 * can be displayed when needed 0024 */ 0025 class KDEVQMLJSDUCHAIN_EXPORT FunctionType : public FunctionTypeBase 0026 { 0027 public: 0028 using Ptr = KDevelop::TypePtr<FunctionType>; 0029 0030 FunctionType(); 0031 FunctionType(const FunctionType& rhs); 0032 explicit FunctionType(Data& data); 0033 ~FunctionType() override; 0034 0035 KDevelop::AbstractType* clone() const override; 0036 QString toString() const override; 0037 uint hash() const override; 0038 0039 enum { 0040 Identity = 30 0041 }; 0042 0043 using Data = FunctionTypeBase::Data; 0044 }; 0045 0046 } 0047 0048 #endif