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

Public Member Functions | |
| DispatchTypePath (QObject *parent=nullptr) | |
| ~DispatchTypePath () override | |
| 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 | isLowPrecedence () const |
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 path dispatch type.
Definition at line 22 of file dispatchtypepath.h.
|
explicit |
Constructs a new DispatchTypePath object with the given parent.
Definition at line 17 of file dispatchtypepath.cpp.
References Cutelyst::DispatchType::DispatchType().
Referenced by inUse(), list(), match(), and registerAction().
|
override |
Destroys the DispatchTypePath object.
Definition at line 23 of file dispatchtypepath.cpp.
|
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 118 of file dispatchtypepath.cpp.
References DispatchTypePath().
|
overridevirtual |
Lists the registered actions. Has to be implemented by subclasses.
Implements Cutelyst::DispatchType.
Definition at line 28 of file dispatchtypepath.cpp.
References DispatchTypePath(), Cutelyst::Action::attribute(), Cutelyst::Action::numberOfArgs(), 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 67 of file dispatchtypepath.cpp.
References DispatchTypePath(), Cutelyst::Context::action, Cutelyst::Action::numberOfArgs(), Cutelyst::Context::request, Cutelyst::Request::setArguments(), 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 101 of file dispatchtypepath.cpp.
References DispatchTypePath(), and Cutelyst::Action::attributes().
|
overridevirtual |
Get a URI part for an action. Always returns NULL if captures is not empty since Path actions don't have captures.
Implements Cutelyst::DispatchType.
Definition at line 124 of file dispatchtypepath.cpp.
References Cutelyst::Action::attributes().