MmProcess
The GeMA Mesh Mapping Process Plugin
Loading...
Searching...
No Matches
gmpMmProcessFactory.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_MM_PROCESS_FACTORY_H_
25#define _GEMA_PLUGIN_MM_PROCESS_FACTORY_H_
26
27#include <QObject>
28
30#include "gmpMmProcess.h"
31#include "gmpMmBucketIndex.h"
32#include "gmpMmProcessVersion.h"
33
36{
38 Q_PLUGIN_METADATA(IID GmPluginObjectFactoryInterfaceIID)
40
41public:
44
45 // See comments on the base class method declaration
46 virtual GmPluginObject* instance(QString category, QString objType, GmSimulationData* simulation,
47 QString id, QString description)
48 {
49 assert(category == GM_PLUGIN_PROCESS || category == GM_PLUGIN_SPATIALINDEX);
50
51 if(category == GM_PLUGIN_SPATIALINDEX)
52 {
53 if(objType == "node")
54 return new GmpMmNodeBucketIndex(simulation, id, description, logger());
55 else if(objType == "cell")
56 return new GmpMmCellBucketIndex(simulation, id, description, logger());
57 else if(objType == "gauss")
58 return new GmpMmGaussBucketIndex(simulation, id, description, logger());
59 }
60 else if(category == GM_PLUGIN_PROCESS)
61 {
62 if(objType == "mm")
63 return new GmpMmProcess(simulation, id, description, logger());
64 }
65
66 return NULL;
67 }
68
70 virtual const QMap<QString, QString>& versionInfo() const { return GmpMmProcessVersionInfo(); }
71
73 virtual const QStringList& depVersionInfo() const { return GmpMmProcessRevisionDependencies(); }
74};
75
76#endif
77
const GmLogCategory & logger()
Class GmpMmCellBucketIndex.
Definition gmpMmBucketIndex.h:352
Class GmpMmGaussBucketIndex.
Definition gmpMmBucketIndex.h:448
Class GmpMmNodeBucketIndex.
Definition gmpMmBucketIndex.h:281
Implementation of the MmProcess factory plugin.
Definition gmpMmProcessFactory.h:36
virtual const QMap< QString, QString > & versionInfo() const
Retuns version information for the plugin. See comments on the base class.
Definition gmpMmProcessFactory.h:70
GmpMmProcessFactory()
Default constructor.
Definition gmpMmProcessFactory.h:43
virtual const QStringList & depVersionInfo() const
Retuns dependency version information for the plugin. See comments on the base class.
Definition gmpMmProcessFactory.h:73
Basic class for the Mesh mapping process plugin object.
Definition gmpMmProcess.h:39
#define GmPluginObjectFactoryInterfaceIID
Declaration of the GmpMmBucketIndex class.
Declaration of the GmpMmProcess class.
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT