Base class for passing arguments to loadable ARC components. More...
#include <Plugin.h>
Public Member Functions | |
PluginsFactory * | get_factory (void) |
Glib::Module * | get_module (void) |
Base class for passing arguments to loadable ARC components.
During its creation constructor function of ARC loadable component expects instance of class inherited from this one or wrapped in it. Then dynamic type casting is used for obtaining class of expected kind.
PluginsFactory* Arc::PluginArgument::get_factory | ( | void | ) |
Returns pointer to factory which instantiated plugin.
Because factory usually destroys/unloads plugins in its destructor it should be safe to keep this pointer inside plugin for later use. But one must always check.
Glib::Module* Arc::PluginArgument::get_module | ( | void | ) |
Returns pointer to loadable module/library which contains plugin.
Corresponding factory keeps list of modules till itself is destroyed. So it should be safe to keep that pointer. But care must be taken if module contains persistent plugins. Such modules stay in memory after factory is detroyed. So it is advisable to use obtained pointer only in constructor function of plugin.