mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Added a new WebRouterNode (skeleton), and made WebRoot inherit from it.
This commit is contained in:
parent
3704c031f2
commit
10d3f2fd87
@ -138,7 +138,7 @@ WebServer *WebRoot::get_server() {
|
||||
return Object::cast_to<WebServer>(get_tree());
|
||||
}
|
||||
|
||||
WebRoot::WebRoot() : WebNode() {
|
||||
WebRoot::WebRoot() : WebRouterNode() {
|
||||
}
|
||||
|
||||
WebRoot::~WebRoot() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef WEB_ROOT_H
|
||||
#define WEB_ROOT_H
|
||||
|
||||
#include "core/http/web_node.h"
|
||||
#include "web_router_node.h"
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <string>
|
||||
@ -14,8 +14,8 @@
|
||||
class Request;
|
||||
class WebServer;
|
||||
|
||||
class WebRoot : public WebNode {
|
||||
RCPP_OBJECT(WebRoot, WebNode);
|
||||
class WebRoot : public WebRouterNode {
|
||||
RCPP_OBJECT(WebRoot, WebRouterNode);
|
||||
|
||||
public:
|
||||
static std::string default_error_404_body;
|
||||
|
12
core/http/web_router_node.cpp
Normal file
12
core/http/web_router_node.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
#include "web_router_node.h"
|
||||
|
||||
void WebRouterNode::handle_request_main(Request *request) {
|
||||
}
|
||||
|
||||
WebRouterNode::WebRouterNode() :
|
||||
WebNode() {
|
||||
}
|
||||
|
||||
WebRouterNode::~WebRouterNode() {
|
||||
}
|
16
core/http/web_router_node.h
Normal file
16
core/http/web_router_node.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef WEB_ROUTER_NODE_H
|
||||
#define WEB_ROUTER_NODE_H
|
||||
|
||||
#include "web_node.h"
|
||||
|
||||
class WebRouterNode : public WebNode {
|
||||
RCPP_OBJECT(WebRouterNode, WebNode);
|
||||
|
||||
public:
|
||||
void handle_request_main(Request *request);
|
||||
|
||||
WebRouterNode();
|
||||
~WebRouterNode();
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user