GemaMesh
The GeMA Mesh Plugin
Loading...
Searching...
No Matches
gmpGemaMeshFactory.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_GEMA_MESH_FACTORY_H_
25#define _GEMA_PLUGIN_GEMA_MESH_FACTORY_H_
26
27#include <QObject>
29
30#include "gmpGemaMesh.h"
31#include "gmpGemaMeshVersion.h"
32
35{
37 Q_PLUGIN_METADATA(IID GmPluginObjectFactoryInterfaceIID)
39
40public:
43
44 // See comments on the base class method declaration
45 virtual GmPluginObject* instance(QString category, QString objType, GmSimulationData* simulation,
46 QString id, QString description)
47 {
48 assert(category == GM_PLUGIN_MESH);
49
50 if(objType == "nodes")
51 return new GmpGemaMesh(simulation, id, description, logger());
52 else if(objType == "cell")
53 return new GmpGemaCellMesh(simulation, id, description, logger());
54 else if(objType == "elem")
55 return new GmpGemaElementMesh(simulation, id, description, logger());
56 if(objType == "nodesd")
57 return new GmpGemaMeshD(simulation, id, description, logger());
58 else if(objType == "celld")
59 return new GmpGemaCellMeshD(simulation, id, description, logger());
60 else if(objType == "elemd")
61 return new GmpGemaElementMeshD(simulation, id, description, logger());
62 else
63 return NULL;
64 }
65
67 virtual const QMap<QString, QString>& versionInfo() const { return GmpGemaMeshVersionInfo(); }
68
70 virtual const QStringList& depVersionInfo() const { return GmpGemaMeshRevisionDependencies(); }
71};
72
73#endif
74
const GmLogCategory & logger()
Implementation of the GmpGemaMesh factory plugin.
Definition gmpGemaMeshFactory.h:35
GmpGemaMeshFactory()
Default constructor.
Definition gmpGemaMeshFactory.h:42
virtual const QStringList & depVersionInfo() const
Retuns dependency version information for the plugin. See comments on the base class.
Definition gmpGemaMeshFactory.h:70
virtual const QMap< QString, QString > & versionInfo() const
Retuns version information for the plugin. See comments on the base class.
Definition gmpGemaMeshFactory.h:67
#define GmPluginObjectFactoryInterfaceIID
Declaration of the GmpGemaMesh class.
GmpElementMesh< GmDualVector > GmpGemaElementMeshD
Typedef for a mesh that supports element data using a GmDualVector for storing node / cell data.
Definition gmpGemaMesh.h:48
GmpCellMesh< GmSingleVector > GmpGemaCellMesh
Typedef for a mesh that supports cell data using a GmSingleVector for storing node / cell data.
Definition gmpGemaMesh.h:38
GmpNodeMesh< GmMesh, GmDualVector > GmpGemaMeshD
Typedef for a mesh that only supports node data using a GmDualVector for storing node data.
Definition gmpGemaMesh.h:34
GmpNodeMesh< GmMesh, GmSingleVector > GmpGemaMesh
Typedef for a mesh that only supports node data using a GmSingleVector for storing node data.
Definition gmpGemaMesh.h:31
GmpCellMesh< GmDualVector > GmpGemaCellMeshD
Typedef for a mesh that supports cell data using a GmDualVector for storing node / cell data.
Definition gmpGemaMesh.h:41
GmpElementMesh< GmSingleVector > GmpGemaElementMesh
Typedef for a mesh that supports element data using a GmSingleVector for storing node / cell data.
Definition gmpGemaMesh.h:45
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT