2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42#ifndef EXPRESS_DISPATCHER_CONTROLLER_H
43#define EXPRESS_DISPATCHER_CONTROLLER_H
57#ifndef DOXYGEN_SHOULD_SKIP_THIS
68 Controller(
const std::shared_ptr<web::http::
server::
Request>& request,
70 Controller(
const Controller& controller);
72 Controller& operator=(
const Controller& controller)
noexcept;
74 void setRootRoute(RootRoute* rootRoute);
75 void setCurrentRoute(Route* currentRoute);
77 const std::shared_ptr<Request>& getRequest();
78 const std::shared_ptr<Response>& getResponse();
82 void next(
const std::string& how)
const;
83 bool nextRouterCalled();
84 bool dispatchNext(
const std::string& parentMountPath);
86 bool setStrictRouting(
bool strictRouting);
88 bool getStrictRouting()
const;
90 enum Flags { NONE = 0, NEXT = 1 << 0, NEXT_ROUTE = 1 << 1, NEXT_ROUTER = 1 << 2 };
93 std::shared_ptr<Request> request;
94 std::shared_ptr<Response> response;
96 RootRoute* rootRoute =
nullptr;
98 mutable Route* lastRoute =
nullptr;
99 Route* currentRoute =
nullptr;
103 unsigned long lastTick = 0;
105 mutable int flags = NONE;
#define DECLARE_ROUTER_REQUESTMETHOD(METHOD)
static express::Router getRouter()
static WebApp getWebApp(const std::string &name)
static WebApp getWebApp(const std::string &name)
int main(int argc, char *argv[])