cae  0.0.0
Cross-API graphics engine
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,
24 NETWORK = 1,
25 RENDERER = 2,
26 SHADER_IR = 3,
28 WINDOW = 5,
29 UNDEFINED = 255,
30 };
31
32 enum class PluginPlatform : uint8_t
33 {
34 LINUX = 0,
35 MACOSX = 1,
36 WINDOWS = 2,
37 ALL = 255
38 };
39
40 ///
41 /// @interface IPlugin
42 /// @brief Interface for plugins
43 /// @namespace utl
44 ///
45 class IPlugin
46 {
47
48 public:
49 virtual ~IPlugin() = default;
50
51 ///
52 /// @return The name of the plugin
53 /// @brief Get the name of the plugin
54 ///
55 [[nodiscard]] virtual std::string getName() const = 0;
56
57 ///
58 /// @return The type of the plugin
59 /// @brief Get the type of the plugin
60 ///
61 [[nodiscard]] virtual PluginType getType() const = 0;
62
63 ///
64 /// @return The handled platform of the plugin
65 /// @brief Get the handled platform of the plugin
66 ///
67 [[nodiscard]] virtual PluginPlatform getPlatform() const = 0;
68
69 }; // interface IPlugin
70} // namespace utl
Interface for plugins.
Definition IPlugin.hpp:46
virtual PluginPlatform getPlatform() const =0
Get the handled platform of the plugin.
virtual std::string getName() const =0
Get the name of the plugin.
virtual PluginType getType() const =0
Get the type of the plugin.
virtual ~IPlugin()=default
PluginPlatform
Definition IPlugin.hpp:33
PluginType
Definition IPlugin.hpp:22