]> SALOME platform Git repositories - modules/smesh.git/blob - src/StdMeshers_I/StdMeshers_i.cxx
Salome HOME
Correct uninitialized variables
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_i.cxx
1 //  SMESH StdMeshers : implementaion of SMESH idl descriptions
2 //
3 //  Copyright (C) 2003  CEA
4 // 
5 //  This library is free software; you can redistribute it and/or 
6 //  modify it under the terms of the GNU Lesser General Public 
7 //  License as published by the Free Software Foundation; either 
8 //  version 2.1 of the License. 
9 // 
10 //  This library is distributed in the hope that it will be useful, 
11 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
12 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
13 //  Lesser General Public License for more details. 
14 // 
15 //  You should have received a copy of the GNU Lesser General Public 
16 //  License along with this library; if not, write to the Free Software 
17 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
18 // 
19 //  See http://www.salome-platform.org or email : webmaster.salome@opencascade.org
20 //
21 //
22 //
23 //  File   : StdMeshers_i.cxx
24 //  Author : Julia DOROVSKIKH
25 //  Module : SMESH
26 //  $Header$
27
28 #include "SMESH_StdMeshers_I.hxx"
29
30 #include "SMESH_Gen_i.hxx"
31
32 #include "utilities.h"
33
34 #include "StdMeshers_LocalLength_i.hxx"
35 #include "StdMeshers_AutomaticLength_i.hxx"
36 #include "StdMeshers_StartEndLength_i.hxx"
37 #include "StdMeshers_Arithmetic1D_i.hxx"
38 #include "StdMeshers_NumberOfSegments_i.hxx"
39 #include "StdMeshers_Deflection1D_i.hxx"
40 #include "StdMeshers_Propagation_i.hxx"
41 #include "StdMeshers_LengthFromEdges_i.hxx"
42 #include "StdMeshers_QuadranglePreference_i.hxx"
43 #include "StdMeshers_MaxElementArea_i.hxx"
44 #include "StdMeshers_MaxElementVolume_i.hxx"
45 #include "StdMeshers_NotConformAllowed_i.hxx"
46
47 #include "StdMeshers_Regular_1D_i.hxx"
48 #include "StdMeshers_MEFISTO_2D_i.hxx"
49 #include "StdMeshers_Quadrangle_2D_i.hxx"
50 #include "StdMeshers_Hexa_3D_i.hxx"
51
52 using namespace std;
53
54 //=============================================================================
55 /*!
56  *
57  */
58 //=============================================================================
59
60 extern "C"
61 {
62 STDMESHERS_I_EXPORT
63   GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName)
64   {
65     MESSAGE("Get HypothesisCreator for " << aHypName);
66
67     GenericHypothesisCreator_i* aCreator = 0;
68
69     // Hypotheses
70     if      (strcmp(aHypName, "LocalLength") == 0)
71       aCreator = new HypothesisCreator_i<StdMeshers_LocalLength_i>;
72     else if (strcmp(aHypName, "NumberOfSegments") == 0)
73       aCreator = new HypothesisCreator_i<StdMeshers_NumberOfSegments_i>;
74     else if (strcmp(aHypName, "LengthFromEdges") == 0)
75       aCreator = new HypothesisCreator_i<StdMeshers_LengthFromEdges_i>;
76     else if (strcmp(aHypName, "NotConformAllowed") == 0)
77       aCreator = new HypothesisCreator_i<StdMeshers_NotConformAllowed_i>;
78     else if (strcmp(aHypName, "Propagation") == 0)
79       aCreator = new HypothesisCreator_i<StdMeshers_Propagation_i>;
80     else if (strcmp(aHypName, "MaxElementArea") == 0)
81       aCreator = new HypothesisCreator_i<StdMeshers_MaxElementArea_i>;
82     else if (strcmp(aHypName, "MaxElementVolume") == 0)
83       aCreator = new HypothesisCreator_i<StdMeshers_MaxElementVolume_i>;
84     else if (strcmp(aHypName, "StartEndLength") == 0)
85       aCreator = new HypothesisCreator_i<StdMeshers_StartEndLength_i>;
86     else if (strcmp(aHypName, "Deflection1D") == 0)
87       aCreator = new HypothesisCreator_i<StdMeshers_Deflection1D_i>;
88     else if (strcmp(aHypName, "Arithmetic1D") == 0)
89       aCreator = new HypothesisCreator_i<StdMeshers_Arithmetic1D_i>;
90     else if (strcmp(aHypName, "AutomaticLength") == 0)
91       aCreator = new HypothesisCreator_i<StdMeshers_AutomaticLength_i>;
92     else if (strcmp(aHypName, "QuadranglePreference") == 0)
93       aCreator = new HypothesisCreator_i<StdMeshers_QuadranglePreference_i>;
94
95     // Algorithms
96     else if (strcmp(aHypName, "Regular_1D") == 0)
97       aCreator = new HypothesisCreator_i<StdMeshers_Regular_1D_i>;
98     else if (strcmp(aHypName, "MEFISTO_2D") == 0)
99       aCreator = new HypothesisCreator_i<StdMeshers_MEFISTO_2D_i>;
100     else if (strcmp(aHypName, "Quadrangle_2D") == 0)
101       aCreator = new HypothesisCreator_i<StdMeshers_Quadrangle_2D_i>;
102     else if (strcmp(aHypName, "Hexa_3D") == 0)
103       aCreator = new HypothesisCreator_i<StdMeshers_Hexa_3D_i>;
104     else ;
105
106     return aCreator;
107   }
108 }