Cutelyst  2.5.0
view.h
1 /*
2  * Copyright (C) 2013-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 VIEW_H
19 #define VIEW_H
20 
21 #include <QObject>
22 
23 #include <Cutelyst/cutelyst_global.h>
24 #include <Cutelyst/component.h>
25 
26 namespace Cutelyst {
27 
28 class Context;
29 
33 class CUTELYST_LIBRARY View : public Component
34 {
35  Q_OBJECT
36 public:
41  explicit View(QObject *parent, const QString &name);
42  virtual ~View();
43 
47  virtual Modifiers modifiers() const override;
48 
55  virtual QByteArray render(Context *c) const = 0;
56 
57 private:
62  bool doExecute(Context *c) final;
63 };
64 
65 }
66 
67 #endif // VIEW_H
The Cutelyst Component base class.
Definition: component.h:38
The Cutelyst Context.
Definition: context.h:50
The Cutelyst namespace holds all public Cutelyst API.
Definition: Mainpage.dox:7
Cutelyst View abstract view component
Definition: view.h:33