File indexing completed on 2024-05-12 04:38:07
0001 /* 0002 SPDX-FileCopyrightText: 2009 Ramón Zarazúa <killerfox512+kde@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-only 0005 */ 0006 0007 #ifndef KDEVPLATFORM_IASTCONTAINER_H 0008 #define KDEVPLATFORM_IASTCONTAINER_H 0009 0010 #include <language/languageexport.h> 0011 0012 #include <QExplicitlySharedDataPointer> 0013 0014 namespace KDevelop { 0015 class COMPILE_ERROR_Ast_Top_Node_Was_Not_Defined; 0016 0017 /** 0018 * \brief Represents A single parse session that created a language-specific AST for a single translation unit 0019 * 0020 * This class is mainly just used as a tag to keep pointers to an AST of a translation unit(file) 0021 * in a KDevelop::TopDUContext, and passed over to Refactoring plugins so they can manipulate 0022 * their language-specific AstChangeSets. 0023 */ 0024 class KDEVPLATFORMLANGUAGE_EXPORT IAstContainer 0025 : public QSharedData 0026 { 0027 public: 0028 virtual ~IAstContainer(); 0029 using Ptr = QExplicitlySharedDataPointer<IAstContainer>; 0030 0031 /// Derived classes must redefine this typedef for CodeGenerator to work 0032 /// with this AST 0033 using TopAstNode = COMPILE_ERROR_Ast_Top_Node_Was_Not_Defined; 0034 }; 0035 } 0036 0037 #endif // KDEVPLATFORM_IASTCONTAINER_H