6 #ifndef SWIFT_CORE_PLUGIN_MANAGER_H
7 #define SWIFT_CORE_PLUGIN_MANAGER_H
32 virtual void collectPlugins();
37 QString getPluginConfigId(
const QString &identifier);
44 return qobject_cast<T *>(getPluginByIdImpl(identifier));
53 virtual const QString &pluginDirectory()
const;
60 virtual bool isValid(
const QJsonObject &metadata)
const;
63 QString pluginIdentifier(
const QJsonObject &metadata)
const;
66 QString getIdByPlugin(
const QObject *instance)
const;
73 bool tryLoad(
const QString &path);
77 QObject *getPluginByIdImpl(
const QString &identifier);
Base class for all contexts that provide plugin support.
const swift::misc::CSequence< QJsonObject > & getPlugins() const
Gets direct access to all plugins' metadata.
T * getPluginById(const QString &identifier)
Loads the given plugin (if necessary), casts it to the desired type and returns its instance....
virtual swift::misc::CSequence< QString > acceptedIids() const =0
Returns the list of valid IIDs for the implementation.
Generic sequential container with value semantics.
Backend services of the swift project, like dealing with the network or the simulators.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.