5 #include "actionchain_p.h"
12 :
Action(new ActionChainPrivate, parent)
17 const Action *
final = d->chain.last();
20 args.insert(QStringLiteral(
"namespace"), final->ns());
30 if ( action->numberOfCaptures() > 0) {
31 d->captures += action->numberOfCaptures();
57 int &actionRefCount = c->d_ptr->actionRefCount;
58 int &captured = c->d_ptr->chainedCaptured;
59 int &chainedIx = c->d_ptr->chainedIx;
61 for (; chainedIx <
chain.
size(); ++chainedIx) {
63 c->d_ptr->pendingAsync.prepend(
this);
72 args.
append(captures.
at(captured++));
78 const bool ret = action->
dispatch(c);
88 #include "moc_actionchain.cpp"
Holds a chain of Cutelyst actions.
ActionChain(const ActionList &chain, QObject *parent=nullptr)
qint8 numberOfCaptures() const noexcept override
ActionList chain() const noexcept
bool doExecute(Context *c) override
This class represents a Cutelyst Action.
void setAttributes(const ParamsMultiMap &attributes)
void setupAction(const QVariantHash &args, Application *app)
bool dispatch(Context *c)
virtual qint8 numberOfCaptures() const
void setController(Controller *controller)
void setReverse(const QString &reverse)
void setName(const QString &name)
QStringList captures() const noexcept
void setArguments(const QStringList &arguments)
The Cutelyst namespace holds all public Cutelyst API.
void append(QList::parameter_type value)
QList::const_reference at(qsizetype i) const const
qsizetype size() const const