Cutelyst  2.13.0
cutelystgrantlee.h
1 /*
2  * Copyright (C) 2017 Daniel Nicoletti <dantti12@gmail.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 #ifndef CUTELYSTGRANTLEE_H
19 #define CUTELYSTGRANTLEE_H
20 
21 #ifndef DOXYGEN_SHOULD_SKIP_THIS
22 
23 #include <grantlee/taglibraryinterface.h>
24 
25 #if defined(cutelyst_grantlee_urifor_EXPORTS)
26 # define CUTELYST_GRANTLEE_URIFOR_EXPORT Q_DECL_EXPORT
27 #else
28 # define CUTELYST_GRANTLEE_URIFOR_EXPORT Q_DECL_IMPORT
29 #endif
30 
31 class CutelystGrantlee final : public QObject, public Grantlee::TagLibraryInterface
32 {
33  Q_OBJECT
34  Q_PLUGIN_METADATA(IID "org.grantlee.TagLibraryInterface/1.0")
35  Q_INTERFACES(Grantlee::TagLibraryInterface)
36 public:
37  explicit CutelystGrantlee(QObject *parent = nullptr);
38 
39  virtual QHash<QString, Grantlee::AbstractNodeFactory *> nodeFactories(const QString &name = QString()) override;
40 
41  virtual QHash<QString, Grantlee::Filter *> filters(const QString &name = QString()) override;
42 };
43 
44 #endif
45 
46 #endif // CUTELYSTGRANTLEE_H