File indexing completed on 2024-04-28 12:21:50
0001 /* 0002 SPDX-FileCopyrightText: 2006 Hamish Rodda <rodda@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-only 0005 */ 0006 0007 #ifndef DUMPTYPES_H 0008 #define DUMPTYPES_H 0009 0010 #include <language/duchain/types/typesystem.h> 0011 #include "phpduchainexport.h" 0012 0013 #include <QSet> 0014 0015 namespace Php 0016 { 0017 0018 class KDEVPHPDUCHAIN_EXPORT DumpTypes : protected KDevelop::TypeVisitor 0019 { 0020 public: 0021 DumpTypes(); 0022 ~DumpTypes() override; 0023 0024 void dump(const KDevelop::AbstractType* type); 0025 0026 protected: 0027 bool preVisit(const KDevelop::AbstractType * type) override; 0028 void postVisit(const KDevelop::AbstractType *) override; 0029 0030 void visit(const KDevelop::IntegralType *) override; 0031 0032 bool visit(const KDevelop::AbstractType *) override; 0033 0034 bool visit(const KDevelop::PointerType * type) override; 0035 void endVisit(const KDevelop::PointerType *) override; 0036 0037 bool visit(const KDevelop::ReferenceType * type) override; 0038 void endVisit(const KDevelop::ReferenceType *) override; 0039 0040 bool visit(const KDevelop::FunctionType * type) override; 0041 void endVisit(const KDevelop::FunctionType *) override; 0042 0043 bool visit(const KDevelop::StructureType * type) override; 0044 void endVisit(const KDevelop::StructureType *) override; 0045 0046 bool visit(const KDevelop::ArrayType * type) override; 0047 void endVisit(const KDevelop::ArrayType *) override; 0048 0049 private: 0050 bool seen(const KDevelop::AbstractType* type); 0051 0052 class CppEditorIntegrator* m_editor; 0053 int indent; 0054 QSet<const KDevelop::AbstractType*> m_encountered; 0055 }; 0056 } 0057 0058 #endif // DUMPTYPES_H 0059