]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
NRI : Replace Med by MED.
authornri <nri@opencascade.com>
Tue, 20 May 2003 12:31:20 +0000 (12:31 +0000)
committernri <nri@opencascade.com>
Tue, 20 May 2003 12:31:20 +0000 (12:31 +0000)
src/MED/MED_test1.py
src/MED/MED_test2.py
src/MED/Med_Gen_i.cxx
src/MEDGUI/MedGUI.cxx
src/MedCorba_Swig/batchmode_medcorba_test.py
src/MedCorba_Swig/medcorba_test.py
src/MedMem/FieldOf_i.hxx
src/MedMem/Med_i.cxx
src/MedMem/Mesh_i.cxx
src/MedMem/Support_i.cxx

index 8ce0e3f66cc694ebf3d29d37797995c7d2948c29..815fae438ab4127efbf6a1f1b38ad128f57fbccc 100755 (executable)
@@ -9,7 +9,7 @@
 
 import salome
 
-med=salome.lcc.FindOrLoadComponent("FactoryServer", "Med")
+med=salome.lcc.FindOrLoadComponent("FactoryServer", "MED")
 
 import os
 filePath=os.getenv("SALOME_BUILD")
index 1169d5c7806348e611a38918e4d3250de79d3462..47ce56eb82f4aaedaa284bc0e396248f0279dec4 100755 (executable)
@@ -14,7 +14,7 @@ import os
 filePath=os.getenv("SALOME_BUILD")
 filePath=filePath+"/../SALOME_ROOT/data/"
 
-med=salome.lcc.FindOrLoadComponent("FactoryServer", "Med")
+med=salome.lcc.FindOrLoadComponent("FactoryServer", "MED")
 
 try:
   mesh=med.readMeshInFile(filePath+"/mesh.med", salome.myStudyName,"Mesh 1")
index b9cb07b2e0e53653fdd28d2a86a037b49d5c2436..ae87fc1f25519aae7d6142c1f5604fd62c99526d 100755 (executable)
@@ -127,7 +127,7 @@ void Med_Gen_i::addInStudy(SALOMEDS::Study_var myStudy)
   myBuilder->NewCommand();
   
   // Create SComponent labelled 'Med' if it doesn't already exit
-  SALOMEDS::SComponent_var medfather = myStudy->FindComponent("Med");
+  SALOMEDS::SComponent_var medfather = myStudy->FindComponent("MED");
   if ( CORBA::is_nil(medfather) )
     {
       // mpv: component label must be created in spite of "Locked" study flag state
@@ -135,10 +135,18 @@ void Med_Gen_i::addInStudy(SALOMEDS::Study_var myStudy)
       if (aLocked) myStudy->GetProperties()->SetLocked(false);
       
       MESSAGE("Add Component Med");
-      medfather = myBuilder->NewComponent("Med");
+      medfather = myBuilder->NewComponent("MED");
       SALOMEDS::GenericAttribute_var anAttr = myBuilder->FindOrCreateAttribute(medfather, "AttributeName");
       SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
-      aName->SetValue("Med");
+      //NRI      aName->SetValue("Med");
+
+      CORBA::Object_var objVarN = _NS->Resolve("/Kernel/ModulCatalog");
+      SALOME_ModuleCatalog::ModuleCatalog_var Catalogue  = SALOME_ModuleCatalog::ModuleCatalog::_narrow(objVarN);
+      SALOME_ModuleCatalog::Acomponent_var Comp = Catalogue->GetComponent( "MED" );
+      if ( !Comp->_is_nil() ) {
+       aName->SetValue( Comp->componentusername() );
+      }    
+
       //           Utilisation de this  deconseillee par Paul ??
       //           myBuilder->DefineComponentInstance(medfather,POA_Engines::Med_Gen::_this());
       CORBA::Object_var myO = _poa->id_to_reference(*_id); // this ior...
@@ -310,7 +318,7 @@ throw (SALOME::SALOME_Exception)
                                  SALOME::BAD_PARAM);
 
         SALOMEDS::StudyBuilder_var myBuilder = myStudy->NewBuilder();
