Grantlee  0.5.1
taglibraryinterface.h
1 /*
2  This file is part of the Grantlee template system.
3 
4  Copyright (c) 2009,2010 Stephen Kelly <steveire@gmail.com>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either version
9  2.1 of the Licence, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library. If not, see <http://www.gnu.org/licenses/>.
18 
19 */
20 
21 #ifndef TAGLIBRARYINTERFACE_H
22 #define TAGLIBRARYINTERFACE_H
23 
24 #include "outputstream.h"
25 
26 #include <QtCore/QHash>
27 
28 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
29 #define Q_PLUGIN_METADATA(p)
30 #endif
31 
32 namespace Grantlee
33 {
34 class AbstractNodeFactory;
35 class Engine;
36 class Filter;
37 
39 
81 {
82 public:
83  virtual ~TagLibraryInterface() {}
84 
88  virtual QHash<QString, AbstractNodeFactory*> nodeFactories( const QString &name = QString() ) {
89  Q_UNUSED( name );
90  static const QHash<QString, AbstractNodeFactory*> h;
91  return h;
92  };
93 
97  virtual QHash<QString, Filter*> filters( const QString &name = QString() ) {
98  Q_UNUSED( name );
99  static const QHash<QString, Filter*> h;
100  return h;
101  };
102 };
103 
104 }
105 
106 Q_DECLARE_INTERFACE( Grantlee::TagLibraryInterface, "org.kde.grantlee.TagLibraryInterface/1.0" )
107 
108 #endif
virtual QHash< QString, AbstractNodeFactory * > nodeFactories(const QString &name=QString())
The TagLibraryInterface returns available tags and filters from libraries.
virtual QHash< QString, Filter * > filters(const QString &name=QString())