Grantlee 5.3.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#include <QtCore/QObject>
28
29namespace Grantlee
30{
32class Engine;
33class Filter;
34
36
80{
81public:
82 virtual ~TagLibraryInterface() {}
83
87 virtual QHash<QString, AbstractNodeFactory *>
88 nodeFactories(const QString &name = {})
89 {
90 Q_UNUSED(name);
91 static const QHash<QString, AbstractNodeFactory *> h;
92 return h;
93 };
94
98 virtual QHash<QString, Filter *> filters(const QString &name = {})
99 {
100 Q_UNUSED(name);
101 static const QHash<QString, Filter *> h;
102 return h;
103 };
104};
105}
106
107Q_DECLARE_INTERFACE(Grantlee::TagLibraryInterface,
108 "org.grantlee.TagLibraryInterface/1.0")
109
110#endif
Base class for all NodeFactories.
Definition node.h:305
Grantlee::Engine is the main entry point for creating Grantlee Templates.
Definition engine.h:121
Base class for all filters.
Definition filter.h:60
The TagLibraryInterface returns available tags and filters from libraries.
virtual QHash< QString, AbstractNodeFactory * > nodeFactories(const QString &name={})
virtual QHash< QString, Filter * > filters(const QString &name={})
The Grantlee namespace holds all public Grantlee API.
Definition Mainpage.dox:8