GemaMesh
The GeMA Mesh Plugin
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>
28 #include <gmPluginObjectFactory.h>
29 
30 #include "gmpGemaMesh.h"
31 #include "gmpGemaCellMesh.h"
32 #include "gmpGemaMeshVersion.h"
33 
36 {
37  Q_OBJECT
38  Q_PLUGIN_METADATA(IID GmPluginObjectFactoryInterfaceIID)
39  Q_INTERFACES(GmPluginObjectFactory)
40 
41 public:
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_MESH);
50 
51  if(objType == "nodes")
52  return new GmpGemaMesh(simulation, id, description, logger());
53  else if(objType == "cell")
54  return new GmpGemaCellMesh(simulation, id, description, logger());
55  else if(objType == "elem")
56  return new GmpGemaElementMesh(simulation, id, description, logger());
57  if(objType == "nodesd")
58  return new GmpGemaMeshD(simulation, id, description, logger());
59  else if(objType == "celld")
60  return new GmpGemaCellMeshD(simulation, id, description, logger());
61  else if(objType == "elemd")
62  return new GmpGemaElementMeshD(simulation, id, description, logger());
63  else
64  return NULL;
65  }
66 
68  virtual const QStringList& versionInfo() const { return GmpGemaMeshVersionInfo(); }
69 
71  virtual const QStringList& depVersionInfo() const { return GmpGemaMeshRevisionDependencies(); }
72 };
73 
74 #endif
75 
GmpGemaCellMeshBase< GmSingleVector > GmpGemaCellMesh
Typedef for a mesh that supports cell data using a GmSingleVector for storing node / cell data.
Definition: gmpGemaCellMesh.h:81
const GmLogCategory & logger()
GmpGemaElementMeshBase< GmDualVector > GmpGemaElementMeshD
Typedef for a mesh that supports element data using a GmDualVector for storing node / cell data.
Definition: gmpGemaCellMesh.h:147
virtual const QStringList & depVersionInfo() const
Retuns dependency version information for the plugin. See comments on the base class.
Definition: gmpGemaMeshFactory.h:71
Declaration of the GmpGemaCellMesh class.
GmpMeshBase< GmMesh, GmpGemaMeshCoordAccessor< GmpGemaMeshData< GmSingleVector >, GmSingleVector >, GmpGemaMeshGhostCoordAccessor< GmpMeshData< GmSingleVector >, GmSingleVector >, GmpGemaMeshData< GmSingleVector >, GmpGemaCellMeshData< GmSingleVector >, GmSingleVector > GmpGemaMesh
Typedef for a mesh that only supports node data using a GmSingleVector for storing node data.
Definition: gmpGemaMesh.h:35
GmpMeshBase< GmMesh, GmpGemaMeshCoordAccessor< GmpGemaMeshData< GmDualVector >, GmDualVector >, GmpGemaMeshGhostCoordAccessor< GmpMeshData< GmDualVector >, GmDualVector >, GmpGemaMeshData< GmDualVector >, GmpGemaCellMeshData< GmDualVector >, GmDualVector > GmpGemaMeshD
Typedef for a mesh that only supports node data using a GmDualVector for storing node data.
Definition: gmpGemaMesh.h:49
GmpGemaMeshFactory()
Default constructor.
Definition: gmpGemaMeshFactory.h:43
Declaration of the GmpGemaMesh class.
virtual const QStringList & versionInfo() const
Retuns version information for the plugin. See comments on the base class.
Definition: gmpGemaMeshFactory.h:68
#define GmPluginObjectFactoryInterfaceIID
GmpGemaElementMeshBase< GmSingleVector > GmpGemaElementMesh
Typedef for a mesh that supports element data using a GmSingleVector for storing node / cell data.
Definition: gmpGemaCellMesh.h:144
GmpGemaCellMeshBase< GmDualVector > GmpGemaCellMeshD
Typedef for a mesh that supports cell data using a GmDualVector for storing node / cell data.
Definition: gmpGemaCellMesh.h:84
Implementation of the GmpGemaMesh factory plugin.
Definition: gmpGemaMeshFactory.h:35