summaryrefslogtreecommitdiff
path: root/libadhocutil/plugins.h
diff options
context:
space:
mode:
Diffstat (limited to 'libadhocutil/plugins.h')
-rw-r--r--libadhocutil/plugins.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/libadhocutil/plugins.h b/libadhocutil/plugins.h
index 4e81b62..d73ffec 100644
--- a/libadhocutil/plugins.h
+++ b/libadhocutil/plugins.h
@@ -30,6 +30,12 @@ namespace AdHoc {
NoSuchPluginException(const std::string &, const std::type_info &);
};
+ /// Base class for all plugin implementations.
+ class DLL_PUBLIC AbstractPluginImplementation {
+ public:
+ virtual ~AbstractPluginImplementation() = 0;
+ };
+
/// Base class for untyped plugins.
class DLL_PUBLIC Plugin {
public:
@@ -40,6 +46,9 @@ namespace AdHoc {
/// Get the plugin type from the subclass.
virtual const std::type_info & type() const = 0;
+ /// Get the abstract base plugin implementation.
+ virtual const AbstractPluginImplementation * implementation() const = 0;
+
/// The name the plugin was installed with.
const std::string name;
/// The filename the plugin was installed in.
@@ -81,7 +90,7 @@ namespace AdHoc {
/// Get the type of this plugin.
const std::type_info & type() const override;
/// Get the implementation of this plugin.
- const T * implementation() const;
+ const T * implementation() const override;
private:
const T * impl;