uibk_703807-Advanced-CXX/exercises/task16/plugin.hpp

20 lines
385 B
C++
Raw Normal View History

2020-11-19 23:47:47 +01:00
#ifndef PLUGIN_HPP
#define PLUGIN_HPP
#include <memory>
/// Interface for plugins.
class Plugin {
public:
virtual void run() = 0;
2020-11-20 23:18:40 +01:00
virtual ~Plugin() {}
2020-11-19 23:47:47 +01:00
};
/// Symbol of the plugin constructor function.
const auto PLUGIN_CONSTRUCTOR = "create_plugin";
/// Type of the plugin constructor function.
using PLUGIN_CONSTRUCTOR_T = std::unique_ptr<Plugin> (*)();
#endif // PLUGIN_HPP