Explorar o código

introduce the plugin definition

Sven Czarnian %!s(int64=3) %!d(string=hai) anos
pai
achega
18d285031c
Modificáronse 5 ficheiros con 155 adicións e 0 borrados
  1. 42 0
      src/ArrivalMANagerMain.cpp
  2. 27 0
      src/PlugIn.cpp
  3. 49 0
      src/PlugIn.h
  4. 12 0
      src/stdafx.cpp
  5. 25 0
      src/stdafx.h

+ 42 - 0
src/ArrivalMANagerMain.cpp

@@ -0,0 +1,42 @@
+/*
+ * Author:
+ *   Sven Czarnian <devel@svcz.de>
+ * Brief:
+ *   Implements the entry functions for EuroScope
+ * Copyright:
+ *   2020-2021 Sven Czarnian
+ * License:
+ *   GNU General Public License v3 (GPLv3)
+ */
+
+#include "stdafx.h"
+
+#include "PlugIn.h"
+
+using namespace arrivalmanager;
+
+BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
+    (void)module;
+    (void)reserved;
+
+    switch (reason) {
+    case DLL_PROCESS_ATTACH:
+    case DLL_PROCESS_DETACH:
+    default:
+        break;
+    }
+
+    return TRUE;
+}
+
+static PlugIn* __plugin = nullptr;
+
+void __declspec(dllexport) EuroScopePlugInInit(EuroScopePlugIn::CPlugIn** ppPlugInInstance) {
+    *ppPlugInInstance = __plugin = new PlugIn();
+}
+
+void __declspec(dllexport) EuroScopePlugInExit() {
+    if (nullptr != __plugin)
+        delete __plugin;
+    __plugin = nullptr;
+}

+ 27 - 0
src/PlugIn.cpp

@@ -0,0 +1,27 @@
+/*
+ * Author:
+ *   Sven Czarnian <devel@svcz.de>
+ * Brief:
+ *   Implements the EuroScope plug-in definition
+ * Copyright:
+ *   2021 Sven Czarnian
+ * License:
+ *   GNU General Public License v3 (GPLv3)
+ */
+
+#include "stdafx.h"
+
+#include "PlugIn.h"
+
+EXTERN_C IMAGE_DOS_HEADER __ImageBase;
+
+using namespace arrivalmanager;
+
+PlugIn::PlugIn() :
+        EuroScopePlugIn::CPlugIn(EuroScopePlugIn::COMPATIBILITY_CODE,
+                                 PLUGIN_NAME,
+                                 PLUGIN_VERSION,
+                                 PLUGIN_DEVELOPER,
+                                 PLUGIN_COPYRIGHT) { }
+
+PlugIn::~PlugIn() noexcept { }

+ 49 - 0
src/PlugIn.h

@@ -0,0 +1,49 @@
+/*
+ * @brief Defines the EuroScope plug-in
+ * @file src/PlugIn.h
+ * @author Sven Czarnian <devel@svcz.de>
+ * @copyright Copyright 2021 Sven Czarnian
+ * @license This project is published under the GNU General Public License v3 (GPLv3)
+ */
+
+#pragma once
+
+#include <functional>
+
+#pragma warning(push, 0)
+#include <EuroScopePlugIn.h>
+#pragma warning(pop)
+
+namespace arrivalmanager {
+    /**
+     * @brief Defines the EuroScope plug-in
+     * @ingroup euroscope
+     */
+    class PlugIn : public EuroScopePlugIn::CPlugIn {
+    public:
+        /**
+         * @brief Defines the different internal and external tag functions
+         */
+        enum class TagItemFunction {
+        };
+
+    private:
+        enum class TagItemElement {
+        };
+
+    public:
+        /**
+         * @brief Creates a new plug-in
+         */
+        PlugIn();
+        /**
+         * @brief Destroys all internal strcutures
+         */
+        ~PlugIn() noexcept;
+
+        PlugIn(const PlugIn&) = delete;
+        PlugIn(PlugIn&&) = delete;
+        PlugIn& operator=(const PlugIn&) = delete;
+        PlugIn& operator=(PlugIn&&) = delete;
+    };
+}

+ 12 - 0
src/stdafx.cpp

@@ -0,0 +1,12 @@
+/*
+ * Author:
+ *   Sven Czarnian <devel@svcz.de>
+ * Brief:
+ *   Implements the version checker
+ * Copyright:
+ *   2020-2021 Sven Czarnian
+ * License:
+ *   GNU General Public License v3 (GPLv3)
+ */
+
+#include "stdafx.h"

+ 25 - 0
src/stdafx.h

@@ -0,0 +1,25 @@
+/*
+ * @brief Defines the include header for all euroscope files
+ * @file euroscope/stdafx.h
+ * @author Sven Czarnian <devel@svcz.de>
+ * @copyright Copyright 2020-2021 Sven Czarnian
+ * @license This project is published under the GNU General Public License v3 (GPLv3)
+ */
+
+#pragma once
+
+#include <algorithm>
+
+#include "res/targetver.h"
+
+#include <Windows.h>
+using std::min;
+using std::max;
+
+#include <version.h>
+
+#pragma warning(disable: 4458)
+#pragma warning(push, 0)
+#include <gdiplus.h>
+#pragma warning(pop)
+#pragma warning(default: 4458)