cutelyst  3.9.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
csrf.h
1 /*
2  * SPDX-FileCopyrightText: (C) 2017-2022 Matthias Fehring <mf@huessenbergnetz.de>
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 #ifndef CSRF_H
6 #define CSRF_H
7 
8 #ifndef DOXYGEN_SHOULD_SKIP_THIS
9 
10 # include <cutelee/filter.h>
11 # include <cutelee/node.h>
12 # include <cutelee/safestring.h>
13 # include <cutelee/util.h>
14 
15 class CSRFTag final : public Cutelee::AbstractNodeFactory
16 {
17  Q_OBJECT
18 public:
19  Cutelee::Node *getNode(const QString &tagContent, Cutelee::Parser *p) const override;
20 };
21 
22 class CSRF final : public Cutelee::Node
23 {
24  Q_OBJECT
25 public:
26  explicit CSRF(Cutelee::Parser *parser = nullptr);
27 
28  void render(Cutelee::OutputStream *stream, Cutelee::Context *gc) const override;
29 
30 private:
31  mutable QString m_cutelystContext = QStringLiteral("c");
32 };
33 
34 #endif // DOXYGEN_SHOULD_SKIP_THIS
35 
36 #endif // CSRF_H