cutelyst 3.9.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
Cutelyst::DispatchTypeChained Class Referencefinal
Inheritance diagram for Cutelyst::DispatchTypeChained:

Public Member Functions

 DispatchTypeChained (QObject *parent=nullptr)
ActionexpandAction (const Context *c, Action *action) const final
virtual bool inUse () override
virtual QByteArray list () const override
 list the registered actions To be implemented by subclasses
virtual MatchType match (Context *c, const QString &path, const QStringList &args) const override
virtual bool registerAction (Action *action) override
 registerAction
virtual QString uriForAction (Action *action, const QStringList &captures) const override
Public Member Functions inherited from Cutelyst::DispatchType
 DispatchType (QObject *parent=nullptr)
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

Detailed Description

Definition at line 15 of file dispatchtypechained.h.

Constructor & Destructor Documentation

◆ DispatchTypeChained()

DispatchTypeChained::DispatchTypeChained ( QObject * parent = nullptr)
explicit

Constructs a DispatchTypeChained object with the given parent.

Definition at line 15 of file dispatchtypechained.cpp.

References Cutelyst::DispatchType::DispatchType().

Referenced by expandAction(), inUse(), list(), match(), registerAction(), and uriForAction().

◆ ~DispatchTypeChained()

DispatchTypeChained::~DispatchTypeChained ( )
overridevirtual

Definition at line 21 of file dispatchtypechained.cpp.

Member Function Documentation

◆ expandAction()

Action * DispatchTypeChained::expandAction ( const Context * c,
Action * action ) const
finalvirtual

Expand the action to a list of actions which is used in chained

Reimplemented from Cutelyst::DispatchType.

Definition at line 319 of file dispatchtypechained.cpp.

References DispatchTypeChained(), Cutelyst::Action::attribute(), and Cutelyst::Action::attributes().

◆ inUse()

bool DispatchTypeChained::inUse ( )
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 345 of file dispatchtypechained.cpp.

References DispatchTypeChained().

◆ list()

QByteArray DispatchTypeChained::list ( ) const
overridevirtual

◆ match()

DispatchType::MatchType DispatchTypeChained::match ( Context * c,
const QString & path,
const QStringList & args ) const
overridevirtual

◆ registerAction()

bool DispatchTypeChained::registerAction ( Action * action)
overridevirtual

◆ uriForAction()

QString DispatchTypeChained::uriForAction ( Action * action,
const QStringList & captures ) const
overridevirtual

Returns an uri for an action

Implements Cutelyst::DispatchType.

Definition at line 261 of file dispatchtypechained.cpp.

References DispatchTypeChained(), Cutelyst::Action::attributes(), and Cutelyst::Action::numberOfCaptures().