|
cutelyst 3.9.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
|

Public Types | |
| enum | MatchType { NoMatch , PartialMatch , ExactMatch } |
Public Member Functions | |
| DispatchType (QObject *parent=nullptr) | |
| virtual Action * | expandAction (const Context *c, Action *action) const |
| virtual bool | inUse ()=0 |
| virtual bool | isLowPrecedence () const |
| virtual QByteArray | list () const =0 |
| list the registered actions To be implemented by subclasses | |
| virtual MatchType | match (Context *c, const QString &path, const QStringList &args) const =0 |
| virtual bool | registerAction (Action *action) |
| registerAction | |
| virtual QString | uriForAction (Action *action, const QStringList &captures) const =0 |
Protected Member Functions | |
| void | setupMatchedAction (Context *c, Action *action) const |
Friends | |
| class | Application |
| class | Dispatcher |
Definition at line 18 of file dispatchtype.h.
This enum is used to describe the kind of a match
Definition at line 23 of file dispatchtype.h.
|
explicit |
Construct a DispatchType object
Definition at line 11 of file dispatchtype.cpp.
Referenced by Cutelyst::DispatchTypeChained::DispatchTypeChained(), and Cutelyst::DispatchTypePath::DispatchTypePath().
|
virtual |
Definition at line 16 of file dispatchtype.cpp.
Expand the action to a list of actions which is used in chained
Reimplemented in Cutelyst::DispatchTypeChained.
Definition at line 20 of file dispatchtype.cpp.
Referenced by match().
|
pure virtual |
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.
Implemented in Cutelyst::DispatchTypeChained, and Cutelyst::DispatchTypePath.
References isLowPrecedence(), and setupMatchedAction().
Referenced by Cutelyst::Dispatcher::setupActions().
|
virtual |
Returns true if the dispatch type has low precedence when the precedence is the same the Class name is used to sort them.
Definition at line 40 of file dispatchtype.cpp.
Referenced by inUse().
|
pure virtual |
Implemented in Cutelyst::DispatchTypeChained, and Cutelyst::DispatchTypePath.
|
pure virtual |
Return true if the dispatchType matches the given path
Implemented in Cutelyst::DispatchTypeChained, and Cutelyst::DispatchTypePath.
References expandAction(), registerAction(), and uriForAction().
|
virtual |
| action |
Reimplemented in Cutelyst::DispatchTypeChained, and Cutelyst::DispatchTypePath.
Definition at line 34 of file dispatchtype.cpp.
Referenced by match().
Sets the matched action to the Context
Definition at line 45 of file dispatchtype.cpp.
Referenced by inUse(), Cutelyst::DispatchTypeChained::match(), and Cutelyst::DispatchTypePath::match().
|
pure virtual |
Returns an uri for an action
Implemented in Cutelyst::DispatchTypeChained, and Cutelyst::DispatchTypePath.
Definition at line 27 of file dispatchtype.cpp.
Referenced by match().
|
friend |
Definition at line 81 of file dispatchtype.h.
|
friend |
Definition at line 80 of file dispatchtype.h.