Grantlee  5.0.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 
77 {
78 public:
79  virtual ~TagLibraryInterface() {}
80 
84  virtual QHash<QString, AbstractNodeFactory*> nodeFactories( const QString &name = QString() ) {
85  Q_UNUSED( name );
86  static const QHash<QString, AbstractNodeFactory*> h;
87  return h;
88  };
89 
93  virtual QHash<QString, Filter*> filters( const QString &name = QString() ) {
94  Q_UNUSED( name );
95  static const QHash<QString, Filter*> h;
96  return h;
97  };
98 };
99 
100 }
101 
102 Q_DECLARE_INTERFACE( Grantlee::TagLibraryInterface, "org.grantlee.TagLibraryInterface/1.0" )
103 
104 #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())
The Grantlee namespace holds all public Grantlee API.
Definition: Mainpage.dox:7