/**
- * @file plugins/pluginmanager.h
+ * @file Plugins/pluginmanager.h
* @brief Manager for loadable modules (plugins)
*
* Copyright (c) 2011 Enar Vaikene
#include <version_rc.h>
#include <QObject>
+#include <QString>
+
+namespace eVaf {
/**
* Library for managing loadable modules (plugins).
class PluginManagerPrivate;
}
+/**
+ * Expands plugin names for the selected platform.
+ * @param name Name of the plugin
+ * @return Expanded plugin name
+ *
+ * This function expands the plugin name so that it becomes valid for the selected platform.
+ * For example, on Linux it adds the prefix "lib" to the beginning and extension ".so" to the end.
+ */
+inline QString expandPluginName(QString const & name)
+{
+#ifdef Q_OS_WIN32
+# ifdef Q_CC_MINGW
+ return "lib" + name + ".dll";
+# else
+ return name + ".dll";
+# endif
+#elif defined Q_OS_LINUX
+ return "lib" + name + ".so";
+#elif defined Q_OS_CYGWIN
+ return "cyg" + name + ".dll";
+#else
+ return name;
+#endif
+}
+
/**
* Plugin manager for eVaf applications.
*/
private:
- Internal::PluginManagerPrivate * dl;
+ Internal::PluginManagerPrivate * d;
};
-} // namespace Plugins
-
+} // namespace eVaf::Plugins
+} // namespace eVaf
#endif // pluginmanager.h