You can always specify a host API and give an object implementing that API to the plugin object.
E.g.
class HostApi
{
public:
virtual void doSomething() = 0;
};
class HostApi
{
public:
virtual void doSomething() = 0;
};
To copy to clipboard, switch view to plain text mode
The plugin API would then simply need something like
class Plugin
{
public:
virtual void setHost(HostApi *host) = 0;
};
class Plugin
{
public:
virtual void setHost(HostApi *host) = 0;
};
To copy to clipboard, switch view to plain text mode
The host application can implement the API in any object it likes, it could even hand each plugin a different instance of the implementation or even different implementations.
Cheers,
_
Bookmarks