r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
IPlugin.hpp
Go to the documentation of this file.
1///
2/// @file IPlugin.hpp
3/// @brief This file contains the plugin interface
4/// @namespace utl
5///
6
7#pragma once
8
9#include <cstdint>
10#include <string>
11
12#if defined(_WIN32) || defined(_WIN64)
13#define PLUGIN_EXPORT __declspec(dllexport)
14#else
15#define PLUGIN_EXPORT
16#endif
17
18namespace utl
19{
20
21 enum class PluginType : uint8_t
22 {
23 AUDIO = 0,
26 RENDERER = 2,
27 GAME_CLIENT = 3,
28 GAME_SERVER = 4,
29 UNKNOWN = 255
30 };
31
32 ///
33 /// @interface IPlugin
34 /// @brief Interface for plugins
35 /// @namespace utl
36 ///
37 class IPlugin
38 {
39
40 public:
41 virtual ~IPlugin() = default;
42 [[nodiscard]] virtual const std::string getName() const = 0;
43 [[nodiscard]] virtual PluginType getType() const = 0;
44
45 }; // interface IPlugin
46} // namespace utl
Interface for plugins.
Definition IPlugin.hpp:38
virtual const std::string getName() const =0
virtual PluginType getType() const =0
virtual ~IPlugin()=default
static constexpr std::uint32_t NETWORK_SERVER
Definition Event.hpp:18
PluginType
Definition IPlugin.hpp:22
static constexpr std::uint32_t NETWORK_CLIENT
Definition Event.hpp:17