Salome HOME
0023299: [CEA] Finalize multi-study removal
authorimn <imn@opencascade.com>
Fri, 14 Oct 2016 14:14:28 +0000 (17:14 +0300)
committerimn <imn@opencascade.com>
Fri, 14 Oct 2016 14:14:28 +0000 (17:14 +0300)
- delete study id parameter

src/GUI/HexoticPluginGUI_HypothesisCreator.cxx
src/HexoticPlugin/HexoticPlugin_Hexotic.cxx
src/HexoticPlugin/HexoticPlugin_Hexotic.hxx
src/HexoticPlugin/HexoticPlugin_Hexotic_i.cxx
src/HexoticPlugin/HexoticPlugin_Hexotic_i.hxx
src/HexoticPlugin/HexoticPlugin_Hypothesis.cxx
src/HexoticPlugin/HexoticPlugin_Hypothesis.hxx
src/HexoticPlugin/HexoticPlugin_Hypothesis_i.cxx
src/HexoticPlugin/HexoticPlugin_Hypothesis_i.hxx

index be6ab02145adf8a2f80d9feb34d3820b8f13310d..9fee2cf4c9921ca39132b485eaed3f232f970fa2 100644 (file)
@@ -742,7 +742,7 @@ bool HexoticPluginGUI_HypothesisCreator::readSizeMapsFromWidgets( HexoticHypothe
 GEOM::GEOM_Object_var HexoticPluginGUI_HypothesisCreator::entryToObject( std::string entry) const
 {
   SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen();
-  SALOMEDS::Study_var myStudy = smeshGen_i->GetCurrentStudy();
+  SALOMEDS::Study_var myStudy = smeshGen_i->GetStudy();
   GEOM::GEOM_Object_var aGeomObj;
   SALOMEDS::SObject_var aSObj = myStudy->FindObjectID( entry.c_str() );
   if (!aSObj->_is_nil()) {
index 4150e40c9126c9e9f21e803d2f8eea3ee6192612..f56c997a5ba700943c2109957ff6b580215bd876 100644 (file)
@@ -91,8 +91,8 @@ static void removeFile( const TCollection_AsciiString& fileName )
  */
 //=============================================================================
 
-HexoticPlugin_Hexotic::HexoticPlugin_Hexotic(int hypId, int studyId, SMESH_Gen* gen)
-  : SMESH_3D_Algo(hypId, studyId, gen)
+HexoticPlugin_Hexotic::HexoticPlugin_Hexotic(int hypId, SMESH_Gen* gen)
+  : SMESH_3D_Algo(hypId, gen)
 {
   MESSAGE("HexoticPlugin_Hexotic::HexoticPlugin_Hexotic");
   _name = "MG-Hexa";
@@ -110,13 +110,11 @@ HexoticPlugin_Hexotic::HexoticPlugin_Hexotic(int hypId, int studyId, SMESH_Gen*
   
   // Copy of what is done in BLSURFPLugin TODO : share the code
   smeshGen_i = SMESH_Gen_i::GetSMESHGen();
-  CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/myStudyManager");
-  SALOMEDS::StudyManager_var aStudyMgr = SALOMEDS::StudyManager::_narrow(anObject);
+  CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/Study");
   
-  myStudy = NULL;
-  myStudy = aStudyMgr->GetStudyByID(_studyId);
+  myStudy = SALOMEDS::Study::_narrow(anObject);;
   if ( !myStudy->_is_nil() )
-    MESSAGE("myStudy->StudyId() = " << myStudy->StudyId());
+    MESSAGE("myStudy not empty");
 }
 
 //=============================================================================
index a0b94b7a6cd8b4d6a7292303f0bda29bf4d3f945..0eef149c082a1f99f9fec9b8c7a547e6f848bb8b 100644 (file)
@@ -53,7 +53,7 @@ class MG_Hexotic_API;
 class HEXOTICPLUGIN_EXPORT HexoticPlugin_Hexotic: public SMESH_3D_Algo
 {
 public:
-  HexoticPlugin_Hexotic(int hypId, int studyId, SMESH_Gen* gen);
+  HexoticPlugin_Hexotic(int hypId, SMESH_Gen* gen);
   virtual ~HexoticPlugin_Hexotic();
 
 #ifdef WITH_BLSURFPLUGIN
index 17b28410ef4d92b9a5eab8cbd5bb248e34651df5..15c514cf9b9e2696f7c78db6f9224e714bbd0829 100644 (file)
@@ -38,7 +38,6 @@
 //=============================================================================
 
 HexoticPlugin_Hexotic_i::HexoticPlugin_Hexotic_i( PortableServer::POA_ptr thePOA,
-                                                  int                     theStudyId,
                                                   ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
@@ -47,7 +46,6 @@ HexoticPlugin_Hexotic_i::HexoticPlugin_Hexotic_i( PortableServer::POA_ptr thePOA
 {
   MESSAGE( "HexoticPlugin_Hexotic_i::HexoticPlugin_Hexotic_i" );
   myBaseImpl = new ::HexoticPlugin_Hexotic( theGenImpl->GetANewId(),
-                                            theStudyId,
                                             theGenImpl );
 }
 
index 34236ebc5677d8e03e62008c90588a643edf5081..bf9cdcf79ec136681ed5221484a5bc1d6c213a43 100644 (file)
@@ -42,7 +42,6 @@ class HEXOTICPLUGIN_EXPORT HexoticPlugin_Hexotic_i:
 public:
   // Constructor
   HexoticPlugin_Hexotic_i (PortableServer::POA_ptr thePOA,
-                           int                     theStudyId,
                            ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~HexoticPlugin_Hexotic_i();
index 2891afdd040cdb072ffdae03071f5e2989ab1227..1c36c2dedd62b4066c12a1536506dfc428deef4e 100644 (file)
@@ -32,9 +32,8 @@
  *  
  */
 //=============================================================================
-HexoticPlugin_Hypothesis::HexoticPlugin_Hypothesis (int hypId, int studyId,
-                                                    SMESH_Gen* gen)
-  : SMESH_Hypothesis(hypId, studyId, gen),
+HexoticPlugin_Hypothesis::HexoticPlugin_Hypothesis (int hypId, SMESH_Gen* gen)
+  : SMESH_Hypothesis(hypId, gen),
     _hexesMinLevel( GetDefaultHexesMinLevel() ),
     _hexesMaxLevel( GetDefaultHexesMaxLevel() ),
     _minSize( GetDefaultMinSize() ),
index 3c70d9efeb46adf308626b7f1c9e3496252a7e06..d9b20ba0c768bb2ab8a775f156639e57cb057a67 100644 (file)
@@ -51,7 +51,7 @@ class HEXOTICPLUGIN_EXPORT HexoticPlugin_Hypothesis: public SMESH_Hypothesis
 {
 public:
 
-  HexoticPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen* gen);
+  HexoticPlugin_Hypothesis(int hypId, SMESH_Gen* gen);
 
   static const char* GetHypType() { return "MG-Hexa Parameters"; }
 
index 48ac1b3e73b700a9c9b957a40e1fd14c804090b6..d94fb994eaf220696dc5111c26f6454223b4b7d7 100644 (file)
 //=============================================================================
 HexoticPlugin_Hypothesis_i::
 HexoticPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
-                           int                     theStudyId,
-                           ::SMESH_Gen*            theGenImpl)
+                            ::SMESH_Gen*            theGenImpl)
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
   MESSAGE( "HexoticPlugin_Hypothesis_i::HexoticPlugin_Hypothesis_i" );
   myBaseImpl = new ::HexoticPlugin_Hypothesis (theGenImpl->GetANewId(),
-                                              theStudyId,
-                                              theGenImpl);
+                                               theGenImpl);
 }
 
 //=============================================================================
index cd625583992277ce1b8103ef38c9287f5c88c51e..8f6c8184f98efb4836c9760f4e76df0ff2bebd7f 100644 (file)
@@ -42,8 +42,7 @@ class HEXOTICPLUGIN_EXPORT HexoticPlugin_Hypothesis_i:
  public:
   // Constructor
   HexoticPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             ::SMESH_Gen*            theGenImpl);
+                              ::SMESH_Gen*            theGenImpl);
   // Destructor
   virtual ~HexoticPlugin_Hypothesis_i();