From 147f4d7e4dad17e98370dd8f93532eba73e34453 Mon Sep 17 00:00:00 2001 From: imn Date: Tue, 18 Oct 2016 16:46:44 +0300 Subject: [PATCH] 0023299: [CEA] Finalize multi-study removal - delete study id parameter --- doc/principes.rst | 14 +--- doc/schemapy.rst | 12 +-- doc/schemaxml.rst | 27 ++----- src/genericgui/GenericGui.cxx | 24 ++---- src/genericgui/GuiExecutor.cxx | 2 +- src/genericgui/QtGuiContext.cxx | 1 - src/genericgui/QtGuiContext.hxx | 3 - src/pyqt/salomefiles/threenodes.xml | 10 --- src/pyqt/salomefiles/twoconnectednodes.xml | 10 --- src/pyqt/salomefiles/twonodes.xml | 10 --- src/runtime/CppContainer.cxx | 2 +- src/runtime/CppContainer.hxx | 2 +- src/runtime/SalomeContainerTmpForHP.cxx | 2 +- src/runtime/SalomeContainerTools.cxx | 9 +-- src/runtime/SalomeProc.cxx | 27 ++----- src/runtime/SalomeProc.hxx | 1 - src/runtime/StudyNodes.cxx | 75 ++----------------- src/runtime/StudyPorts.cxx | 4 +- src/salomegui/Yacsgui.cxx | 33 ++------ src/salomegui/Yacsgui.hxx | 4 +- src/salomegui/resources/YACSSchemaCatalog.xml | 1 - src/salomeloader/samples/GeomGraph.xml | 45 +---------- src/salomeloader/samples/GeomGraphGates.xml | 49 ------------ .../samples/GeomGraphGates_py.xml | 5 +- src/salomeloader/samples/GeomGraph_py.xml | 8 +- src/salomeloader/samples/testvisu20.xml | 5 +- src/salomewrap/SalomeWrap_Module.cxx | 13 ---- src/salomewrap/SalomeWrap_Module.hxx | 5 -- src/salomewrap/SuitWrapper.cxx | 61 --------------- src/salomewrap/SuitWrapper.hxx | 2 - .../bin/runSalome.py | 40 +++++----- .../bin/runSalome.py | 40 +++++----- src/yacsloader/samples/SchemaIOFile.xml | 1 - .../samples/SchemaInputOutputGeom.xml | 13 ---- src/yacsloader/samples/calcium5.xml | 1 - src/yacsloader/samples/foreach7.xml | 1 - src/yacsloader/samples/foreach8.xml | 1 - src/yacsloader/samples/foreach_init2fin.xml | 1 - src/yacsloader/samples/foreach_init2work.xml | 1 - src/yacsloader/samples/gobj1.xml | 1 - .../samples/optimizer_async_cpp.xml | 1 - src/yacsloader/samples/optimizer_async_py.xml | 1 - src/yacsloader/samples/optimizer_retro.xml | 1 - src/yacsloader/samples/optimizer_sync_cpp.xml | 1 - src/yacsloader/samples/optimizer_sync_py.xml | 1 - src/yacsloader/samples/pyremote1.xml | 1 - src/yacsloader/samples/pyremote2.xml | 1 - src/yacsloader/samples/pyremote3.xml | 1 - src/yacsloader/samples/pyremote4.xml | 1 - src/yacsloader/samples/schema2.xml | 11 +-- src/yacsloader/samples/schemaANN2.xml | 1 - src/yacsloader/samples/schemaANNLR2.xml | 1 - src/yacsloader/samples/schemaLR2.xml | 1 - .../samples/schemaPmmlDoesNotExist.xml | 1 - src/yacsloader/samples/study1.xml | 2 - src/yacsloader/samples/switch10.xml | 1 - 56 files changed, 90 insertions(+), 503 deletions(-) diff --git a/doc/principes.rst b/doc/principes.rst index 6bbd81cd5..c873c3cd5 100644 --- a/doc/principes.rst +++ b/doc/principes.rst @@ -318,7 +318,7 @@ A Study node is used to relate the elements of a SALOME study to the data and re StudyIn node ................... -A StudyIn node has output data ports only. It is used to define data in the calculation scheme originating from a SALOME study. The associated study is given by its SALOME StudyID. +A StudyIn node has output data ports only. It is used to define data in the calculation scheme originating from a SALOME study. A port corresponds to data stored in the associated study. The data has a name (the port name), a type (the port type), and a reference that gives the entry into the study. This reference is either a SALOME Entry (for example 0:1:1:2) or a path in the SALOME study tree (for example, /Geometry/box_1). @@ -330,7 +330,7 @@ To create this type of node: StudyOut node ................... -A StudyOut node only has input data ports. It is used to store results in a SALOME study. The associated study is given by its SALOME StudyID. +A StudyOut node only has input data ports. It is used to store results in a SALOME study. A port corresponds to a result to be stored in an associated study. The result has a name (the port name), a type (the port type), and a reference that gives the entry into the study. This reference is either a SALOME Entry (for example 0:1:1:2) or a path in the SALOME study tree (for example, /Geometry/box_1). @@ -880,16 +880,6 @@ that is not a genuine node. If it is said that block “b” in the previous ex value of 1 and a default case, then the absolute name of node “n” in the case 1 will be “c.b.p1_n” and the absolute name of the node in the default case will be “c.b.default_n”. -Active study --------------- -A schema can be executed without using the SALOME study manager. But when a schema must be executed in the context -of a SALOME study, it is possible to specify the studyId to use. - -The way to do that is to set the schema property **DefaultStudyID** to the study id. - -In the GUI, this is set automatically to the current active studyId. -For execution in console mode, see :ref:`xml_active_study` - .. _errorreport: Error report diff --git a/doc/schemapy.rst b/doc/schemapy.rst index ccd0ada80..fa2ded1fc 100644 --- a/doc/schemapy.rst +++ b/doc/schemapy.rst @@ -771,19 +771,17 @@ The result file will be copied into the local file myfile:: StudyIn node ++++++++++++++ A StudyIn node is defined using the runtime createInDataNode method. It uses two arguments, the first of which must be “study” -and the second the node name. The associated study is specified by adding the “StudyID” property to the node using -its setProperty method. Node data are defined by adding output data ports using the edAddOutputPOrt method, transferring +and the second the node name. Node data are defined by adding output data ports using the edAddOutputPOrt method, transferring the name of the data and its type as arguments. The data is initialised with the reference in the study, using the setData method for the port thus created, transferring a character string to it containing either the SALOME Entry or the path in the study tree structure. The following is an example of the StudyIn node that defines 2 GEOM_Object type data (a and b). The study is assumed to be -loaded into memory by SALOME as StudyID 1. Data a is referenced by one SALOME Entry. Data b is referenced by a path in the +loaded into memory by SALOME. Data a is referenced by one SALOME Entry. Data b is referenced by a path in the study tree structure:: n=r.createInDataNode("study","study1") p.edAddChild(n) - n.setProperty("StudyID","1") pout=n.edAddOutputPort('a',tgeom) pout.setData("0:1:1:1") pout=n.edAddOutputPort('b',tgeom) @@ -794,21 +792,19 @@ study tree structure:: StudyOut node ++++++++++++++ A StudyOut node is defined using the runtime createOutDataNode method. It uses two arguments, the first of -which must be “study” and the second the node name. The associated study is specified by adding -the “StudyID” property to the node using its setProperty method. The name of the file in which the study will be +which must be “study” and the second the node name. The name of the file in which the study will be saved is specified using the node SetRef method with the file name as an argument. The node results are defined by adding input data ports to it using the edAddInputPort method, transferring the data name and type as arguments. The setData method for the port is used to associate the entry into the study to the result, transferring a character string to it that contains either the SALOME Entry or the path in the study tree structure. The following contains an example of the StudyOut node that defines two GEOM_Object type results (a and b). -The studyId of the study used is 1. Result a is referenced by a SALOME Entry. The result b is referenced by a path. +Result a is referenced by a SALOME Entry. The result b is referenced by a path. The complete study is saved in the study1.hdf file at the end of the calculation:: n=r.createOutDataNode("study","study2") n.setRef("study1.hdf") p.edAddChild(n) - n.setProperty("StudyID","1") pout=n.edAddInputPort('a',tgeom) pout.setData("0:1:2:1") pout=n.edAddInputPort('b',tgeom) diff --git a/doc/schemaxml.rst b/doc/schemaxml.rst index 378d94848..8a9145e67 100644 --- a/doc/schemaxml.rst +++ b/doc/schemaxml.rst @@ -794,20 +794,6 @@ In the case of a SALOME service node, the property is transmitted to the compone .. _xml_active_study: -Active study --------------- -To execute a schema in the context of a SALOME study, you have to set the **DefaultStudyID** property of the schema. - -Example to execute the schema in the study with studyId 5: - -.. code-block:: xml - - - - ... - - - Datastream connections ---------------------------- Datastream connections are only possible for SALOME service nodes, as we have seen in :ref:`principes`. Firstly, datastream ports @@ -968,20 +954,19 @@ The result file will be copied into the local file myfile: StudyIn node ''''''''''''''' This type of node is defined as a DataIn node with the datanode tag. All that is necessary is to add the kind attribute -with the “study” value. The associated study is given by a property (property tag) named StudyID (the value of which is an integer). +with the “study” value. The parameter sub-tag will be used to define the node data. This tag has two compulsory attributes, name and type, that give the data name and type respectively. The ref attribute gives the input into the study in the form of a SALOME Entry, or a path in the study tree structure. The following is an example of a StudyIn node that defines 2 data (b and c) with types GEOM_Object and Boolean. It is assumed -that SALOME has loaded the study (with StudyID 1) into memory. Data b is referenced by a SALOME Entry. +that SALOME has loaded the study into memory. Data b is referenced by a SALOME Entry. The data c is referenced by a path in the study tree structure. .. code-block:: xml - @@ -992,20 +977,18 @@ StudyOut node '''''''''''''''''' This type of node is defined as a DataOut node with the outnode tag and the name attribute. All that is necessary is to add the kind attribute with the value “study”. -The optional ref attribute gives the name of the file in which the study will be saved at the end of the calculation. -The associated study is given by a property (property tag) with name StudyID (the value of which is an integer). +The optional ref attribute gives the name of the file in which the study will be saved at the end of the calculation. The parameter sub-tag will be used to define the node results. This tag has two compulsory attributes, name and type, that give the data name and type respectively. The ref attribute gives the entry into the study in the form of a SALOME Entry, or a path in the study tree structure. -The following gives an example of the StudyOut node that defines 2 results (a and b) of the GEOM_Object type. The study used has -the studyId 1. The complete study is saved in the study1.hdf file at the end of the calculation: +The following gives an example of the StudyOut node that defines 2 results (a and b) of the GEOM_Object type. +The complete study is saved in the study1.hdf file at the end of the calculation: .. code-block:: xml - diff --git a/src/genericgui/GenericGui.cxx b/src/genericgui/GenericGui.cxx index 7f1ce70cb..bca1cd3ef 100644 --- a/src/genericgui/GenericGui.cxx +++ b/src/genericgui/GenericGui.cxx @@ -969,19 +969,15 @@ bool GenericGui::closeContext(QWidget *view, bool onExit) break; } } - int studyId = _wrapper->activeStudyId(); - if (context->getStudyId() == studyId) + _wrapper->deleteSchema(view); + DEBTRACE("delete context"); + if (GuiExecutor* exec = context->getGuiExecutor()) { - _wrapper->deleteSchema(view); - DEBTRACE("delete context"); - if (GuiExecutor* exec = context->getGuiExecutor()) - { - exec->closeContext(); - } - delete context; - _mapViewContext.erase(view); - switchContext(newView, onExit); + exec->closeContext(); } + delete context; + _mapViewContext.erase(view); + switchContext(newView, onExit); return true; } @@ -1093,11 +1089,6 @@ void GenericGui::createContext(YACS::ENGINE::Proc* proc, GraphicsView* gView = new GraphicsView(viewWindow); gView->setScene(scene); gView->setViewportUpdateMode(QGraphicsView::FullViewportUpdate); - int studyId = _wrapper->AssociateViewToWindow(gView, viewWindow); - context->setStudyId(studyId); - std::ostringstream value; - value << studyId; - proc->setProperty("DefaultStudyID",value.str()); context->setScene(scene); context->setView(gView); context->setWindow(viewWindow); @@ -2589,7 +2580,6 @@ void GenericGui::onShowRedo() void GenericGui::onCleanOnExit() { DEBTRACE("GenericGui::onCleanOnExit"); - int studyId = _wrapper->activeStudyId(); map mapViewContextCopy = _mapViewContext; map::iterator it = mapViewContextCopy.begin(); for (; it != mapViewContextCopy.end(); ++it) diff --git a/src/genericgui/GuiExecutor.cxx b/src/genericgui/GuiExecutor.cxx index ec06250fd..c758989b8 100644 --- a/src/genericgui/GuiExecutor.cxx +++ b/src/genericgui/GuiExecutor.cxx @@ -92,7 +92,7 @@ void GuiExecutor::startResumeDataflow(bool initialize) SALOME_NamingService namingService(orb); SALOME_LifeCycleCORBA lcc(&namingService); ostringstream containerName; - containerName << "localhost/YACSContainer" << QtGuiContext::getQtCurrent()->getStudyId(); + containerName << "localhost/YACSContainer"; Engines::EngineComponent_var comp = lcc.FindOrLoad_Component(containerName.str().c_str(), "YACS" ); _engineRef =YACS_ORB::YACS_Gen::_narrow(comp); YASSERT(!CORBA::is_nil(_engineRef)); diff --git a/src/genericgui/QtGuiContext.cxx b/src/genericgui/QtGuiContext.cxx index 6dd139500..50aba7a33 100644 --- a/src/genericgui/QtGuiContext.cxx +++ b/src/genericgui/QtGuiContext.cxx @@ -49,7 +49,6 @@ QtGuiContext::QtGuiContext(GenericGui *gmain) : GuiContext() _selectedSubject = 0; _isEdition = true; _isLoadingPresentation = false; - _studyId = 0; _fileName = QString(); _mapOfSchemaItem.clear(); _mapOfSceneItem.clear(); diff --git a/src/genericgui/QtGuiContext.hxx b/src/genericgui/QtGuiContext.hxx index e20084968..4e5555f19 100644 --- a/src/genericgui/QtGuiContext.hxx +++ b/src/genericgui/QtGuiContext.hxx @@ -65,7 +65,6 @@ namespace YACS inline QString getFileName() {return _fileName; }; inline YACS::HMI::GuiExecutor* getGuiExecutor() {return _guiExecutor; }; inline bool isEdition() {return _isEdition; }; - inline int getStudyId() {return _studyId; }; inline bool isLoadingPresentation() {return _isLoadingPresentation; }; YACS::HMI::Subject* getSubjectToPaste(bool &isCut); @@ -83,7 +82,6 @@ namespace YACS inline void setFileName(const QString& fileName) {_fileName = fileName; }; inline void setGuiExecutor(YACS::HMI::GuiExecutor* guiEx) {_guiExecutor = guiEx; }; inline void setEdition(bool isEdition) {_isEdition = isEdition; }; - inline void setStudyId(int studyId) {_studyId = studyId; }; inline void setLoadingPresentation(bool isLoadpres) {_isLoadingPresentation = isLoadpres; }; void setSubjectToCut(YACS::HMI::Subject* sub); @@ -119,7 +117,6 @@ namespace YACS YACS::HMI::Subject* _selectedSubject; bool _isEdition; bool _isLoadingPresentation; - int _studyId; SuitWrapper* _wrapper; }; diff --git a/src/pyqt/salomefiles/threenodes.xml b/src/pyqt/salomefiles/threenodes.xml index 9fa212b28..33e6e5694 100644 --- a/src/pyqt/salomefiles/threenodes.xml +++ b/src/pyqt/salomefiles/threenodes.xml @@ -47,10 +47,6 @@ string CreateHypothesis__anHyp - - long - CreateHypothesis__studyId - @@ -125,10 +121,6 @@ string anHyp - - long - studyId - @@ -248,9 +240,7 @@ aNewDataFlow_1 - CreateHypothesis__studyId CreateHypothesis - studyId 3 1 diff --git a/src/pyqt/salomefiles/twoconnectednodes.xml b/src/pyqt/salomefiles/twoconnectednodes.xml index 1f6dabd41..f12168db6 100644 --- a/src/pyqt/salomefiles/twoconnectednodes.xml +++ b/src/pyqt/salomefiles/twoconnectednodes.xml @@ -35,10 +35,6 @@ string CreateHypothesis__anHyp - - long - CreateHypothesis__studyId - GEOM_Shape AddHypothesis__aSubShape @@ -77,10 +73,6 @@ string anHyp - - long - studyId - @@ -160,9 +152,7 @@ aNewDataFlow_1 - CreateHypothesis__studyId CreateHypothesis - studyId 3 1 diff --git a/src/pyqt/salomefiles/twonodes.xml b/src/pyqt/salomefiles/twonodes.xml index 69627232c..e89bc040e 100644 --- a/src/pyqt/salomefiles/twonodes.xml +++ b/src/pyqt/salomefiles/twonodes.xml @@ -47,10 +47,6 @@ string CreateHypothesis__anHyp - - long - CreateHypothesis__studyId - @@ -129,10 +125,6 @@ string anHyp - - long - studyId - @@ -201,9 +193,7 @@ aNewDataFlow_1 - CreateHypothesis__studyId CreateHypothesis - studyId 3 1 diff --git a/src/runtime/CppContainer.cxx b/src/runtime/CppContainer.cxx index af5aec92a..3b56b5b94 100644 --- a/src/runtime/CppContainer.cxx +++ b/src/runtime/CppContainer.cxx @@ -126,7 +126,7 @@ bool CppContainer::loadComponentLibrary(const std::string & componentName) throw return false; } -CppComponent * CppContainer::createComponentInstance(const std::string & componentName, int /* studyID */) +CppComponent * CppContainer::createComponentInstance(const std::string & componentName) { DEBTRACE("CppContainer::createComponentInstance"); if (_trueCont) diff --git a/src/runtime/CppContainer.hxx b/src/runtime/CppContainer.hxx index 9bc3577c6..281fa7d9e 100644 --- a/src/runtime/CppContainer.hxx +++ b/src/runtime/CppContainer.hxx @@ -120,7 +120,7 @@ namespace YACS void checkCapabilityToDealWith(const ComponentInstance *inst) const throw (YACS::Exception); bool loadComponentLibrary(const std::string & componentName) throw (YACS::Exception); - CppComponent * createComponentInstance(const std::string & componentName, int studyID = 0); + CppComponent * createComponentInstance(const std::string & componentName); void createInternalInstance(const std::string & componentName, void *& obj, RunFunction &r, TerminateFunction &t); void unregisterComponentInstance(CppComponent * C); diff --git a/src/runtime/SalomeContainerTmpForHP.cxx b/src/runtime/SalomeContainerTmpForHP.cxx index d0f13c747..981ad70d9 100644 --- a/src/runtime/SalomeContainerTmpForHP.cxx +++ b/src/runtime/SalomeContainerTmpForHP.cxx @@ -41,7 +41,7 @@ CORBA::Object_ptr SalomeContainerTmpForHP::loadComponent(Task *askingNode) YACS::BASES::AutoLocker alck(this);//To be sure std::string compoName(inst->getCompoName()); Engines::Container_var container(_launchModeType->getContainer(askingNode)); - objComponent=container->find_component_instance(compoName.c_str(),0); + objComponent=container->find_component_instance(compoName.c_str()); if(CORBA::is_nil(objComponent)) { char *reason; diff --git a/src/runtime/SalomeContainerTools.cxx b/src/runtime/SalomeContainerTools.cxx index f4d66286f..aaf96813f 100644 --- a/src/runtime/SalomeContainerTools.cxx +++ b/src/runtime/SalomeContainerTools.cxx @@ -454,14 +454,7 @@ CORBA::Object_ptr SalomeContainerTools::CreateComponentInstance(Container *cont, char *reason(0); std::string compoName(inst->getCompoName()); CORBA::Object_ptr objComponent=CORBA::Object::_nil(); - int studyid(1); Proc* p(cont->getProc()); - if(p) - { - std::string value(p->getProperty("DefaultStudyID")); - if(!value.empty()) - studyid= atoi(value.c_str()); - } // prepare component instance properties Engines::FieldsDict_var env(new Engines::FieldsDict); std::map properties(inst->getProperties()); @@ -481,7 +474,7 @@ CORBA::Object_ptr SalomeContainerTools::CreateComponentInstance(Container *cont, env[item].value <<= itm->second.c_str(); } - objComponent=contPtr->create_component_instance_env(compoName.c_str(), studyid, env, reason); + objComponent=contPtr->create_component_instance_env(compoName.c_str(), env, reason); if(CORBA::is_nil(objComponent)) { std::string text="Error while trying to create a new component: component '"+ compoName; diff --git a/src/runtime/SalomeProc.cxx b/src/runtime/SalomeProc.cxx index 81166e9c6..2f8dc8d87 100644 --- a/src/runtime/SalomeProc.cxx +++ b/src/runtime/SalomeProc.cxx @@ -70,30 +70,13 @@ void SalomeProc::saveSchema(std::string xmlSchemaFile) vss.closeFileSchema(); } -//! Get the default study id for the proc -/*! - * \return the study id - */ -int SalomeProc::getDefaultStudyId() -{ - std::string value=getProperty("DefaultStudyID"); - if(value.empty()) - return 1; - else - return atoi(value.c_str()); -} - //! Initialise the proc void SalomeProc::init(bool start) { - std::string value=getProperty("DefaultStudyID"); - if(!value.empty()) - { - //initialise Python module salome with the study id given by value - std::string cmd="import salome;salome.salome_init("+value+")"; - PyGILState_STATE gstate = PyGILState_Ensure(); // acquire the Global Interpreter Lock - PyRun_SimpleString(cmd.c_str()); - PyGILState_Release(gstate); // Release the Global Interpreter Lock - } + //initialise Python module salome with the study id given by value + std::string cmd="import salome;salome.salome_init()"; + PyGILState_STATE gstate = PyGILState_Ensure(); // acquire the Global Interpreter Lock + PyRun_SimpleString(cmd.c_str()); + PyGILState_Release(gstate); // Release the Global Interpreter Lock Proc::init(start); } diff --git a/src/runtime/SalomeProc.hxx b/src/runtime/SalomeProc.hxx index 46c13beef..8f45938c9 100644 --- a/src/runtime/SalomeProc.hxx +++ b/src/runtime/SalomeProc.hxx @@ -43,7 +43,6 @@ namespace YACS virtual TypeCode * createStructTc(const std::string& id, const std::string& name); virtual std::string typeName() {return "YACS__ENGINE__SalomeProc";} virtual void saveSchema(std::string xmlSchemaFile); - virtual int getDefaultStudyId(); virtual void init(bool start=true); }; } diff --git a/src/runtime/StudyNodes.cxx b/src/runtime/StudyNodes.cxx index bad02108c..6067003b6 100644 --- a/src/runtime/StudyNodes.cxx +++ b/src/runtime/StudyNodes.cxx @@ -75,44 +75,17 @@ void StudyInNode::execute() { DEBTRACE("+++++++ StudyInNode::execute +++++++++++"); SALOME_NamingService NS(getSALOMERuntime()->getOrb()); - CORBA::Object_var obj=NS.Resolve("/myStudyManager"); + CORBA::Object_var obj=NS.Resolve("/Study"); if(CORBA::is_nil(obj)) { _errorDetails="Execution problem: no naming service"; throw Exception(_errorDetails); } - SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(obj); - if(CORBA::is_nil(aStudyManager)) - { - _errorDetails="Execution problem: no naming service"; - throw Exception(_errorDetails); - } - - int studyid=1; - if (getProperty("StudyID") != "") - { - // StudyId is specified - studyid=atoi(getProperty("StudyID").c_str()); - } - else - { - Proc* p=getProc(); - if(p) - { - std::string value=p->getProperty("DefaultStudyID"); - if(!value.empty()) - studyid= atoi(value.c_str()); - } - } - - - SALOMEDS::Study_var myStudy =aStudyManager->GetStudyByID(studyid); + SALOMEDS::Study_var myStudy = SALOMEDS::Study::_narrow(obj); if(CORBA::is_nil(myStudy)) { - std::stringstream msg; - msg << "Execution problem: no study with id " << studyid; - _errorDetails=msg.str(); + _errorDetails="Execution problem: no study"; throw Exception(_errorDetails); } @@ -243,51 +216,19 @@ void StudyOutNode::execute() { DEBTRACE("+++++++ StudyOutNode::execute +++++++++++"); SALOME_NamingService NS(getSALOMERuntime()->getOrb()); - CORBA::Object_var obj=NS.Resolve("/myStudyManager"); + CORBA::Object_var obj=NS.Resolve("/Study"); if(CORBA::is_nil(obj)) { _errorDetails="Execution problem: no naming service"; throw Exception(_errorDetails); } - SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(obj); - if(CORBA::is_nil(aStudyManager)) - { - _errorDetails="Execution problem: no naming service"; - throw Exception(_errorDetails); - } - - int studyid=1; - if (getProperty("StudyID") != "") - { - // StudyId is specified - studyid=atoi(getProperty("StudyID").c_str()); - } - else - { - Proc* p=getProc(); - if(p) - { - std::string value=p->getProperty("DefaultStudyID"); - if(!value.empty()) - studyid= atoi(value.c_str()); - } - } - - SALOMEDS::Study_var myStudy =aStudyManager->GetStudyByID(studyid); + SALOMEDS::Study_var myStudy = SALOMEDS::Study::_narrow(obj); if(CORBA::is_nil(myStudy)) { - //open a new one - std::stringstream msg; - msg << "Study" << studyid; - myStudy=aStudyManager->NewStudy(msg.str().c_str()); - if(CORBA::is_nil(myStudy)) - { - _errorDetails="Execution problem: can not create new study " + msg.str(); - throw Exception(_errorDetails); - } + _errorDetails="Execution problem: no study"; + throw Exception(_errorDetails); } - DEBTRACE(myStudy->StudyId()); SALOMEDS::StudyBuilder_var aBuilder =myStudy->NewBuilder() ; if(CORBA::is_nil(aBuilder)) @@ -311,7 +252,7 @@ void StudyOutNode::execute() // save in file if ref is given if(_ref != "") { - aStudyManager->SaveAs(_ref.c_str(),myStudy, false); + myStudy->SaveAs(_ref.c_str(), false); } DEBTRACE("+++++++ end StudyOutNode::execute +++++++++++" ); } diff --git a/src/runtime/StudyPorts.cxx b/src/runtime/StudyPorts.cxx index d1839b1bd..6bf53daca 100644 --- a/src/runtime/StudyPorts.cxx +++ b/src/runtime/StudyPorts.cxx @@ -148,7 +148,7 @@ void OutputStudyPort::getDataFromStudy(SALOMEDS::Study_var myStudy) if(CORBA::is_nil(aSO)) { std::stringstream msg; - msg << "Execution problem: no id or path: " << data << " in study " << myStudy->StudyId(); + msg << "Execution problem: no id or path: " << data << " in study"; throw Exception(msg.str()); } } @@ -418,7 +418,7 @@ void InputStudyPort::putDataInStudy(SALOMEDS::Study_var myStudy,SALOMEDS::StudyB SALOMEDS::SObject_var aTmpSO; // initialized to nil try { - aTmpSO = aDriver->PublishInStudy(myStudy, aTmpSO, anObject,objname.c_str() ); + aTmpSO = aDriver->PublishInStudy(aTmpSO, anObject,objname.c_str() ); return; } catch ( ... ) diff --git a/src/salomegui/Yacsgui.cxx b/src/salomegui/Yacsgui.cxx index 584615251..904d70909 100644 --- a/src/salomegui/Yacsgui.cxx +++ b/src/salomegui/Yacsgui.cxx @@ -58,8 +58,6 @@ using namespace std; using namespace YACS::HMI; -int Yacsgui::_oldStudyId = -1; - Yacsgui::Yacsgui() : SalomeWrap_Module( "YACS" ) // default name { @@ -67,7 +65,7 @@ Yacsgui::Yacsgui() : _wrapper = 0; _genericGui = 0; _selectFromTree = false; - _studyContextMap.clear(); + _studyContextMap = 0; } Yacsgui::~Yacsgui() @@ -111,7 +109,7 @@ void Yacsgui::initialize( CAM_Application* app ) _genericGui->createActions(); _genericGui->createMenus(); _genericGui->createTools(); - this->studyActivated(); + _studyContextMap = QtGuiContext::getQtCurrent(); // VSR 23/10/2014: note that this is not a good way to create SComponent from this point // as initialize() method can be potentially called when there's no yet open study; @@ -207,8 +205,8 @@ bool Yacsgui::deactivateModule( SUIT_Study* theStudy ) setToolShown( false ); _genericGui->showDockWidgets(false); QtGuiContext *context = QtGuiContext::getQtCurrent(); - _studyContextMap[theStudy->id()] = context; - DEBTRACE("_studyContextMap[theStudy] " << theStudy << " " << context); + _studyContextMap = context; + DEBTRACE("_studyContextMap " << theStudy << " " << context); return SalomeApp_Module::deactivateModule( theStudy ); } @@ -280,7 +278,7 @@ void Yacsgui::onWindowActivated( SUIT_ViewWindow* svw) YASSERT(_genericGui); _genericGui->switchContext(viewWindow); - _studyContextMap[getApp()->activeStudy()->id()] = QtGuiContext::getQtCurrent(); + _studyContextMap = QtGuiContext::getQtCurrent(); if (_selectFromTree) return; SalomeWrap_DataModel *model = dynamic_cast(dataModel()); @@ -359,27 +357,6 @@ void Yacsgui::preferencesChanged( const QString& sect, const QString& name ) } } -void Yacsgui::studyActivated() -{ - int newStudyId = getApp()->activeStudy()->id(); - DEBTRACE("Yacsgui::studyActivated " << _oldStudyId << " " << newStudyId); - - if (_oldStudyId != -1) - { - _studyContextMap[_oldStudyId] = QtGuiContext::getQtCurrent(); - if (_studyContextMap.count(newStudyId)) - { - DEBTRACE("switch to valid context " << QtGuiContext::getQtCurrent() << " " << _studyContextMap[newStudyId]); - QtGuiContext::setQtCurrent(_studyContextMap[newStudyId]); - } - else - { - DEBTRACE("no switch to null context"); - } - } - _oldStudyId = newStudyId; -} - void Yacsgui::loadSchema(const std::string& filename,bool edit, bool arrangeLocalNodes) { _genericGui->loadSchema(filename,edit,arrangeLocalNodes); diff --git a/src/salomegui/Yacsgui.hxx b/src/salomegui/Yacsgui.hxx index 7948f1608..b3e22cf0e 100644 --- a/src/salomegui/Yacsgui.hxx +++ b/src/salomegui/Yacsgui.hxx @@ -59,7 +59,6 @@ public: virtual void createPreferences(); virtual void preferencesChanged( const QString& sect, const QString& name ); virtual void loadSchema(const std::string& filename,bool edit=true, bool arrangeLocalNodes=false); - virtual void studyActivated(); public slots: bool deactivateModule( SUIT_Study* theStudy); @@ -81,8 +80,7 @@ protected: bool _selectFromTree; Yacsgui_Resource* _myresource; SUIT_ViewWindow* _currentSVW; - std::map _studyContextMap; - static int _oldStudyId; + YACS::HMI::QtGuiContext* _studyContextMap; }; #endif diff --git a/src/salomegui/resources/YACSSchemaCatalog.xml b/src/salomegui/resources/YACSSchemaCatalog.xml index 1673967d6..2b6274338 100644 --- a/src/salomegui/resources/YACSSchemaCatalog.xml +++ b/src/salomegui/resources/YACSSchemaCatalog.xml @@ -1,6 +1,5 @@ - diff --git a/src/salomeloader/samples/GeomGraph.xml b/src/salomeloader/samples/GeomGraph.xml index 35a6b168a..93efd237a 100644 --- a/src/salomeloader/samples/GeomGraph.xml +++ b/src/salomeloader/samples/GeomGraph.xml @@ -88,29 +88,7 @@ 0 0 - -GEOM_Superv - GEOM_Superv - SetStudyID - 0 - ? - -SetStudyID - - -long - theStudyID - - - - 6/6/2005 - 10:39:55 - 6/6/2005 - 10:39:55 - 2.0 - ? - localhost/FactoryServer - SetStudyID from GEOM_Superv - 14 - 241 + GEOM_Superv GEOM_Superv @@ -333,18 +311,6 @@ 993 312 - -SetStudyID - Gate - MakeBox - Gate - - -SetStudyID - Gate - MakeSphere_1 - Gate - MakeBox return @@ -388,15 +354,6 @@ theShape1 - -GeomGraph - SetStudyID__theStudyID - SetStudyID - theStudyID - -3 - 1 - GeomGraph MakeBox__theX1 diff --git a/src/salomeloader/samples/GeomGraphGates.xml b/src/salomeloader/samples/GeomGraphGates.xml index 392ca6949..895d26f12 100644 --- a/src/salomeloader/samples/GeomGraphGates.xml +++ b/src/salomeloader/samples/GeomGraphGates.xml @@ -31,10 +31,6 @@ GeomGraph - - long - SetStudyID__theStudyID - double MakeBox__theX1 @@ -108,33 +104,6 @@ - - GEOM_Superv - GEOM_Superv - SetStudyID - 0 - ? - - SetStudyID - - - long - theStudyID - - - - - - - 14/12/2005 - 14:39:18 - 14/12/2005 - 14:39:18 - 2.0 - ? - localhost/FactoryServer - SetStudyID from GEOM_Superv - 14 - 241 - GEOM_Superv GEOM_Superv @@ -413,13 +382,6 @@ - - SetStudyID - Gate - MakeBox - Gate - - MakeBox return @@ -531,17 +493,6 @@ - - GeomGraph - SetStudyID__theStudyID - SetStudyID - theStudyID - - 3 - 1 - - - GeomGraph MakeBox__theX1 diff --git a/src/salomeloader/samples/GeomGraphGates_py.xml b/src/salomeloader/samples/GeomGraphGates_py.xml index a11585215..39201eaf1 100644 --- a/src/salomeloader/samples/GeomGraphGates_py.xml +++ b/src/salomeloader/samples/GeomGraphGates_py.xml @@ -459,10 +459,7 @@ - - - - + diff --git a/src/salomeloader/samples/GeomGraph_py.xml b/src/salomeloader/samples/GeomGraph_py.xml index 102d8182f..47e2d9c83 100644 --- a/src/salomeloader/samples/GeomGraph_py.xml +++ b/src/salomeloader/samples/GeomGraph_py.xml @@ -370,13 +370,7 @@ - - - - - - - + 29/10/2004 - 10:50:25 diff --git a/src/salomeloader/samples/testvisu20.xml b/src/salomeloader/samples/testvisu20.xml index 1721040a4..9532414f5 100644 --- a/src/salomeloader/samples/testvisu20.xml +++ b/src/salomeloader/samples/testvisu20.xml @@ -113,11 +113,10 @@ - - + + - aVisu ", aVisu ]]> diff --git a/src/salomewrap/SalomeWrap_Module.cxx b/src/salomewrap/SalomeWrap_Module.cxx index f22c7a17a..955e417c2 100644 --- a/src/salomewrap/SalomeWrap_Module.cxx +++ b/src/salomewrap/SalomeWrap_Module.cxx @@ -71,19 +71,6 @@ QxScene_ViewWindow* SalomeWrap_Module::getNewWindow(QGraphicsScene *scene) return aView; } -int SalomeWrap_Module::AssociateViewToWindow(QGraphicsView* gView, - QxScene_ViewWindow* viewWindow) -{ - viewWindow->setSceneView(gView); - viewWindow->setCentralWidget(gView); - return viewWindow->getViewManager()->study()->id(); -} - -int SalomeWrap_Module::activeStudyId() -{ - return getApp()->activeStudy()->id(); -} - QDockWidget* SalomeWrap_Module::objectBrowser() { if ( !getApp()->objectBrowser() ) return 0; diff --git a/src/salomewrap/SalomeWrap_Module.hxx b/src/salomewrap/SalomeWrap_Module.hxx index 811686c81..302de575e 100644 --- a/src/salomewrap/SalomeWrap_Module.hxx +++ b/src/salomewrap/SalomeWrap_Module.hxx @@ -45,11 +45,6 @@ public: QxScene_ViewWindow* getNewWindow(QGraphicsScene *scene); - int AssociateViewToWindow(QGraphicsView* gView, - QxScene_ViewWindow* viewWindow); - - int activeStudyId(); - QDockWidget* objectBrowser(); QAction* wCreateAction(const int id, diff --git a/src/salomewrap/SuitWrapper.cxx b/src/salomewrap/SuitWrapper.cxx index a8bda02d7..7d0177130 100644 --- a/src/salomewrap/SuitWrapper.cxx +++ b/src/salomewrap/SuitWrapper.cxx @@ -60,67 +60,6 @@ QWidget* SuitWrapper::getNewWindow(QGraphicsScene *scene) return module->getNewWindow(scene); } -/*! - * return studyId used in context delete when study is closed. - */ -int SuitWrapper::AssociateViewToWindow(QGraphicsView* gView, QWidget* viewWindow) -{ - SalomeWrap_Module* module = dynamic_cast(_wrapped); - QxScene_ViewWindow *svw = dynamic_cast(viewWindow); - YASSERT(svw); - int studyId = module->AssociateViewToWindow(gView, svw); - WrapGraphicsView* wgv = dynamic_cast(gView); - YASSERT(wgv); - QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::FitAllId), - SIGNAL(triggered(bool)), - svw, SLOT(onViewFitAll())); - QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::FitAllId), - SIGNAL(triggered(bool)), - wgv, SLOT(onViewFitAll())); - - QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::FitRectId), - SIGNAL(triggered(bool)), - svw, SLOT(onViewFitArea())); - QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::FitRectId), - SIGNAL(triggered(bool)), - wgv, SLOT(onViewFitArea())); - - QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::ZoomId), - SIGNAL(triggered(bool)), - svw, SLOT(onViewZoom())); - QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::ZoomId), - SIGNAL(triggered(bool)), - wgv, SLOT(onViewZoom())); - - QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::PanId), - SIGNAL(triggered(bool)), - svw, SLOT(onViewPan())); - QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::PanId), - SIGNAL(triggered(bool)), - wgv, SLOT(onViewPan())); - - QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::GlobalPanId), - SIGNAL(triggered(bool)), - svw, SLOT(onViewGlobalPan())); - QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::GlobalPanId), - SIGNAL(triggered(bool)), - wgv, SLOT(onViewGlobalPan())); - - QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::ResetId), - SIGNAL(triggered(bool)), - svw, SLOT(onViewReset())); - QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::ResetId), - SIGNAL(triggered(bool)), - wgv, SLOT(onViewReset())); - return studyId; -} - -int SuitWrapper::activeStudyId() -{ - SalomeWrap_Module* module = dynamic_cast(_wrapped); - return module->activeStudyId(); -} - QDockWidget* SuitWrapper::objectBrowser() { SalomeWrap_Module* module = dynamic_cast(_wrapped); diff --git a/src/salomewrap/SuitWrapper.hxx b/src/salomewrap/SuitWrapper.hxx index 5e12bc55c..9ce3234f5 100644 --- a/src/salomewrap/SuitWrapper.hxx +++ b/src/salomewrap/SuitWrapper.hxx @@ -47,8 +47,6 @@ namespace YACS virtual ~SuitWrapper(); QWidget* getNewWindow(QGraphicsScene *scene); - int AssociateViewToWindow(QGraphicsView* gView, QWidget* viewWindow); - int activeStudyId(); QDockWidget* objectBrowser(); QAction* createAction(const int id, diff --git a/src/wrappergen/bin/HXX2SALOME_GENERIC_CLASS_NAME_SRC/bin/runSalome.py b/src/wrappergen/bin/HXX2SALOME_GENERIC_CLASS_NAME_SRC/bin/runSalome.py index d353097c4..aee8a99b4 100755 --- a/src/wrappergen/bin/HXX2SALOME_GENERIC_CLASS_NAME_SRC/bin/runSalome.py +++ b/src/wrappergen/bin/HXX2SALOME_GENERIC_CLASS_NAME_SRC/bin/runSalome.py @@ -24,19 +24,19 @@ usage="""USAGE: runSalome.py [options] --help : affichage de l'aide --gui : lancement du GUI --logger : redirection des messages dans un fichier ---xterm : les serveurs ouvrent une fenêtre xterm et les messages sont affichés dans cette fenêtre ---modules=module1,module2,... : où modulen est le nom d'un module Salome à charger dans le catalogue +--xterm : les serveurs ouvrent une fen�tre xterm et les messages sont affich�s dans cette fen�tre +--modules=module1,module2,... : o� modulen est le nom d'un module Salome � charger dans le catalogue --containers=cpp,python,superv: lancement des containers cpp, python et de supervision ---killall : arrêt des serveurs de salome +--killall : arr�t des serveurs de salome - La variable d'environnement _ROOT_DIR doit etre préalablement - positionnée (modulen doit etre en majuscule). + La variable d'environnement _ROOT_DIR doit etre pr�alablement + positionn�e (modulen doit etre en majuscule). KERNEL_ROOT_DIR est obligatoire. """ # ----------------------------------------------------------------------------- # -# Fonction d'arrêt de salome +# Fonction d'arr�t de salome # def killSalome(): @@ -128,7 +128,7 @@ except getopt.error, msg: # ----------------------------------------------------------------------------- # -# Vérification des variables d'environnement +# V�rification des variables d'environnement # try: kernel_root_dir=os.environ["KERNEL_ROOT_DIR"] @@ -148,7 +148,7 @@ for module in liste_modules : # il faut KERNEL en premier dans la liste des modules # - l'ordre des modules dans le catalogue sera identique -# - la liste des modules presents dans le catalogue est exploitée pour charger les modules CORBA python, +# - la liste des modules presents dans le catalogue est exploit�e pour charger les modules CORBA python, # il faut charger les modules python du KERNEL en premier if "KERNEL" in liste_modules:liste_modules.remove("KERNEL") @@ -162,7 +162,7 @@ if "SUPERV" in liste_modules:with_container_superv=1 # ----------------------------------------------------------------------------- # -# Définition des classes d'objets pour le lancement des Server CORBA +# D�finition des classes d'objets pour le lancement des Server CORBA # class Server: @@ -342,7 +342,7 @@ def startSalome(): RegistryServer().run() # - # Attente de la disponibilité du Registry dans le Naming Service + # Attente de la disponibilit� du Registry dans le Naming Service # clt.waitNS("/Registry") @@ -354,7 +354,7 @@ def startSalome(): cataServer.run() # - # Attente de la disponibilité du Catalog Server dans le Naming Service + # Attente de la disponibilit� du Catalog Server dans le Naming Service # import SALOME_ModuleCatalog clt.waitNS("/Kernel/ModulCatalog",SALOME_ModuleCatalog.ModuleCatalog) @@ -372,9 +372,9 @@ def startSalome(): # - # Attente de la disponibilité du SalomeDS dans le Naming Service + # Attente de la disponibilit� du SalomeDS dans le Naming Service # - clt.waitNS("/myStudyManager") + clt.waitNS("/Study") # # Lancement Session Server @@ -382,7 +382,7 @@ def startSalome(): SessionServer().run() # - # Attente de la disponibilité du Session Server dans le Naming Service + # Attente de la disponibilit� du Session Server dans le Naming Service # import SALOME session=clt.waitNS("/Kernel/Session",SALOME.Session) @@ -399,7 +399,7 @@ def startSalome(): if with_container_cpp: ContainerCPPServer().run() # - # Attente de la disponibilité du Container C++ local + # Attente de la disponibilit� du Container C++ local # dans le Naming Service # clt.waitNS("/Containers/" + theComputer + "/FactoryServer") @@ -409,7 +409,7 @@ def startSalome(): if with_container_python: ContainerPYServer().run() # - # Attente de la disponibilité du Container Python local + # Attente de la disponibilit� du Container Python local # dans le Naming Service # clt.waitNS("/Containers/" + theComputer + "/FactoryServerPy") @@ -420,7 +420,7 @@ def startSalome(): # ContainerSUPERVServer().run() # - # Attente de la disponibilité du Container Supervision local + # Attente de la disponibilit� du Container Supervision local # dans le Naming Service # clt.waitNS("/Containers/" + theComputer + "/SuperVisionContainer") @@ -463,13 +463,13 @@ if __name__ == "__main__": Sauvegarde du dictionnaire des process dans , %s Pour tuer les process SALOME, executer : python killSalome.py depuis une console, ou bien killSalome() depuis le present interpreteur, -s'il n'est pas fermé. +s'il n'est pas ferm�. runSalome, avec l'option --killall, commence par tuer les process restants -d'une execution précédente. +d'une execution pr�c�dente. Pour lancer uniquement le GUI, executer startGUI() depuis le present interpreteur, -s'il n'est pas fermé. +s'il n'est pas ferm�. """ % filedict diff --git a/src/wrappergen/src/HXX2SALOME_GENERIC_CLASS_NAME_SRC/bin/runSalome.py b/src/wrappergen/src/HXX2SALOME_GENERIC_CLASS_NAME_SRC/bin/runSalome.py index d353097c4..aee8a99b4 100755 --- a/src/wrappergen/src/HXX2SALOME_GENERIC_CLASS_NAME_SRC/bin/runSalome.py +++ b/src/wrappergen/src/HXX2SALOME_GENERIC_CLASS_NAME_SRC/bin/runSalome.py @@ -24,19 +24,19 @@ usage="""USAGE: runSalome.py [options] --help : affichage de l'aide --gui : lancement du GUI --logger : redirection des messages dans un fichier ---xterm : les serveurs ouvrent une fenêtre xterm et les messages sont affichés dans cette fenêtre ---modules=module1,module2,... : où modulen est le nom d'un module Salome à charger dans le catalogue +--xterm : les serveurs ouvrent une fen�tre xterm et les messages sont affich�s dans cette fen�tre +--modules=module1,module2,... : o� modulen est le nom d'un module Salome � charger dans le catalogue --containers=cpp,python,superv: lancement des containers cpp, python et de supervision ---killall : arrêt des serveurs de salome +--killall : arr�t des serveurs de salome - La variable d'environnement _ROOT_DIR doit etre préalablement - positionnée (modulen doit etre en majuscule). + La variable d'environnement _ROOT_DIR doit etre pr�alablement + positionn�e (modulen doit etre en majuscule). KERNEL_ROOT_DIR est obligatoire. """ # ----------------------------------------------------------------------------- # -# Fonction d'arrêt de salome +# Fonction d'arr�t de salome # def killSalome(): @@ -128,7 +128,7 @@ except getopt.error, msg: # ----------------------------------------------------------------------------- # -# Vérification des variables d'environnement +# V�rification des variables d'environnement # try: kernel_root_dir=os.environ["KERNEL_ROOT_DIR"] @@ -148,7 +148,7 @@ for module in liste_modules : # il faut KERNEL en premier dans la liste des modules # - l'ordre des modules dans le catalogue sera identique -# - la liste des modules presents dans le catalogue est exploitée pour charger les modules CORBA python, +# - la liste des modules presents dans le catalogue est exploit�e pour charger les modules CORBA python, # il faut charger les modules python du KERNEL en premier if "KERNEL" in liste_modules:liste_modules.remove("KERNEL") @@ -162,7 +162,7 @@ if "SUPERV" in liste_modules:with_container_superv=1 # ----------------------------------------------------------------------------- # -# Définition des classes d'objets pour le lancement des Server CORBA +# D�finition des classes d'objets pour le lancement des Server CORBA # class Server: @@ -342,7 +342,7 @@ def startSalome(): RegistryServer().run() # - # Attente de la disponibilité du Registry dans le Naming Service + # Attente de la disponibilit� du Registry dans le Naming Service # clt.waitNS("/Registry") @@ -354,7 +354,7 @@ def startSalome(): cataServer.run() # - # Attente de la disponibilité du Catalog Server dans le Naming Service + # Attente de la disponibilit� du Catalog Server dans le Naming Service # import SALOME_ModuleCatalog clt.waitNS("/Kernel/ModulCatalog",SALOME_ModuleCatalog.ModuleCatalog) @@ -372,9 +372,9 @@ def startSalome(): # - # Attente de la disponibilité du SalomeDS dans le Naming Service + # Attente de la disponibilit� du SalomeDS dans le Naming Service # - clt.waitNS("/myStudyManager") + clt.waitNS("/Study") # # Lancement Session Server @@ -382,7 +382,7 @@ def startSalome(): SessionServer().run() # - # Attente de la disponibilité du Session Server dans le Naming Service + # Attente de la disponibilit� du Session Server dans le Naming Service # import SALOME session=clt.waitNS("/Kernel/Session",SALOME.Session) @@ -399,7 +399,7 @@ def startSalome(): if with_container_cpp: ContainerCPPServer().run() # - # Attente de la disponibilité du Container C++ local + # Attente de la disponibilit� du Container C++ local # dans le Naming Service # clt.waitNS("/Containers/" + theComputer + "/FactoryServer") @@ -409,7 +409,7 @@ def startSalome(): if with_container_python: ContainerPYServer().run() # - # Attente de la disponibilité du Container Python local + # Attente de la disponibilit� du Container Python local # dans le Naming Service # clt.waitNS("/Containers/" + theComputer + "/FactoryServerPy") @@ -420,7 +420,7 @@ def startSalome(): # ContainerSUPERVServer().run() # - # Attente de la disponibilité du Container Supervision local + # Attente de la disponibilit� du Container Supervision local # dans le Naming Service # clt.waitNS("/Containers/" + theComputer + "/SuperVisionContainer") @@ -463,13 +463,13 @@ if __name__ == "__main__": Sauvegarde du dictionnaire des process dans , %s Pour tuer les process SALOME, executer : python killSalome.py depuis une console, ou bien killSalome() depuis le present interpreteur, -s'il n'est pas fermé. +s'il n'est pas ferm�. runSalome, avec l'option --killall, commence par tuer les process restants -d'une execution précédente. +d'une execution pr�c�dente. Pour lancer uniquement le GUI, executer startGUI() depuis le present interpreteur, -s'il n'est pas fermé. +s'il n'est pas ferm�. """ % filedict diff --git a/src/yacsloader/samples/SchemaIOFile.xml b/src/yacsloader/samples/SchemaIOFile.xml index c2e754c4c..29bff2398 100644 --- a/src/yacsloader/samples/SchemaIOFile.xml +++ b/src/yacsloader/samples/SchemaIOFile.xml @@ -20,7 +20,6 @@ --> - diff --git a/src/yacsloader/samples/SchemaInputOutputGeom.xml b/src/yacsloader/samples/SchemaInputOutputGeom.xml index a246838ec..ec55a5859 100644 --- a/src/yacsloader/samples/SchemaInputOutputGeom.xml +++ b/src/yacsloader/samples/SchemaInputOutputGeom.xml @@ -39,7 +39,6 @@ - @@ -61,19 +60,11 @@ y=b - - - SalomeNode0 - SetStudyID - - StudyInNode0 PyScript0 - StudyInNode0 SalomeNode1 PyScript0 SalomeNode0 SalomeNode0 StudyOutNode0 - SalomeNode1 SalomeNode0 StudyInNode0 a PyScript0 a @@ -94,8 +85,4 @@ y=b SalomeNode0 return StudyOutNode0 a - - SalomeNode1theStudyID - 1 - diff --git a/src/yacsloader/samples/calcium5.xml b/src/yacsloader/samples/calcium5.xml index d0b72c4ff..01a1efbb9 100644 --- a/src/yacsloader/samples/calcium5.xml +++ b/src/yacsloader/samples/calcium5.xml @@ -20,7 +20,6 @@ --> - diff --git a/src/yacsloader/samples/foreach7.xml b/src/yacsloader/samples/foreach7.xml index b55285f86..e84535d4b 100644 --- a/src/yacsloader/samples/foreach7.xml +++ b/src/yacsloader/samples/foreach7.xml @@ -20,7 +20,6 @@ --> - diff --git a/src/yacsloader/samples/foreach8.xml b/src/yacsloader/samples/foreach8.xml index 4607c61a3..0b080ef00 100644 --- a/src/yacsloader/samples/foreach8.xml +++ b/src/yacsloader/samples/foreach8.xml @@ -1,6 +1,5 @@ - diff --git a/src/yacsloader/samples/foreach_init2fin.xml b/src/yacsloader/samples/foreach_init2fin.xml index 42fcd80d5..90507abb5 100644 --- a/src/yacsloader/samples/foreach_init2fin.xml +++ b/src/yacsloader/samples/foreach_init2fin.xml @@ -1,6 +1,5 @@ - diff --git a/src/yacsloader/samples/foreach_init2work.xml b/src/yacsloader/samples/foreach_init2work.xml index 2d6c36740..fe9edb2af 100644 --- a/src/yacsloader/samples/foreach_init2work.xml +++ b/src/yacsloader/samples/foreach_init2work.xml @@ -1,6 +1,5 @@ - diff --git a/src/yacsloader/samples/gobj1.xml b/src/yacsloader/samples/gobj1.xml index b5b43155e..001f7e538 100644 --- a/src/yacsloader/samples/gobj1.xml +++ b/src/yacsloader/samples/gobj1.xml @@ -44,7 +44,6 @@ - diff --git a/src/yacsloader/samples/optimizer_async_cpp.xml b/src/yacsloader/samples/optimizer_async_cpp.xml index 6a2c69570..f9a365920 100644 --- a/src/yacsloader/samples/optimizer_async_cpp.xml +++ b/src/yacsloader/samples/optimizer_async_cpp.xml @@ -20,7 +20,6 @@ --> - diff --git a/src/yacsloader/samples/optimizer_async_py.xml b/src/yacsloader/samples/optimizer_async_py.xml index 96d324dac..1f3ea790d 100644 --- a/src/yacsloader/samples/optimizer_async_py.xml +++ b/src/yacsloader/samples/optimizer_async_py.xml @@ -20,7 +20,6 @@ --> - diff --git a/src/yacsloader/samples/optimizer_retro.xml b/src/yacsloader/samples/optimizer_retro.xml index 22a825533..d465f9e06 100644 --- a/src/yacsloader/samples/optimizer_retro.xml +++ b/src/yacsloader/samples/optimizer_retro.xml @@ -1,6 +1,5 @@ - diff --git a/src/yacsloader/samples/optimizer_sync_cpp.xml b/src/yacsloader/samples/optimizer_sync_cpp.xml index e885f2e8d..186836cbd 100644 --- a/src/yacsloader/samples/optimizer_sync_cpp.xml +++ b/src/yacsloader/samples/optimizer_sync_cpp.xml @@ -20,7 +20,6 @@ --> - diff --git a/src/yacsloader/samples/optimizer_sync_py.xml b/src/yacsloader/samples/optimizer_sync_py.xml index abcaaa8ca..3aacba434 100644 --- a/src/yacsloader/samples/optimizer_sync_py.xml +++ b/src/yacsloader/samples/optimizer_sync_py.xml @@ -20,7 +20,6 @@ --> - diff --git a/src/yacsloader/samples/pyremote1.xml b/src/yacsloader/samples/pyremote1.xml index 42f5cf117..33aab9440 100644 --- a/src/yacsloader/samples/pyremote1.xml +++ b/src/yacsloader/samples/pyremote1.xml @@ -20,7 +20,6 @@ --> - diff --git a/src/yacsloader/samples/pyremote2.xml b/src/yacsloader/samples/pyremote2.xml index 07b226505..bdbe51478 100644 --- a/src/yacsloader/samples/pyremote2.xml +++ b/src/yacsloader/samples/pyremote2.xml @@ -20,7 +20,6 @@ --> - diff --git a/src/yacsloader/samples/pyremote3.xml b/src/yacsloader/samples/pyremote3.xml index 5bb90f242..8e4f0f990 100644 --- a/src/yacsloader/samples/pyremote3.xml +++ b/src/yacsloader/samples/pyremote3.xml @@ -20,7 +20,6 @@ --> - diff --git a/src/yacsloader/samples/pyremote4.xml b/src/yacsloader/samples/pyremote4.xml index 9697dc6d5..2105195c2 100644 --- a/src/yacsloader/samples/pyremote4.xml +++ b/src/yacsloader/samples/pyremote4.xml @@ -20,7 +20,6 @@ --> - diff --git a/src/yacsloader/samples/schema2.xml b/src/yacsloader/samples/schema2.xml index c0c148995..0f41a11d8 100644 --- a/src/yacsloader/samples/schema2.xml +++ b/src/yacsloader/samples/schema2.xml @@ -146,9 +146,8 @@ orb = CORBA.ORB_init([], CORBA.ORB_ID) lcc = LifeCycleCORBA(orb) naming_service = SALOME_NamingServicePy_i(orb) - StudyManager = naming_service.Resolve('myStudyManager') + aStudy = naming_service.Resolve('Study') aVisu = lcc.FindOrLoadComponent("FactoryServer","VISU") - aStudy = StudyManager.GetStudyByID(1) aVisu.SetCurrentStudy(aStudy) aViewManager=aVisu.GetViewManager() aView=aViewManager.Create3DView() @@ -251,11 +250,6 @@ - - GEOM_Superv - SetStudyID - - PYHELLO makeBanner @@ -322,8 +316,6 @@ node5 node62 node5 node63 node13 node14 - node44 node51 - node51 node49 node49 node50 node36 node37 @@ -385,7 +377,6 @@ node37p4vitesse node37p50. node52nomtoto -node51id1 node49 x10 node49 y10 node49 z10 diff --git a/src/yacsloader/samples/schemaANN2.xml b/src/yacsloader/samples/schemaANN2.xml index 27551ccf9..48dd3ad69 100644 --- a/src/yacsloader/samples/schemaANN2.xml +++ b/src/yacsloader/samples/schemaANN2.xml @@ -1,6 +1,5 @@ - diff --git a/src/yacsloader/samples/schemaANNLR2.xml b/src/yacsloader/samples/schemaANNLR2.xml index 1fdcf33bd..2d2b04e11 100644 --- a/src/yacsloader/samples/schemaANNLR2.xml +++ b/src/yacsloader/samples/schemaANNLR2.xml @@ -1,6 +1,5 @@ - diff --git a/src/yacsloader/samples/schemaLR2.xml b/src/yacsloader/samples/schemaLR2.xml index bf78b6031..048553f6a 100644 --- a/src/yacsloader/samples/schemaLR2.xml +++ b/src/yacsloader/samples/schemaLR2.xml @@ -1,6 +1,5 @@ - diff --git a/src/yacsloader/samples/schemaPmmlDoesNotExist.xml b/src/yacsloader/samples/schemaPmmlDoesNotExist.xml index 33da8c7ed..524709d61 100644 --- a/src/yacsloader/samples/schemaPmmlDoesNotExist.xml +++ b/src/yacsloader/samples/schemaPmmlDoesNotExist.xml @@ -1,6 +1,5 @@ - diff --git a/src/yacsloader/samples/study1.xml b/src/yacsloader/samples/study1.xml index 37124851f..1b9a80f48 100644 --- a/src/yacsloader/samples/study1.xml +++ b/src/yacsloader/samples/study1.xml @@ -29,7 +29,6 @@ - @@ -45,7 +44,6 @@ - - -- 2.30.2