File indexing completed on 2024-05-12 04:37:48
0001 /* 0002 SPDX-FileCopyrightText: 2012 Milian Wolff <mail@milianw.de> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KDEVPLATFORM_TEMPLATEENGINE_H 0008 #define KDEVPLATFORM_TEMPLATEENGINE_H 0009 0010 #include <language/languageexport.h> 0011 0012 #include <QScopedPointer> 0013 0014 class QStringList; 0015 0016 namespace KDevelop { 0017 class TemplateRenderer; 0018 class TemplateEnginePrivate; 0019 0020 /** 0021 * Central template engine where template directories and archives can be registered. 0022 */ 0023 class KDEVPLATFORMLANGUAGE_EXPORT TemplateEngine 0024 { 0025 public: 0026 static TemplateEngine* self(); 0027 0028 /** 0029 * Adds @p directories to the list of directories searched for templates 0030 * 0031 **/ 0032 void addTemplateDirectories(const QStringList& directories); 0033 0034 private: 0035 TemplateEngine(); 0036 ~TemplateEngine(); 0037 0038 Q_DISABLE_COPY(TemplateEngine) 0039 0040 private: 0041 const QScopedPointer<class TemplateEnginePrivate> d_ptr; 0042 Q_DECLARE_PRIVATE(TemplateEngine) 0043 friend class TemplateRenderer; 0044 }; 0045 } 0046 0047 #endif // KDEVPLATFORM_TEMPLATEENGINE_H