-        SALOMEDS::SComponent_var medfather = myStudy->FindComponent("Med");
+        SALOMEDS::SComponent_var medfather = myStudy->FindComponent("MED");
         if (CORBA::is_nil(medfather))
         {
                myBuilder->NewCommand();
@@ -318,10 +326,18 @@ throw (SALOME::SALOME_Exception)
                bool aLocked = myStudy->GetProperties()->IsLocked();
                if (aLocked) myStudy->GetProperties()->SetLocked(false);
 
-                medfather = myBuilder->NewComponent("Med");
+                medfather = myBuilder->NewComponent("MED");
                SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(
                       myBuilder->FindOrCreateAttribute(medfather, "AttributeName"));
-               aName->SetValue("Med");
+               //NRI           aName->SetValue("Med");
+
+               CORBA::Object_var objVarN = _NS->Resolve("/Kernel/ModulCatalog");
+               SALOME_ModuleCatalog::ModuleCatalog_var Catalogue  = SALOME_ModuleCatalog::ModuleCatalog::_narrow(objVarN);
+               SALOME_ModuleCatalog::Acomponent_var Comp = Catalogue->GetComponent( "MED" );
+               if ( !Comp->_is_nil() ) {
+                 aName->SetValue( Comp->componentusername() );
+               }    
+
                 CORBA::Object_var myO = _poa->id_to_reference(*_id); // this ior...
                 myBuilder->DefineComponentInstance(medfather,myO);
 
@@ -595,7 +611,7 @@ void Med_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent)
 char* Med_Gen_i::ComponentDataType()
 {
   MESSAGE("Med_Gen_i::ComponentDataType");
-  return strdup("Med") ; /* What is this type ? */
+  return strdup("MED") ; /* What is this type ? */
 }
     
 //=============================================================================
@@ -777,14 +793,21 @@ SALOMEDS::SObject_ptr Med_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
   SALOMEDS::GenericAttribute_var anAttr;
   SALOMEDS::AttributeName_var    aName;
   SALOMEDS::AttributeIOR_var     anIOR;
-  SALOMEDS::SComponent_var aFather = theStudy->FindComponent("Med");
+  SALOMEDS::SComponent_var aFather = theStudy->FindComponent("MED");
 
   if (aFather->_is_nil()) {
-    aFather = aBuilder->NewComponent("Med");
+    aFather = aBuilder->NewComponent("MED");
     if (aFather->_is_nil()) return aResultSO;
     anAttr = aBuilder->FindOrCreateAttribute(aFather, "AttributeName");
     aName = SALOMEDS::AttributeName::_narrow(anAttr);
-    aName->SetValue("MED");
+    //NRI    aName->SetValue("MED");
+
+    CORBA::Object_var objVarN = _NS->Resolve("/Kernel/ModulCatalog");
+    SALOME_ModuleCatalog::ModuleCatalog_var Catalogue  = SALOME_ModuleCatalog::ModuleCatalog::_narrow(objVarN);
+    SALOME_ModuleCatalog::Acomponent_var Comp = Catalogue->GetComponent( "MED" );
+    if ( !Comp->_is_nil() ) {
+      aName->SetValue( Comp->componentusername() );
+    }    
     aBuilder->DefineComponentInstance(aFather, Med_Gen::_this());
   }
 
