DSPatch v.11.4.1
Loading...
Searching...
No Matches
DSPatch::Plugin Class Referencefinal

Component plugin loader. More...

#include <Plugin.h>

Public Member Functions

 Plugin (const Plugin &)=delete
 
Pluginoperator= (const Plugin &)=delete
 
 Plugin (const std::string &pluginPath)
 
bool IsLoaded () const
 
Component::SPtr Create () const
 

Detailed Description

Component plugin loader.

A component, packaged into a shared library (.so / .dylib / .dll) and exported via the EXPORT_PLUGIN macro, can be dynamically loaded into a host application using the Plugin class. Each Plugin object represents one Component class. (Example component plugins)

A Plugin should be constructed with the absolute path of the plugin (shared library) to be loaded. Once instantiated you should check that the plugin was successfully loaded by calling IsLoaded(). Thereafter, the contained component type can be instantiated (mutiple times) via the Create() method.

Definition at line 69 of file Plugin.h.

Constructor & Destructor Documentation

◆ Plugin()

DSPatch::Plugin::Plugin ( const std::string & pluginPath)
inlineexplicit

Definition at line 89 of file Plugin.h.

◆ ~Plugin()

DSPatch::Plugin::~Plugin ( )
inline

Definition at line 120 of file Plugin.h.

Member Function Documentation

◆ Create()

Component::SPtr DSPatch::Plugin::Create ( ) const
inline

Definition at line 140 of file Plugin.h.

◆ IsLoaded()

bool DSPatch::Plugin::IsLoaded ( ) const
inline

Definition at line 134 of file Plugin.h.


The documentation for this class was generated from the following file: