5 #ifndef CUTELYST_CONTROLLER_H
6 #define CUTELYST_CONTROLLER_H
10 #include <Cutelyst/cutelyst_global.h>
11 #include <Cutelyst/action.h>
12 #include <Cutelyst/context.h>
13 #include <Cutelyst/request.h>
14 #include <Cutelyst/response.h>
17 #define C_PATH(X, Y) Q_CLASSINFO(STR(X ## _Path), STR(Y))
18 #define C_NAMESPACE(value) Q_CLASSINFO("Namespace", value)
19 #define C_ATTR(X, Y) Q_CLASSINFO(STR(X), STR(Y)) Q_INVOKABLE
21 # define CActionFor(str) \
22 ([this]() -> Cutelyst::Action * { \
23 static thread_local Cutelyst::Action *action = \
24 Cutelyst::Controller::actionFor(str); \
31 class ControllerPrivate;
96 explicit Controller(QObject *parent =
nullptr);
116 Action *actionFor(
const QString &name)
const;
124 Action *actionFor(QStringView name)
const;
135 bool operator==(
const char *className);
165 ControllerPrivate *d_ptr;
This class represents a Cutelyst Action.
The Cutelyst Application.
Cutelyst Controller base class
The Cutelyst namespace holds all public Cutelyst API.
QVector< Action * > ActionList