1 // Copyright (C) 2012-2013 ALNEOS
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.alneos.com/ or email : contact@alneos.fr
19 #include "utilities.h"
21 #include "GMSHPlugin_Hypothesis_i.hxx"
22 #include "GMSHPlugin_Hypothesis_2D_i.hxx"
23 #include "GMSHPlugin_GMSH_i.hxx"
24 #include "GMSHPlugin_GMSH_2D_i.hxx"
26 template <class T> class GMSHPlugin_Creator_i:public HypothesisCreator_i<T>
28 // as we have 'module GMSHPlugin' in GMSHPlugin_Algorithm.idl
29 virtual std::string GetModuleName() { return "GMSHPlugin"; }
32 //=============================================================================
36 //=============================================================================
41 GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName)
43 MESSAGE("GetHypothesisCreator " << aHypName);
45 GenericHypothesisCreator_i* aCreator = 0;
50 if (strcmp(aHypName, "GMSH") == 0)
51 aCreator = new GMSHPlugin_Creator_i<GMSHPlugin_GMSH_i>;
52 else if (strcmp(aHypName, "GMSH_2D") == 0)
53 aCreator = new GMSHPlugin_Creator_i<GMSHPlugin_GMSH_2D_i>;
55 else if (strcmp(aHypName, "GMSH_Parameters") == 0)
56 aCreator = new GMSHPlugin_Creator_i<GMSHPlugin_Hypothesis_i>;
57 else if (strcmp(aHypName, "GMSH_Parameters_2D") == 0)
58 aCreator = new GMSHPlugin_Creator_i<GMSHPlugin_Hypothesis_2D_i>;