From: imn Date: Fri, 14 Oct 2016 14:14:28 +0000 (+0300) Subject: 0023299: [CEA] Finalize multi-study removal X-Git-Tag: Before_python3_27062017^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=af252acee35d206d68d7891fe4f7aede825a3458;p=plugins%2Fhexoticplugin.git 0023299: [CEA] Finalize multi-study removal - delete study id parameter --- diff --git a/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx b/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx index be6ab02..9fee2cf 100644 --- a/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx @@ -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()) { diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx index 4150e40..f56c997 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx @@ -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"); } //============================================================================= diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic.hxx b/src/HexoticPlugin/HexoticPlugin_Hexotic.hxx index a0b94b7..0eef149 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic.hxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic.hxx @@ -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 diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic_i.cxx b/src/HexoticPlugin/HexoticPlugin_Hexotic_i.cxx index 17b2841..15c514c 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic_i.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic_i.cxx @@ -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 ); } diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic_i.hxx b/src/HexoticPlugin/HexoticPlugin_Hexotic_i.hxx index 34236eb..bf9cdcf 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic_i.hxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic_i.hxx @@ -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(); diff --git a/src/HexoticPlugin/HexoticPlugin_Hypothesis.cxx b/src/HexoticPlugin/HexoticPlugin_Hypothesis.cxx index 2891afd..1c36c2d 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hypothesis.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hypothesis.cxx @@ -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() ), diff --git a/src/HexoticPlugin/HexoticPlugin_Hypothesis.hxx b/src/HexoticPlugin/HexoticPlugin_Hypothesis.hxx index 3c70d9e..d9b20ba 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hypothesis.hxx +++ b/src/HexoticPlugin/HexoticPlugin_Hypothesis.hxx @@ -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"; } diff --git a/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.cxx b/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.cxx index 48ac1b3..d94fb99 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.cxx @@ -39,15 +39,13 @@ //============================================================================= 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); } //============================================================================= diff --git a/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.hxx b/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.hxx index cd62558..8f6c818 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.hxx +++ b/src/HexoticPlugin/HexoticPlugin_Hypothesis_i.hxx @@ -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();