2 * @file Plugins/ipluginfactory.h
3 * @brief Common plugin factory interface for all the eVaf modules
6 * Copyright (c) 2011 Enar Vaikene
8 * This file is part of the eVaf C++ cross-platform application development framework.
10 * This file can be used under the terms of the GNU General Public License
11 * version 3.0 as published by the Free Software Foundation and appearing in
12 * the file LICENSE included in the packaging of this file. Please review the
13 * the following information to ensure the GNU General Public License version
14 * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
16 * Alternatively, this file may be used in accordance with the Commercial License
17 * Agreement provided with the Software.
20 #ifndef __PLUGINS_IPLUGINFACTORY_H
21 #define __PLUGINS_IPLUGINFACTORY_H
23 #include "libplugins.h"
32 * Common plugin factory interface for eVaf modules.
33 * @code#include <Plugins/iPluginFactory>
35 * The iPluginFactory interface is implemented by modules that export more than one
38 * Modules that implement only one iPlugin interface, use the iPlugin interface object
41 class PLUGINS_EXPORT iPluginFactory
: public QObject
48 iPluginFactory() : QObject() {}
50 /// Empty virtual destructor
51 virtual ~iPluginFactory() {}
54 * Creates the requested iPlugin interface object
55 * @param name Name of the interface
56 * @return The requested iPlugin interface object or 0 if failed
58 * This function creates the requested iPlugin interface object. Modules can implement more than
59 * one iPlugin interface objects and use names to identify them.
61 * If the requested interface object cannot be created, this function returns 0.
63 * The module implementing the iPluginFactory interface is responsible for destroying all the
64 * created iPlugin interface objects.
66 virtual QObject
* create(const QString
& name
) = 0;
70 } // namespace eVaf::Plugins
73 #endif // ipluginfactory.h