GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
gmPluginObjectFactory.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMA_PLUGIN_OBJECT_FACTORY_H_
25#define _GEMA_PLUGIN_OBJECT_FACTORY_H_
26
27#include <QtPlugin>
28
29#include "gmLog.h"
30
31class QString;
33class GmPluginObject;
34
37{
38public:
40
41 virtual ~GmPluginObjectFactory();
42
60 virtual GmPluginObject* instance(QString category, QString objType, GmSimulationData* simulation, QString id, QString description) = 0;
61
76 virtual const QMap<QString, QString>& versionInfo() const = 0;
77
86 virtual const QStringList& depVersionInfo() const = 0;
87
88protected:
92 const GmLogCategory& logger() { return _logger; }
93
94private:
96};
97
99#define GmPluginObjectFactoryInterfaceIID "Gema.PluginFactoryInterface.1.1"
100
103
104#endif
105
Class representing a category with multiple logging levels.
Definition gmLog.h:58
Factory class exported by every plugin object.
Definition gmPluginObjectFactory.h:37
GmLogCategory _logger
Private logger used by every object instanced by this plugin to emmit messages.
Definition gmPluginObjectFactory.h:95
const GmLogCategory & logger()
Returns a reference to the internal logger that should be used by every object instanciated by this f...
Definition gmPluginObjectFactory.h:92
virtual const QMap< QString, QString > & versionInfo() const =0
Virtual function responsible for returning the set of version information strings for the current plu...
virtual const QStringList & depVersionInfo() const =0
Virtual function responsible for returning a set of pairs containing the names of the libraries that ...
virtual GmPluginObject * instance(QString category, QString objType, GmSimulationData *simulation, QString id, QString description)=0
Instances a new object of the specified object type, returning it as a GmPluginObject....
Base interface class for all object plugins.
Definition gmPluginObject.h:37
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
Declaration of support functions and macros for information logging.
#define GmPluginObjectFactoryInterfaceIID
Macro used to identify this interface (and version)
Definition gmPluginObjectFactory.h:99