Cutelyst
2.14.2
Cutelyst
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
33
Action
*
DispatchType::expandAction
(
const
Context
*c,
Action
*action)
const
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
47
bool
DispatchType::registerAction
(
Action
*action)
48
{
49
Q_UNUSED(action)
50
return
true
;
51
}
52
53
bool
DispatchType::isLowPrecedence
()
const
54
{
55
return
false
;
56
}
57
58
void
DispatchType::setupMatchedAction
(
Context
*c,
Action
*action)
const
59
{
60
c->d_ptr->action = action;
61
}
62
63
#include "moc_dispatchtype.cpp"
Cutelyst::Context
The Cutelyst Context.
Definition:
context.h:52
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
QObject
Cutelyst::DispatchType::uriForAction
virtual QString uriForAction(Action *action, const QStringList &captures) const =0
Definition:
dispatchtype.cpp:40
QString
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:8
Cutelyst::DispatchType::registerAction
virtual bool registerAction(Action *action)
registerAction
Definition:
dispatchtype.cpp:47
Cutelyst::Action
This class represents a Cutelyst Action.
Definition:
action.h:48
Cutelyst::DispatchType::isLowPrecedence
virtual bool isLowPrecedence() const
Definition:
dispatchtype.cpp:53
QStringList
Generated by
1.8.20