5#ifndef CUTELYST_COMPONENT_H
6#define CUTELYST_COMPONENT_H
8#include <Cutelyst/cutelyst_global.h>
10#include <QtCore/qobject.h>
18class ComponentPrivate;
35 BeforeExecute = 2 << 1,
36 AroundExecute = 3 << 1,
37 AfterExecute = 4 << 1,
40 Q_DECLARE_FLAGS(Modifiers, Modifier)
47 explicit Component(QObject *parent =
nullptr);
53 [[nodiscard]]
virtual Modifiers modifiers()
const;
58 [[nodiscard]] QString name() const noexcept;
63 void setName(const QString &name);
68 [[nodiscard]] QString reverse() const noexcept;
73 void setReverse(const QString &reverse);
81 virtual
bool init(
Application *application, const QVariantHash &args);
93 explicit
Component(ComponentPrivate *d, QObject *parent =
nullptr);
98 virtual
bool beforeExecute(
Context *c);
109 virtual
bool afterExecute(
Context *c);
114 virtual
bool doExecute(
Context *c);
119 void applyRoles(const QStack<
Component *> &roles);
The Cutelyst Application.
The Cutelyst Component base class.
Cutelyst Controller base class
The Cutelyst namespace holds all public Cutelyst API.