FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
expresscpp/include/expresscpp/handlerfunctor.hpp at master · kassane/expresscpp · GitHub
kassane
/
expresscpp
Public
forked from
expresscpp/expresscpp
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
expresscpp
/
include
/
expresscpp
/
handlerfunctor.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (28 loc) · 712 Bytes
Breadcrumbs
expresscpp
/
include
/
expresscpp
/
handlerfunctor.hpp
Copy path
File metadata and controls
39 lines (28 loc) · 712 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
pragma
once
#
include
"
expresscpp/types.hpp
"
#
include
"
expresscpp/exports.hpp
"
namespace
expresscpp
{
class
EXPRESSCPP_API
HandlerFunctor {
public:
HandlerFunctor
(){};
HandlerFunctor
(
handler_wn_t
handler) {
handler_with_next_ = handler;
with_next =
true
;
};
HandlerFunctor
(
handler_t
handler) {
handler_ = handler;
with_next =
false
;
};
void
operator
()(
request_t
req,
response_t
res) {
handler_
(req, res);
}
void
operator
()(
request_t
req,
response_t
res,
next_t
next) {
handler_with_next_
(req, res, next);
}
bool
getWith_next
()
const
;
private:
bool
with_next{
false
};
handler_t
handler_;
handler_wn_t
handler_with_next_;
};
}
//
namespace expresscpp
Back
|
FazBrowse Home
|
New Git URL