Back to index

salome-med  6.5.0
MEDCouplingMeshFieldFactoryComponentServ.cxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #include "MEDCouplingMeshFieldFactoryComponentServ.hxx"
00021 #include "MEDCouplingMeshFieldFactoryComponent.hxx"
00022 #include "MEDCouplingFieldDoubleServant.hxx"
00023 #include "MEDCouplingFieldTemplateServant.hxx"
00024 #include "MEDCouplingMultiFieldsServant.hxx"
00025 #include "MEDCouplingFieldOverTimeServant.hxx"
00026 #include "MEDCouplingExtrudedMeshServant.hxx"
00027 #include "MEDCouplingCMeshServant.hxx"
00028 #include "MEDCouplingUMeshServant.hxx"
00029 #include "DataArrayDoubleServant.hxx"
00030 #include "DataArrayIntServant.hxx"
00031 #include "MEDCouplingFieldDouble.hxx"
00032 #include "MEDCouplingFieldTemplate.hxx"
00033 #include "MEDCouplingMultiFields.hxx"
00034 #include "MEDCouplingFieldOverTime.hxx"
00035 #include "MEDCouplingExtrudedMesh.hxx"
00036 #include "MEDCouplingUMesh.hxx"
00037 #include "MEDCouplingCMesh.hxx"
00038 
00039 namespace SALOME_TEST
00040 {
00041   MEDCouplingMeshFieldFactoryComponent::MEDCouplingMeshFieldFactoryComponent(CORBA::ORB_ptr orb):_orb(orb)
00042   {
00043   }
00044 
00045   void MEDCouplingMeshFieldFactoryComponent::destroyFactory()
00046   {
00047     PortableServer::ObjectId_var oid = _default_POA()->servant_to_id(this);
00048     _default_POA()->deactivate_object(oid);
00049     _remove_ref();
00050   }
00051 
00052   void MEDCouplingMeshFieldFactoryComponent::shutdownOrb()
00053   {
00054     _orb->shutdown(0);
00055   }
00056 
00057   SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get1DMesh()
00058   {
00059     ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build1DMesh();
00060     ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
00061     m1->decrRef();
00062     SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
00063     return ret;
00064   }
00065 
00066   SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get2DMesh()
00067   {
00068     ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build2DMesh();
00069     ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
00070     m1->decrRef();
00071     SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
00072     return ret;
00073   }
00074 
00075   SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get3DMesh()
00076   {
00077     ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build3DMesh();
00078     ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
00079     m1->decrRef();
00080     SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
00081     return ret;
00082   }
00083 
00084   SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get3DSurfMesh()
00085   {
00086     ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build3DSurfMesh();
00087     ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
00088     m1->decrRef();
00089     SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
00090     return ret;
00091   }
00092 
00093   SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get0DMesh()
00094   {
00095     ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build0DMesh();
00096     ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
00097     m1->decrRef();
00098     SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
00099     return ret;
00100   }
00101 
00102   SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getM1DMesh()
00103   {
00104     ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::buildM1DMesh();
00105     ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
00106     m1->decrRef();
00107     SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
00108     return ret;
00109   }
00110 
00111   SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getExtrudedMesh()
00112   {
00113     ParaMEDMEM::MEDCouplingUMesh *m2D;
00114     ParaMEDMEM::MEDCouplingExtrudedMesh *m1=MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(m2D);
00115     m2D->decrRef();
00116     ParaMEDMEM::MEDCouplingExtrudedMeshServant *m=new ParaMEDMEM::MEDCouplingExtrudedMeshServant(m1);
00117     m1->decrRef();
00118     SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr ret=m->_this();
00119     return ret;
00120   }
00121 
00122   SALOME_MED::MEDCouplingCMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getCMesh()
00123   {
00124     ParaMEDMEM::MEDCouplingCMesh *m1=MEDCouplingCorbaServBasicsTest::buildCMesh();
00125     ParaMEDMEM::MEDCouplingCMeshServant *m=new ParaMEDMEM::MEDCouplingCMeshServant(m1);
00126     m1->decrRef();
00127     SALOME_MED::MEDCouplingCMeshCorbaInterface_ptr ret=m->_this();
00128     return ret;
00129   }
00130 
00131   SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldScalarOn2DNT()
00132   {
00133     ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DNT();
00134     ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
00135     field->decrRef();
00136     SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
00137     return ret;
00138   }
00139 
00140   SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldNodeScalarOn2DNT()
00141   {
00142     ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldNodeScalarOn2DNT();
00143     ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
00144     field->decrRef();
00145     SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
00146     return ret;
00147   }
00148 
00149   SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldScalarOn3DNT()
00150   {
00151     ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DNT();
00152     ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
00153     field->decrRef();
00154     SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
00155     return ret;
00156   }
00157 
00158   SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldScalarOn3DSurfWT()
00159   {
00160     ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfWT();
00161     ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
00162     field->decrRef();
00163     SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
00164     return ret;
00165   }
00166   
00167   SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldScalarOn3DSurfCOTI()
00168   {
00169     ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfCOTI();
00170     ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
00171     field->decrRef();
00172     SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
00173     return ret;
00174   }
00175 
00176   SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldScalarOn2DLT()
00177   {
00178     ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DLT();
00179     ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
00180     field->decrRef();
00181     SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
00182     return ret;
00183   }
00184 
00185   SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldGaussPt2DWT()
00186   {
00187     ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldGaussPt2DWT();
00188     ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
00189     field->decrRef();
00190     SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
00191     return ret;
00192   }
00193 
00194   SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldGaussPtNE2DWT()
00195   {
00196     ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldGaussPtNE2DWT();
00197     ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
00198     field->decrRef();
00199     SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
00200     return ret;
00201   }
00202 
00203   SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldVectorOnExtrudedWT()
00204   {
00205     ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldVectorOnExtrudedWT();
00206     ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
00207     field->decrRef();
00208     SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
00209     return ret;
00210   }
00211 
00212   SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldVectorOnCMeshWT()
00213   {
00214     ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldVectorOnCMeshWT();
00215     ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
00216     field->decrRef();
00217     SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
00218     return ret;
00219   }
00220   
00221   SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldTemplateCellOn2D()
00222   {
00223     ParaMEDMEM::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateCellOn2D();
00224     ParaMEDMEM::MEDCouplingFieldTemplateServant *m=new ParaMEDMEM::MEDCouplingFieldTemplateServant(field);
00225     field->decrRef();
00226     SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr ret=m->_this();
00227     return ret;
00228   }
00229   
00230   SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldTemplateNodeOn2D()
00231   {
00232     ParaMEDMEM::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateNodeOn2D();
00233     ParaMEDMEM::MEDCouplingFieldTemplateServant *m=new ParaMEDMEM::MEDCouplingFieldTemplateServant(field);
00234     field->decrRef();
00235     SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr ret=m->_this();
00236     return ret;
00237   }
00238   
00239   SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldTemplateGaussPtOn2D()
00240   {
00241     ParaMEDMEM::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussPtOn2D();
00242     ParaMEDMEM::MEDCouplingFieldTemplateServant *m=new ParaMEDMEM::MEDCouplingFieldTemplateServant(field);
00243     field->decrRef();
00244     SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr ret=m->_this();
00245     return ret;
00246   }
00247 
00248   SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldTemplateGaussNEOn2D()
00249   {
00250     ParaMEDMEM::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussNEOn2D();
00251     ParaMEDMEM::MEDCouplingFieldTemplateServant *m=new ParaMEDMEM::MEDCouplingFieldTemplateServant(field);
00252     field->decrRef();
00253     SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr ret=m->_this();
00254     return ret;
00255   }
00256 
00257   SALOME_MED::MEDCouplingMultiFieldsCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getMultiFields1()
00258   {
00259     ParaMEDMEM::MEDCouplingMultiFields *fields=MEDCouplingCorbaServBasicsTest::buildMultiFields1();
00260     ParaMEDMEM::MEDCouplingMultiFieldsServant *s=new ParaMEDMEM::MEDCouplingMultiFieldsServant(fields);
00261     fields->decrRef();
00262     SALOME_MED::MEDCouplingMultiFieldsCorbaInterface_ptr ret=s->_this();
00263     return ret;
00264   }
00265 
00266   SALOME_MED::DataArrayDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayDouble1()
00267   {
00268     ParaMEDMEM::DataArrayDouble *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayDouble1();
00269     ParaMEDMEM::DataArrayDoubleServant *retServ=new ParaMEDMEM::DataArrayDoubleServant(retCpp);
00270     retCpp->decrRef();
00271     return retServ->_this();
00272   }
00273 
00274   SALOME_MED::DataArrayDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayDouble2()
00275   {
00276     ParaMEDMEM::DataArrayDouble *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayDouble2();
00277     ParaMEDMEM::DataArrayDoubleServant *retServ=new ParaMEDMEM::DataArrayDoubleServant(retCpp);
00278     retCpp->decrRef();
00279     return retServ->_this();
00280   }
00281 
00282   SALOME_MED::DataArrayDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayDouble3()
00283   {
00284     ParaMEDMEM::DataArrayDouble *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayDouble3();
00285     ParaMEDMEM::DataArrayDoubleServant *retServ=new ParaMEDMEM::DataArrayDoubleServant(retCpp);
00286     retCpp->decrRef();
00287     return retServ->_this();
00288   }
00289 
00290   SALOME_MED::DataArrayIntCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayInt1()
00291   {
00292     ParaMEDMEM::DataArrayInt *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayInt1();
00293     ParaMEDMEM::DataArrayIntServant *retServ=new ParaMEDMEM::DataArrayIntServant(retCpp);
00294     retCpp->decrRef();
00295     return retServ->_this();
00296   }
00297 
00298   SALOME_MED::DataArrayIntCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayInt2()
00299   {
00300     ParaMEDMEM::DataArrayInt *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayInt2();
00301     ParaMEDMEM::DataArrayIntServant *retServ=new ParaMEDMEM::DataArrayIntServant(retCpp);
00302     retCpp->decrRef();
00303     return retServ->_this();
00304   }
00305 
00306   SALOME_MED::DataArrayIntCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayInt3()
00307   {
00308     ParaMEDMEM::DataArrayInt *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayInt3();
00309     ParaMEDMEM::DataArrayIntServant *retServ=new ParaMEDMEM::DataArrayIntServant(retCpp);
00310     retCpp->decrRef();
00311     return retServ->_this();
00312   }
00313 
00314   SALOME_MED::MEDCouplingFieldOverTimeCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getMultiFields2()
00315   {
00316     ParaMEDMEM::MEDCouplingFieldOverTime *fot=MEDCouplingCorbaServBasicsTest::buildMultiFields2();
00317     ParaMEDMEM::MEDCouplingFieldOverTimeServant *retServ=new ParaMEDMEM::MEDCouplingFieldOverTimeServant(fot);
00318     fot->decrRef();
00319     return retServ->_this();
00320   }
00321 }