Grantlee
0.5.1
|
00001 /* 00002 This file is part of the Grantlee template system. 00003 00004 Copyright (c) 2009,2010 Stephen Kelly <steveire@gmail.com> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Lesser General Public 00008 License as published by the Free Software Foundation; either version 00009 2.1 of the Licence, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Lesser General Public License for more details. 00015 00016 You should have received a copy of the GNU Lesser General Public 00017 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00018 00019 */ 00020 00021 #ifndef TAGLIBRARYINTERFACE_H 00022 #define TAGLIBRARYINTERFACE_H 00023 00024 #include "outputstream.h" 00025 00026 #include <QtCore/QHash> 00027 00028 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 00029 #define Q_PLUGIN_METADATA(p) 00030 #endif 00031 00032 namespace Grantlee 00033 { 00034 class AbstractNodeFactory; 00035 class Engine; 00036 class Filter; 00037 00039 00080 class TagLibraryInterface 00081 { 00082 public: 00083 virtual ~TagLibraryInterface() {} 00084 00088 virtual QHash<QString, AbstractNodeFactory*> nodeFactories( const QString &name = QString() ) { 00089 Q_UNUSED( name ); 00090 static const QHash<QString, AbstractNodeFactory*> h; 00091 return h; 00092 }; 00093 00097 virtual QHash<QString, Filter*> filters( const QString &name = QString() ) { 00098 Q_UNUSED( name ); 00099 static const QHash<QString, Filter*> h; 00100 return h; 00101 }; 00102 }; 00103 00104 } 00105 00106 Q_DECLARE_INTERFACE( Grantlee::TagLibraryInterface, "org.kde.grantlee.TagLibraryInterface/1.0" ) 00107 00108 #endif