cutelyst 5.0.0
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
11namespace Cutelyst {
12
13class ActionRESTPrivate;
14class ActionREST final : public Action
15{
17 Q_DECLARE_PRIVATE(ActionREST)
18public:
22 explicit ActionREST(QObject *parent = nullptr);
23
24protected:
25 bool doExecute(Context *c) override;
26};
27
29 : public QObject
30 , public ComponentFactory
31{
33 Q_PLUGIN_METADATA(IID "org.cutelyst.ComponentFactory" FILE "metadata.json")
35public:
37};
38
39} // namespace Cutelyst
40
41#endif // ACTIONREST_H
Automated REST method dispatching.
Definition actionrest.h:15
bool doExecute(Context *c) override
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