Salome HOME
Copyright update 2022
[modules/med.git] / src / MEDCouplingCorba / Client / MEDCouplingFieldDoubleClient.cxx
index 0ca4da1f17865c95edecdc079f8d50c93e17284e..8dc1b414be254b6cd537ce29f8126337bf1f5ec1 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +16,7 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Author : Anthony Geay (CEA/DEN)
 
 #include "MEDCouplingFieldDoubleClient.hxx"
 #include "MEDCouplingMeshClient.hxx"
@@ -23,7 +24,7 @@
 
 #include <vector>
 
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
 
 MEDCouplingFieldDouble *MEDCouplingFieldDoubleClient::New(SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr)
 {
@@ -35,7 +36,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDoubleClient::New(SALOME_MED::MEDCouplin
   //1st CORBA call : getting all tiny info of all types (int, double string).
   fieldPtr->getTinyInfo(tinyL,tinyD,tinyS);
   int tinyLgth=tinyL->length();
-  std::vector<int> tinyLV(tinyLgth);
+  std::vector<mcIdType> tinyLV(tinyLgth);
   for(int i=0;i<tinyLgth;i++)
     tinyLV[i]=(*tinyL)[i];
   delete tinyL;
@@ -62,18 +63,18 @@ MEDCouplingFieldDouble *MEDCouplingFieldDoubleClient::New(SALOME_MED::MEDCouplin
   CORBA::release(meshPtr);
   ret->setMesh(mesh);
   mesh->decrRef();
-  DataArrayInt *array0;
+  DataArrayIdType *array0;
   std::vector<DataArrayDouble *> arrays;
   ret->resizeForUnserialization(tinyLV,array0,arrays);
   SALOME_TYPES::ListOfLong *bigArr0;
   SALOME_TYPES::ListOfDouble2 *bigArr;
-  //3rd CORBA invokation to get big content
+  //3rd CORBA invocation to get big content
   fieldPtr->getSerialisationData(bigArr0,bigArr);
   if(bigArr0->length()!=0)
     {
-      int *pt=array0->getPointer();
-      int lgth=array0->getNbOfElems();
-      for(int i=0;i<lgth;i++)
+      mcIdType *pt=array0->getPointer();
+      mcIdType lgth=array0->getNbOfElems();
+      for(mcIdType i=0;i<lgth;i++)
         pt[i]=(*bigArr0)[i];
     }
   delete bigArr0;