![]() |
cutelyst 4.8.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
|
Describes a chained dispatch type. More...
#include <dispatchtypechained.h>

Public Member Functions | |
| DispatchTypeChained (QObject *parent=nullptr) | |
| ~DispatchTypeChained () override | |
| Action * | expandAction (const Context *c, Action *action) const final |
| bool | inUse () override |
| QByteArray | list () const override |
| MatchType | match (Context *c, QStringView path, const QStringList &args) const override |
| bool | registerAction (Action *action) override |
| QString | uriForAction (Action *action, const QStringList &captures) const override |
Public Member Functions inherited from Cutelyst::DispatchType | |
| DispatchType (QObject *parent=nullptr) | |
| virtual | ~DispatchType () |
| virtual Action * | expandAction (const Context *c, Action *action) const |
| virtual bool | inUse ()=0 |
| virtual bool | isLowPrecedence () const |
| virtual QByteArray | list () const =0 |
| virtual MatchType | match (Context *c, QStringView path, const QStringList &args) const =0 |
| virtual bool | registerAction (Action *action) |
| virtual QString | uriForAction (Action *action, const QStringList &captures) const =0 |
Additional Inherited Members | |
Public Types inherited from Cutelyst::DispatchType | |
| enum | MatchType { NoMatch , PartialMatch , ExactMatch } |
Protected Member Functions inherited from Cutelyst::DispatchType | |
| void | setupMatchedAction (Context *c, Action *action) const |
Describes a chained dispatch type.
Definition at line 21 of file dispatchtypechained.h.
|
explicit |
Constructs a new DispatchTypeChained object with the given parent.
Definition at line 16 of file dispatchtypechained.cpp.
|
override |
Destryos the DispatchTypeChained object.
Definition at line 22 of file dispatchtypechained.cpp.
|
finalvirtual |
Expand the action to a list of actions which is used in chained. The default implementation does nothing and returns a nullptr.
Reimplemented from Cutelyst::DispatchType.
Definition at line 318 of file dispatchtypechained.cpp.
References Cutelyst::Action::attribute(), and Cutelyst::Action::attributes().
|
overridevirtual |
If false the dispatcher will be unregistered for performance reasons. This method can be used to prepare actions for dispatcher as in a Chain of Actions there is no garantee of registering order.
In the common case if the dispatcher has registered any action, or in some special case that it doesn't need actions it will return true.
Implements Cutelyst::DispatchType.
Definition at line 344 of file dispatchtypechained.cpp.
|
overridevirtual |
Lists the registered actions. Has to be implemented by subclasses.
Implements Cutelyst::DispatchType.
Definition at line 27 of file dispatchtypechained.cpp.
References Cutelyst::Action::attributes(), Cutelyst::Action::numberOfCaptures(), and Cutelyst::Component::reverse().
|
overridevirtual |
Returns the MatchType for the given path and args. Has to be implemented by subclasses.
Implements Cutelyst::DispatchType.
Definition at line 157 of file dispatchtypechained.cpp.
References Cutelyst::Context::request, Cutelyst::Component::reverse(), Cutelyst::Request::setArguments(), Cutelyst::Request::setCaptures(), Cutelyst::Request::setMatch(), and Cutelyst::DispatchType::setupMatchedAction().
|
overridevirtual |
Register an action and return true on success. The default implementation does nothing and returns always true.
Reimplemented from Cutelyst::DispatchType.
Definition at line 191 of file dispatchtypechained.cpp.
References Cutelyst::Action::attributes(), Cutelyst::Component::name(), Cutelyst::Component::reverse(), and Cutelyst::Action::setAttributes().
|
overridevirtual |
Returns an uri for an action with given captures. Has to be implemented by subclasses.
Implements Cutelyst::DispatchType.
Definition at line 260 of file dispatchtypechained.cpp.
References Cutelyst::Action::attributes(), and Cutelyst::Action::numberOfCaptures().