Grantlee 5.2.0

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 namespace Grantlee
29 {
30 class AbstractNodeFactory;
31 class Engine;
32 class Filter;
33
35
78 class TagLibraryInterface
79 {
80 public:
81 virtual ~TagLibraryInterface() {}
82
86 virtual QHash<QString, AbstractNodeFactory *>
87 nodeFactories(const QString &name = {})
88 {
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 = {})
98 {
99 Q_UNUSED(name);
100 static const QHash<QString, Filter *> h;
101 return h;
102 };
103 };
104 }
105
106 Q_DECLARE_INTERFACE(Grantlee::TagLibraryInterface,
107 "org.grantlee.TagLibraryInterface/1.0")
108
109 #endif
Grantlee::TagLibraryInterface::nodeFactories
virtual QHash< QString, AbstractNodeFactory * > nodeFactories(const QString &name={})
Definition: taglibraryinterface.h:87
Grantlee::TagLibraryInterface
The TagLibraryInterface returns available tags and filters from libraries.
Definition: taglibraryinterface.h:78
Grantlee::TagLibraryInterface::filters
virtual QHash< QString, Filter * > filters(const QString &name={})
Definition: taglibraryinterface.h:97
Grantlee
The Grantlee namespace holds all public Grantlee API.
Definition: Mainpage.dox:7