introduce the plugin definition

This commit is contained in:
Sven Czarnian
2021-08-09 22:28:00 +02:00
parent 0035c97c20
commit 18d285031c
5 changed files with 155 additions and 0 deletions

View File

@@ -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
src/PlugIn.cpp Normal file
View File

@@ -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
src/PlugIn.h Normal file
View File

@@ -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
src/stdafx.cpp Normal file
View File

@@ -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
src/stdafx.h Normal file
View File

@@ -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)