cutelyst  4.5.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
dispatchtypepath.h
1 /*
2  * SPDX-FileCopyrightText: (C) 2013-2022 Daniel Nicoletti <dantti12@gmail.com>
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 #ifndef CUTELYST_DISPATCHTYPEPATH_H
6 #define CUTELYST_DISPATCHTYPEPATH_H
7 
8 #include <Cutelyst/action.h>
9 #include <Cutelyst/cutelyst_export.h>
10 #include <Cutelyst/dispatchtype.h>
11 
12 namespace Cutelyst {
13 
14 class DispatchTypePathPrivate;
22 class CUTELYST_EXPORT DispatchTypePath final : public DispatchType
23 {
24  Q_OBJECT
25  Q_DECLARE_PRIVATE(DispatchTypePath)
26 public:
30  explicit DispatchTypePath(QObject *parent = nullptr);
34  ~DispatchTypePath() override;
35 
36  QByteArray list() const override;
37 
38  MatchType match(Context *c, QStringView path, const QStringList &args) const override;
39 
40  bool registerAction(Action *action) override;
41 
42  bool inUse() override;
43 
48  QString uriForAction(Action *action, const QStringList &captures) const override;
49 
50 protected:
51  DispatchTypePathPrivate *d_ptr;
52 };
53 
54 } // namespace Cutelyst
55 
56 #endif // DispatchTypePath_H
This class represents a Cutelyst Action.
Definition: action.h:35
The Cutelyst Context.
Definition: context.h:42
Describes a path dispatch type.
Abstract class to described a dispatch type.
Definition: dispatchtype.h:25
The Cutelyst namespace holds all public Cutelyst API.