Cutelyst  2.13.0
dispatchtype.cpp
1 /*
2  * Copyright (C) 2013-2017 Daniel Nicoletti <dantti12@gmail.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 #include "dispatchtype.h"
19 
20 #include "context_p.h"
21 
22 using namespace Cutelyst;
23 
24 DispatchType::DispatchType(QObject *parent) :
25  QObject(parent)
26 {
27 }
28 
29 DispatchType::~DispatchType()
30 {
31 }
32 
34 {
35  Q_UNUSED(c)
36  Q_UNUSED(action)
37  return nullptr;
38 }
39 
40 QString DispatchType::uriForAction(Action *action, const QStringList &captures) const
41 {
42  Q_UNUSED(action)
43  Q_UNUSED(captures)
44  return QString();
45 }
46 
48 {
49  Q_UNUSED(action)
50  return true;
51 }
52 
54 {
55  return false;
56 }
57 
59 {
60  c->d_ptr->action = action;
61 }
62 
63 #include "moc_dispatchtype.cpp"
Cutelyst::Context
The Cutelyst Context.
Definition: context.h:50
Cutelyst::DispatchType::DispatchType
DispatchType(QObject *parent=nullptr)
Definition: dispatchtype.cpp:24
Cutelyst::DispatchType::setupMatchedAction
void setupMatchedAction(Context *c, Action *action) const
Definition: dispatchtype.cpp:58
Cutelyst::DispatchType::uriForAction
virtual QString uriForAction(Action *action, const QStringList &captures) const =0
Definition: dispatchtype.cpp:40
Cutelyst::DispatchType::expandAction
virtual Action * expandAction(const Context *c, Action *action) const
Definition: dispatchtype.cpp:33
Cutelyst
The Cutelyst namespace holds all public Cutelyst API.
Definition: Mainpage.dox:7
Cutelyst::DispatchType::registerAction
virtual bool registerAction(Action *action)
registerAction
Definition: dispatchtype.cpp:47
Cutelyst::Action
This class represents a Cutelyst Action.
Definition: action.h:47
Cutelyst::DispatchType::isLowPrecedence
virtual bool isLowPrecedence() const
Definition: dispatchtype.cpp:53