index d7d863ac3b6086482324ce48b2a52e97f8ca568e..f3e2a855e062ddd1cab5324088416f1f62b0bcb4 100644 (file)
@@ -532,7 +532,7 @@ bool MedGUI::DumpSubMesh( SALOME_MED::FAMILY_var Fam )
 Engines::Med_Gen_ptr MedGUI::InitMedGen(QAD_Desktop* parent)
 {
   Engines::Component_var comp = 
-    parent->getEngine("FactoryServer", "Med");
+    parent->getEngine("FactoryServer", "MED");
   MESSAGE("_________________________________________");
   Engines::Med_Gen_var clr = Engines::Med_Gen::_narrow(comp);
   ASSERT(!CORBA::is_nil(clr));
index 8d08b2a34cc82ce3baa1e6e208171d63ccf82d78..ad1373cf26635d23b7bbb45c00eba6c0fd74b15d 100755 (executable)
@@ -97,7 +97,7 @@ medFile = "cube_hexa8_quad4.med"
 print "Loading of the Med Component"
 print ""
 
-med_comp = batchmode_salome.lcc.FindOrLoadComponent("FactoryServer", "Med")
+med_comp = batchmode_salome.lcc.FindOrLoadComponent("FactoryServer", "MED")
 
 med_comp.readStructFile(medFile,studyCurrent)
 
index bbbe8c0a9083e5058835252fd397d7aef26d4f47..4961487cb24a2a29b37e35a7f28cfb4a7a25f92c 100644 (file)
@@ -84,7 +84,7 @@ medFile = "cube_hexa8_quad4.med"
 print "Loading of the Med Component"
 print ""
 
-med_comp = salome.lcc.FindOrLoadComponent("FactoryServer", "Med")
+med_comp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED")
 
 med_comp.readStructFile(medFile,studyCurrent)
 
index 3e353d3313b50c0b37bb10f324cda69df1aa35a7..75678d2299925d97b67bcb10dc6e2507eec65834 100644 (file)
@@ -473,7 +473,7 @@ throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection)
         SALOMEDS::AttributeIOR_var     aIOR;
 
         // Create SComponent labelled 'Med'
-        SALOMEDS::SComponent_var medfather = myStudy->FindComponent("Med");
+        SALOMEDS::SComponent_var medfather = myStudy->FindComponent("MED");
         if ( CORBA::is_nil(medfather) )
          THROW_SALOME_CORBA_EXCEPTION("SComponent labelled 'Med' not Found",SALOME::INTERNAL_ERROR);
 
index c1cfc9c8d68f398eb7007d38ea02b20af265fc5b..3c083048909689aaf647dac59d0741a433781e3a 100644 (file)
@@ -805,7 +805,7 @@ throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection)
         SALOMEDS::AttributeIOR_var     aIOR;
 
         // Create SComponent labelled 'MED' if it doesn't already exit
-        SALOMEDS::SComponent_var medfather = myStudy->FindComponent("Med");
+        SALOMEDS::SComponent_var medfather = myStudy->FindComponent("MED");
         if ( CORBA::is_nil(medfather) )
         {
          THROW_SALOME_CORBA_EXCEPTION("Component Med not found",
index ca28b495cb6901f1a74d3bc6132b1df4d89929eb..881dd2bd48f130aff57a2eaf7677eeeea804dfc5 100644 (file)
@@ -976,7 +976,7 @@ throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection)
         SALOMEDS::AttributeIOR_var     aIOR;
 
        // Find SComponent labelled 'MED'
-       SALOMEDS::SComponent_var medfather = myStudy->FindComponent("Med");
+       SALOMEDS::SComponent_var medfather = myStudy->FindComponent("MED");
        if ( CORBA::is_nil(medfather) ) 
          THROW_SALOME_CORBA_EXCEPTION("SComponent labelled 'Med' not Found",SALOME::INTERNAL_ERROR);
 
@@ -1035,7 +1035,7 @@ throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection)
         SALOMEDS::AttributeComment_var aComment;
 
         // Find SComponent labelled 'Med'
-        SALOMEDS::SComponent_var medfather = myStudy->FindComponent("Med");
+        SALOMEDS::SComponent_var medfather = myStudy->FindComponent("MED");
         if ( CORBA::is_nil(medfather) )
           THROW_SALOME_CORBA_EXCEPTION("SComponent labelled 'Med' not Found",SALOME::INTERNAL_ERROR);
 
index f59bb1cf9d75fdabb62cbc2591428e6320c35d58..0804a3f9a588b2afef7e0963d83ce21d9045a85f 100644 (file)
@@ -407,7 +407,7 @@ void SUPPORT_i::addInStudy (SALOMEDS::Study_ptr myStudy, SALOME_MED::SUPPORT_ptr
   
   // Find SComponent labelled 'Med'
   MESSAGE("Find SComponent labelled 'Med'");
-  SALOMEDS::SComponent_var medfather = myStudy->FindComponent("Med");
+  SALOMEDS::SComponent_var medfather = myStudy->FindComponent("MED");
   if ( CORBA::is_nil(medfather) ) 
     THROW_SALOME_CORBA_EXCEPTION("SComponent labelled 'Med' not Found",SALOME::INTERNAL_ERROR);