From: mpa Date: Tue, 31 Jan 2017 08:48:58 +0000 (+0300) Subject: - Deleted Study as an input parameter and class field. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=074699f122e9bfd758dc805ca0023d355ce25ec5;p=modules%2Fyacs.git - Deleted Study as an input parameter and class field. - Deleted methods GetStudy from Study and SObject interfaces --- diff --git a/idl/SALOMEDS.idl b/idl/SALOMEDS.idl index c193837db..bc22b3d33 100644 --- a/idl/SALOMEDS.idl +++ b/idl/SALOMEDS.idl @@ -408,8 +408,6 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin typedef sequence ListOfSObject; //! Get the persistent reference to the %Study. PersistentReference GetPersistentReference() raises(StudyInvalidReference); -//! Get a transient reference to the %Study. - SalomeReference GetTransientReference() raises(StudyInvalidReference); /*! \brief indicate whether the %Study is empty @@ -924,11 +922,6 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin */ ListOfAttributes GetAllAttributes(); -/*! Gets the study of a given %SObject. - \return The study containing the given %SObject. -*/ - Study GetStudy(); - /*! Gets the CORBA object by its own IOR attribute. Returns nil, if can't. \return The CORBA object of the %SObject. diff --git a/src/KernelHelpers/SALOME_StudyEditor.cxx b/src/KernelHelpers/SALOME_StudyEditor.cxx index fe79af59d..39199d4a9 100644 --- a/src/KernelHelpers/SALOME_StudyEditor.cxx +++ b/src/KernelHelpers/SALOME_StudyEditor.cxx @@ -23,15 +23,7 @@ /** Canonic constructor. The object can't be used without a setStudy() */ SALOME_StudyEditor::SALOME_StudyEditor() { -} - -void SALOME_StudyEditor::setStudy(SALOMEDS::Study_ptr study) { - _study = study; - _sbuilder = _study->NewBuilder(); -} - -SALOME_StudyEditor::SALOME_StudyEditor(SALOMEDS::Study_ptr study) { - this->setStudy(study); + _sbuilder = KERNEL::getStudy()->NewBuilder(); } SALOMEDS::SObject_ptr SALOME_StudyEditor::newObject(SALOMEDS::SObject_ptr parent) { @@ -39,7 +31,7 @@ SALOMEDS::SObject_ptr SALOME_StudyEditor::newObject(SALOMEDS::SObject_ptr parent } SALOMEDS::SObject_ptr SALOME_StudyEditor::findObject(const char * entry) { - SALOMEDS::SObject_var sobject = _study->FindObjectID(entry); + SALOMEDS::SObject_var sobject = KERNEL::getStudy()->FindObjectID(entry); return sobject._retn(); } @@ -66,7 +58,7 @@ bool SALOME_StudyEditor::bindEngine(SALOMEDS::SComponent_var studyRoot, } SALOMEDS::SComponent_ptr SALOME_StudyEditor::findRoot(const char * moduleName) { - return _study->FindComponent(moduleName); + return KERNEL::getStudy()->FindComponent(moduleName); } void SALOME_StudyEditor::setName(SALOMEDS::SObject_var sobject, const char * value) { diff --git a/src/KernelHelpers/SALOME_StudyEditor.hxx b/src/KernelHelpers/SALOME_StudyEditor.hxx index 52b98fc5a..334f953b9 100644 --- a/src/KernelHelpers/SALOME_StudyEditor.hxx +++ b/src/KernelHelpers/SALOME_StudyEditor.hxx @@ -32,7 +32,7 @@ class KERNELHELPERS_EXPORT SALOME_StudyEditor { public: - SALOME_StudyEditor(SALOMEDS::Study_ptr study); + SALOME_StudyEditor(); typedef std::vector SObjectList; @@ -54,12 +54,6 @@ public: static const int UNDEFINED = -1; -protected: - SALOME_StudyEditor(); - void setStudy(SALOMEDS::Study_ptr study); - - SALOMEDS::Study_var _study; - private: SALOMEDS::StudyBuilder_var _sbuilder; }; diff --git a/src/SALOMEDS/CMakeLists.txt b/src/SALOMEDS/CMakeLists.txt index 68c5a4b8b..14ae84208 100755 --- a/src/SALOMEDS/CMakeLists.txt +++ b/src/SALOMEDS/CMakeLists.txt @@ -57,6 +57,7 @@ SET(COMMON_LIBS SalomeGenericObj SalomeLifeCycleCORBA SalomeIDLKernel + SalomeDSClient ${HDF5_C_LIBRARIES} ) diff --git a/src/SALOMEDS/SALOMEDS.cxx b/src/SALOMEDS/SALOMEDS.cxx index 432444085..2d86b26de 100644 --- a/src/SALOMEDS/SALOMEDS.cxx +++ b/src/SALOMEDS/SALOMEDS.cxx @@ -116,10 +116,6 @@ extern "C" PortableServer::ObjectId_var aStudy_iid = root_poa->activate_object(aStudy_i); aStudy = aStudy_i->_this(); namingService.Register(aStudy, "/Study"); - - // Assign the value of the IOR in the study->root - CORBA::String_var IORStudy = orb->object_to_string(aStudy); - aStudy_i->GetImpl()->SetTransientReference((char*)IORStudy.in()); aStudy_i->GetImpl()->GetDocument()->SetModified(false); aStudy_i->_remove_ref(); } @@ -140,15 +136,6 @@ extern "C" return so->GetSObject(); } - SALOMEDS_EXPORT - SALOMEDS::Study_ptr ConvertStudy(const _PTR(Study)& theStudy) - { - SALOMEDS_Study* study = _CAST(Study, theStudy); - if ( !theStudy || !study ) - return SALOMEDS::Study::_nil(); - return study->GetStudy(); - } - SALOMEDS_EXPORT SALOMEDS::StudyBuilder_ptr ConvertBuilder(const _PTR(StudyBuilder)& theBuilder) { diff --git a/src/SALOMEDS/SALOMEDS_Client.cxx b/src/SALOMEDS/SALOMEDS_Client.cxx index 1f5ef1d3a..29f9ba1a2 100644 --- a/src/SALOMEDS/SALOMEDS_Client.cxx +++ b/src/SALOMEDS/SALOMEDS_Client.cxx @@ -29,7 +29,7 @@ #include #include CORBA_SERVER_HEADER(SALOMEDS) #include "SALOMEDS_AttributeName_i.hxx" -#include "SALOME_NamingService.hxx" +#include "SALOME_KernelServices.hxx" #include "utilities.h" #include "HDFOI.hxx" @@ -38,9 +38,9 @@ * Purpose : */ //============================================================================ -static void DumpComponent(SALOMEDS::Study_ptr Study,SALOMEDS::SObject_ptr SO, int offset) { +static void DumpComponent(SALOMEDS::SObject_ptr SO, int offset) { SALOMEDS::SObject_var RefSO; - SALOMEDS::ChildIterator_var it = Study->NewChildIterator(SO); + SALOMEDS::ChildIterator_var it = KERNEL::getStudy()->NewChildIterator(SO); for (; it->More();it->Next()){ SALOMEDS::SObject_var CSO= it->Value(); SALOMEDS::GenericAttribute_var anAttr; @@ -57,7 +57,7 @@ static void DumpComponent(SALOMEDS::Study_ptr Study,SALOMEDS::SObject_ptr SO, in MESSAGE(" "); MESSAGE("*Reference"<GetID()); } - DumpComponent(Study,CSO,offset+2); + DumpComponent(CSO,offset+2); } } @@ -66,17 +66,17 @@ static void DumpComponent(SALOMEDS::Study_ptr Study,SALOMEDS::SObject_ptr SO, in * Purpose : */ //============================================================================ -static void DumpStudy (SALOMEDS::Study_ptr Study) { +static void DumpStudy() { MESSAGE("Explore Study and Write name of each object if it exists"); char* name; - SALOMEDS::SComponentIterator_var itcomp = Study->NewComponentIterator(); + SALOMEDS::SComponentIterator_var itcomp = KERNEL::getStudy()->NewComponentIterator(); int offset = 1; for (; itcomp->More(); itcomp->Next()) { SALOMEDS::SComponent_var SC = itcomp->Value(); name = SC->ComponentDataType(); MESSAGE("-> ComponentDataType is "<NewBuilder(); @@ -183,15 +185,11 @@ static void Test(SALOMEDS::Study_ptr myStudy) Name->SetValue("mesh_cylinder_0"); StudyBuild->CommitCommand(); - MESSAGE("Test GetStudy"); - SALOMEDS::Study_var stu = mesh_cylinder->GetStudy(); - MESSAGE ("-> Study Name is "<Name()); - - DumpStudy(myStudy); + DumpStudy(); StudyBuild->Undo(); // Study should have no trace of object mesh_cylinder - DumpStudy(myStudy); + DumpStudy(); // Save as myStudy->SaveAs("/home/edeville/Study1.hdf", false, false); @@ -200,10 +198,6 @@ static void Test(SALOMEDS::Study_ptr myStudy) name = myStudy->GetPersistentReference(); MESSAGE("Persitent Reference of the study " << name); - // Get Transient Reference of the study test - name = myStudy->GetTransientReference(); - MESSAGE("Transient Reference of the study " << name); - // FindComponent Test SALOMEDS::SComponent_var compo = myStudy->FindComponent("GEOM"); // Get ComponentDataType test @@ -243,7 +237,7 @@ static void Test(SALOMEDS::Study_ptr myStudy) else { MESSAGE("-> Name is not found"); } - //DumpStudy(myStudy); + //DumpStudy(); } catch(HDFexception) { @@ -267,21 +261,14 @@ int main(int argc, char** argv) CORBA::Object_var obj = orb->resolve_initial_references("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow(obj); - SALOME_NamingService * salomens = new SALOME_NamingService(orb); - - MESSAGE("Find Study "); - CORBA::Object_ptr obj2 = salomens->Resolve("/Study"); - SALOMEDS::Study_var myStudy = SALOMEDS::Study::_narrow(obj2); - // Obtain a POAManager, and tell the POA to start accepting // requests on its objects. PortableServer::POAManager_var pman = poa->the_POAManager(); pman->activate(); // Test basic services - Test(myStudy); + Test(); - delete salomens; orb->run(); orb->destroy(); } diff --git a/src/SALOMEDS/SALOMEDS_IParameters.cxx b/src/SALOMEDS/SALOMEDS_IParameters.cxx index 8329a78ef..8439c8b0d 100644 --- a/src/SALOMEDS/SALOMEDS_IParameters.cxx +++ b/src/SALOMEDS/SALOMEDS_IParameters.cxx @@ -21,6 +21,8 @@ // #include "SALOMEDS_IParameters.hxx" +#include +#include #include #define PT_INTEGER 0 @@ -46,8 +48,6 @@ SALOMEDS_IParameters::SALOMEDS_IParameters(const _PTR(AttributeParameter)& ap) { if(!ap) return; _ap = ap; - _PTR(SObject) so = _ap->GetSObject(); - _study = so->GetStudy(); } SALOMEDS_IParameters::~SALOMEDS_IParameters() @@ -258,14 +258,13 @@ std::string SALOMEDS_IParameters::encodeEntry(const std::string& entry, const st std::string SALOMEDS_IParameters::decodeEntry(const std::string& entry) { - if(!_study) return entry; int pos = entry.rfind("_"); if(pos < 0 || pos >= entry.length()) return entry; std::string compName(entry, 0, pos), compID, tail(entry, pos+1, entry.length()-1); if(_compNames.find(compName) == _compNames.end()) { - _PTR(SObject) so = _study->FindComponent(compName); + _PTR(SObject) so = ClientFactory::Study(KERNEL::getStudy())->FindComponent(compName); if(!so) return entry; compID = so->GetID(); _compNames[compName] = compID; @@ -278,23 +277,23 @@ std::string SALOMEDS_IParameters::decodeEntry(const std::string& entry) return newEntry; } -void SALOMEDS_IParameters::setDumpPython(_PTR(Study) study, const std::string& theID) +void SALOMEDS_IParameters::setDumpPython(const std::string& theID) { std::string anID; if(theID == "") anID = getDefaultVisualComponent(); else anID = theID; - _PTR(AttributeParameter) ap = study->GetCommonParameters(anID, 0); - ap->SetBool(_AP_DUMP_PYTHON_, !isDumpPython(study, theID)); + _PTR(AttributeParameter) ap = ClientFactory::Study(KERNEL::getStudy())->GetCommonParameters(anID, 0); + ap->SetBool(_AP_DUMP_PYTHON_, !isDumpPython(theID)); } -bool SALOMEDS_IParameters::isDumpPython(_PTR(Study) study, const std::string& theID) +bool SALOMEDS_IParameters::isDumpPython(const std::string& theID) { std::string anID; if(theID == "") anID = getDefaultVisualComponent(); else anID = theID; - _PTR(AttributeParameter) ap = study->GetCommonParameters(anID, 0); + _PTR(AttributeParameter) ap = ClientFactory::Study(KERNEL::getStudy())->GetCommonParameters(anID, 0); if(!ap) return false; if(!ap->IsSet(_AP_DUMP_PYTHON_, PT_BOOLEAN)) return false; return (bool)ap->GetBool(_AP_DUMP_PYTHON_); diff --git a/src/SALOMEDS/SALOMEDS_IParameters.hxx b/src/SALOMEDS/SALOMEDS_IParameters.hxx index 24468d011..197eace7d 100644 --- a/src/SALOMEDS/SALOMEDS_IParameters.hxx +++ b/src/SALOMEDS/SALOMEDS_IParameters.hxx @@ -142,12 +142,12 @@ public: /*! Enables/Disables the dumping visual parameters */ - virtual void setDumpPython(_PTR(Study) study, const std::string& theID = ""); + virtual void setDumpPython(const std::string& theID = ""); /*! Returns whether there is the dumping visual parameters */ - virtual bool isDumpPython(_PTR(Study) study, const std::string& theID = ""); + virtual bool isDumpPython(const std::string& theID = ""); /*! Returns a default name of the component where the visula parameters are stored. @@ -156,7 +156,6 @@ public: private: _PTR(AttributeParameter) _ap; - _PTR(Study) _study; std::map _compNames; }; diff --git a/src/SALOMEDS/SALOMEDS_SObject.cxx b/src/SALOMEDS/SALOMEDS_SObject.cxx index 2a6adb8c4..6f3332f6b 100644 --- a/src/SALOMEDS/SALOMEDS_SObject.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject.cxx @@ -196,16 +196,6 @@ bool SALOMEDS_SObject::FindSubObject(int theTag, _PTR(SObject)& theObject) return ret; } -_PTR(Study) SALOMEDS_SObject::GetStudy() -{ - if (_isLocal) { - SALOMEDS::Locker lock; - return _PTR(Study)(new SALOMEDS_Study(_local_impl->GetStudy())); - } - SALOMEDS::Study_var study=_corba_impl->GetStudy(); - return _PTR(Study)(new SALOMEDS_Study(study)); -} - std::string SALOMEDS_SObject::Name() { std::string aName; diff --git a/src/SALOMEDS/SALOMEDS_SObject.hxx b/src/SALOMEDS/SALOMEDS_SObject.hxx index 4635829ae..da8bf79fd 100644 --- a/src/SALOMEDS/SALOMEDS_SObject.hxx +++ b/src/SALOMEDS/SALOMEDS_SObject.hxx @@ -60,7 +60,6 @@ public: virtual bool FindAttribute(_PTR(GenericAttribute)& anAttribute, const std::string& aTypeOfAttribute); virtual bool ReferencedObject(_PTR(SObject)& theObject); virtual bool FindSubObject(int theTag, _PTR(SObject)& theObject); - virtual _PTR(Study) GetStudy(); virtual std::string Name(); virtual void Name(const std::string& theName); virtual std::vector<_PTR(GenericAttribute)> GetAllAttributes(); diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.cxx b/src/SALOMEDS/SALOMEDS_SObject_i.cxx index 0378e3003..2cf28a4cc 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.cxx @@ -130,27 +130,6 @@ SALOMEDS::SObject_ptr SALOMEDS_SObject_i::GetFather() return so._retn(); } -//============================================================================ -/*! Function : - * Purpose : - */ -//============================================================================ -SALOMEDS::Study_ptr SALOMEDS_SObject_i::GetStudy() -{ - SALOMEDS::Locker lock; - SALOMEDSImpl_Study* aStudy = _impl->GetStudy(); - if(!aStudy) { - MESSAGE("Problem GetStudy"); - return SALOMEDS::Study::_nil(); - } - - std::string IOR = aStudy->GetTransientReference(); - CORBA::Object_var obj = _orb->string_to_object(IOR.c_str()); - SALOMEDS::Study_var Study = SALOMEDS::Study::_narrow(obj) ; - ASSERT(!CORBA::is_nil(Study)); - return SALOMEDS::Study::_duplicate(Study); -} - //============================================================================ /*! Function : FindAttribute * Purpose : Find attribute of given type on this SObject diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.hxx b/src/SALOMEDS/SALOMEDS_SObject_i.hxx index f996197fb..fea6ecab6 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.hxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.hxx @@ -62,7 +62,6 @@ public: virtual CORBA::Boolean ReferencedObject(SALOMEDS::SObject_out obj) ; virtual CORBA::Boolean FindSubObject(CORBA::Long atag, SALOMEDS::SObject_out obj ); - virtual SALOMEDS::Study_ptr GetStudy() ; virtual char* Name(); virtual void Name(const char*); virtual SALOMEDS::ListOfAttributes* GetAllAttributes(); diff --git a/src/SALOMEDS/SALOMEDS_Server.cxx b/src/SALOMEDS/SALOMEDS_Server.cxx index addbbba1a..e97335387 100644 --- a/src/SALOMEDS/SALOMEDS_Server.cxx +++ b/src/SALOMEDS/SALOMEDS_Server.cxx @@ -167,13 +167,6 @@ int main(int argc, char** argv) NS->init_orb( orb ); } NS->Register(Study, "/Study"); - - // Assign the value of the IOR in the study->root - if ( myStudy_i->GetImpl()->GetTransientReference().empty() ) { - CORBA::String_var IORStudy = orb->object_to_string(Study); - myStudy_i->GetImpl()->SetTransientReference((char*)IORStudy.in()); - } - myStudy_i->_remove_ref(); // Obtain a POAManager, and tell the POA to start accepting diff --git a/src/SALOMEDS/SALOMEDS_Study.cxx b/src/SALOMEDS/SALOMEDS_Study.cxx index c197b66a6..0583c10ca 100644 --- a/src/SALOMEDS/SALOMEDS_Study.cxx +++ b/src/SALOMEDS/SALOMEDS_Study.cxx @@ -134,13 +134,17 @@ bool SALOMEDS_Study::Open(const std::string& theStudyUrl) bool SALOMEDS_Study::Save(bool theMultiFile, bool theASCII) { - //SRN: Pure CORBA save as the save operation require CORBA in any case + if(CORBA::is_nil(_corba_impl)) + return false; + return _corba_impl->Save(theMultiFile, theASCII); } bool SALOMEDS_Study::SaveAs(const std::string& theUrl, bool theMultiFile, bool theASCII) { - //SRN: Pure CORBA save as the save operation require CORBA in any case + if(CORBA::is_nil(_corba_impl)) + return false; + return _corba_impl->SaveAs((char*)theUrl.c_str(), theMultiFile, theASCII); } @@ -253,17 +257,6 @@ std::string SALOMEDS_Study::GetPersistentReference() else aRef = (CORBA::String_var)_corba_impl->GetPersistentReference(); return aRef; } - -std::string SALOMEDS_Study::GetTransientReference() -{ - std::string aRef; - if (_isLocal) { - SALOMEDS::Locker lock; - aRef = _local_impl->GetTransientReference(); - } - else aRef = _corba_impl->GetTransientReference(); - return aRef; -} bool SALOMEDS_Study::IsEmpty() { @@ -658,10 +651,10 @@ bool SALOMEDS_Study::DumpStudy(const std::string& thePath, bool isPublished, bool isMultiFile) { - //SRN: Pure CORBA DumpStudy as it does more cleaning than the local one - if(CORBA::is_nil(_corba_impl)) GetStudy(); //If CORBA implementation is null then retrieve it - bool ret = _corba_impl->DumpStudy(thePath.c_str(), theBaseName.c_str(), isPublished, isMultiFile); - return ret; + if(CORBA::is_nil(_corba_impl)) + return false; + + return _corba_impl->DumpStudy(thePath.c_str(), theBaseName.c_str(), isPublished, isMultiFile); } void SALOMEDS_Study::SetStudyLock(const std::string& theLockerID) @@ -962,36 +955,6 @@ CORBA::Object_ptr SALOMEDS_Study::ConvertIORToObject(const std::string& theIOR) return _orb->string_to_object(theIOR.c_str()); } -SALOMEDS::Study_ptr SALOMEDS_Study::GetStudy() -{ - if (_isLocal) { - SALOMEDS::Locker lock; - - if (!CORBA::is_nil(_corba_impl)) return SALOMEDS::Study::_duplicate(_corba_impl); - std::string anIOR = _local_impl->GetTransientReference(); - SALOMEDS::Study_var aStudy; - if (!_local_impl->IsError() && anIOR != "") { - aStudy = SALOMEDS::Study::_narrow(_orb->string_to_object(anIOR.c_str())); - } - else { - SALOME_NamingService* namingService = KERNEL::getNamingService(); - CORBA::Object_var obj = namingService->Resolve("/Study"); - aStudy = SALOMEDS::Study::_narrow(obj); - if( !CORBA::is_nil( aStudy ) ) { - _local_impl->SetTransientReference(_orb->object_to_string(aStudy)); - } - } - _corba_impl = SALOMEDS::Study::_duplicate(aStudy); - return aStudy._retn(); - } - else { - return SALOMEDS::Study::_duplicate(_corba_impl); - } - - return SALOMEDS::Study::_nil(); -} - - _PTR(AttributeParameter) SALOMEDS_Study::GetCommonParameters(const std::string& theID, int theSavePoint) { SALOMEDSClient_AttributeParameter* AP = NULL; @@ -1025,12 +988,16 @@ _PTR(AttributeParameter) SALOMEDS_Study::GetModuleParameters(const std::string& void SALOMEDS_Study::attach(SALOMEDS::Observer_ptr theObserver,bool modify) { - if(CORBA::is_nil(_corba_impl)) GetStudy(); //If CORBA implementation is null then retrieve it + if(CORBA::is_nil(_corba_impl)) + return; + _corba_impl->attach(theObserver,modify); } void SALOMEDS_Study::detach(SALOMEDS::Observer_ptr theObserver) { - if(CORBA::is_nil(_corba_impl)) GetStudy(); //If CORBA implementation is null then retrieve it + if(CORBA::is_nil(_corba_impl)) + return; + _corba_impl->detach(theObserver); } diff --git a/src/SALOMEDS/SALOMEDS_Study.hxx b/src/SALOMEDS/SALOMEDS_Study.hxx index d7231e139..4f3b6db1f 100644 --- a/src/SALOMEDS/SALOMEDS_Study.hxx +++ b/src/SALOMEDS/SALOMEDS_Study.hxx @@ -66,7 +66,6 @@ public: virtual _PTR(SObject) Paste(const _PTR(SObject)& theSO); virtual std::string GetPersistentReference(); - virtual std::string GetTransientReference(); virtual bool IsEmpty(); virtual _PTR(SComponent) FindComponent (const std::string& aComponentName); virtual _PTR(SComponent) FindComponentID(const std::string& aComponentID); @@ -130,8 +129,6 @@ public: std::string ConvertObjectToIOR(CORBA::Object_ptr theObject); CORBA::Object_ptr ConvertIORToObject(const std::string& theIOR); - - SALOMEDS::Study_ptr GetStudy(); SALOMEDSImpl_Study* GetLocalImpl() { return _local_impl; } diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index cdd6dd3b9..cd586ec2f 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -288,16 +288,6 @@ void SALOMEDS_Study_i::Init() aSession->emitMessageOneWay(str.c_str()); SALOMEDS::lock(); } - - std::string anIOR = _impl->GetTransientReference(); - if ( anIOR.empty() ) { - CORBA::Object_var obj = aNamingService->Resolve("/Study"); - SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow( obj ); - CORBA::String_var IORStudy = _orb->object_to_string(aStudy); - _impl->SetTransientReference((char*)IORStudy.in()); - } - _impl->GetDocument()->SetModified(false); - } //============================================================================ @@ -543,18 +533,6 @@ char* SALOMEDS_Study_i::GetPersistentReference() throw SALOMEDS::Study::StudyInvalidReference(); return CORBA::string_dup(_impl->GetPersistentReference().c_str()); } -//============================================================================ -/*! Function : GetTransientReference - * Purpose : Get IOR of the Study (registred in OCAF document in doc->Root) - */ -//============================================================================ -char* SALOMEDS_Study_i::GetTransientReference() -{ - SALOMEDS::Locker lock; - if (_closed) - throw SALOMEDS::Study::StudyInvalidReference(); - return CORBA::string_dup(_impl->GetTransientReference().c_str()); -} //============================================================================ /*! Function : IsEmpty @@ -949,23 +927,6 @@ void SALOMEDS_Study_i::UpdateIORLabelMap(const char* anIOR, const char* anEntry) _impl->UpdateIORLabelMap(std::string((char*)anIOR), std::string((char*)anEntry)); } -SALOMEDS::Study_ptr SALOMEDS_Study_i::GetStudy(const DF_Label& theLabel, CORBA::ORB_ptr orb) -{ - SALOMEDS::Locker lock; - - SALOMEDSImpl_AttributeIOR* Att = NULL; - if ((Att=(SALOMEDSImpl_AttributeIOR*)theLabel.Root().FindAttribute(SALOMEDSImpl_AttributeIOR::GetID()))){ - char* IOR = CORBA::string_dup(Att->Value().c_str()); - CORBA::Object_var obj = orb->string_to_object(IOR); - SALOMEDS::Study_ptr aStudy = SALOMEDS::Study::_narrow(obj) ; - ASSERT(!CORBA::is_nil(aStudy)); - return SALOMEDS::Study::_duplicate(aStudy); - } else { - MESSAGE("GetStudy: Problem to get study"); - } - return SALOMEDS::Study::_nil(); -} - void SALOMEDS_Study_i::IORUpdated(SALOMEDSImpl_AttributeIOR* theAttribute) { SALOMEDS::Locker lock; diff --git a/src/SALOMEDS/SALOMEDS_Study_i.hxx b/src/SALOMEDS/SALOMEDS_Study_i.hxx index 18a8f0d66..232b0fb4c 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.hxx @@ -107,13 +107,6 @@ public: */ virtual char* GetPersistentReference(); - - //! method to Get transient reference of study - /*! - \return char* arguments, the transient reference of the study - */ - virtual char* GetTransientReference(); - //! method to detect if a study is empty /*! \return bool arguments, true if study is empty @@ -244,8 +237,6 @@ public: */ virtual void URL(const char* url); - static SALOMEDS::Study_ptr GetStudy(const DF_Label& theLabel, CORBA::ORB_ptr orb); - static void IORUpdated(SALOMEDSImpl_AttributeIOR* theAttribute); virtual void UpdateIORLabelMap(const char* anIOR, const char* aLabel); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_SObject.cxx b/src/SALOMEDS/Test/SALOMEDSTest_SObject.cxx index 2899ce038..4da0748a8 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_SObject.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_SObject.cxx @@ -87,9 +87,6 @@ void SALOMEDSTest::testSObject() CPPUNIT_ASSERT(so->FindSubObject(1, so2)); CPPUNIT_ASSERT(so2->GetID() == so1->GetID()); - //Check method GetStudy - CPPUNIT_ASSERT(so->GetStudy() == study); - //Check methods Name so->Name("test"); CPPUNIT_ASSERT(so->Name() == "test"); diff --git a/src/SALOMEDS/Test/SALOMEDSTest_Study.cxx b/src/SALOMEDS/Test/SALOMEDSTest_Study.cxx index dbf65e2e6..3c1574cc9 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_Study.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_Study.cxx @@ -42,9 +42,6 @@ void SALOMEDSTest::testStudy() CPPUNIT_ASSERT(componentIterator); - //Check method GetTransientReference - CPPUNIT_ASSERT(!study->GetTransientReference().empty()); - //Check method URL (get/set) study->URL(""); CPPUNIT_ASSERT(study->URL() == ""); diff --git a/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx index 77d1861b7..344abda6d 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx +++ b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx @@ -39,7 +39,6 @@ static void* _libHandle = NULL; #define BUILDER_FACTORY "BuilderFactory" #define GET_PARAMETERS "GetIParameters" #define CONVERT_SOBJECT "ConvertSObject" -#define CONVERT_STUDY "ConvertStudy" #define CONVERT_BUILDER "ConvertBuilder" typedef SALOMEDSClient_SObject* (*SOBJECT_FACTORY_FUNCTION) (SALOMEDS::SObject_ptr); @@ -49,7 +48,6 @@ typedef void (*STUDY_CREATE_FUNCTION) (CORBA::ORB_ptr, Portable typedef SALOMEDSClient_StudyBuilder* (*BUILDER_FACTORY_FUNCTION) (SALOMEDS::StudyBuilder_ptr); typedef SALOMEDSClient_IParameters* (*GET_PARAMETERS_FACTORY) (const _PTR(AttributeParameter)&); typedef SALOMEDS::SObject_ptr (*CONVERT_SOBJECT_FUNCTION) (const _PTR(SObject)&); -typedef SALOMEDS::Study_ptr (*CONVERT_STUDY_FUNCTION) (const _PTR(Study)&); typedef SALOMEDS::StudyBuilder_ptr (*CONVERT_BUILDER_FUNCTION) (const _PTR(StudyBuilder)&); @@ -60,7 +58,6 @@ static STUDY_CREATE_FUNCTION aCreateFactory = NULL; static BUILDER_FACTORY_FUNCTION aBuilderFactory = NULL; static GET_PARAMETERS_FACTORY aGetIParameters = NULL; static CONVERT_SOBJECT_FUNCTION aConvertSObject = NULL; -static CONVERT_STUDY_FUNCTION aConvertStudy = NULL; static CONVERT_BUILDER_FUNCTION aConvertBuilder = NULL; _PTR(SObject) ClientFactory::SObject(SALOMEDS::SObject_ptr theSObject) @@ -174,25 +171,6 @@ SALOMEDS::SObject_ptr ClientFactory::crbSObject(const _PTR(SObject)& theSObject) return so._retn(); } - -SALOMEDS::Study_ptr ClientFactory::crbStudy(const _PTR(Study)& theStudy) -{ - SALOMEDS::Study_var study; - -#ifdef WIN32 - if(!_libHandle) _libHandle = ::LoadLibrary(SALOMEDS_LIB_NAME); - if(!aConvertStudy) aConvertStudy = (CONVERT_STUDY_FUNCTION)::GetProcAddress(_libHandle, CONVERT_STUDY); -#else - if(!_libHandle) _libHandle = dlopen(SALOMEDS_LIB_NAME, RTLD_LAZY | RTLD_GLOBAL); - if(!aConvertStudy) aConvertStudy = (CONVERT_STUDY_FUNCTION) dlsym(_libHandle, CONVERT_STUDY); -#endif - - if(aConvertStudy) study = aConvertStudy(theStudy); - - if(CORBA::is_nil(study)) return SALOMEDS::Study::_nil(); - return study._retn(); -} - SALOMEDS::StudyBuilder_ptr ClientFactory::crbStudyBuilder(const _PTR(StudyBuilder)& theStudyBuilder) { SALOMEDS::StudyBuilder_var studyBuilder; diff --git a/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx index 6e4afdf43..6293ce294 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx @@ -79,11 +79,6 @@ public: */ static SALOMEDS::SObject_ptr crbSObject(const _PTR(SObject)& theSObject); - /*! - * Returns a CORBA Study that corresponds %theStudy - */ - static SALOMEDS::Study_ptr crbStudy(const _PTR(Study)& theStudy); - /*! * Returns a CORBA StudyBuilder that corresponds %theStudyBuilder */ diff --git a/src/SALOMEDSClient/SALOMEDSClient_IParameters.hxx b/src/SALOMEDSClient/SALOMEDSClient_IParameters.hxx index 78a8fc6ac..1ceaabe1e 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_IParameters.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_IParameters.hxx @@ -141,12 +141,12 @@ public: /*! Enables/Disables the dumping visual parameters, static implementation is supposed */ - virtual void setDumpPython(_PTR(Study) study, const std::string& theID = "") = 0; + virtual void setDumpPython(const std::string& theID = "") = 0; /*! Returns whether there is the dumping visual parameters, static implementation is supposed */ - virtual bool isDumpPython(_PTR(Study) study, const std::string& theID = "") = 0; + virtual bool isDumpPython(const std::string& theID = "") = 0; /*! Returns a default name of the component where the visula parameters are stored. diff --git a/src/SALOMEDSClient/SALOMEDSClient_SObject.hxx b/src/SALOMEDSClient/SALOMEDSClient_SObject.hxx index 9aa5812b1..29840b7f3 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_SObject.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_SObject.hxx @@ -49,7 +49,6 @@ public: virtual bool FindAttribute(_PTR(GenericAttribute)& anAttribute, const std::string& aTypeOfAttribute) = 0; virtual bool ReferencedObject(_PTR(SObject)& theObject) = 0; virtual bool FindSubObject(int theTag, _PTR(SObject)& theObject) = 0; - virtual _PTR(Study) GetStudy() = 0; virtual std::string Name() = 0; virtual void Name(const std::string& theName) = 0; virtual std::vector<_PTR(GenericAttribute)> GetAllAttributes() = 0; diff --git a/src/SALOMEDSClient/SALOMEDSClient_Study.hxx b/src/SALOMEDSClient/SALOMEDSClient_Study.hxx index d4ae8e610..8732b23d5 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_Study.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_Study.hxx @@ -55,7 +55,6 @@ public: virtual bool Open(const std::string& theStudyUrl) = 0; virtual std::string GetPersistentReference() = 0; - virtual std::string GetTransientReference() = 0; virtual bool IsEmpty() = 0; virtual _PTR(SComponent) FindComponent (const std::string& aComponentName) = 0; virtual _PTR(SComponent) FindComponentID(const std::string& aComponentID) = 0; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx index f5c8ec764..0b3a7564c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx @@ -68,7 +68,7 @@ void SALOMEDSImpl_AttributeIOR::SetValue(const std::string& theValue) //remove IOR entry in study if(theValue != myString) { - SALOMEDSImpl_Study* study=SALOMEDSImpl_Study::GetStudy(Label()); + SALOMEDSImpl_Study* study=SALOMEDSImpl_Study::GetStudyImpl(Label()); study->RegisterGenObj(theValue, Label()); study->UnRegisterGenObj(myString, Label()); study->DeleteIORLabelMapItem(myString); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.cxx index 2813fbc9a..f74bb71b2 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.cxx @@ -63,7 +63,7 @@ void SALOMEDSImpl_GenericAttribute::CheckLocked() DF_Label aLabel = Label(); if(aLabel.IsNull()) return; - SALOMEDSImpl_Study* aStudy = SALOMEDSImpl_Study::GetStudy(aLabel); + SALOMEDSImpl_Study* aStudy = SALOMEDSImpl_Study::GetStudyImpl(aLabel); if(!aStudy) return; if(aStudy->IsLocked()) { aStudy->_errorCode = "LockProtection"; @@ -88,7 +88,7 @@ void SALOMEDSImpl_GenericAttribute::SetModifyFlag(int reason) DF_Label aLabel = Label(); if(aLabel.IsNull()) return; - SALOMEDSImpl_Study* aStudy = SALOMEDSImpl_Study::GetStudy(aLabel); + SALOMEDSImpl_Study* aStudy = SALOMEDSImpl_Study::GetStudyImpl(aLabel); if(aStudy) aStudy->modifySO_Notification(GetSObject(), reason); if(aStudy) aStudy->Modify(); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx index 38acf7d96..749c112bb 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx @@ -40,8 +40,6 @@ SALOMEDSImpl_IParameters::SALOMEDSImpl_IParameters(SALOMEDSImpl_AttributeParamet { if(!ap) return; _ap = ap; - SALOMEDSImpl_SObject so = _ap->GetSObject(); - _study = so.GetStudy(); } SALOMEDSImpl_IParameters::~SALOMEDSImpl_IParameters() @@ -222,14 +220,13 @@ std::vector SALOMEDSImpl_IParameters::getProperties() std::string SALOMEDSImpl_IParameters::decodeEntry(const std::string& entry) { - if(!_study) return entry; int pos = entry.rfind("_"); if(pos < 0 || pos >= entry.size()) return entry; std::string compName(entry, 0, pos), compID, tail(entry, pos+1, entry.length()-1); if(_compNames.find(compName) == _compNames.end()) { - SALOMEDSImpl_SObject so = _study->FindComponent(compName); + SALOMEDSImpl_SObject so = SALOMEDSImpl_Study::GetStudyImpl( _ap->GetSObject().GetLabel() )->FindComponent(compName); if(!so) return entry; compID = so.GetID(); _compNames[compName] = compID; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx index 236607102..ac12499f3 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx @@ -160,7 +160,6 @@ public: private: SALOMEDSImpl_AttributeParameter* _ap; - SALOMEDSImpl_Study* _study; std::map _compNames; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx index 050e3ab72..7eb80ce8d 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.cxx @@ -104,7 +104,7 @@ SALOMEDSImpl_SComponent SALOMEDSImpl_SObject::GetFatherComponent() const if(LF.IsRoot()) return sco; - return GetStudy()->GetSComponent(LF); + return SALOMEDSImpl_Study::SComponent(LF); } //============================================================================ @@ -114,7 +114,7 @@ SALOMEDSImpl_SComponent SALOMEDSImpl_SObject::GetFatherComponent() const //============================================================================ SALOMEDSImpl_SObject SALOMEDSImpl_SObject::GetFather() const { - return GetStudy()->GetSObject(_lab.Father()); + return SALOMEDSImpl_Study::SObject(_lab.Father()); } //============================================================================ @@ -127,16 +127,6 @@ int SALOMEDSImpl_SObject::GetLastChildTag() const return _lab.LastChildTag(); } -//============================================================================ -/*! Function : GetStudy - * Purpose : - */ -//============================================================================ -SALOMEDSImpl_Study* SALOMEDSImpl_SObject::GetStudy() const -{ - return SALOMEDSImpl_Study::GetStudy(_lab); -} - //============================================================================ /*! Function : FindAttribute * Purpose : Find attribute of given type on this SObject @@ -182,7 +172,7 @@ bool SALOMEDSImpl_SObject::ReferencedObject(SALOMEDSImpl_SObject& theObject) con if (!(Ref=(SALOMEDSImpl_AttributeReference*)_lab.FindAttribute(SALOMEDSImpl_AttributeReference::GetID()))) return false; - theObject = GetStudy()->GetSObject(Ref->Get()); + theObject = SALOMEDSImpl_Study::SObject(Ref->Get()); return true; } @@ -196,7 +186,7 @@ bool SALOMEDSImpl_SObject::FindSubObject(int theTag, SALOMEDSImpl_SObject& theOb DF_Label L = _lab.FindChild(theTag, false); if (L.IsNull()) return false; - theObject = GetStudy()->GetSObject(L); + theObject = SALOMEDSImpl_Study::SObject(L); return true; } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx index eadad3502..0bce0b682 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx @@ -60,7 +60,6 @@ public: virtual bool ReferencedObject(SALOMEDSImpl_SObject& theObject) const ; virtual bool FindSubObject(int theTag, SALOMEDSImpl_SObject& theObject); - virtual SALOMEDSImpl_Study* GetStudy() const; virtual std::string Name() const { return _name; } virtual void Name(const std::string& theName) { _name = theName; } virtual std::vector GetAllAttributes() const; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index 1f3fefc89..09adc5d2c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -967,9 +967,6 @@ bool SALOMEDSImpl_Study::Copy(const SALOMEDSImpl_SObject& theObject, bool aStructureOnly; // copy only SObjects and attributes without component help aStructureOnly = !theObject.GetLabel().IsAttribute(SALOMEDSImpl_AttributeIOR::GetID()); - // get component-engine - SALOMEDSImpl_Study* aStudy = theObject.GetStudy(); - if (!_doc) { _errorCode = "Document is null"; return false; @@ -1195,41 +1192,6 @@ std::string SALOMEDSImpl_Study::GetPersistentReference() _errorCode = ""; return URL(); } -//============================================================================ -/*! Function : GetTransientReference - * Purpose : Get IOR of the Study (registred in Document in doc->Root) - */ -//============================================================================ -std::string SALOMEDSImpl_Study::GetTransientReference() -{ - _errorCode = ""; - std::string IOR = ""; - - SALOMEDSImpl_AttributeIOR* Att; - DF_Label _lab = _doc->Root(); - if ((Att=(SALOMEDSImpl_AttributeIOR*)_lab.FindAttribute(SALOMEDSImpl_AttributeIOR::GetID()))) { - IOR = Att->Value(); - } - else { - _errorCode = "IOR is empty"; - } - - return IOR; -} - -void SALOMEDSImpl_Study::SetTransientReference(const std::string& theIOR) -{ - _errorCode = ""; - - SALOMEDSImpl_AttributeStudyProperties* aProp = GetProperties(); - int aLocked = aProp->IsLocked(); - if (aLocked) aProp->SetLocked(false); - - // Assign the value of the IOR in the study->root - SALOMEDSImpl_AttributeIOR::Set(_doc->Main().Root(), theIOR); - - if (aLocked) aProp->SetLocked(true); -} //============================================================================ /*! Function : IsEmpty @@ -1846,7 +1808,7 @@ void SALOMEDSImpl_Study::DeleteIORLabelMapItem(const std::string& anIOR) } } -SALOMEDSImpl_Study* SALOMEDSImpl_Study::GetStudy(const DF_Label& theLabel) +SALOMEDSImpl_Study* SALOMEDSImpl_Study::GetStudyImpl(const DF_Label& theLabel) { SALOMEDSImpl_StudyHandle* Att; if ((Att=(SALOMEDSImpl_StudyHandle*)theLabel.Root().FindAttribute(SALOMEDSImpl_StudyHandle::GetID()))) { @@ -1857,19 +1819,19 @@ SALOMEDSImpl_Study* SALOMEDSImpl_Study::GetStudy(const DF_Label& theLabel) SALOMEDSImpl_SObject SALOMEDSImpl_Study::SObject(const DF_Label& theLabel) { - return GetStudy(theLabel)->GetSObject(theLabel); + return GetStudyImpl(theLabel)->GetSObject(theLabel); } SALOMEDSImpl_SComponent SALOMEDSImpl_Study::SComponent(const DF_Label& theLabel) { - return GetStudy(theLabel)->GetSComponent(theLabel); + return GetStudyImpl(theLabel)->GetSComponent(theLabel); } void SALOMEDSImpl_Study::IORUpdated(const SALOMEDSImpl_AttributeIOR* theAttribute) { std::string aString = theAttribute->Label().Entry(); - GetStudy(theAttribute->Label())->UpdateIORLabelMap(theAttribute->Value(), aString); + GetStudyImpl(theAttribute->Label())->UpdateIORLabelMap(theAttribute->Value(), aString); } std::vector SALOMEDSImpl_Study::FindDependances(const SALOMEDSImpl_SObject& anObject) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx index 81504d301..f1c1d23ba 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx @@ -92,7 +92,7 @@ private: public: - static SALOMEDSImpl_Study* GetStudy(const DF_Label& theLabel); + static SALOMEDSImpl_Study* GetStudyImpl(const DF_Label& theLabel); static SALOMEDSImpl_SObject SObject(const DF_Label& theLabel); static SALOMEDSImpl_SComponent SComponent(const DF_Label& theLabel); static void IORUpdated(const SALOMEDSImpl_AttributeIOR* theAttribute); @@ -150,11 +150,6 @@ public: //! method to Get persistent reference of study (idem URL()) virtual std::string GetPersistentReference(); - //! method to Get transient reference of study - virtual std::string GetTransientReference(); - - virtual void SetTransientReference(const std::string& theIOR); - //! method to detect if a study is empty virtual bool IsEmpty(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx index 893f9c647..e9b39a1ae 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx @@ -133,7 +133,7 @@ bool SALOMEDSImpl_UseCaseBuilder::Append(const SALOMEDSImpl_SObject& theObject) aCurrentNode->Append(aNode); // Mantis issue 0020136: Drag&Drop in OB - theObject.GetStudy()->addSO_Notification(theObject); + SALOMEDSImpl_Study::GetStudyImpl(theObject.GetLabel())->addSO_Notification(theObject); return true; } @@ -208,7 +208,7 @@ bool SALOMEDSImpl_UseCaseBuilder::AppendTo(const SALOMEDSImpl_SObject& theFather bool ret = aFather->Append(aNode); // Mantis issue 0020136: Drag&Drop in OB - theObject.GetStudy()->addSO_Notification(theObject); + SALOMEDSImpl_Study::GetStudyImpl(theObject.GetLabel())->addSO_Notification(theObject); return ret; } @@ -244,7 +244,7 @@ bool SALOMEDSImpl_UseCaseBuilder::InsertBefore(const SALOMEDSImpl_SObject& theFi bool ret = aNode->InsertBefore(aFirstNode); // Mantis issue 0020136: Drag&Drop in OB - theFirst.GetStudy()->addSO_Notification(theFirst); + SALOMEDSImpl_Study::GetStudyImpl(theFirst.GetLabel())->addSO_Notification(theFirst); return ret; }