-// 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
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingMultiFields *MEDCouplingMultiFieldsClient::New(SALOME_MED::MEDCouplingMultiFieldsCorbaInterface_ptr fieldPtr)
{
CORBA::Long nbOfFields;
CORBA::Long nbOfMeshes=fieldPtr->getMainTinyInfo(tinyL,tinyD,nbOfArrays,nbOfFields);
int tinyLgth=tinyL->length();
- std::vector<int> mainI(tinyLgth);
+ std::vector<mcIdType> mainI(tinyLgth);
for(int i=0;i<tinyLgth;i++)
mainI[i]=(*tinyL)[i];
delete tinyL; tinyL=0;
for(CORBA::Long i=0;i<nbOfFields;i++)
{
fieldPtr->getTinyInfo(i,tinyL,tinyD,tinyS);
- int tinyLgth=tinyL->length();
- std::vector<int> tinyLV(tinyLgth);
- for(int j=0;j<tinyLgth;j++)
+ int tinyLgth2=tinyL->length();
+ std::vector<mcIdType> tinyLV(tinyLgth2);
+ for(int j=0;j<tinyLgth2;j++)
tinyLV[j]=(*tinyL)[j];
delete tinyL; tinyL=0;
//
- tinyLgth=tinyD->length();
- std::vector<double> tinyLD(tinyLgth);
- for(int j=0;j<tinyLgth;j++)
+ tinyLgth2=tinyD->length();
+ std::vector<double> tinyLD(tinyLgth2);
+ for(int j=0;j<tinyLgth2;j++)
tinyLD[j]=(*tinyD)[j];
delete tinyD; tinyD=0;
//
- tinyLgth=tinyS->length();
- std::vector<std::string> tinyLS(tinyLgth);
- for(int j=0;j<tinyLgth;j++)
+ tinyLgth2=tinyS->length();
+ std::vector<std::string> tinyLS(tinyLgth2);
+ for(int j=0;j<tinyLgth2;j++)
tinyLS[j]=(*tinyS)[j];
delete tinyS; tinyS=0;
TypeOfField type=(TypeOfField) tinyLV[0];
MEDCouplingFieldTemplate *f1=MEDCouplingFieldTemplate::New(type);
//
- DataArrayInt *array0;
+ DataArrayIdType *array0;
f1->resizeForUnserialization(tinyLV,array0);
if(array0)
{
fieldPtr->getSerialisationData(i,tinyL);
- tinyLgth=tinyL->length();
- int *ptr=array0->getPointer();
- for(int j=0;j<tinyLgth;j++)
+ tinyLgth2=tinyL->length();
+ mcIdType *ptr=array0->getPointer();
+ for(int j=0;j<tinyLgth2;j++)
ptr[j]=(*tinyL)[j];
delete tinyL; tinyL=0;
}