cutelyst  4.5.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
actionrest.h
1 /*
2  * SPDX-FileCopyrightText: (C) 2013-2022 Daniel Nicoletti <dantti12@gmail.com>
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 #ifndef ACTIONREST_H
6 #define ACTIONREST_H
7 
8 #include <Cutelyst/action.h>
9 #include <Cutelyst/componentfactory.h>
10 
11 namespace Cutelyst {
12 
13 class ActionRESTPrivate;
14 class ActionREST final : public Action
15 {
16  Q_OBJECT
17  Q_DECLARE_PRIVATE(ActionREST)
18 public:
22  explicit ActionREST(QObject *parent = nullptr);
23 
24 protected:
25  bool doExecute(Context *c) override;
26 };
27 
28 class CutelystActionREST final
29  : public QObject
30  , public ComponentFactory
31 {
32  Q_OBJECT
33  Q_PLUGIN_METADATA(IID "org.cutelyst.ComponentFactory" FILE "metadata.json")
35 public:
37 };
38 
39 } // namespace Cutelyst
40 
41 #endif // ACTIONREST_H
Automated REST method dispatching.
Definition: actionrest.h:15
bool doExecute(Context *c) override
Definition: actionrest.cpp:59
ActionREST(QObject *parent=nullptr)
Definition: actionrest.cpp:54
This class represents a Cutelyst Action.
Definition: action.h:35
The Cutelyst Component base class.
Definition: component.h:30
The Cutelyst Context.
Definition: context.h:42
Component * createComponent(QObject *parent) override
Definition: actionrest.h:36
The Cutelyst namespace holds all public Cutelyst API.
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
QObject * parent() const const