Version: 6.3.1

src/StdMeshers_I/StdMeshers_i.cxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  SMESH StdMeshers : implementaion of SMESH idl descriptions
00024 //  File   : StdMeshers_i.cxx
00025 //  Author : Julia DOROVSKIKH
00026 //  Module : SMESH
00027 //
00028 #include "SMESH_StdMeshers_I.hxx"
00029 
00030 #include "SMESH_Gen_i.hxx"
00031 
00032 #include "utilities.h"
00033 
00034 #include "StdMeshers_LocalLength_i.hxx"
00035 #include "StdMeshers_AutomaticLength_i.hxx"
00036 #include "StdMeshers_StartEndLength_i.hxx"
00037 #include "StdMeshers_Arithmetic1D_i.hxx"
00038 #include "StdMeshers_FixedPoints1D_i.hxx"
00039 #include "StdMeshers_NumberOfSegments_i.hxx"
00040 #include "StdMeshers_Deflection1D_i.hxx"
00041 #include "StdMeshers_Propagation_i.hxx"
00042 #include "StdMeshers_LengthFromEdges_i.hxx"
00043 #include "StdMeshers_QuadranglePreference_i.hxx"
00044 #include "StdMeshers_TrianglePreference_i.hxx"
00045 #include "StdMeshers_QuadraticMesh_i.hxx"
00046 #include "StdMeshers_MaxElementArea_i.hxx"
00047 #include "StdMeshers_MaxElementVolume_i.hxx"
00048 #include "StdMeshers_NotConformAllowed_i.hxx"
00049 #include "StdMeshers_ProjectionSource3D_i.hxx"
00050 #include "StdMeshers_ProjectionSource2D_i.hxx"
00051 #include "StdMeshers_ProjectionSource1D_i.hxx"
00052 #include "StdMeshers_NumberOfLayers_i.hxx"
00053 #include "StdMeshers_LayerDistribution_i.hxx"
00054 #include "StdMeshers_NumberOfLayers2D_i.hxx"
00055 #include "StdMeshers_LayerDistribution2D_i.hxx"
00056 #include "StdMeshers_SegmentLengthAroundVertex_i.hxx"
00057 #include "StdMeshers_MaxLength_i.hxx"
00058 #include "StdMeshers_QuadrangleParams_i.hxx"
00059 #include "StdMeshers_ImportSource1D_i.hxx"
00060 #include "StdMeshers_ImportSource2D_i.hxx"
00061 
00062 #include "StdMeshers_Regular_1D_i.hxx"
00063 #include "StdMeshers_MEFISTO_2D_i.hxx"
00064 #include "StdMeshers_Quadrangle_2D_i.hxx"
00065 #include "StdMeshers_Hexa_3D_i.hxx"
00066 #include "StdMeshers_Projection_1D_2D_3D_i.hxx"
00067 #include "StdMeshers_Prism_3D_i.hxx"
00068 #include "StdMeshers_SegmentAroundVertex_0D_i.hxx"
00069 #include "StdMeshers_CompositeSegment_1D_i.hxx"
00070 #include "StdMeshers_UseExisting_1D2D_i.hxx"
00071 #include "StdMeshers_RadialQuadrangle_1D2D_i.hxx"
00072 #include "StdMeshers_Import_1D_i.hxx"
00073 #include "StdMeshers_Import_1D2D_i.hxx"
00074 #include "StdMeshers_ViscousLayers_i.hxx"
00075 
00076 template <class T> class StdHypothesisCreator_i:public HypothesisCreator_i<T>
00077 {
00078   // as we have 'module StdMeshers' in SMESH_BasicHypothesis.idl
00079   virtual std::string GetModuleName() { return "StdMeshers"; }
00080 };
00081 
00082 //=============================================================================
00086 //=============================================================================
00087 
00088 extern "C"
00089 {
00090 STDMESHERS_I_EXPORT
00091   GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName)
00092   {
00093     MESSAGE("Get HypothesisCreator for " << aHypName);
00094 
00095     GenericHypothesisCreator_i* aCreator = 0;
00096 
00097     // Hypotheses
00098     if      (strcmp(aHypName, "LocalLength") == 0)
00099       aCreator = new StdHypothesisCreator_i<StdMeshers_LocalLength_i>;
00100     else if (strcmp(aHypName, "MaxLength") == 0)
00101       aCreator = new StdHypothesisCreator_i<StdMeshers_MaxLength_i>;
00102     else if (strcmp(aHypName, "NumberOfSegments") == 0)
00103       aCreator = new StdHypothesisCreator_i<StdMeshers_NumberOfSegments_i>;
00104     else if (strcmp(aHypName, "LengthFromEdges") == 0)
00105       aCreator = new StdHypothesisCreator_i<StdMeshers_LengthFromEdges_i>;
00106     else if (strcmp(aHypName, "NotConformAllowed") == 0)
00107       aCreator = new StdHypothesisCreator_i<StdMeshers_NotConformAllowed_i>;
00108     else if (strcmp(aHypName, "Propagation") == 0)
00109       aCreator = new StdHypothesisCreator_i<StdMeshers_Propagation_i>;
00110     else if (strcmp(aHypName, "MaxElementArea") == 0)
00111       aCreator = new StdHypothesisCreator_i<StdMeshers_MaxElementArea_i>;
00112     else if (strcmp(aHypName, "MaxElementVolume") == 0)
00113       aCreator = new StdHypothesisCreator_i<StdMeshers_MaxElementVolume_i>;
00114     else if (strcmp(aHypName, "StartEndLength") == 0)
00115       aCreator = new StdHypothesisCreator_i<StdMeshers_StartEndLength_i>;
00116     else if (strcmp(aHypName, "Deflection1D") == 0)
00117       aCreator = new StdHypothesisCreator_i<StdMeshers_Deflection1D_i>;
00118     else if (strcmp(aHypName, "FixedPoints1D") == 0)
00119       aCreator = new StdHypothesisCreator_i<StdMeshers_FixedPoints1D_i>;
00120     else if (strcmp(aHypName, "Arithmetic1D") == 0)
00121       aCreator = new StdHypothesisCreator_i<StdMeshers_Arithmetic1D_i>;
00122     else if (strcmp(aHypName, "AutomaticLength") == 0)
00123       aCreator = new StdHypothesisCreator_i<StdMeshers_AutomaticLength_i>;
00124     else if (strcmp(aHypName, "QuadranglePreference") == 0)
00125       aCreator = new StdHypothesisCreator_i<StdMeshers_QuadranglePreference_i>;
00126     else if (strcmp(aHypName, "TrianglePreference") == 0)
00127       aCreator = new StdHypothesisCreator_i<StdMeshers_TrianglePreference_i>;
00128     else if (strcmp(aHypName, "QuadraticMesh") == 0)
00129       aCreator = new StdHypothesisCreator_i<StdMeshers_QuadraticMesh_i>;
00130     else if (strcmp(aHypName, "ProjectionSource3D") == 0)
00131       aCreator = new StdHypothesisCreator_i<StdMeshers_ProjectionSource3D_i>;
00132     else if (strcmp(aHypName, "ProjectionSource2D") == 0)
00133       aCreator = new StdHypothesisCreator_i<StdMeshers_ProjectionSource2D_i>;
00134     else if (strcmp(aHypName, "ProjectionSource1D") == 0)
00135       aCreator = new StdHypothesisCreator_i<StdMeshers_ProjectionSource1D_i>;
00136     else if (strcmp(aHypName, "NumberOfLayers") == 0)
00137       aCreator = new StdHypothesisCreator_i<StdMeshers_NumberOfLayers_i>;
00138     else if (strcmp(aHypName, "LayerDistribution") == 0)
00139       aCreator = new StdHypothesisCreator_i<StdMeshers_LayerDistribution_i>;
00140     else if (strcmp(aHypName, "NumberOfLayers2D") == 0)
00141       aCreator = new StdHypothesisCreator_i<StdMeshers_NumberOfLayers2D_i>;
00142     else if (strcmp(aHypName, "LayerDistribution2D") == 0)
00143       aCreator = new StdHypothesisCreator_i<StdMeshers_LayerDistribution2D_i>;
00144     else if (strcmp(aHypName, "SegmentLengthAroundVertex") == 0)
00145       aCreator = new StdHypothesisCreator_i<StdMeshers_SegmentLengthAroundVertex_i>;
00146     else if (strcmp(aHypName, "QuadrangleParams") == 0)
00147       aCreator = new StdHypothesisCreator_i<StdMeshers_QuadrangleParams_i>;
00148     else if (strcmp(aHypName, "ImportSource1D") == 0)
00149       aCreator = new StdHypothesisCreator_i<StdMeshers_ImportSource1D_i>;
00150     else if (strcmp(aHypName, "ImportSource2D") == 0)
00151       aCreator = new StdHypothesisCreator_i<StdMeshers_ImportSource2D_i>;
00152     else if (strcmp(aHypName, "ViscousLayers") == 0)
00153       aCreator = new StdHypothesisCreator_i<StdMeshers_ViscousLayers_i>;
00154 
00155     // Algorithms
00156     else if (strcmp(aHypName, "Regular_1D") == 0)
00157       aCreator = new StdHypothesisCreator_i<StdMeshers_Regular_1D_i>;
00158     else if (strcmp(aHypName, "MEFISTO_2D") == 0)
00159       aCreator = new StdHypothesisCreator_i<StdMeshers_MEFISTO_2D_i>;
00160     else if (strcmp(aHypName, "Quadrangle_2D") == 0)
00161       aCreator = new StdHypothesisCreator_i<StdMeshers_Quadrangle_2D_i>;
00162     else if (strcmp(aHypName, "Hexa_3D") == 0)
00163       aCreator = new StdHypothesisCreator_i<StdMeshers_Hexa_3D_i>;
00164     else if (strcmp(aHypName, "Projection_1D") == 0)
00165       aCreator = new StdHypothesisCreator_i<StdMeshers_Projection_1D_i>;
00166     else if (strcmp(aHypName, "Projection_2D") == 0)
00167       aCreator = new StdHypothesisCreator_i<StdMeshers_Projection_2D_i>;
00168     else if (strcmp(aHypName, "Projection_3D") == 0)
00169       aCreator = new StdHypothesisCreator_i<StdMeshers_Projection_3D_i>;
00170     else if (strcmp(aHypName, "Prism_3D") == 0)
00171       aCreator = new StdHypothesisCreator_i<StdMeshers_Prism_3D_i>;
00172     else if (strcmp(aHypName, "RadialPrism_3D") == 0)
00173       aCreator = new StdHypothesisCreator_i<StdMeshers_RadialPrism_3D_i>;
00174     else if (strcmp(aHypName, "SegmentAroundVertex_0D") == 0)
00175       aCreator = new StdHypothesisCreator_i<StdMeshers_SegmentAroundVertex_0D_i>;
00176     else if (strcmp(aHypName, "CompositeSegment_1D") == 0)
00177       aCreator = new StdHypothesisCreator_i<StdMeshers_CompositeSegment_1D_i>;
00178     else if (strcmp(aHypName, "UseExisting_1D") == 0)
00179       aCreator = new StdHypothesisCreator_i<StdMeshers_UseExisting_1D_i>;
00180     else if (strcmp(aHypName, "UseExisting_2D") == 0)
00181       aCreator = new StdHypothesisCreator_i<StdMeshers_UseExisting_2D_i>;
00182     else if (strcmp(aHypName, "RadialQuadrangle_1D2D") == 0)
00183       aCreator = new StdHypothesisCreator_i<StdMeshers_RadialQuadrangle_1D2D_i>;
00184     else if (strcmp(aHypName, "Import_1D") == 0)
00185       aCreator = new StdHypothesisCreator_i<StdMeshers_Import_1D_i>;
00186     else if (strcmp(aHypName, "Import_1D2D") == 0)
00187       aCreator = new StdHypothesisCreator_i<StdMeshers_Import_1D2D_i>;
00188     else ;
00189 
00190     return aCreator;
00191   }
00192 }
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS