Member Function Documentation

The plugin system will take over the control of the provided plugin instance and will destroy it in case it's no longer required. The plugin system will also handle the plugin lifecycle by calling "onInstall()", "onStartup()", "onShutdown()" and "onUninstall()" at the appropriate time.

void qsf::PluginSystem::addPluginSearchDirectory

(

const std::string &

path

)

Add a search directory to look for plugin dependencies.

Parameters

[in]

path

UTF-8 absolute path in platform-independent notation of the directory to search in (e.g. "D:/sample_project/bin")

const char * qsf::PluginSystem::getName

(

)

const

inlineoverridevirtual

Get the name of the system.

Returns

Null terminated ASCII name of the system, never a null pointer, do not manipulate or destroy the returned name

UTF-8 filename in platform-independent notation of the plugin to load in (e.g. "sample.dll")

Returns

"true" if all went fine or the plugin is already loaded, else "false"

Remarks

Inside the plugin file, the plugin function entry point is named "CreatePluginInstance_<plugin name>()" (e.g. "CreatePluginInstance_sample()" if the plugin name is "sample"). Sadly, we can't give each plugin the same plugin function entry point name. While this would work on MS Windows, it would not work on Mac OS X due to the dylib behaviour there: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/dlsym.3.html "If dlsym() is called with a handle, returned by dlopen() then only that image and any libraries it depends on are searched for symbol."