From 159c7846898b857dba4d240e339ec46efed3a42d Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 8 Jan 2022 12:39:04 +0100 Subject: [PATCH] Removed HandlerInstance. --- core/http/handler_instance.cpp | 13 ------------- core/http/handler_instance.h | 17 ----------------- core/http/request.h | 2 -- core/http/web_root.h | 4 ++-- modules/drogon/drogon_web_server.h | 2 -- modules/drogon/request.h | 2 -- modules/paged_list/paged_list.cpp | 2 -- 7 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 core/http/handler_instance.cpp delete mode 100644 core/http/handler_instance.h diff --git a/core/http/handler_instance.cpp b/core/http/handler_instance.cpp deleted file mode 100644 index d00ae1b..0000000 --- a/core/http/handler_instance.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "handler_instance.h" - -#include "request.h" -#include "core/object.h" - -HandlerInstance::HandlerInstance() { - instance = nullptr; -} - -HandlerInstance::HandlerInstance(std::function p_handler_func, Object *p_instance) { - handler_func = p_handler_func; - instance = p_instance; -} \ No newline at end of file diff --git a/core/http/handler_instance.h b/core/http/handler_instance.h deleted file mode 100644 index 0451cf1..0000000 --- a/core/http/handler_instance.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef HANDLER_INSTANCE_H -#define HANDLER_INSTANCE_H - -#include - -class Object; -class Request; - -struct HandlerInstance { - std::function handler_func; - Object *instance; - - HandlerInstance(); - HandlerInstance(std::function p_handler_func, Object *p_instance = nullptr); -}; - -#endif \ No newline at end of file diff --git a/core/http/request.h b/core/http/request.h index 32d508a..f61622a 100644 --- a/core/http/request.h +++ b/core/http/request.h @@ -11,8 +11,6 @@ #include "core/object.h" #include "core/reference.h" -#include "handler_instance.h" - #include "http_enums.h" class WebServer; diff --git a/core/http/web_root.h b/core/http/web_root.h index 8164c0d..bee8395 100644 --- a/core/http/web_root.h +++ b/core/http/web_root.h @@ -6,11 +6,9 @@ #include #include #include -#include #include "web_router_node.h" -#include "handler_instance.h" #include "middleware.h" class Request; @@ -21,6 +19,8 @@ class Request; // Update the rest of the modules to the new systems +//remove std::strings + class WebRoot : public WebRouterNode { RCPP_OBJECT(WebRoot, WebRouterNode); diff --git a/modules/drogon/drogon_web_server.h b/modules/drogon/drogon_web_server.h index f042130..2a650ca 100644 --- a/modules/drogon/drogon_web_server.h +++ b/modules/drogon/drogon_web_server.h @@ -12,8 +12,6 @@ #include #include -#include "core/http/handler_instance.h" - #include #include #include diff --git a/modules/drogon/request.h b/modules/drogon/request.h index 41e83d4..5110a33 100644 --- a/modules/drogon/request.h +++ b/modules/drogon/request.h @@ -11,8 +11,6 @@ #include "http/HttpRequestImpl.h" #include "http/HttpResponse.h" -#include "core/http/handler_instance.h" - //using namespace drogon; class DrogonWebServer; diff --git a/modules/paged_list/paged_list.cpp b/modules/paged_list/paged_list.cpp index 6af49c7..0d292df 100644 --- a/modules/paged_list/paged_list.cpp +++ b/modules/paged_list/paged_list.cpp @@ -6,8 +6,6 @@ #include "core/file_cache.h" -#include "core/http/handler_instance.h" - #include "core/database/database_manager.h" #include "core/html/html_builder.h"