From b79a2894a4b10fca04489d3f7b7cbd750326a4a8 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 9 Feb 2006 08:06:59 +0000 Subject: [PATCH] Adjust to changes of the MEDMEM API --- src/CalculatorComponent/CalculatorEngine.cxx | 17 ++++++++++------- src/CalculatorComponent/CalculatorEngine.hxx | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/CalculatorComponent/CalculatorEngine.cxx b/src/CalculatorComponent/CalculatorEngine.cxx index dd0442a..b3c70c7 100644 --- a/src/CalculatorComponent/CalculatorEngine.cxx +++ b/src/CalculatorComponent/CalculatorEngine.cxx @@ -49,11 +49,14 @@ using namespace std; #define MED_TAILLE_PNOM MED_TAILLE_PNOM21 #endif +typedef FIELD TFieldDouble; +typedef FIELDTEMPLATE_I TFieldDouble_i; + //================================================================================ // static PrintFieldValues - shows field contents //================================================================================ -static void PrintFieldValues (FIELD * field, int until_index) +static void PrintFieldValues (TFieldDouble * field, int until_index) { const double * values = field -> getValue(); int nb_comp = field -> getNumberOfComponents(); @@ -275,7 +278,7 @@ SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Add(SALOME_MED::FIELDDOUBLE_ptr Fi MESSAGE("CalculatorEngine::Add Creation of the local field "<< totalLength); - FIELD * fieldloc = new FIELD(); + TFieldDouble * fieldloc = new TFieldDouble(); fieldloc -> allocValue(nb_comp1,len_value1); fieldloc -> setValue(new_value); fieldloc -> setName("-new_Add-"); @@ -296,7 +299,7 @@ SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Add(SALOME_MED::FIELDDOUBLE_ptr Fi SUPPORT *support1Clt=new SUPPORTClient(support1); fieldloc->setSupport(support1Clt); - FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ; + TFieldDouble_i * NewField = new TFieldDouble_i(fieldloc) ; SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = NewField->_this() ; //sleep(4); @@ -372,7 +375,7 @@ SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Mul(SALOME_MED::FIELDDOUBLE_ptr Ol MESSAGE("CalculatorEngine::Mul Creation of the local field "<< totalLength); - FIELD * fieldloc = new FIELD(); + TFieldDouble * fieldloc = new TFieldDouble(); fieldloc -> allocValue(nb_comp,len_value); fieldloc -> setValue(new_value); fieldloc -> setName("-new_Mul-"); @@ -387,7 +390,7 @@ SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Mul(SALOME_MED::FIELDDOUBLE_ptr Ol SUPPORT *supportClt=new SUPPORTClient(support); fieldloc->setSupport(supportClt); - FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ; + TFieldDouble_i * NewField = new TFieldDouble_i(fieldloc) ; SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = NewField->_this() ; //sleep(4); @@ -458,7 +461,7 @@ SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Constant(SALOME_MED::FIELDDOUBLE_p MESSAGE("CalculatorEngine::Constant Creation of the local field "<< totalLength); - FIELD * fieldloc = new FIELD(); + TFieldDouble * fieldloc = new TFieldDouble(); fieldloc -> allocValue(nb_comp,len_value); fieldloc -> setValue(new_value); fieldloc -> setName("-new_Const_Field-"); @@ -476,7 +479,7 @@ SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Constant(SALOME_MED::FIELDDOUBLE_p SUPPORT *supportClt=new SUPPORTClient(FirstSupport); fieldloc->setSupport(supportClt); - FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ; + TFieldDouble_i * NewField = new TFieldDouble_i(fieldloc) ; SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = NewField->_this() ; diff --git a/src/CalculatorComponent/CalculatorEngine.hxx b/src/CalculatorComponent/CalculatorEngine.hxx index 31b6149..1a74f1b 100644 --- a/src/CalculatorComponent/CalculatorEngine.hxx +++ b/src/CalculatorComponent/CalculatorEngine.hxx @@ -35,7 +35,7 @@ #include CORBA_CLIENT_HEADER(MED) #include "MEDMEM_Med_i.hxx" #include "MEDMEM_Field.hxx" -#include "MEDMEM_FieldDouble_i.hxx" +#include "MEDMEM_FieldTemplate_i.hxx" #include "SALOME_NamingService.hxx" -- 2.39.2