1 // SMESH StdMeshers : implementaion of SMESH idl descriptions
3 // Copyright (C) 2003 CEA
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.
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.
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
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File : StdMeshers_i.cxx
24 // Author : Julia DOROVSKIKH
28 #include "SMESH_StdMeshers_I.hxx"
30 #include "SMESH_Gen_i.hxx"
32 #include "utilities.h"
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_QuadraticMesh_i.hxx"
44 #include "StdMeshers_MaxElementArea_i.hxx"
45 #include "StdMeshers_MaxElementVolume_i.hxx"
46 #include "StdMeshers_NotConformAllowed_i.hxx"
47 #include "StdMeshers_ProjectionSource3D_i.hxx"
48 #include "StdMeshers_ProjectionSource2D_i.hxx"
49 #include "StdMeshers_ProjectionSource1D_i.hxx"
50 #include "StdMeshers_NumberOfLayers_i.hxx"
51 #include "StdMeshers_LayerDistribution_i.hxx"
52 #include "StdMeshers_SegmentLengthAroundVertex_i.hxx"
54 #include "StdMeshers_Regular_1D_i.hxx"
55 #include "StdMeshers_MEFISTO_2D_i.hxx"
56 #include "StdMeshers_Quadrangle_2D_i.hxx"
57 #include "StdMeshers_Hexa_3D_i.hxx"
58 #include "StdMeshers_Projection_1D_2D_3D_i.hxx"
59 #include "StdMeshers_Prism_3D_i.hxx"
60 #include "StdMeshers_SegmentAroundVertex_0D_i.hxx"
61 #include "StdMeshers_CompositeSegment_1D_i.hxx"
64 template <class T> class StdHypothesisCreator_i:public HypothesisCreator_i<T>
66 // as we have 'module StdMeshers' in SMESH_BasicHypothesis.idl
67 virtual std::string GetModuleName() { return "StdMeshers"; }
70 //=============================================================================
74 //=============================================================================
79 GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName)
81 MESSAGE("Get HypothesisCreator for " << aHypName);
83 GenericHypothesisCreator_i* aCreator = 0;
86 if (strcmp(aHypName, "LocalLength") == 0)
87 aCreator = new StdHypothesisCreator_i<StdMeshers_LocalLength_i>;
88 else if (strcmp(aHypName, "NumberOfSegments") == 0)
89 aCreator = new StdHypothesisCreator_i<StdMeshers_NumberOfSegments_i>;
90 else if (strcmp(aHypName, "LengthFromEdges") == 0)
91 aCreator = new StdHypothesisCreator_i<StdMeshers_LengthFromEdges_i>;
92 else if (strcmp(aHypName, "NotConformAllowed") == 0)
93 aCreator = new StdHypothesisCreator_i<StdMeshers_NotConformAllowed_i>;
94 else if (strcmp(aHypName, "Propagation") == 0)
95 aCreator = new StdHypothesisCreator_i<StdMeshers_Propagation_i>;
96 else if (strcmp(aHypName, "MaxElementArea") == 0)
97 aCreator = new StdHypothesisCreator_i<StdMeshers_MaxElementArea_i>;
98 else if (strcmp(aHypName, "MaxElementVolume") == 0)
99 aCreator = new StdHypothesisCreator_i<StdMeshers_MaxElementVolume_i>;
100 else if (strcmp(aHypName, "StartEndLength") == 0)
101 aCreator = new StdHypothesisCreator_i<StdMeshers_StartEndLength_i>;
102 else if (strcmp(aHypName, "Deflection1D") == 0)
103 aCreator = new StdHypothesisCreator_i<StdMeshers_Deflection1D_i>;
104 else if (strcmp(aHypName, "Arithmetic1D") == 0)
105 aCreator = new StdHypothesisCreator_i<StdMeshers_Arithmetic1D_i>;
106 else if (strcmp(aHypName, "AutomaticLength") == 0)
107 aCreator = new StdHypothesisCreator_i<StdMeshers_AutomaticLength_i>;
108 else if (strcmp(aHypName, "QuadranglePreference") == 0)
109 aCreator = new StdHypothesisCreator_i<StdMeshers_QuadranglePreference_i>;
110 else if (strcmp(aHypName, "QuadraticMesh") == 0)
111 aCreator = new StdHypothesisCreator_i<StdMeshers_QuadraticMesh_i>;
112 else if (strcmp(aHypName, "ProjectionSource3D") == 0)
113 aCreator = new StdHypothesisCreator_i<StdMeshers_ProjectionSource3D_i>;
114 else if (strcmp(aHypName, "ProjectionSource2D") == 0)
115 aCreator = new StdHypothesisCreator_i<StdMeshers_ProjectionSource2D_i>;
116 else if (strcmp(aHypName, "ProjectionSource1D") == 0)
117 aCreator = new StdHypothesisCreator_i<StdMeshers_ProjectionSource1D_i>;
118 else if (strcmp(aHypName, "NumberOfLayers") == 0)
119 aCreator = new StdHypothesisCreator_i<StdMeshers_NumberOfLayers_i>;
120 else if (strcmp(aHypName, "LayerDistribution") == 0)
121 aCreator = new StdHypothesisCreator_i<StdMeshers_LayerDistribution_i>;
122 else if (strcmp(aHypName, "SegmentLengthAroundVertex") == 0)
123 aCreator = new StdHypothesisCreator_i<StdMeshers_SegmentLengthAroundVertex_i>;
126 else if (strcmp(aHypName, "Regular_1D") == 0)
127 aCreator = new StdHypothesisCreator_i<StdMeshers_Regular_1D_i>;
128 else if (strcmp(aHypName, "MEFISTO_2D") == 0)
129 aCreator = new StdHypothesisCreator_i<StdMeshers_MEFISTO_2D_i>;
130 else if (strcmp(aHypName, "Quadrangle_2D") == 0)
131 aCreator = new StdHypothesisCreator_i<StdMeshers_Quadrangle_2D_i>;
132 else if (strcmp(aHypName, "Hexa_3D") == 0)
133 aCreator = new StdHypothesisCreator_i<StdMeshers_Hexa_3D_i>;
134 else if (strcmp(aHypName, "Projection_1D") == 0)
135 aCreator = new StdHypothesisCreator_i<StdMeshers_Projection_1D_i>;
136 else if (strcmp(aHypName, "Projection_2D") == 0)
137 aCreator = new StdHypothesisCreator_i<StdMeshers_Projection_2D_i>;
138 else if (strcmp(aHypName, "Projection_3D") == 0)
139 aCreator = new StdHypothesisCreator_i<StdMeshers_Projection_3D_i>;
140 else if (strcmp(aHypName, "Prism_3D") == 0)
141 aCreator = new StdHypothesisCreator_i<StdMeshers_Prism_3D_i>;
142 else if (strcmp(aHypName, "RadialPrism_3D") == 0)
143 aCreator = new StdHypothesisCreator_i<StdMeshers_RadialPrism_3D_i>;
144 else if (strcmp(aHypName, "SegmentAroundVertex_0D") == 0)
145 aCreator = new StdHypothesisCreator_i<StdMeshers_SegmentAroundVertex_0D_i>;
146 else if (strcmp(aHypName, "CompositeSegment_1D") == 0)
147 aCreator = new StdHypothesisCreator_i<StdMeshers_CompositeSegment_1D_i>;