5#include "actionchain_p.h"
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"
ActionChain(const ActionList &chain, QObject *parent=nullptr)
qint8 numberOfCaptures() const noexcept override
ActionList chain() const noexcept
bool doExecute(Context *c) override
void setAttributes(const ParamsMultiMap &attributes)
void setupAction(const QVariantHash &args, Application *app)
bool dispatch(Context *c)
Action(QObject *parent=nullptr)
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.
QVector< Action * > ActionList
void append(QList< T > &&value)
QList< T >::const_reference at(qsizetype i) const const
qsizetype size() const const
QObject * parent() const const