5#ifndef CUTELYST_ACTION_H
6#define CUTELYST_ACTION_H
8#include <Cutelyst/component.h>
9#include <Cutelyst/context.h>
10#include <Cutelyst/cutelyst_global.h>
12#include <QtCore/QMetaMethod>
13#include <QtCore/QStringList>
41 explicit Action(QObject *parent =
nullptr);
42 virtual ~Action()
override =
default;
44 virtual Modifiers modifiers()
const override;
60 QString attribute(
const QString &name,
const QString &defaultValue = {})
const;
71 QString className()
const;
87 virtual bool match(
int numberOfArgs)
const noexcept;
99 virtual bool matchCaptures(
int numberOfCaptures)
const noexcept;
104 QString ns() const noexcept;
111 virtual qint8 numberOfArgs() const noexcept;
117 virtual qint8 numberOfCaptures() const noexcept;
121 friend class ControllerPrivate;
127 explicit
Action(ActionPrivate *ptr, QObject *parent =
nullptr);
132 virtual
bool doExecute(
Context *c) override;
137 void setMethod(const QMetaMethod &method);
147 void setupAction(const QVariantHash &args,
Application *app);
This class represents a Cutelyst Action.
bool dispatch(Context *c)
The Cutelyst Application.
The Cutelyst Component base class.
bool execute(Component *code)
Cutelyst Controller base class
The Cutelyst namespace holds all public Cutelyst API.
QVector< Action * > ActionList
QMultiMap< QString, QString > ParamsMultiMap