From c40ce95e4c74639a48719dfc8f328eced7233b69 Mon Sep 17 00:00:00 2001 From: LeoKle Date: Wed, 1 May 2024 11:53:07 +0200 Subject: [PATCH] allow access to plugin ptr from external classes --- CMakeLists.txt | 1 + src/core/DataManager.cpp | 1 + src/main.cpp | 3 ++- src/main.h | 6 ++++++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/main.h diff --git a/CMakeLists.txt b/CMakeLists.txt index fb77e75..c2d743f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,7 @@ SET(SOURCE_FILES src/vACDM.cpp src/vACDM.h src/main.cpp + src/main.h src/Version.h ) diff --git a/src/core/DataManager.cpp b/src/core/DataManager.cpp index 2d6aa68..8c516a0 100644 --- a/src/core/DataManager.cpp +++ b/src/core/DataManager.cpp @@ -2,6 +2,7 @@ #include "core/Server.h" #include "log/Logger.h" +#include "main.h" #include "utils/Date.h" using namespace vacdm::com; diff --git a/src/main.cpp b/src/main.cpp index 01a82cb..e38f0bd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,9 +3,10 @@ #include #pragma warning(pop) +#include "main.h" #include "vACDM.h" -std::unique_ptr Plugin; +std::unique_ptr Plugin; void __declspec(dllexport) EuroScopePlugInInit(EuroScopePlugIn::CPlugIn **ppPlugInInstance) { Plugin.reset(new vacdm::vACDM()); diff --git a/src/main.h b/src/main.h new file mode 100644 index 0000000..eac3f50 --- /dev/null +++ b/src/main.h @@ -0,0 +1,6 @@ +#pragma once +#include + +#include "vACDM.h" + +extern std::unique_ptr Plugin; \ No newline at end of file