From c46f174ce52809de76f2a22795db89d229aedc7e Mon Sep 17 00:00:00 2001 From: nri Date: Wed, 16 Jul 2003 08:02:43 +0000 Subject: [PATCH] sources v1.2 --- idl/AddComponent.idl | 51 + idl/Calculator.idl | 49 + idl/DivComponent.idl | 39 + idl/FactorialComponent.idl | 34 + idl/GEOM/GEOM_Gen.idl | 318 ++++ idl/GEOM/GEOM_Shape.idl | 83 + idl/GEOM_Gen.idl | 318 ++++ idl/GEOM_Shape.idl | 83 + idl/Logger.idl | 24 + idl/MED.idl | 796 ++++++++++ idl/MPIContainer.idl | 38 + idl/MPIObject.idl | 36 + idl/Makefile.in | 71 +- idl/Med_Gen.idl | 58 + idl/MulComponent.idl | 39 + idl/NPMatComponent.idl | 58 + idl/NPSolveComponent.idl | 43 + idl/NPVecComponent.idl | 58 + idl/SALOME/Logger.idl | 24 + idl/SALOME/MPIContainer.idl | 38 + idl/SALOME/MPIObject.idl | 36 + idl/SALOME/SALOMEDS.idl | 1371 +++++++++++++++++ idl/SALOME/SALOMEDS_Attributes.idl | 1181 ++++++++++++++ idl/SALOME/SALOME_Component.idl | 137 ++ idl/SALOME/SALOME_DataTypeCatalog.idl | 49 + idl/SALOME/SALOME_Exception.idl | 67 + idl/SALOME/SALOME_ModuleCatalog.idl | 254 +++ idl/SALOME/SALOME_Registry.idl | 61 + idl/SALOME/SALOME_RessourcesCatalog.idl | 64 + idl/SALOME/SALOME_Session.idl | 103 ++ idl/SALOME/SALOME_TestComponent.idl | 36 + idl/SALOME/TestNotif.idl | 33 + idl/SALOME/TypeData.idl | 44 + idl/SALOMEDS.idl | 1371 +++++++++++++++++ idl/SALOMEDS_Attributes.idl | 1181 ++++++++++++++ idl/SALOME_Component.idl | 137 ++ idl/SALOME_DataTypeCatalog.idl | 49 + idl/SALOME_Exception.idl | 67 + idl/SALOME_ModuleCatalog.idl | 254 +++ idl/SALOME_Registry.idl | 61 + idl/SALOME_RessourcesCatalog.idl | 64 + idl/SALOME_Session.idl | 103 ++ idl/SALOME_TestComponent.idl | 36 + idl/SMESH/SMESH_BasicHypothesis.idl | 83 + idl/SMESH/SMESH_Gen.idl | 112 ++ idl/SMESH/SMESH_Hypothesis.idl | 87 ++ idl/SMESH/SMESH_Mesh.idl | 277 ++++ idl/SMESH_BasicHypothesis.idl | 83 + idl/SMESH_Gen.idl | 112 ++ idl/SMESH_Hypothesis.idl | 87 ++ idl/SMESH_Mesh.idl | 277 ++++ idl/SUPERV.idl | 32 +- idl/SUPERV/SUPERV.idl | 896 +++++++++++ idl/SubComponent.idl | 39 + idl/SyrComponent.idl | 77 + idl/SyrControlComponent.idl | 39 + idl/TestNotif.idl | 33 + idl/TypeData.idl | 44 + idl/VISU/VISU_Gen.idl | 928 +++++++++++ idl/VISU_Gen.idl | 928 +++++++++++ resources/Supervision_en.xml | 53 + resources/Supervision_fr.xml | 47 + resources/config | 1 + src/GraphBase/DataFlowBase_Base.cxx | 36 +- src/GraphBase/DataFlowBase_Base.hxx | 34 +- src/GraphBase/DataFlowBase_ComputingNode.cxx | 54 +- src/GraphBase/DataFlowBase_ComputingNode.hxx | 19 +- src/GraphBase/DataFlowBase_DataNode.cxx | 43 +- src/GraphBase/DataFlowBase_DataNode.hxx | 34 +- src/GraphBase/DataFlowBase_DataPort.cxx | 141 +- src/GraphBase/DataFlowBase_DataPort.hxx | 35 +- src/GraphBase/DataFlowBase_EndOfLoopNode.cxx | 19 +- src/GraphBase/DataFlowBase_EndOfLoopNode.hxx | 17 +- .../DataFlowBase_EndOfSwitchNode.cxx | 19 +- .../DataFlowBase_EndOfSwitchNode.hxx | 17 +- src/GraphBase/DataFlowBase_FactoryNode.cxx | 20 +- src/GraphBase/DataFlowBase_FactoryNode.hxx | 22 +- src/GraphBase/DataFlowBase_GOTONode.cxx | 19 +- src/GraphBase/DataFlowBase_GOTONode.hxx | 65 +- src/GraphBase/DataFlowBase_Graph.cxx | 141 +- src/GraphBase/DataFlowBase_Graph.hxx | 34 +- src/GraphBase/DataFlowBase_InLineNode.cxx | 19 +- src/GraphBase/DataFlowBase_InLineNode.hxx | 17 +- src/GraphBase/DataFlowBase_InPort.cxx | 36 +- src/GraphBase/DataFlowBase_InPort.hxx | 42 +- src/GraphBase/DataFlowBase_LoadXml.cxx | 27 +- src/GraphBase/DataFlowBase_LoopNode.cxx | 19 +- src/GraphBase/DataFlowBase_LoopNode.hxx | 17 +- src/GraphBase/DataFlowBase_OutPort.cxx | 36 +- src/GraphBase/DataFlowBase_OutPort.hxx | 34 +- src/GraphBase/DataFlowBase_Port.cxx | 19 +- src/GraphBase/DataFlowBase_Port.hxx | 34 +- src/GraphBase/DataFlowBase_PortsOfNode.cxx | 60 +- src/GraphBase/DataFlowBase_PortsOfNode.hxx | 41 +- src/GraphBase/DataFlowBase_Service.cxx | 36 +- src/GraphBase/DataFlowBase_Service.hxx | 34 +- .../DataFlowBase_ServicesParameter.hxx | 26 + src/GraphBase/DataFlowBase_SwitchNode.cxx | 19 +- src/GraphBase/DataFlowBase_SwitchNode.hxx | 17 +- src/GraphBase/DataFlowBase_XmlHandler.cxx | 51 +- src/GraphBase/DataFlowBase_XmlHandler.hxx | 32 +- src/GraphBase/Makefile.in | 50 +- .../SuperVisionBase_CheckOfUndefined.cxx | 66 +- src/GraphEditor/DataFlowEditor_DataFlow.cxx | 27 +- src/GraphEditor/DataFlowEditor_DataFlow.hxx | 39 +- src/GraphEditor/DataFlowEditor_DataFlow.lxx | 48 + src/GraphEditor/DataFlowEditor_InNode.cxx | 26 + src/GraphEditor/DataFlowEditor_InNode.hxx | 26 + src/GraphEditor/DataFlowEditor_OutNode.cxx | 54 +- src/GraphEditor/DataFlowEditor_OutNode.hxx | 34 +- src/GraphEditor/Makefile.in | 44 +- .../SuperVisionEditor_CheckOfUndefined.cxx | 29 + .../DataFlowExecutor_DataFlow.cxx | 38 +- .../DataFlowExecutor_DataFlow.hxx | 26 + .../DataFlowExecutor_DataFlow.lxx | 26 + .../DataFlowExecutor_DynInvoke.cxx | 36 +- .../DataFlowExecutor_DynInvoke.hxx | 26 + .../DataFlowExecutor_FiniteStateMachine.cxx | 36 +- .../DataFlowExecutor_FiniteStateMachine.hxx | 34 +- .../DataFlowExecutor_InNodeThreads.cxx | 105 +- .../DataFlowExecutor_OutNode.cxx | 95 +- .../DataFlowExecutor_OutNode.hxx | 7 + .../DataFlowExecutor_PyDynInvoke.cxx | 78 +- src/GraphExecutor/Makefile.in | 8 +- src/Makefile.in | 35 +- src/SUPERVGUI/Makefile.in | 51 +- src/SUPERVGUI/SUPERVGUI.cxx | 36 +- src/SUPERVGUI/SUPERVGUI.h | 32 +- src/SUPERVGUI/SUPERVGUI_Array.cxx | 122 +- src/SUPERVGUI/SUPERVGUI_Array.h | 52 +- src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.cxx | 28 +- src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.h | 16 +- src/SUPERVGUI/SUPERVGUI_ComputeNode.cxx | 25 +- src/SUPERVGUI/SUPERVGUI_ComputeNode.h | 19 +- src/SUPERVGUI/SUPERVGUI_ControlNode.cxx | 22 +- src/SUPERVGUI/SUPERVGUI_ControlNode.h | 16 +- src/SUPERVGUI/SUPERVGUI_CtrlLink.cxx | 18 +- src/SUPERVGUI/SUPERVGUI_CtrlLink.h | 16 +- src/SUPERVGUI/SUPERVGUI_Def.h | 15 +- src/SUPERVGUI/SUPERVGUI_Graph.cxx | 34 +- src/SUPERVGUI/SUPERVGUI_Graph.h | 34 +- src/SUPERVGUI/SUPERVGUI_GraphNode.cxx | 46 +- src/SUPERVGUI/SUPERVGUI_GraphNode.h | 16 +- src/SUPERVGUI/SUPERVGUI_Information.cxx | 73 +- src/SUPERVGUI/SUPERVGUI_Information.h | 39 +- src/SUPERVGUI/SUPERVGUI_Label.cxx | 34 +- src/SUPERVGUI/SUPERVGUI_Label.h | 34 +- src/SUPERVGUI/SUPERVGUI_Link.cxx | 21 +- src/SUPERVGUI/SUPERVGUI_Link.h | 15 +- src/SUPERVGUI/SUPERVGUI_Main.cxx | 46 +- src/SUPERVGUI/SUPERVGUI_Main.h | 32 +- src/SUPERVGUI/SUPERVGUI_Node.cxx | 96 +- src/SUPERVGUI/SUPERVGUI_Node.h | 32 +- src/SUPERVGUI/SUPERVGUI_Notification.cxx | 34 +- src/SUPERVGUI/SUPERVGUI_Notification.h | 32 +- src/SUPERVGUI/SUPERVGUI_Port.cxx | 34 +- src/SUPERVGUI/SUPERVGUI_Port.h | 32 +- src/SUPERVGUI/SUPERVGUI_Python.cxx | 34 +- src/SUPERVGUI/SUPERVGUI_Python.h | 32 +- src/SUPERVGUI/SUPERVGUI_Service.cxx | 34 +- src/SUPERVGUI/SUPERVGUI_Service.h | 32 +- src/SUPERVGUI/SUPERVGUI_View.cxx | 18 +- src/SUPERVGUI/SUPERVGUI_View.h | 16 +- src/SUPERVGUI/SupervisionGUI_icons.po | 37 + src/SUPERVGUI/SupervisionGUI_msg_en.po | 611 ++++++++ src/SUPERVGUI/SupervisionGUI_msg_fr.po | 444 ++++++ src/Supervision/CNode_Impl.cxx | 68 +- src/Supervision/CNode_Impl.hxx | 21 +- src/Supervision/ELNode_Impl.cxx | 19 +- src/Supervision/ELNode_Impl.hxx | 18 +- src/Supervision/ESNode_Impl.cxx | 19 +- src/Supervision/ESNode_Impl.hxx | 18 +- src/Supervision/FNode_Impl.cxx | 23 +- src/Supervision/FNode_Impl.hxx | 18 +- src/Supervision/GNode_Impl.cxx | 19 +- src/Supervision/GNode_Impl.hxx | 18 +- src/Supervision/Graph_Impl.cxx | 122 +- src/Supervision/Graph_Impl.hxx | 35 +- src/Supervision/INode_Impl.cxx | 20 +- src/Supervision/INode_Impl.hxx | 18 +- src/Supervision/LNode_Impl.cxx | 19 +- src/Supervision/LNode_Impl.hxx | 18 +- src/Supervision/Link_Impl.cxx | 36 +- src/Supervision/Link_Impl.hxx | 35 +- src/Supervision/Makefile.in | 55 +- src/Supervision/Port_Impl.cxx | 36 +- src/Supervision/Port_Impl.hxx | 35 +- src/Supervision/SNode_Impl.cxx | 19 +- src/Supervision/SNode_Impl.hxx | 18 +- src/Supervision/SuperV.py | 18 +- src/Supervision/SuperV_CheckOfUndefined.cxx | 29 + src/Supervision/SuperV_Impl.cxx | 107 +- src/Supervision/SuperV_Impl.hxx | 48 +- src/Supervision/Value_Impl.cxx | 36 +- src/Supervision/Value_Impl.hxx | 35 +- src/Supervision/batchmode_SuperV.py | 14 +- 196 files changed, 17824 insertions(+), 1210 deletions(-) create mode 100644 idl/AddComponent.idl create mode 100644 idl/Calculator.idl create mode 100644 idl/DivComponent.idl create mode 100644 idl/FactorialComponent.idl create mode 100644 idl/GEOM/GEOM_Gen.idl create mode 100644 idl/GEOM/GEOM_Shape.idl create mode 100644 idl/GEOM_Gen.idl create mode 100644 idl/GEOM_Shape.idl create mode 100644 idl/Logger.idl create mode 100644 idl/MED.idl create mode 100644 idl/MPIContainer.idl create mode 100644 idl/MPIObject.idl create mode 100644 idl/Med_Gen.idl create mode 100644 idl/MulComponent.idl create mode 100644 idl/NPMatComponent.idl create mode 100644 idl/NPSolveComponent.idl create mode 100644 idl/NPVecComponent.idl create mode 100644 idl/SALOME/Logger.idl create mode 100644 idl/SALOME/MPIContainer.idl create mode 100644 idl/SALOME/MPIObject.idl create mode 100644 idl/SALOME/SALOMEDS.idl create mode 100644 idl/SALOME/SALOMEDS_Attributes.idl create mode 100644 idl/SALOME/SALOME_Component.idl create mode 100644 idl/SALOME/SALOME_DataTypeCatalog.idl create mode 100644 idl/SALOME/SALOME_Exception.idl create mode 100644 idl/SALOME/SALOME_ModuleCatalog.idl create mode 100644 idl/SALOME/SALOME_Registry.idl create mode 100755 idl/SALOME/SALOME_RessourcesCatalog.idl create mode 100644 idl/SALOME/SALOME_Session.idl create mode 100644 idl/SALOME/SALOME_TestComponent.idl create mode 100644 idl/SALOME/TestNotif.idl create mode 100644 idl/SALOME/TypeData.idl create mode 100644 idl/SALOMEDS.idl create mode 100644 idl/SALOMEDS_Attributes.idl create mode 100644 idl/SALOME_Component.idl create mode 100644 idl/SALOME_DataTypeCatalog.idl create mode 100644 idl/SALOME_Exception.idl create mode 100644 idl/SALOME_ModuleCatalog.idl create mode 100644 idl/SALOME_Registry.idl create mode 100755 idl/SALOME_RessourcesCatalog.idl create mode 100644 idl/SALOME_Session.idl create mode 100644 idl/SALOME_TestComponent.idl create mode 100644 idl/SMESH/SMESH_BasicHypothesis.idl create mode 100644 idl/SMESH/SMESH_Gen.idl create mode 100644 idl/SMESH/SMESH_Hypothesis.idl create mode 100644 idl/SMESH/SMESH_Mesh.idl create mode 100644 idl/SMESH_BasicHypothesis.idl create mode 100644 idl/SMESH_Gen.idl create mode 100644 idl/SMESH_Hypothesis.idl create mode 100644 idl/SMESH_Mesh.idl create mode 100644 idl/SUPERV/SUPERV.idl create mode 100644 idl/SubComponent.idl create mode 100755 idl/SyrComponent.idl create mode 100644 idl/SyrControlComponent.idl create mode 100644 idl/TestNotif.idl create mode 100644 idl/TypeData.idl create mode 100644 idl/VISU/VISU_Gen.idl create mode 100644 idl/VISU_Gen.idl create mode 100755 resources/Supervision_en.xml create mode 100755 resources/Supervision_fr.xml create mode 100644 resources/config create mode 100644 src/SUPERVGUI/SupervisionGUI_icons.po create mode 100644 src/SUPERVGUI/SupervisionGUI_msg_en.po create mode 100644 src/SUPERVGUI/SupervisionGUI_msg_fr.po diff --git a/idl/AddComponent.idl b/idl/AddComponent.idl new file mode 100644 index 0000000..08b8ab3 --- /dev/null +++ b/idl/AddComponent.idl @@ -0,0 +1,51 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : AddComponent.idl +// Author : +// $Header$ + +#ifndef _ADDCOMPONENT_IDL +#define _ADDCOMPONENT_IDL + +#include "SALOME_Component.idl" + +module SuperVisionTest { + + interface Adder ; + + interface AddComponent : Engines::Component { + Adder Addition() ; + double Add( in double x , in double y , out double z ) ; + double LastResult() ; + }; + + interface Adder : Engines::Component { + double Add( in double x , in double y , out double z ) ; + double AddAndCompare( in double x , in double y , in Adder anOtherAdder, + out double z ) ; + void SetLastResult( in double z ) ; + void LastResult( out double z ) ; + }; + +} ; + +#endif diff --git a/idl/Calculator.idl b/idl/Calculator.idl new file mode 100644 index 0000000..c4b0174 --- /dev/null +++ b/idl/Calculator.idl @@ -0,0 +1,49 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : Calculator.idl +// Author : Laurent DADA CEA +// $Header$ + +#ifndef CALCULATOR_IDL +#define CALCULATOR_IDL + +#include "SALOME_Component.idl" +#include "MED.idl" + + +module Engines { + +interface Calculator : Component +{ + + SALOME_MED::FIELDDOUBLE PutToStudy(in SALOME_MED::FIELDDOUBLE field1, in long theStudyId); + SALOME_MED::FIELDDOUBLE Add(in SALOME_MED::FIELDDOUBLE field1, in SALOME_MED::FIELDDOUBLE field2); + SALOME_MED::FIELDDOUBLE Mul(in SALOME_MED::FIELDDOUBLE field1, in double x1); + SALOME_MED::FIELDDOUBLE Constant(in SALOME_MED::FIELDDOUBLE field1, in double x1); + void writeMEDfile(in SALOME_MED::FIELDDOUBLE field1, in string fileName); + +}; +}; + + + +#endif diff --git a/idl/DivComponent.idl b/idl/DivComponent.idl new file mode 100644 index 0000000..c7a83d7 --- /dev/null +++ b/idl/DivComponent.idl @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DivComponent.idl +// Author : +// $Header$ + +#ifndef _DIVCOMPONENT_IDL +#define _DIVCOMPONENT_IDL + +#include "SALOME_Component.idl" + +module SuperVisionTest { + + interface DivComponent : Engines::Component { + void Div( in double x , in double y , out double z ) ; + }; +}; + + +#endif diff --git a/idl/FactorialComponent.idl b/idl/FactorialComponent.idl new file mode 100644 index 0000000..6ac4439 --- /dev/null +++ b/idl/FactorialComponent.idl @@ -0,0 +1,34 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : FactorialComponent.idl +// Author : +// $Header$ + +#include "SALOME_Component.idl" + +module SuperVisionTest { + + interface FactorialComponent : Engines::Component { + long eval(in long n); + }; + +}; diff --git a/idl/GEOM/GEOM_Gen.idl b/idl/GEOM/GEOM_Gen.idl new file mode 100644 index 0000000..94249fa --- /dev/null +++ b/idl/GEOM/GEOM_Gen.idl @@ -0,0 +1,318 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_Gen.idl +// Author : Lucien PIGNOLONI + +#ifndef __GEOM_GEN__ +#define __GEOM_GEN__ + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" +#include "GEOM_Shape.idl" + +module GEOM +{ + interface GEOM_Gen : Engines::Component,SALOMEDS::Driver + { + typedef sequence ListOfIOR ; + typedef sequence ListOfGeomShapes ; + + //--------------------------------------------------------------// + // Studies Management // + //--------------------------------------------------------------// + void GetCurrentStudy(in long StudyID) ; + + short NbLabels(); + + //--------------------------------------------------------------// + // Shapes Management // + //--------------------------------------------------------------// + GEOM_Shape GetIORFromString (in string ior); + ListOfIOR GetReferencedObjects(in GEOM_Shape shape); + ListOfIOR GetObjects (in GEOM_Shape shape); + + //--------------------------------------------------------------// + // Structures // + //--------------------------------------------------------------// + PointStruct MakePointStruct(in double x, + in double y, + in double z) ; + DirStruct MakeDirection (in PointStruct p) ; + AxisStruct MakeAxisStruct(in double x, + in double y, + in double z, + in double vx, + in double vy, + in double vz) ; + + //------------------------------------------------------------// + // Boolean Operations // + //------------------------------------------------------------// + GEOM_Shape MakeBoolean (in GEOM_Shape shape1, + in GEOM_Shape shape2, + in long operation) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeFuse( in GEOM_Shape shape1, + in GEOM_Shape shape2) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Advanced Operations // + //-----------------------------------------------------------// + GEOM_Shape Partition (in ListOfIOR ListShapes, + in ListOfIOR ListTools, + in ListOfIOR ListKeepInside, + in ListOfIOR ListRemoveInside, + in short Limit) + raises (SALOME::SALOME_Exception) ; + + + GEOM_Shape MakeFilling(in GEOM_Shape shape, + in short mindeg, + in short maxdeg, + in double tol3d, + in double tol2d, + in short nbiter) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeSewing (in ListOfIOR ListShape, + in double precision) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeSewingShape( in GEOM_Shape aShape, + in double precision ) raises (SALOME::SALOME_Exception); + + GEOM_Shape OrientationChange(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakePlacedBox(in double x1, in double y1, in double z1, + in double delta1, in double delta2, in double delta3) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakePanel(in GEOM_Shape shape, + in short directiontype, + in double delta) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeGlueFaces(in GEOM_Shape shape, + in double tol3d) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Transformations Operations // + //-----------------------------------------------------------// + GEOM_Shape MakeCopy(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeTranslation(in GEOM_Shape shape, + in double x, + in double y, + in double z) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeRotation(in GEOM_Shape shape, + in AxisStruct axis, + in double angle) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeScaleTransform(in GEOM_Shape shape, + in PointStruct theCenterofScale, + in double factor) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeMirrorByPlane(in GEOM_Shape shape, + in GEOM_Shape shapePlane) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeRevolution(in GEOM_Shape shape, + in AxisStruct axis, + in double angle) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakePrism(in GEOM_Shape baseShape, + in PointStruct P1, + in PointStruct P2) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakePipe(in GEOM_Shape pathShape, + in GEOM_Shape baseShape) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Patterns Construction // + //-----------------------------------------------------------// + GEOM_Shape MakeMultiTranslation1D(in GEOM_Shape shape, + in DirStruct dir, + in double step, + in short nbtimes) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeMultiTranslation2D(in GEOM_Shape shape, + in DirStruct dir1, + in double step1, + in short nbtimes1, + in DirStruct dir2, + in double step2, + in short nbtimes2) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeMultiRotation1D(in GEOM_Shape shape, + in DirStruct dir, + in PointStruct loc, + in short nbtimes) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeMultiRotation2D(in GEOM_Shape shape, + in DirStruct dir, + in PointStruct loc, + in double ang, + in short nbtimes1, + in double step, + in short nbtimes2) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Mesures Construction // + //-----------------------------------------------------------// + GEOM_Shape MakeCDG(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; + + + //-----------------------------------------------------------// + // Primitives Construction // + //-----------------------------------------------------------// + + GEOM_Shape MakeVertex(in double x, + in double y, + in double z) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeVector (in PointStruct pstruct1, + in PointStruct pstruct2) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeLine (in PointStruct pstruct, + in DirStruct dstruct) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakePlane (in PointStruct pstruct, + in DirStruct dstruct, + in double trimsize) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeCircle(in PointStruct pstruct, + in DirStruct dstruct, + in double radius) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeArc(in PointStruct pInit, + in PointStruct pCircle, + in PointStruct pEnd) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Primitives Construction // + //-----------------------------------------------------------// + GEOM_Shape MakeBox (in double x1, + in double y1, + in double z1, + in double x2, + in double y2, + in double z2) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeCylinder(in PointStruct pstruct, + in DirStruct dstruct, + in double radius, + in double height) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeSphere (in double x1, + in double y1, + in double z1, + in double radius) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeTorus(in PointStruct pstruct, + in DirStruct dstruct, + in double major_radius, + in double minor_radius) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeCone(in PointStruct pstruct, + in DirStruct dstruct, + in double radius1, + in double radius2, + in double height) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Archimede // + //-----------------------------------------------------------// + GEOM_Shape Archimede(in GEOM_Shape shape, + in double Weight, + in double WaterDensity, + in double MeshingDeflection) raises (SALOME::SALOME_Exception); + + //-----------------------------------------------------------// + // Build // + //-----------------------------------------------------------// + GEOM_Shape MakeEdge (in PointStruct pstruct1, + in PointStruct pstruct2) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeWire (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeCompound (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeFace (in GEOM_Shape shapeWire, + in boolean wantplanarface ) raises (SALOME::SALOME_Exception) ; + + + //-----------------------------------------------------------// + // Subshapes Construction for GUI only // + //-----------------------------------------------------------// + GEOM_Shape SubShape(in GEOM_Shape shape, + in short ShapeType, + in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Subshapes Construction for TUI or GUI // + //-----------------------------------------------------------// + ListOfGeomShapes SubShapeAll(in GEOM_Shape shape, + in short ShapeType) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Subshapes Construction + // Use it to have the same order of subshapes if their + // order may change as a result of reconstruction using + // boolean operations, fillet etc. + //-----------------------------------------------------------// + GEOM_Shape SubShapeSorted(in GEOM_Shape shape, + in short ShapeType, + in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; + + ListOfGeomShapes SubShapeAllSorted(in GEOM_Shape shape, + in short ShapeType) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Fillet and Chamfer construction // + //-----------------------------------------------------------// + GEOM_Shape MakeFillet(in GEOM_Shape shape, + in double radius, + in short ShapeType, + in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeChamfer(in GEOM_Shape shape, + in double d1, + in double d2, + in short ShapeType, + in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Suppress faces in a shape // + //-----------------------------------------------------------// + ListOfGeomShapes SuppressFaces(in GEOM_Shape shape, + in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Suppress a single hole in topology (face) shell or solid // + // : ListOfIdEndFace may be an empty list // + // : used only when hole traverses the topology // + //-----------------------------------------------------------// + GEOM_Shape SuppressHole(in GEOM_Shape shape, + in GEOM_Shape::ListOfSubShapeID ListOfIdFace, + in GEOM_Shape::ListOfSubShapeID ListOfIdWire, + in GEOM_Shape::ListOfSubShapeID ListOfIdEndFace ) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Suppress one or more holes in a face or a shell // + //-----------------------------------------------------------// + GEOM_Shape SuppressHolesInFaceOrShell(in GEOM_Shape shapeFaceShell, + in GEOM_Shape::ListOfSubShapeID ListOfIdWires ) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Import/Export // + //-----------------------------------------------------------// + GEOM_Shape ImportIGES(in string filename) raises (SALOME::SALOME_Exception) ; + GEOM_Shape ImportBREP(in string filename) raises (SALOME::SALOME_Exception) ; + GEOM_Shape ImportSTEP(in string filename) raises (SALOME::SALOME_Exception) ; + + void ExportIGES(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ; + void ExportBREP(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ; + void ExportSTEP(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ; + //-----------------------------------------------------------// + // Check Shape // + //-----------------------------------------------------------// + boolean CheckShape(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; + + }; +}; + +#endif diff --git a/idl/GEOM/GEOM_Shape.idl b/idl/GEOM/GEOM_Shape.idl new file mode 100644 index 0000000..b9091a0 --- /dev/null +++ b/idl/GEOM/GEOM_Shape.idl @@ -0,0 +1,83 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_Shape.idl +// Author : Lucien PIGNOLONI + +#ifndef __GEOM_Shape__ +#define __GEOM_Shape__ + +module GEOM +{ + //-----------------------------------------------------------------// + // Topological types for shapes (like Open Cascade types) // + //-----------------------------------------------------------------// + + enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL, + FACE, WIRE, EDGE, VERTEX, SHAPE } ; + + //----------------------------------------------------------------// + // Structures // + //--------------------------------------------------- ------------// + struct PointStruct { double x; + double y; + double z; } ; + struct DirStruct { PointStruct PS ; } ; // analog to Occ Direction + + struct AxisStruct { double x; + double y; + double z; + double vx; + double vy; + double vz; } ; + + //----------------------------------------------------------------// + // interface GEOM_Shape methods // + //----------------------------------------------------------------// + + interface GEOM_Gen; + + interface GEOM_Shape + { + typedef sequence ListOfSubShapeID ; + typedef sequence TMPFile; + + attribute string Name; // (to set and get) the name of shape (= CORBA IOR converted into a string) + attribute string MainName; // (to set and get) the name of mainshape (= CORBA IOR converted into a string) + + attribute boolean IsMainShape; // (...) true if this is a main shape (not a sub shape) + attribute string ShapeId; // (...) the entry of the shape in geom/OCAF document + attribute string StudyShapeId; // (...) the entry of the shape in the study/OCAF when added + attribute ListOfSubShapeID Index; // (...) list of references (number) identifing the sub shapes in the main shape + attribute shape_type ShapeType; // (...) a topological type of the shape + + attribute string NameType; // (...) a topological/geometrical name of the shape + + //Transfer resulting shape to client as sequence of bytes + //client can extract shape from stream using BrepTools::Read function + TMPFile GetShapeStream(); + + // the generator engine + GEOM_Gen Engine(); + + }; +}; +#endif diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl new file mode 100644 index 0000000..94249fa --- /dev/null +++ b/idl/GEOM_Gen.idl @@ -0,0 +1,318 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_Gen.idl +// Author : Lucien PIGNOLONI + +#ifndef __GEOM_GEN__ +#define __GEOM_GEN__ + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" +#include "GEOM_Shape.idl" + +module GEOM +{ + interface GEOM_Gen : Engines::Component,SALOMEDS::Driver + { + typedef sequence ListOfIOR ; + typedef sequence ListOfGeomShapes ; + + //--------------------------------------------------------------// + // Studies Management // + //--------------------------------------------------------------// + void GetCurrentStudy(in long StudyID) ; + + short NbLabels(); + + //--------------------------------------------------------------// + // Shapes Management // + //--------------------------------------------------------------// + GEOM_Shape GetIORFromString (in string ior); + ListOfIOR GetReferencedObjects(in GEOM_Shape shape); + ListOfIOR GetObjects (in GEOM_Shape shape); + + //--------------------------------------------------------------// + // Structures // + //--------------------------------------------------------------// + PointStruct MakePointStruct(in double x, + in double y, + in double z) ; + DirStruct MakeDirection (in PointStruct p) ; + AxisStruct MakeAxisStruct(in double x, + in double y, + in double z, + in double vx, + in double vy, + in double vz) ; + + //------------------------------------------------------------// + // Boolean Operations // + //------------------------------------------------------------// + GEOM_Shape MakeBoolean (in GEOM_Shape shape1, + in GEOM_Shape shape2, + in long operation) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeFuse( in GEOM_Shape shape1, + in GEOM_Shape shape2) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Advanced Operations // + //-----------------------------------------------------------// + GEOM_Shape Partition (in ListOfIOR ListShapes, + in ListOfIOR ListTools, + in ListOfIOR ListKeepInside, + in ListOfIOR ListRemoveInside, + in short Limit) + raises (SALOME::SALOME_Exception) ; + + + GEOM_Shape MakeFilling(in GEOM_Shape shape, + in short mindeg, + in short maxdeg, + in double tol3d, + in double tol2d, + in short nbiter) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeSewing (in ListOfIOR ListShape, + in double precision) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeSewingShape( in GEOM_Shape aShape, + in double precision ) raises (SALOME::SALOME_Exception); + + GEOM_Shape OrientationChange(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakePlacedBox(in double x1, in double y1, in double z1, + in double delta1, in double delta2, in double delta3) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakePanel(in GEOM_Shape shape, + in short directiontype, + in double delta) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeGlueFaces(in GEOM_Shape shape, + in double tol3d) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Transformations Operations // + //-----------------------------------------------------------// + GEOM_Shape MakeCopy(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeTranslation(in GEOM_Shape shape, + in double x, + in double y, + in double z) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeRotation(in GEOM_Shape shape, + in AxisStruct axis, + in double angle) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeScaleTransform(in GEOM_Shape shape, + in PointStruct theCenterofScale, + in double factor) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeMirrorByPlane(in GEOM_Shape shape, + in GEOM_Shape shapePlane) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeRevolution(in GEOM_Shape shape, + in AxisStruct axis, + in double angle) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakePrism(in GEOM_Shape baseShape, + in PointStruct P1, + in PointStruct P2) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakePipe(in GEOM_Shape pathShape, + in GEOM_Shape baseShape) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Patterns Construction // + //-----------------------------------------------------------// + GEOM_Shape MakeMultiTranslation1D(in GEOM_Shape shape, + in DirStruct dir, + in double step, + in short nbtimes) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeMultiTranslation2D(in GEOM_Shape shape, + in DirStruct dir1, + in double step1, + in short nbtimes1, + in DirStruct dir2, + in double step2, + in short nbtimes2) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeMultiRotation1D(in GEOM_Shape shape, + in DirStruct dir, + in PointStruct loc, + in short nbtimes) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeMultiRotation2D(in GEOM_Shape shape, + in DirStruct dir, + in PointStruct loc, + in double ang, + in short nbtimes1, + in double step, + in short nbtimes2) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Mesures Construction // + //-----------------------------------------------------------// + GEOM_Shape MakeCDG(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; + + + //-----------------------------------------------------------// + // Primitives Construction // + //-----------------------------------------------------------// + + GEOM_Shape MakeVertex(in double x, + in double y, + in double z) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeVector (in PointStruct pstruct1, + in PointStruct pstruct2) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeLine (in PointStruct pstruct, + in DirStruct dstruct) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakePlane (in PointStruct pstruct, + in DirStruct dstruct, + in double trimsize) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeCircle(in PointStruct pstruct, + in DirStruct dstruct, + in double radius) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeArc(in PointStruct pInit, + in PointStruct pCircle, + in PointStruct pEnd) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Primitives Construction // + //-----------------------------------------------------------// + GEOM_Shape MakeBox (in double x1, + in double y1, + in double z1, + in double x2, + in double y2, + in double z2) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeCylinder(in PointStruct pstruct, + in DirStruct dstruct, + in double radius, + in double height) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeSphere (in double x1, + in double y1, + in double z1, + in double radius) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeTorus(in PointStruct pstruct, + in DirStruct dstruct, + in double major_radius, + in double minor_radius) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeCone(in PointStruct pstruct, + in DirStruct dstruct, + in double radius1, + in double radius2, + in double height) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Archimede // + //-----------------------------------------------------------// + GEOM_Shape Archimede(in GEOM_Shape shape, + in double Weight, + in double WaterDensity, + in double MeshingDeflection) raises (SALOME::SALOME_Exception); + + //-----------------------------------------------------------// + // Build // + //-----------------------------------------------------------// + GEOM_Shape MakeEdge (in PointStruct pstruct1, + in PointStruct pstruct2) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeWire (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeCompound (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; + GEOM_Shape MakeFace (in GEOM_Shape shapeWire, + in boolean wantplanarface ) raises (SALOME::SALOME_Exception) ; + + + //-----------------------------------------------------------// + // Subshapes Construction for GUI only // + //-----------------------------------------------------------// + GEOM_Shape SubShape(in GEOM_Shape shape, + in short ShapeType, + in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Subshapes Construction for TUI or GUI // + //-----------------------------------------------------------// + ListOfGeomShapes SubShapeAll(in GEOM_Shape shape, + in short ShapeType) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Subshapes Construction + // Use it to have the same order of subshapes if their + // order may change as a result of reconstruction using + // boolean operations, fillet etc. + //-----------------------------------------------------------// + GEOM_Shape SubShapeSorted(in GEOM_Shape shape, + in short ShapeType, + in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; + + ListOfGeomShapes SubShapeAllSorted(in GEOM_Shape shape, + in short ShapeType) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Fillet and Chamfer construction // + //-----------------------------------------------------------// + GEOM_Shape MakeFillet(in GEOM_Shape shape, + in double radius, + in short ShapeType, + in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; + + GEOM_Shape MakeChamfer(in GEOM_Shape shape, + in double d1, + in double d2, + in short ShapeType, + in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Suppress faces in a shape // + //-----------------------------------------------------------// + ListOfGeomShapes SuppressFaces(in GEOM_Shape shape, + in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Suppress a single hole in topology (face) shell or solid // + // : ListOfIdEndFace may be an empty list // + // : used only when hole traverses the topology // + //-----------------------------------------------------------// + GEOM_Shape SuppressHole(in GEOM_Shape shape, + in GEOM_Shape::ListOfSubShapeID ListOfIdFace, + in GEOM_Shape::ListOfSubShapeID ListOfIdWire, + in GEOM_Shape::ListOfSubShapeID ListOfIdEndFace ) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Suppress one or more holes in a face or a shell // + //-----------------------------------------------------------// + GEOM_Shape SuppressHolesInFaceOrShell(in GEOM_Shape shapeFaceShell, + in GEOM_Shape::ListOfSubShapeID ListOfIdWires ) raises (SALOME::SALOME_Exception) ; + + //-----------------------------------------------------------// + // Import/Export // + //-----------------------------------------------------------// + GEOM_Shape ImportIGES(in string filename) raises (SALOME::SALOME_Exception) ; + GEOM_Shape ImportBREP(in string filename) raises (SALOME::SALOME_Exception) ; + GEOM_Shape ImportSTEP(in string filename) raises (SALOME::SALOME_Exception) ; + + void ExportIGES(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ; + void ExportBREP(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ; + void ExportSTEP(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ; + //-----------------------------------------------------------// + // Check Shape // + //-----------------------------------------------------------// + boolean CheckShape(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; + + }; +}; + +#endif diff --git a/idl/GEOM_Shape.idl b/idl/GEOM_Shape.idl new file mode 100644 index 0000000..b9091a0 --- /dev/null +++ b/idl/GEOM_Shape.idl @@ -0,0 +1,83 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_Shape.idl +// Author : Lucien PIGNOLONI + +#ifndef __GEOM_Shape__ +#define __GEOM_Shape__ + +module GEOM +{ + //-----------------------------------------------------------------// + // Topological types for shapes (like Open Cascade types) // + //-----------------------------------------------------------------// + + enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL, + FACE, WIRE, EDGE, VERTEX, SHAPE } ; + + //----------------------------------------------------------------// + // Structures // + //--------------------------------------------------- ------------// + struct PointStruct { double x; + double y; + double z; } ; + struct DirStruct { PointStruct PS ; } ; // analog to Occ Direction + + struct AxisStruct { double x; + double y; + double z; + double vx; + double vy; + double vz; } ; + + //----------------------------------------------------------------// + // interface GEOM_Shape methods // + //----------------------------------------------------------------// + + interface GEOM_Gen; + + interface GEOM_Shape + { + typedef sequence ListOfSubShapeID ; + typedef sequence TMPFile; + + attribute string Name; // (to set and get) the name of shape (= CORBA IOR converted into a string) + attribute string MainName; // (to set and get) the name of mainshape (= CORBA IOR converted into a string) + + attribute boolean IsMainShape; // (...) true if this is a main shape (not a sub shape) + attribute string ShapeId; // (...) the entry of the shape in geom/OCAF document + attribute string StudyShapeId; // (...) the entry of the shape in the study/OCAF when added + attribute ListOfSubShapeID Index; // (...) list of references (number) identifing the sub shapes in the main shape + attribute shape_type ShapeType; // (...) a topological type of the shape + + attribute string NameType; // (...) a topological/geometrical name of the shape + + //Transfer resulting shape to client as sequence of bytes + //client can extract shape from stream using BrepTools::Read function + TMPFile GetShapeStream(); + + // the generator engine + GEOM_Gen Engine(); + + }; +}; +#endif diff --git a/idl/Logger.idl b/idl/Logger.idl new file mode 100644 index 0000000..d58070d --- /dev/null +++ b/idl/Logger.idl @@ -0,0 +1,24 @@ +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : Logger.idl +// Author : Vasily Rusyaev + +#ifndef SALOME_LOGGER_IDL +#define SALOME_LOGGER_IDL + +#pragma prefix "opencascade.com" + +module SALOME_Logger +{ + interface Logger + { + //put message into one special place for all servers using Logger + oneway void putMessage (in string message); + }; +}; + + + +#endif diff --git a/idl/MED.idl b/idl/MED.idl new file mode 100644 index 0000000..17633a5 --- /dev/null +++ b/idl/MED.idl @@ -0,0 +1,796 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : MED.idl +// $Header$ + +/*! +This file contains the main IDL difinitions of the %MED component in %SALOME application. +*/ +#ifndef MED_IDL +#define MED_IDL +/*! + \defgroup MED SALOME MED component +*/ + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" + +module Engines { + /*! + An array of long + */ + typedef sequence long_array; + /*! + An array of double + */ + typedef sequence double_array; + /*! + An array of string + */ + typedef sequence string_array; + /*! + An array of boolean + */ + typedef sequence boolean_array; + +}; +/*! \ingroup MED +This package contains a set of interfaces used for %SALOME %MED component. +*/ + +module SALOME_MED { + + // interface FIELD; + interface FIELD; + interface FAMILY; + interface GROUP; + interface MESH; + interface SUPPORT; + +/*! +This enumeration conatains a set of elements difining the type of geometrical elements which constitue +a %Mesh. +*/ + enum medGeometryElement { + MED_NONE, + MED_POINT1, + MED_SEG2, + MED_SEG3, + MED_TRIA3, + MED_QUAD4, + MED_TRIA6, + MED_QUAD8, + MED_TETRA4, + MED_PYRA5, + MED_PENTA6, + MED_HEXA8, + MED_TETRA10, + MED_PYRA13, + MED_PENTA15, + MED_HEXA20, + MED_ALL_ELEMENTS + }; +/*! +This enumeration conatains a set of elements difining the structural elements (entities) which constitue +a %Mesh. +*/ + + enum medEntityMesh { + MED_CELL, + MED_FACE, + MED_EDGE, + MED_NODE, + MED_ALL_ENTITIES + }; + + enum medModeSwitch { + MED_FULL_INTERLACE, + MED_NO_INTERLACE + }; + + enum medConnectivity { + MED_NODAL, + MED_DESCENDING + }; +/*! +This enumeration conatains a set of elements difining the type of driver. +*/ + + enum medDriverTypes { + MED_DRIVER , /*!medGeometryElement + */ + typedef sequence medGeometryElement_array; + /*! + An array of %FAMILY + */ + typedef sequence Family_array; + /*! + An array of %GROUP + */ + typedef sequence Group_array; + + // ---------------------- + // mesh interface + // ---------------------- + + interface MESH { + // Index range begins from 1 + + // General Informations + //--------------------- + + /*! + Returns the name of the mesh . + */ + string getName() raises (SALOME::SALOME_Exception); + + /*! + Returns space dimension. + */ + long getSpaceDimension() raises (SALOME::SALOME_Exception); + + /*! + Returns mesh dimension. + + Example : + - we have only MED_TETRA4 in MED_CELL : MeshDimension = 3D + - we have only MED_QUAD4 in MED_CELL : MeshDimension = 2D + - we have both MED_SEG2 and MED_TRIA3 in MED_CELL : MeshDimension = 2D + */ + long getMeshDimension() raises (SALOME::SALOME_Exception); + + // Coordinates + //------------ + + /*! + Returns coordinate system : + - "CARTESIAN" + - "CYLINDRICAL" + - "SPHERICAL" + */ + string getCoordinateSystem() raises (SALOME::SALOME_Exception); + + /*! + Returns the number of nodes defined in the mesh. + */ + long getNumberOfNodes() raises (SALOME::SALOME_Exception); + + /*! + Returns an array of coordinates : + - X1,Y1,Z1,X2,Y2,...,Zn if MED_FULL_INTERLACE + - X1,X2,...Xn,Y1,Y2,...Zn if MED_NO_INTERLACE + */ + Engines::double_array getCoordinates(in medModeSwitch typeSwitch) + raises (SALOME::SALOME_Exception); + + /*! + Returns an array containing the names of coordinates. + + Example : + - x,y,z + - r,teta,phi + - ... + + It could be empty. + */ + Engines::string_array getCoordinatesNames() + raises (SALOME::SALOME_Exception); + + /*! + Returns an array containing the units of coordinates (cm, m, mm, ...) + + It could be empty. By defult IS is used (meter). + */ + Engines::string_array getCoordinatesUnits() + raises (SALOME::SALOME_Exception); + + // Connectivity + // ------------ + + /*! + Returns the number of different medGeometryElement types existing + in the specified entity. + + \note + Not implemented for MED_ALL_ENTITIES. + */ + long getNumberOfTypes(in medEntityMesh entity) + raises (SALOME::SALOME_Exception); + + /*! + Returns an array of all medGeometryElement types existing + in the mesh. + + \note + Not implemented for MED_ALL_ENTITIES. + */ + medGeometryElement_array getTypes(in medEntityMesh entity) + raises (SALOME::SALOME_Exception); + + /*! + Returns the number of elements of type medGeometryElement. + + Note : + - Implemented for MED_ALL_ELEMENTS + - Not implemented for MED_ALL_ENTITIES + */ + long getNumberOfElements(in medEntityMesh entity, + in medGeometryElement geomElement) + raises (SALOME::SALOME_Exception); + + /*! + Give, in full or no interlace mode (for nodal connectivity), + descending or nodal connectivity. + + You must give a medEntityMesh (ie:MED_EDGE) and a + medGeometryElement (ie:MED_SEG3). + */ + Engines::long_array getConnectivity(in medModeSwitch typeSwitch, + in medConnectivity mode, + in medEntityMesh entity, + in medGeometryElement geomElement) + raises (SALOME::SALOME_Exception); + + /*! + Give morse index array to use with + getConnectivity(MED_FULL_INTERLACE,mode,entity,MED_ALL_ELEMENTS). + + Each value give start index for corresponding entity in + connectivity array. + + Example : i-th element, j-th node of it : + - In C mode : Connectivity[ConnectivityIndex[i]-1+j-1] + - In fortran mode : Connectivity[ConnectivityIndex[i]+j] + */ + Engines::long_array getConnectivityIndex(in medConnectivity mode, + in medEntityMesh entity) + raises (SALOME::SALOME_Exception); + + /*! + Gets a global number of the element which have the same connectivity as the + connectivity argument. + */ + long getElementNumber(in medConnectivity mode, + in medEntityMesh entity, + in medGeometryElement type, + in Engines::long_array connectivity) + raises (SALOME::SALOME_Exception); + + /*! + Returns a reverse connectivity to MED_CELL. + + If mode=MED_NODAL, the array contains, for each node, all cells + arround it. + + If mode=MED_DESCENDING, the array contains, for each face (or edge), + the 2 cells of each side. First is cell which face normal is outgoing. + */ + Engines::long_array getReverseConnectivity(in medConnectivity mode) + raises (SALOME::SALOME_Exception); + + /*! + Give index array to use with getReverseConnectivity(MED_NODAL). + + This method is not used with MED_DESCENDING mode, + because we have allways two cells. + + See getConnectivityIndex for details. + */ + Engines::long_array getReverseConnectivityIndex(in medConnectivity mode) + raises (SALOME::SALOME_Exception); + + // Families and Groups + // ------------------- + + /*! + Returns the number of all families. + */ + long getNumberOfFamilies(in medEntityMesh entity) + raises (SALOME::SALOME_Exception); + + /*! + Returns the number of all groups. + */ + long getNumberOfGroups(in medEntityMesh entity) + raises (SALOME::SALOME_Exception); + + /*! + Returns an array of all families. + */ + Family_array getFamilies(in medEntityMesh entity) + raises (SALOME::SALOME_Exception); + + /*! + Returns the reference to i-th family. + + \note + i is bounded by 1 and NumberOfFamilies. + */ + FAMILY getFamily(in medEntityMesh entity,in long familyNumber) + raises (SALOME::SALOME_Exception); + + /*! + Returns an array of all groups. + */ + Group_array getGroups(in medEntityMesh entity) + raises (SALOME::SALOME_Exception); + + /*! + Returns the reference to i-th group. + + \note + i is bounded by 1 and NumberOfGroups. + */ + GROUP getGroup(in medEntityMesh entity,in long groupNumber) + raises (SALOME::SALOME_Exception); + + // Others + // ------ + + /*! + Returns a field on mySupport containing volume. + + \note + mySupport must be on MED_CELL entity and MeshDimension must be 3D. + */ + FIELD getVolume(in SUPPORT mySupport) + raises (SALOME::SALOME_Exception); + + /*! + Returns a field on mySupport containing area. + + \note + mySupport must be on MED_FACE entity. + */ + FIELD getArea(in SUPPORT mySupport) + raises (SALOME::SALOME_Exception); + + /*! + Returns a field on mySupport containing length. + + \note + mySupport must be on MED_EDGE entity. + */ + FIELD getLength(in SUPPORT mySupport) + raises (SALOME::SALOME_Exception); + + /*! + Returns a field on mySupport containing normal. + + \note + mySupport must be on MED_FACE entity if MeshDimension and + SpaceDimension=3D and on MED_EDGE if MeshDimension and SpaceDimension=2D. + */ + FIELD getNormal(in SUPPORT mySupport) + raises (SALOME::SALOME_Exception); + + /*! + Returns a field on mySupport containing barycenter. + */ + FIELD getBarycenter(in SUPPORT mySupport) + raises (SALOME::SALOME_Exception); + + /* + Returns a field on mySupport containing neighbourhood. + */ + // FIELD getNeighbourhood(in SUPPORT mySupport) + // raises (SALOME::SALOME_Exception); + + // Read & Write + // ----------- + + /*! + Adds the Mesh in the StudyManager. + */ + void addInStudy(in SALOMEDS::Study myStudy, in MESH myIor ) + raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection); + + // Add a MED/VTK/... driver + // Multiple drivers can be added whatever the type + long addDriver (in medDriverTypes driverType, in string fileName, in string meshName) + raises (SALOME::SALOME_Exception); + // Remove a driver + void rmDriver (in long i) raises (SALOME::SALOME_Exception); + + // + void read (in long i) raises (SALOME::SALOME_Exception); + void write (in long i, in string driverMeshName) + raises (SALOME::SALOME_Exception); + +/*! +Internal Corba method. +*/ + long getCorbaIndex() raises (SALOME::SALOME_Exception); + }; + + + // ---------------------- + // Support interface + // ---------------------- + + interface SUPPORT { + + /*! + Returns the name of the support. + */ + string getName() raises (SALOME::SALOME_Exception); + + /*! + Returns the description of the support. + */ + string getDescription() raises (SALOME::SALOME_Exception); + + /*! + Returns a reference to the mesh. + */ + MESH getMesh() raises (SALOME::SALOME_Exception); + + /*! + Returns the type of medEntityMesh used by the support. + + \note + A support deals only with one entity's type + (for example : MED_FACE or MED_NODE) + */ + medEntityMesh getEntity() raises (SALOME::SALOME_Exception); + + /*! + Returns True if all elements of this entity are + engaged, False otherwise. + + If True, you must use mesh reference (getMesh) to get more information. + */ + boolean isOnAllElements() raises (SALOME::SALOME_Exception); + + /*! + If the method isOnAllElements returns False, this method + returns the number of elements in the support. + + Example : number of MED_TRIA3 or MED_ALL_ELEMETNS elements + in entity of support. + + \note + If %SUPPORT is defined on MED_NODE, use MED_NONE medGeometryElement type. + */ + long getNumberOfElements(in medGeometryElement geomElement) + raises (SALOME::SALOME_Exception); + + /*! + If isOnAllElements is False, returns an array of medGeometryElement + types used by the support. + + medEntityMesh is given by getEntity. + */ + medGeometryElement_array getTypes() raises (SALOME::SALOME_Exception); + + /*! + If the method isOnAllElements returns False, this method returns an array which + contains all numbers of given medGeometryElement. + + Numbering is global, ie numbers are bounded by 1 and + MESH::getNumberOfElement(entity,MED_ALL_ELEMENTS) and not by 1 and + MESH::getNumberOfElement(entity,geomElement). + + \note + If %SUPPORT is defined on MED_NODE, use MED_NONE medGeometryElement type. + */ + Engines::long_array getNumber(in medGeometryElement geomElement) + raises (SALOME::SALOME_Exception); + + /*! + If the method isOnAllElements returns False, this method returns the index + of element number. + + Use it with getNumber(MED_ALL_ELEMENTS). + + \note + See the method getConnectivityIndex for more details. + */ + Engines::long_array getNumberIndex() + raises (SALOME::SALOME_Exception); + /*! + Returns the number of Gauss points for this medGeometryElement. + + \note + - Not defined if %SUPPORT is on MED_NODE. + - Not defined for MED_ALL_ELEMENTS medGeometryElement type. + */ + long getNumberOfGaussPoints(in medGeometryElement geomElement) + raises (SALOME::SALOME_Exception); +/*! +Internal Corba method. +*/ + long getCorbaIndex() raises (SALOME::SALOME_Exception); + }; + + + //----------------- + // Family interface + //----------------- + + interface FAMILY : SUPPORT + { + + /*! + Returns Family identifier (Identifier + of the family in the mesh). + + \note + There is precisely only one indentifier for each family. + */ + long getIdentifier() raises (SALOME::SALOME_Exception); + + /*! + Returns number of attributes. + */ + long getNumberOfAttributes() raises (SALOME::SALOME_Exception); + + /*! + Returns an array of all attributes' identifiers. + There is one for each attribute. + */ + Engines::long_array getAttributesIdentifiers() + raises (SALOME::SALOME_Exception); + + /*! + Returns identifier of i-th attribute. + + \note + i is bounded by 1 and NumberOfAttributes. + */ + long getAttributeIdentifier(in long i) raises (SALOME::SALOME_Exception); + + /*! + Returns an array of all values of the attributes . + There is one value for each attribute. + */ + Engines::long_array getAttributesValues() + raises (SALOME::SALOME_Exception); + + /*! + Returns the value of i-th attribute. + + \note + i is bounded by 1 and NumberOfAttributes. + */ + long getAttributeValue(in long i) raises (SALOME::SALOME_Exception); + + /*! + Returns an array of all descriptions of the attributes . + There is one description for each attribute. + */ + Engines::string_array getAttributesDescriptions() + raises (SALOME::SALOME_Exception); + + /*! + Returns the description of i-th attribute. + + \note + i is bounded by 1 and NumberOfAttributes. + */ + string getAttributeDescription(in long i) + raises (SALOME::SALOME_Exception); + }; + + + //---------------- + // Group interface + //---------------- + interface GROUP : SUPPORT + { + + /*! + Returns the number of families in this group. + */ + long getNumberOfFamilies() raises (SALOME::SALOME_Exception); + + /*! + Returns an array of all families. + */ + Family_array getFamilies() raises (SALOME::SALOME_Exception); + + /*! + Returns a reference to the i-th family. + + \note + i is bounded by 1 and NumberOfFamilies. + */ + FAMILY getFamily(in long i) raises (SALOME::SALOME_Exception); + + }; + + + //---------------- + // Field interface + //---------------- + + interface FIELD + { + + /*! + Returns the field name. + */ + string getName() raises (SALOME::SALOME_Exception); + + /*! + Returns the field description. + */ + string getDescription() raises (SALOME::SALOME_Exception); + + /*! + Returns a reference to the support + on which the field is defined. + */ + SUPPORT getSupport() raises (SALOME::SALOME_Exception); + + /*! + Returns the number of field's components. + */ + long getNumberOfComponents() raises (SALOME::SALOME_Exception); + + /*! + Returns an array containing components names. + */ + Engines::string_array getComponentsNames() + raises (SALOME::SALOME_Exception); + + /*! + Returns the name of i-th component. + + \note + - i is bounded by 1 and NumberOfComponents. + - Name is mandatory for each field's component. + */ + string getComponentName(in long i) raises (SALOME::SALOME_Exception); + + /*! + Returns an array containing components units. + */ + Engines::string_array getComponentsUnits() + raises (SALOME::SALOME_Exception); + + /*! + Returns the unit of i-th component. + + \note + i is bounded by 1 and NumberOfComponents. + */ + string getComponentUnit(in long i) raises (SALOME::SALOME_Exception); + + + long getIterationNumber() raises (SALOME::SALOME_Exception); + + /*! + Returns time for this iteration. + */ + double getTime() raises (SALOME::SALOME_Exception); + + /*! + Returns order number use for + internal step in this iteration. + */ + long getOrderNumber() raises (SALOME::SALOME_Exception); + + // Read & Write + // ----------- + + long addDriver (in medDriverTypes driverType, in string fileName, in string fieldName) + raises (SALOME::SALOME_Exception); + + /*! + Removes a driver + */ + void rmDriver (in long i) + raises (SALOME::SALOME_Exception); + + // + void read (in long i) + raises (SALOME::SALOME_Exception); + + /*! + Writes a field. + */ + void write (in long i, in string driverFieldName) + raises (SALOME::SALOME_Exception); + + /*! + Adds the Field in the StudyManager. + */ + void addInStudy(in SALOMEDS::Study myStudy, in FIELD myIor ) + raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection); + +/*! +Internal Corba method. +*/ + long getCorbaIndex() + raises (SALOME::SALOME_Exception); + + }; + + + interface FIELDDOUBLE : FIELD { + + /*! + Returns an array of values of the field + */ + Engines::double_array getValue(in medModeSwitch mode) + raises (SALOME::SALOME_Exception); + }; + + interface FIELDINT : FIELD { + + /*! + Returns an array of values of the field + */ + Engines::long_array getValue(in medModeSwitch mode) + raises (SALOME::SALOME_Exception); + + }; + + // MED interface + + interface MED { + + + long getNumberOfMeshes () raises (SALOME::SALOME_Exception); + long getNumberOfFields () raises (SALOME::SALOME_Exception); + Engines::string_array getMeshNames () raises (SALOME::SALOME_Exception); + Engines::string_array getFieldNames () raises (SALOME::SALOME_Exception); + MESH getMeshByName ( in string meshName) raises (SALOME::SALOME_Exception); + MESH getMesh ( in FIELD fieldPtr) raises (SALOME::SALOME_Exception); + FIELD getField ( in string fieldName, + in long pasTemps, + in long numOrdre ) raises (SALOME::SALOME_Exception); + + + // Add a MED/VTK/... driver to a MED'GEN' object to + // be able to read/write files preserving meshes<-->fields association + // Multiple drivers can be added whatever the type. + // The access point in the returned + long addDriver (in medDriverTypes driverType, in string fileName) + raises (SALOME::SALOME_Exception); + /*! + Removes the driver + */ + void rmDriver (in long i) raises (SALOME::SALOME_Exception); + /*! + Reads the structure of the %MED file + */ + void readFileStruct(in long i) raises (SALOME::SALOME_Exception); + void writeFrom (in long i) raises (SALOME::SALOME_Exception); + void write (in long i) raises (SALOME::SALOME_Exception); + + void addMesh (in MESH ptrMesh ) raises (SALOME::SALOME_Exception); + void addField (in FIELD ptrField ) raises (SALOME::SALOME_Exception); + + void addInStudy (in SALOMEDS::Study myStudy, in MED medPtr) raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection); + }; +}; + +#endif /* MED_IDL */ diff --git a/idl/MPIContainer.idl b/idl/MPIContainer.idl new file mode 100644 index 0000000..6aab335 --- /dev/null +++ b/idl/MPIContainer.idl @@ -0,0 +1,38 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : MPIContainer.idl + +#ifndef _SALOME_MPICONTAINER_IDL_ +#define _SALOME_MPICONTAINER_IDL_ + +#include "SALOME_Component.idl" +#include "MPIObject.idl" + +module Engines +{ + interface MPIContainer:Container,MPIObject + { + } ; +} ; + +#endif + diff --git a/idl/MPIObject.idl b/idl/MPIObject.idl new file mode 100644 index 0000000..a480f51 --- /dev/null +++ b/idl/MPIObject.idl @@ -0,0 +1,36 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : MPIObject.idl + +#ifndef _SALOME_MPIOBJECT_IDL_ +#define _SALOME_MPIOBJECT_IDL_ + +module Engines +{ + typedef sequence IORTab; + interface MPIObject + { + attribute IORTab tior; + } ; +} ; + +#endif diff --git a/idl/Makefile.in b/idl/Makefile.in index 4d3d9dd..f57f603 100644 --- a/idl/Makefile.in +++ b/idl/Makefile.in @@ -1,37 +1,84 @@ +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org # -# generate dependencies for idl file : # +# +# File : Makefile.in +# Module : idl -# source path top_srcdir=@top_srcdir@ top_builddir=.. srcdir=@srcdir@ -VPATH=.:$(srcdir):${KERNEL_ROOT_DIR}/idl/salome +VPATH=.:$(srcdir) @COMMENCE@ IDL_FILES = \ - SALOME_Component.idl \ + GEOM_Gen.idl \ + SALOME_Exception.idl \ + SALOME_ModuleCatalog.idl \ + SALOME_DataTypeCatalog.idl \ + SALOME_RessourcesCatalog.idl \ + GEOM_Shape.idl \ SALOMEDS.idl \ SALOMEDS_Attributes.idl \ - SALOME_Exception.idl \ + SALOME_Session.idl \ + SALOME_Component.idl \ + SALOME_TestComponent.idl \ + SUPERV.idl \ + SALOME_Registry.idl \ + MED.idl \ + Med_Gen.idl \ + AddComponent.idl \ + DivComponent.idl \ + FactorialComponent.idl \ + MulComponent.idl \ + SubComponent.idl \ + SyrComponent.idl \ + SyrControlComponent.idl \ + TypeData.idl \ + MPIObject.idl \ + MPIContainer.idl \ + NPVecComponent.idl \ + NPMatComponent.idl \ + NPSolveComponent.idl \ + SMESH_Gen.idl \ + SMESH_Mesh.idl \ + SMESH_Hypothesis.idl \ + SMESH_BasicHypothesis.idl \ + Calculator.idl \ Logger.idl \ - SALOME_ModuleCatalog.idl \ - SUPERV.idl + VISU_Gen.idl PY_CLIENT_IDL = $(IDL_FILES) -# we copy all idl file in $(top_builddir)/idl -inc: $(IDL_FILES:%=$(top_builddir)/idl/%) +# we copy all idl file in $(top_builddir)/share/salome/idl +inc: $(IDL_FILES:%=$(top_builddir)/share/salome/idl/%) -$(IDL_FILES:%=$(top_builddir)/idl/%):$(top_builddir)/idl/%:% +$(IDL_FILES:%=$(top_builddir)/share/salome/idl/%):$(top_builddir)/share/salome/idl/%:% # $(CP) $< $@ cp -f $< $@ lib: pyidl -PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@ +PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/salome pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py) @@ -66,6 +113,6 @@ cleandep: distclean: -$(RM) *.py - -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/%) + -$(RM) $(IDL_FILES:%=$(top_builddir)/share/salome/idl/%) -$(RM) Makefile diff --git a/idl/Med_Gen.idl b/idl/Med_Gen.idl new file mode 100644 index 0000000..171f738 --- /dev/null +++ b/idl/Med_Gen.idl @@ -0,0 +1,58 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : Med_Gen.idl + +#ifndef _Med_GEN_IDL_ +#define _Med_GEN_IDL_ + + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" +#include "MED.idl" + +module Engines +{ + interface Med_Gen : Engines::Component, SALOMEDS::Driver + { + SALOME_MED::MESH readMeshInFile(in string fileName, + in string studyName, + in string meshName ) + raises (SALOME::SALOME_Exception); + SALOME_MED::FIELD readFieldInFile(in string fileName, + in string studyName, + in string fieldName, + in long ordre, + in long iter ) + raises (SALOME::SALOME_Exception); + SALOME_MED::MED readStructFile(in string fileName, + in string studyName ) + raises (SALOME::SALOME_Exception); + + void readStructFileWithFieldType(in string fileName, + in string studyName ) + raises (SALOME::SALOME_Exception); + }; + +}; + +#endif diff --git a/idl/MulComponent.idl b/idl/MulComponent.idl new file mode 100644 index 0000000..eda62ce --- /dev/null +++ b/idl/MulComponent.idl @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : MulComponent.idl +// Author : +// $Header$ + +#ifndef _MULCOMPONENT_IDL +#define _MULCOMPONENT_IDL + +#include "SALOME_Component.idl" + +module SuperVisionTest { + + interface MulComponent : Engines::Component { + void Mul( in double x , in double y , out double z ) ; + } ; +}; + + +#endif diff --git a/idl/NPMatComponent.idl b/idl/NPMatComponent.idl new file mode 100644 index 0000000..f108ee8 --- /dev/null +++ b/idl/NPMatComponent.idl @@ -0,0 +1,58 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : NPMatComponent.idl + +#ifndef _SALOME_NPMATCOMPONENT_IDL_ +#define _SALOME_NPMATCOMPONENT_IDL_ + +#include "SALOME_Component.idl" +#include "TypeData.idl" +#include "MPIObject.idl" + +module Engines +{ + interface PCSRMat : MPIObject + { + readonly attribute CSRMatStruct csrmat; + + unsigned long NbRows(); + unsigned long NbCols(); + void LMat(out unsigned long start, out unsigned long end); + CSRMatStruct ncsrmat(in unsigned long start, in unsigned long end); + }; + + interface NPMatComponent:Component,MPIObject + { + + readonly attribute PCSRMat dmat; + + void SetFileName(in string filename); + + oneway void ReadDataFromFile(in string id_callback); + oneway void SaveDataToFile(in string id_callback); + + oneway void SPGetData(in string id_callback); + } ; +} ; + +#endif + diff --git a/idl/NPSolveComponent.idl b/idl/NPSolveComponent.idl new file mode 100644 index 0000000..1e43bf2 --- /dev/null +++ b/idl/NPSolveComponent.idl @@ -0,0 +1,43 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : NPSolveComponent.idl + +#ifndef _SALOME_NPSOLVECOMPONENT_IDL_ +#define _SALOME_NPSOLVECOMPONENT_IDL_ + +#include "SALOME_Component.idl" +#include "TypeData.idl" +#include "MPIObject.idl" +#include "NPVecComponent.idl" +#include "NPMatComponent.idl" + +module Engines +{ + interface NPSolveComponent:Component,MPIObject + { + void Solve( in PCSRMat A, in PVec b, out PVec x ); + oneway void SPSolve( in PCSRMat A, in PVec b, in string id_callback ); + } ; +} ; + +#endif + diff --git a/idl/NPVecComponent.idl b/idl/NPVecComponent.idl new file mode 100644 index 0000000..ac0b13e --- /dev/null +++ b/idl/NPVecComponent.idl @@ -0,0 +1,58 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : NPVecComponent.idl + +#ifndef _SALOME_NPVECCOMPONENT_IDL_ +#define _SALOME_NPVECCOMPONENT_IDL_ + +#include "SALOME_Component.idl" +#include "TypeData.idl" +#include "MPIObject.idl" + +module Engines +{ + interface PVec : MPIObject + { + readonly attribute DoubleVec vec; + + unsigned long Size(); + void LVec(out unsigned long start, out unsigned long end); + DoubleVec nvec(in unsigned long start, in unsigned long end); + }; + + interface NPVecComponent:Component,MPIObject + { + + attribute PVec dvec; + + void SetFileName(in string filename); + + oneway void ReadDataFromFile(in string id_callback); + oneway void SaveDataToFile(in string id_callback); + + oneway void SPGetData(in string id_callback); + oneway void SPPutData(in PVec vec,in string id_callback); + } ; +} ; + +#endif + diff --git a/idl/SALOME/Logger.idl b/idl/SALOME/Logger.idl new file mode 100644 index 0000000..d58070d --- /dev/null +++ b/idl/SALOME/Logger.idl @@ -0,0 +1,24 @@ +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : Logger.idl +// Author : Vasily Rusyaev + +#ifndef SALOME_LOGGER_IDL +#define SALOME_LOGGER_IDL + +#pragma prefix "opencascade.com" + +module SALOME_Logger +{ + interface Logger + { + //put message into one special place for all servers using Logger + oneway void putMessage (in string message); + }; +}; + + + +#endif diff --git a/idl/SALOME/MPIContainer.idl b/idl/SALOME/MPIContainer.idl new file mode 100644 index 0000000..6aab335 --- /dev/null +++ b/idl/SALOME/MPIContainer.idl @@ -0,0 +1,38 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : MPIContainer.idl + +#ifndef _SALOME_MPICONTAINER_IDL_ +#define _SALOME_MPICONTAINER_IDL_ + +#include "SALOME_Component.idl" +#include "MPIObject.idl" + +module Engines +{ + interface MPIContainer:Container,MPIObject + { + } ; +} ; + +#endif + diff --git a/idl/SALOME/MPIObject.idl b/idl/SALOME/MPIObject.idl new file mode 100644 index 0000000..a480f51 --- /dev/null +++ b/idl/SALOME/MPIObject.idl @@ -0,0 +1,36 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : MPIObject.idl + +#ifndef _SALOME_MPIOBJECT_IDL_ +#define _SALOME_MPIOBJECT_IDL_ + +module Engines +{ + typedef sequence IORTab; + interface MPIObject + { + attribute IORTab tior; + } ; +} ; + +#endif diff --git a/idl/SALOME/SALOMEDS.idl b/idl/SALOME/SALOMEDS.idl new file mode 100644 index 0000000..5fcb8c1 --- /dev/null +++ b/idl/SALOME/SALOMEDS.idl @@ -0,0 +1,1371 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS.idl +// Author : Yves FRICAUD +// $Header$ + +/*! \mainpage + \image html Application-About.png + +*/ +/*! \page page1 Mapping of IDL definitions to Python language. +\section Intro Introduction +%SALOME PRO is a distributed client/server application using the Common Object Request Broker Architecture (CORBA). +CORBA architecture uses the Interface Definition Language (IDL), which specifies interfaces between CORBA objects. So with help of IDL +CORBA's language independence is ensured . Because interfaces described in IDL can be mapped to the most of currently used programming languages, CORBA applications and components are thus +independent of the language(s) used to implement them. In other words, a client written in C++ can communicate with a server written in Java, which in turn can communicate with +another server written in COBOL, and so forth. + +One important thing to remember about IDL is that it is not an implementation language. That is, applications can't be written in IDL. The sole purpose of IDL is to define interfaces; +providing implementations for these interfaces is performed using some other language. + +This page contains an abridged reference manual for mapping of IDL definitions to Python language. It will be useful for Python programmers who are not familiar +with IDL language. All examples are taken from %SALOME PRO source files. +The complete version of Python Language Mapping Specification can be found here. + +
CONTENTS: +- \ref subsection1 +- \ref subsection2 +- \ref subsection3 +- \ref subsection4 +- \ref subsection5 +- \ref subsection6 +- \ref subsection7 + +\subsection subsection1 Using Scoped Names + +Python implements a module concept that is similar to the IDL scoping mechanisms, +except that it does not allow for nested modules. In addition, Python requires each +object to be implemented in a module; globally visible objects are not supported. + +Because of these constraints, scoped names are translated into Python using the +following rules: + +• An IDL module mapped into a Python module. Modules containing modules are +mapped to packages (i.e., directories with an __init__ module containing all +definitions excluding the nested modules). An implementation can chose to map toplevel +definitions (including the module CORBA) to modules in an implementationdefined +package, to allow concurrent installations of different CORBA runtime +libraries. In that case, the implementation must provide additional modules so that +toplevel modules can be used without importing them from a package. + +• For all other scopes, a Python class is introduced that contains all the definitions +inside this scope. + +• Other global definitions (except modules) appear in a module whose name is +implementation dependent. Implementations are encouraged to use the name of the +IDL file when defining the name of that module. + +For instance, + +\verbatim +module SALOMEDS { + interface StudyManager { + void Close(in Study aStudy); + }; +}; +\endverbatim + +would introduce a module SALOMEDS.py, which contains the following definitions: + +\verbatim +# module SALOMEDS.py +class StudyManager: + def _Close(self,aStudy): + pass #interfaces are discussed later +\endverbatim + +To avoid conflicts, IDL names that are also Python identifiers are prefixed with an underscore (‘_’). + +\subsection subsection2 Mapping for Template and Array Types + +Both the bounded and the unbounded string type of IDL are mapped to the Python +string type. Wide strings are represented by an implementation-defined type with the +following properties: + +• For the wide string X and the integer n, X[n] returns the nth character, which is a +wide string of length 1. + +• len(X) returns the number of characters of wide string X. + +• CORBA.wstr(c) returns a wide character with the code point c in an +implementation-defined encoding. + +• X+Y returns the concatenation of wide strings X and Y. + +• CORBA.word(CORBA.wstr(c)) == c + +The sequence template is mapped to sequence objects (e.g., tuples or lists). +Applications should not assume that values of a sequence type are mutable. Sequences +and arrays of octets and characters are mapped to the string type for efficiency reasons. + +For example, given the IDL definitions + +\verbatim +module SALOMEDS { + typedef sequence StringSeq; + + interface AttributeTableOfInteger : GenericAttribute { + + void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); + }; +}; +\endverbatim + +a client could invoke the operation + +\verbatim +print My_AttributeTableOfInteger.SetRowTitles(["X","F"]) +\endverbatim + +Array types are mapped like sequence templates. The application in this example also expects an +IncorrectArgumentLength exception if it passes sequences that violate the bounds constraint or +arrays of wrong size. + +Another example with arrays. The following IDL definition + +\verbatim +module SALOMEDS { + typedef sequence ListOfAttributes; + interface SObject { + ListOfAttributes GetAllAttributes(); + }; +}; +\endverbatim + +is equal to + +\verbatim +import SALOMEDS + +attributes=[] + +attributes = My_SObject.GetAllAttributes() + +length = len(attributes) + +print "Attributes number = ", length +print attributes +\endverbatim + +\subsection subsection3 Mapping for Objects and Operations + +A CORBA object reference is represented as a Python object at run-time. This object +provides all the operations that are available on the interface of the object. Although +this specification does not mandate the use of classes for stub objects, the following +discussion uses classes to indicate the interface. + +The nil object is represented by None. + +If an operation expects parameters of the IDL Object type, any Python object +representing an object reference might be passed as actual argument. + +If an operation expects a parameter of an abstract interface, either an object +implementing that interface, or a value supporting this interface may be passed as +actual argument. The semantics of abstract values then define whether the argument is +passed by value or by reference. + +Operations of an interface map to methods available on the object references. +Parameters with a parameter attribute of in or inout +are passed from left to right tothe method, skipping out parameters. +The return value of a method depends on the number of out parameters +and the return type. If the operation returns a value, this +value forms the first result value. All inout or out +parameters form consecutive result values. The method result depends then on the number +of result values: + +• If there is no result value, the method returns None. + +• If there is exactly one result value, it is returned as a single value. + +• If there is more than one result value, all of them are packed into a tuple, and this +tuple is returned. + +Assuming the IDL definition + +\verbatim +module SALOMEDS{ + interface StudyBuilder{ + boolean FindAttribute ( in SObject anObject, + out GenericAttribute anAttribute, + in string aTypeOfAttribute ); + }; +}; +\endverbatim + +a client could write + +\verbatim +from SALOMEDS import StudyBuilder; +my_StudyBuilder=... + + res,A=my_StudyBuilder.FindAttribute(Sobj, "AttributeSequenceOfReal") +\endverbatim + +In this example A corresponds to the return value anAttribute and +res to the boolean return value. + +If an interface defines an attribute name, for example, the attribute is mapped into an +operation _get_name. If the attribute is not readonly, there is an +additional operation _set_name. + +The IDL definition + +\verbatim +module SALOMEDS{ + interface Study{ + attribute string Name; + }; +}; +\endverbatim + +is equal to the following + +\verbatim +from SALOMEDS import Study +My_Study=... + Name=My_Study._get_name(); + Name=My_Study._set_name(); +\endverbatim + +\subsection subsection4 Narrowing Object References + +Python objects returned from CORBA operations or pseudo-operations (such as +string_to_object) might have a dynamic type, which is more specific than the +static type as defined in the operation signature. + +Since there is no efficient and reliable way of automatically creating the most specific +type, explicit narrowing is necessary. To narrow an object reference A to an interface +class AttributeSequenceOfReal, the client can use the following operation + +\verbatim +A = A._narrow(SALOMEDS.AttributeSequenceOfReal) +\endverbatim + +\subsection subsection5 Mapping for Exceptions + +An IDL exception is translated into a Python class derived from +CORBA.UserException. System exceptions are derived from CORBA.SystemException. +Both base classes are derived from CORBA.Exception. The parameters of the +exception are mapped in the same way as the fields of a struct definition. When +raising an exception, a new instance of the class is created; the constructor +expects the exception parameters. For example, the definition + +\verbatim +module SALOMEDS{ + interface StudyBuilder{ + exception LockProtection {}; + void CommitCommand() raises(LockProtection); + }; +}; +\endverbatim + +could be used caught as + +\verbatim +from SALOMEDS import StudyBuilder; +my_StudyBuilder=... +try: + my_StudyBuilder.CommitCommand(); +except StudyBuilder.LockProtection,value: + print "Error! Study is locked for modifications" +\endverbatim + + +\subsection subsection6 Mapping for Enumeration Types + +An enumeration is mapped into a number of constant objects in the name space where +the enumeration is defined. An application may only test for equivalence of two +enumeration values, and not assume that they behave like numbers. +For example, the definition + +\verbatim +module VISU { + interface PrsObject{ + + enum PrsObjType{ TCURVE, TTABLE, TMESH, TCONTAINER, + TSCALARMAP, TISOSURFACE, TDEFORMEDSHAPE, + TCUTPLANES, TVECTORS }; + }; +}; +\endverbatim + +introduces the objects + +\verbatim +from VISU import PrsObject +VISU.PrsObjType.TCURVE,VISU.PrsObjType.TTABLE,VISU.PrsObjType.TMESH,VISU.PrsObjType.TCONTAINER, +VISU.PrsObjType.TSCALARMAP,VISU.PrsObjType.TISOSURFACE,VISU.PrsObjType.TDEFORMEDSHAPE,VISU.PrsObjType.TCUTPLANES, +VISU.PrsObjType.TVECTORS +\endverbatim + +\subsection subsection7 Mapping for Structured Types + +An IDL struct definition is mapped into a Python class or type. For each field in the +struct, there is a corresponding attribute in the class with the same name as the field. +The constructor of the class expects the field values, from left to right. +For example, the IDL definition + +\verbatim +struct SDate { + short Second; + short Minute; + short Hour; + short Day; + short Month; + short Year; + }; +\endverbatim + +could be used in the Python statements + +\verbatim +Date=SDate(30, 12, 15, 26, 1, 79) +print Date.Second,Date.Minute,Date.Hour,Date.Day,Date.Month,Date.Year +\endverbatim +*/ +/*! \page page2 Mapping of SALOME IDL definitions to Python language. + + + - %SALOME STUDY module + - Mapping of %SALOMEDS functions + - Mapping of SALOMEDS_Attributes functions + - %SAlOME KERNEL module + - Mapping of %Med_Gen functions + - Mapping of %SALOME_Session functions + - Mapping of %SALOME_ModuleCatalog functions + - Mapping of %SALOME_Exception functions + - Mapping of %SALOME_Component functions + - %SALOME MED component + - Mapping of %Med functions + - %SALOME SUPERVISION module + - Mapping of %SUPERV functions + - %SALOME %VISU module + - Mapping of %VISU_Gen functions + +*/ + +/*! \defgroup Study SALOME STUDY module +*/ + +/*! + \file SALOMEDS.idl This file contains a set of interfaces used for creation, managment + and modification of the %Study +*/ + +#ifndef _SALOMEDS_IDL_ +#define _SALOMEDS_IDL_ + +#include "SALOME_Exception.idl" + +/*! \ingroup Study + This package contains the interfaces used for creation, managment + and modification of the %Study +*/ +module SALOMEDS +{ +/*! \typedef URL + Name of the file in which the %Study is saved. + +*/ + typedef string URL; + +/*! Main identifier of an object in %SALOME application +*/ + typedef string ID; + +/*! While saving the data, IOR is transformed into persistent reference +*/ + typedef string PersistentReference; + +/*! IOR of the study in %SALOME application +*/ + typedef string SalomeReference; +/*! List of names of open studies in a %SALOME session +*/ + typedef sequence ListOfOpenStudies; +/*! List of file names +*/ + typedef sequence ListOfFileNames; +/*! List of modification dates of the study +*/ + typedef sequence ListOfDates ; +/*! An unbounded sequence of strings +*/ + typedef sequence ListOfStrings ; +/*! A byte stream which is used for binary data transfer between components +*/ + typedef sequence TMPFile; + + // Reference to other objects is treated with function AddReference + // and ReferencedObject + // All other type of attributes defined in AttributeType enum are + // treated with AddAdttribute and GetAttribute + // The difference is made because Reference attribute don't contain + // strings but reference to ID of other objects + + interface GenericAttribute; + interface Study; + interface StudyManager; + interface StudyBuilder; + interface SObject; + interface SComponent; + interface SComponentIterator; + interface ChildIterator; + interface Driver; + interface AttributeStudyProperties; + interface UseCaseIterator; + interface UseCaseBuilder; + interface Callback; +/*! List of attributes +*/ + typedef sequence ListOfAttributes; +/*! Exception indicating that this feature hasn't been implemented +*/ + exception NotImplemented {}; + + + //=========================================================================== + /*! \brief %Study Interface + + The purpose of the %Study is to manage the data produced by various components of %SALOME platform. + Most of the %Study operations are handled by the StudyManager and the StudyBuilder. + What is left in the %Study interface are elementary inquiries. + (Incidentally, we recall that a CORBA attribute is implemented as a pair of get + and set methods.) A %Study is explored by a set of tools, mainly iterators + , which are described further. Nevertheless, the %Study + interface allows the search of an object by name or by ID. + \note +
The Path of an object in %SALOME application is much alike a standard path of a file. + In general it's a string of names of directories divided by a slash '/'. +
The Context is the current directory of an object.

+*/ + + interface Study + { + exception StudyInvalidContext {}; + exception StudyInvalidComponent {}; +/*! Invalid directory of the %study exception +*/ + exception StudyInvalidDirectory {}; +/*! Exception pointing that this name of the study has already been used. +*/ + exception StudyNameAlreadyUsed {}; + exception StudyObjectAlreadyExists {}; +/*! Invalid name of the %study exception +*/ + exception StudyNameError {}; + exception StudyCommentError {}; +/*! \brief The name of the %Study + + This is equivalent to the methods setName() & getName() +*/ + attribute string Name; // equivalent to setName() & getName() +/*! \brief The ID of the %Study + + This is equivalent to the methods setID() & getID() +*/ + attribute short StudyId; +/*! Sequence containing %SObjects +*/ + typedef sequence ListOfSObject; +/*! + Gets a persistent reference to the %Study. +*/ + PersistentReference GetPersistentReference(); +/*! + Gets a transient reference to the %Study. +*/ + SalomeReference GetTransientReference(); + +/*! + Returns True if the %Study is empty +*/ + boolean IsEmpty(); +/*! + Allows to find a %SComponent by its name. + \param aComponentName It's a string value in the Comment Attribute of the Component, + which is looked for, defining the data type of this Component. + +
See also an example of this method usage in batchmode of %SALOME application. +*/ + SComponent FindComponent (in string aComponentName); +/*! + Allows to find a %SComponent by ID of the according %SObject +*/ + SComponent FindComponentID(in ID aComponentID); +/*! + Allows to find a %SObject by the Name Attribute of this %SObject +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + SObject FindObject (in string anObjectName); +/*! + Allows to find a %SObject by its ID +*/ + SObject FindObjectID (in ID aObjectID); +/*! + Allows to find a %SObject by IOR of the object belonging to this %SObject. +*/ + SObject FindObjectIOR (in ID aObjectIOR); +/*! + Returns a list of %SObjects belonging to this %Component. The Name Attribute + of these %SObjects should correspond to anObjectName. +*/ + ListOfSObject FindObjectByName(in string anObjectName, in string aComponentName); +/*! + Allows to find a %SObject by the path to it. +*/ + SObject FindObjectByPath(in string thePath); +/*! + Returns the path to the %SObject. +*/ + string GetObjectPath(in Object theObject); + +/*! + Sets the context of the %Study. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetContext(in string thePath); +/*! + Gets the context of the %Study +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + string GetContext(); +/*! + Returns a list of names of objects corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. +*/ + ListOfStrings GetObjectNames(in string theContext); +/*! + Returns a list of names of directories and subdirectories corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. +*/ + ListOfStrings GetDirectoryNames(in string theContext); +/*! + Returns a list of names of Files corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. +*/ + ListOfStrings GetFileNames(in string theContext); +/*! + Returns a list of names of Components corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. +*/ + ListOfStrings GetComponentNames(in string theContext); +/*! \brief Creation of a new iterator of child levels + + Creates a new iterator of child levels of the %SObject +*/ + ChildIterator NewChildIterator(in SObject aSO); +/*! \brief Creation of a new iterator of the %SComponent + + Creates a new iterator of the %SComponent. +*/ + SComponentIterator NewComponentIterator(); +/*! \brief Creation of a %StudyBuilder + + Creates a new %StudyBuilder to add or modify an object in the study. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + StudyBuilder NewBuilder() ; +/*! \brief Labels dependency + + Updates the map with IOR attribute. It's an inner method used for optimization. +*/ + void UpdateIORLabelMap(in string anIOR, in string anEntry); + +/*! \brief Getting properties of the study + + Returns the attriubte, which contains the properties of this study. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + AttributeStudyProperties GetProperties(); +/*! + Determines whether the %study has been saved +*/ + attribute boolean IsSaved; +/*! + Returns True if the %study has been modified and not saved. +*/ + boolean IsModified(); +/*! + Determines the file where the %study has been saved +*/ + attribute string URL; + +/*! \brief List of %SObjects + + Returns the list of %SObjects which refers to %anObject. +*/ + ListOfSObject FindDependances(in SObject anObject); + +/*! \brief The date of the last saving of the study + + Returns the date of the last saving of study with format: "DD/MM/YYYY HH:MM" +*/ + string GetLastModificationDate(); +/*! \brief The list of modification dates of the study + + Returns the list of modification dates (without creation date) with format "DD/MM/YYYY HH:MM". + Note : the first modification begins the list. +*/ + ListOfDates GetModificationsDate(); +/*! \brief Object conversion. + + Converts an object into IOR. + \return IOR +*/ + string ConvertObjectToIOR(in Object theObject); +/*! \brief Object conversion. + + Converts IOR into an object. + \return An object +*/ + Object ConvertIORToObject(in string theIOR); +/*! + Gets a new %UseCaseBuilder. +*/ + UseCaseBuilder GetUseCaseBuilder(); + +/*! + Closes the components in the study, removes itself from the %StudyManager. +*/ + void Close(); + +/*! + Enables(if isEnabled = True)/disables automatic addition of new %SObjects to the use case. +*/ + void EnableUseCaseAutoFilling(in boolean isEnabled); + }; + + //========================================================================== +/*! \brief %Study Builder Interface + + The purpose of the Builder is to add and/or remove objects and attributes. + A %StudyBuilder is linked to a %Study. A + command management is provided for the undo/redo functionalities. + \note +
The Tag of an item in %SALOME application is a symbolic description of + item's position in the tree-type structure of the browser. In general it has the following + form: 0:2:1:1 +*/ + //========================================================================== + + interface StudyBuilder + { +/*! \brief %LockProtection Exception + + This exception is raised while attempting to modify a locked %study. +*/ + exception LockProtection {}; +/*! \brief Creation of a new %SComponent. + + Creates a new %SComponent + \param ComponentDataType Data type of the %SComponent which will be created. + +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + SComponent NewComponent(in string ComponentDataType); +/*! \brief Definition of the instance to the %SComponent + + Defines the instance to the %SComponent. +*/ + void DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR); +/*! \brief Deletion of the %SComponent + + Removes the %SComponent. +*/ + void RemoveComponent(in SComponent aComponent); + +/*! \brief Creation of a new %SObject + + Creates a new %SObject. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + SObject NewObject (in SObject theFatherObject); +/*! \brief Creation of a new %SObject with a definite %tag + + Creates a new %SObject with a definite %tag. +*/ + SObject NewObjectToTag (in SObject theFatherObject, in long atag); +/*! \brief Deletion of the %SObject + + Removes a %SObject from the %StudyBuilder. +*/ + void RemoveObject (in SObject anObject); +/*! \brief Deletion of the %SObject with all his child objects. + + Removes the %SObject with all his child objects. +*/ + void RemoveObjectWithChildren(in SObject anObject); + +/*! + Loads a %SComponent. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception); +/*! + Loads a %SObject. +*/ + void Load (in SObject sco); + +/*! \brief Looking for or creating an attribute assigned to the %SObject + + Allows to find or create an attribute of a specific type which is assigned to the object. + \param anObject The %SObject corresponding to the attribute which is looked for. + \param aTypeOfAttribute Type of the attribute. + +
See also an example of this method usage in batchmode of %SALOME application. +*/ + + GenericAttribute FindOrCreateAttribute(in SObject anObject, + in string aTypeOfAttribute); + +/*! \brief Looking for an attribute assigned to %SObject + + Allows to find an attribute of a specific type which is assigned to the object. + \param anObject The %SObject corresponding to the attribute which is looked for. + \param aTypeOfAttribute Type of the attribute. + \param anAttribute Where the attribute is placed if it's found. + \return True if it finds an attribute. + */ + + boolean FindAttribute(in SObject anObject, + out GenericAttribute anAttribute, + in string aTypeOfAttribute); +/*! \brief Deleting the attribute assigned to the %SObject + + Removes the attribute of a specific type which is assigned to the object. + \param anObject The %SObject corresponding to the attribute. + \param aTypeOfAttribute Type of the attribute. + +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void RemoveAttribute(in SObject anObject, + in string aTypeOfAttribute); +/*! \brief Addition of a reference + + Adds a reference between %anObject and %theReferencedObject. +*/ + + void Addreference(in SObject anObject, + in SObject theReferencedObject) ; +/*! + Adds a directory in the %Study. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void AddDirectory(in string theName); + +/*! \brief Identification of the %SObject's substructure. + + Identification of the %SObject's substructure by GUID. + It has the following format "00000000-0000-0000-0000-000000000000" +*/ + + void SetGUID(in SObject anObject, in string theGUID); +/*! + + Returns True if the %SObject has GUID. +*/ + boolean IsGUID(in SObject anObject, in string theGUID); + +/*! \brief Creation of a new command + + Creates a new command which can contain several different actions. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void NewCommand(); // command management +/*! \brief Execution of the command + + Commits all actions declared within this command. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void CommitCommand() raises(LockProtection); // command management +/*! + Returns True if at this moment there is a command under execution. +*/ + boolean HasOpenCommand(); +/*! \brief Cancelation of the command + + Cancels all actions declared within the command. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void AbortCommand(); // command management +/*! \brief Undolimit + + The number of actions which can be undone +*/ + attribute long UndoLimit; +/*! \brief Undo method + + Cancels all actions of the last command. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Undo() raises (LockProtection); +/*! \brief Redo method + + Redoes all actions of the last command. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Redo() raises (LockProtection); +/*! + Returns True if at this moment there are any actions which can be canceled. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean GetAvailableUndos(); +/*! + Returns True if at this moment there are any actions which can be redone. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean GetAvailableRedos(); +/*! + Sets the callback for addition of the given %SObject. Returns the previous callback. +*/ + Callback SetOnAddSObject(in Callback theCallback); +/*! + Sets the callback for removal of the given %SObject. Returns the previous callback. +*/ + Callback SetOnRemoveSObject(in Callback theCallback); + + }; + + //========================================================================== +/*! \brief %Study Manager interface + + The purpose of the Manager is to manipulate the %Studies. You will find in this + interface the methods to create, open, + close, and save a %Study. Since a %SALOME session is multi-document, you will + also find the methods allowing to navigate + through the collection of studies present in a session. +*/ + //========================================================================== + + interface StudyManager + { +/*! + Determines whether the server has already been loaded or not. +*/ + void ping(); + +/*! \brief Creation of a new %Study + + Creates a new %Study with a definite name. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + Study NewStudy(in string study_name); + +/*! \brief Open a study + + Reads and activates the structure of the study %Objects. + \warning This method doesn't activate the corba objects. Only a component can do it. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception); + +/*! \brief Closing the study + + Closes the study. +*/ + void Close(in Study aStudy); +/*! \brief Saving the study + + Saves the study. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Save(in Study aStudy, in boolean theMultiFile); + + void SaveASCII(in Study aStudy, in boolean theMultiFile); +/*! \brief Saving the study in a file + + Saves the study in a specified file. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SaveAs(in URL aUrl, // if the file already exists + in Study aStudy, + in boolean theMultiFile); // overwrite (as option) + + void SaveAsASCII(in URL aUrl, // if the file already exists + in Study aStudy, + in boolean theMultiFile); // overwrite (as option) + + +/*! \brief List of open studies. + + Returns the list of open studies in the current session. +*/ + ListOfOpenStudies GetOpenStudies(); + +/*! \brief Getting a particular %Study picked by name + + Activates a particular %Study + amongst the session collection picking it by name. +*/ + Study GetStudyByName (in string aStudyName); + +/*! \brief Getting a particular %Study picked by ID + + Activates a particular %Study + amongst the session collection picking it by ID. +*/ + Study GetStudyByID (in short aStudyID); + + // copy/paste methods + +/*! + Returns True, if the given %SObject can be copied to the clipboard. +*/ + boolean CanCopy(in SObject theObject); +/*! + Returns True, if the given %SObject is copied to the clipboard. +*/ + boolean Copy(in SObject theObject); +/*! + Returns True, if the object from the clipboard can be pasted to the given %SObject. +*/ + boolean CanPaste(in SObject theObject); +/*! + Returns the %SObject in which the object from the clipboard was pasted to. +*/ + SObject Paste(in SObject theObject) raises (SALOMEDS::StudyBuilder::LockProtection); + }; + + + //========================================================================== +/*! \brief %SObject interface + + The objects in the %study are built by the %StudyBuilder. The %SObject interface + provides methods for elementary inquiries, like getting an object %ID or its attribuites. + \note +
Tag of an item in %SALOME application is an integer value uniquely defining an item + in the tree-type data structure. +
ID of an item is a description of item's position in the tree-type data structure. + ID is a list of tags and it has the following form: 0:2:1:1. +*/ + //========================================================================== + + interface SObject + { +/*! Name of the %SObject +*/ + attribute string Name; // equivalent to setName() & getName() +/*! \brief Getting an object %ID + + Returns ID of the %SObject. +*/ + ID GetID(); +/*! \brief Acquisition of the father %Component of the %SObject + + Returns the father %Component of the %SObject. +*/ + SComponent GetFatherComponent(); +/*! \brief Acquisition of the father %SObject of the %SObject + + Returns the father %SObject of the given %SObject. +*/ + SObject GetFather(); +/*! \brief %Tag of %SObject + + Returns the %tag of the %SObject. +*/ + short Tag(); +/*! \brief Looking for subobjects of an object. + + Returns True if it finds a subobject of the %SObject with a definite tag. +*/ + + boolean FindSubObject (in long atag, out SObject obj); +/*! \brief Looking for attributes of the %SObject + + Returns True if it finds an attribute of a definite type of the %SObject. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + boolean FindAttribute(out GenericAttribute anAttribute, + in string aTypeOfAttribute); +/*! + Returns the object which this %SObject refers to. It also returns True if it finds + this object. +*/ + boolean ReferencedObject(out SObject obj); // A REVOIR +/*! \brief Getting all attributes of the %SObject + + Returns the list of all attributes of the %SObject. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + ListOfAttributes GetAllAttributes(); +/*! \brief Returning the study + + Returns the study containing the given %SObject. +*/ + Study GetStudy(); + }; + + + //========================================================================== +/*! \brief %Generic attribute interface + + %Generic attribute is a base interface for all attributes which inherit + its methods. +*/ + //========================================================================== + interface GenericAttribute + { +/*! \brief Exception locking all changes + + This exception locks all modifications in attributes. +*/ + exception LockProtection {}; +/*! \brief Method CheckLocked + + Checks whether the %Study is protected for modifications. + \note
This exception is raised only outside the transaction. +*/ + void CheckLocked() raises (LockProtection); + }; + + + + //========================================================================== +/*! \brief %SComponent interface + + The %SComponent interface is a specialization of the %SObject interface. + It inherits the most of its methods from the %SObject interface. +*/ + //========================================================================== + interface SComponent : SObject + { +/*! \brief Data type of the %SComponent + + Returns the data type of the %SComponent. +*/ + string ComponentDataType(); +/*! + Returns IOR of the according component. +*/ + boolean ComponentIOR (out ID theID); //returns True if there is an instance + //In this case ID identifies this one + }; + + + //========================================================================== +/*! \brief %SComponentIterator interface + + This interface contains the methods allowing to iterate over all components in the list. + The search is started from the first %SComponent in the list. +*/ + //========================================================================== + interface SComponentIterator + { +/*! \brief Initialization of the Iterator + +Activates the %SComponentIterator. +*/ + void Init(); +/*! \brief Method More + + Returns True if there is one more %SComponent in the list. +*/ + boolean More(); +/*! \brief Moving the iterator to the next %SComponent + +Moves the iterator to the next %SComponent in the list. +*/ + void Next(); +/*! + Returns the %SComponent corresponding to the current %SComponent found by the iterator. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + SComponent Value(); + }; + + //========================================================================== +/*! \brief %ChildIterator interface + + This interface contains methods which allow to iterate over all child + levels. +*/ + //========================================================================== + interface ChildIterator + { +/*! \brief Initialization of the Iterator. + +Activates the %ChildIterator. +*/ + void Init(); +/*! \brief Initialization of the Iterator for all child levels. + +Activates the %ChildIterator (if True) for all child levels. +*/ + void InitEx(in boolean allLevels); +/*! \brief Method More + + Returns True if the %ChildIterator finds one more child level. +*/ + boolean More(); +/*! + Passes the iterator to the next level. +*/ + void Next(); +/*! + Returns the %SObject corresponding to the current object found by the iterator. +*/ + SObject Value(); + }; + + //========================================================================== + //========================================================================== +/*! \brief Interface of the %UseCaseIterator. + + This interface contains a set of methods used for iteration over the objects in the use case. +*/ + interface UseCaseIterator + { +/*! \brief Initialization of the Iterator. + +Activates the %UseCaseIterator. If allLevels is True the Iterator is activated for all subobjects. +*/ + void Init(in boolean allLevels); +/*! \brief Method More + + Returns True if the %UseCaseIterator finds one more object. +*/ + boolean More(); +/*! + Passes the iterator to the next object. +*/ + void Next(); +/*! + Returns the %SObject corresponding to the current object found by the Iterator. +*/ + SObject Value(); + }; + + //========================================================================== + //========================================================================== +/*! \brief Interface of the %UseCaseBuilder + + Use case in the study represents a user-managed subtree, containing all or some of the objects which exist in the study. + The %UseCaseBuilder interface contains a set of methods used for management of the use case in the study. +*/ + interface UseCaseBuilder + { +/*! + Adds to the use case an object theObject as a child of the current object of the use case. +*/ + boolean Append(in SObject theObject); +/*! + Removes an object theObject from the use case. +*/ + boolean Remove(in SObject theObject); +/*! + Adds a child object theObject to the given father theFather object in the use case. +*/ + boolean AppendTo(in SObject theFather, in SObject theObject); +/*! + Inserts in the use case the object theFirst before the object theNext. +*/ + boolean InsertBefore(in SObject theFirst, in SObject theNext); +/*! + Sets the current object of the use case. +*/ + boolean SetCurrentObject(in SObject theObject); +/*! + Makes the root object to be the current object of the use case. +*/ + boolean SetRootCurrent(); +/*! + Returns True if the given object theObject of the use case has child objects. +*/ + boolean HasChildren(in SObject theObject); +/*! + Sets the name of the use case. +*/ + boolean SetName(in string theName); +/*! + Gets the name of the use case. +*/ + string GetName(); +/*! + Returns True if the given object theObject represents a use case. +*/ + boolean IsUseCase(in SObject theObject); +/*! + Gets the current object of the use case. +*/ + SObject GetCurrentObject(); +/*! + Creates a new use case in the use case browser. +*/ + SObject AddUseCase(in string theName); +/*! + Returns the %UseCaseIterator for the given object theObject in the use case. +*/ + UseCaseIterator GetUseCaseIterator(in SObject theObject); + }; + //========================================================================== + //========================================================================== +/*! \brief The callback interface + + The %StudyBuilder can be created with the method NewBuilder. While invocation of this method a new object of the class Callback is created + and this object is assigned to the newly created Builder as callback which should be called when adding and removing of the ojects. +*/ + interface Callback + { +/*! + Invokes the corresponding method Append of the %UseCaseBuilder. +*/ + void OnAddSObject(in SObject theObject); +/*! + Invokes the corresponding method Remove of the %UseCaseBuilder. +*/ + void OnRemoveSObject(in SObject theObject); + }; + + //========================================================================== +/*! \brief %Driver interface + + This interface contains a set of methods used for the management + of the object produced in the %study by a component. +*/ + //========================================================================== + interface Driver + { + + /*! \brief Saving the data. + + This method is called by the StudyManager when saving a study. + \param theComponent %SComponent corresponding to this Component + \return A byte stream TMPFile that contains all saved data + +
See also an example of this method usage in batchmode of %SALOME application. + + */ + + + TMPFile Save(in SComponent theComponent, in string theURL, in boolean isMultiFile); + + TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile); + + /*! \brief Loading the data. + + This method is called by the StudyManager when opening a study. + \param theComponent %SComponent corresponding to this Component + \param theStream The file which contains all data saved by the component on Save method + */ + + boolean Load(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile); + + boolean LoadASCII(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile); + + /*! \brief Closing of the study + + This method Close is called by the StudyManager when closing a study. + + */ + + void Close (in SComponent aSComponent); + //void Close ( in string aIORSComponent); + + /*! \brief The type of the data + + Returns the type of data produced by the Component in the study. + */ + + string ComponentDataType(); + + // Driver Transient -> persistent called for each object in study +/*! + Transforms IOR into PersistentID of the object. It is called for each + object in the %study. +*/ + string IORToLocalPersistentID (in SObject theSObject, + in string IORString, + in boolean isMultiFile, + in boolean isASCII); +/*! + Transforms PersistentID into IOR of the object. It is called for each + object in the %study. +*/ + string LocalPersistentIDToIOR (in SObject theSObject, + in string aLocalPersistentID, + in boolean isMultiFile, + in boolean isASCII) + raises (SALOME::SALOME_Exception); + + // Publishing in the study +/*! \brief Publishing in the study + + Returns True if the given %Component can publish the %object in the %study. +*/ + boolean CanPublishInStudy(in Object theIOR) raises (SALOME::SALOME_Exception); +/*! \brief Publishing in the study + + Publishes the given object in the %study, using the algorithm of this component. + \param theStudy The %study in which the object is published + \param theSObject If this parameter is null the object is published for the first time. Otherwise + this parameter should contain a reference to the object published earlier + \param theObject The object which is published + \param theName The name of the published object. If this parameter is empty, the name is generated + automatically by the component. +*/ + SObject PublishInStudy(in Study theStudy, in SObject theSObject, in Object theObject, in string theName); + + // copy/paste methods + +/*! + Returns True, if the given %SObject can be copied to the clipboard. +*/ + boolean CanCopy(in SObject theObject); +/*! + Returns the object %ID and the %TMPFile of the object from the given %SObject. +*/ + TMPFile CopyFrom(in SObject theObject, out long theObjectID); +/*! + Returns True, if the component can paste the object with given %ID of the component with name theComponentName. +*/ + boolean CanPaste(in string theComponentName, in long theObjectID); +/*! + Returns the %SObject of the pasted object. +*/ + SObject PasteInto(in TMPFile theStream, in long theObjectID, in SObject theObject); + + }; +}; + +#endif diff --git a/idl/SALOME/SALOMEDS_Attributes.idl b/idl/SALOME/SALOMEDS_Attributes.idl new file mode 100644 index 0000000..b47f39b --- /dev/null +++ b/idl/SALOME/SALOMEDS_Attributes.idl @@ -0,0 +1,1181 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS.idl +// Author : Yves FRICAUD +// $Header$ + +/*! \file SALOMEDS_Attributes.idl This file contains a set of interfaces + for the attributes which can be assigned to %SObject +*/ +#ifndef _SALOMEDS_AttributesIDL_ +#define _SALOMEDS_AttributesIDL_ + +#include "SALOMEDS.idl" + +module SALOMEDS +{ +/*! Sequence of double values +*/ + typedef sequence DoubleSeq; +/*! Sequence of long values +*/ + typedef sequence LongSeq; +/*! Sequence of string values +*/ + typedef sequence StringSeq; +/*! \struct Color + This structure stores a set of elements defining the color based on RGB. +*/ + struct Color { +/*! Red color +*/ + double R; +/*! Green color +*/ + double G; +/*! Blue color +*/ + double B; + }; + //========================================================================== +/*! \brief Attribute allowing to store a real value + + Attribute allowing to store a real value +*/ + //========================================================================== + interface AttributeReal : GenericAttribute + { +/*! + Returns the value of this attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + double Value(); +/*! + Sets the value of this attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in double value); + }; + //========================================================================== +/*! \brief Attribute allowing to store an integer value + + Attribute allowing to store an integer value +*/ + //========================================================================== + interface AttributeInteger : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + long Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in long value); + }; + //========================================================================== +/*! \brief Attribute - sequence of real values + + Attribute - sequence of real values, indexing from 1 (like in CASCADE). +*/ + //========================================================================== + interface AttributeSequenceOfReal : GenericAttribute + { +/*! + Initialization of the attribute with initial data. + \param other Initially assigned sequence of real numbers. +*/ + void Assign (in DoubleSeq other); +/*! + Returns the sequence of real numbers stored in the attribute. +*/ + DoubleSeq CorbaSequence(); +/*! + Adds to the end of the sequence a real number. + \param value A real number added to the sequence. + +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void Add (in double value); +/*! + Removes a real number with a definite index + from the sequence of real numbers stored in the Attribute. +*/ + void Remove(in long index); +/*! + Substitutes a real number with a definite index for another real number. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void ChangeValue(in long index, in double value); +/*! + Returns a real number with a definite index + in the sequence of real numbers stored in the Attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + double Value(in short index); +/*! + Returns the length of the sequence of real numbers stored in the Attribute. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + long Length(); + }; + //========================================================================== +/*! \brief Attribute - sequence of integer + + Attribute - sequence of integer, indexing from 1 (like in CASCADE) +*/ + //========================================================================== + interface AttributeSequenceOfInteger : GenericAttribute + { +/*! + Initialization of the attribute with initial data. + \param other Initially assigned sequence of integer numbers. +*/ + void Assign (in LongSeq other); +/*! + Returns the sequence of integer numbers stored in the Attribute. +*/ + LongSeq CorbaSequence(); +/*! + Adds to the end of the sequence an integer number. + \param value An integer number added to the sequence. + +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Add (in long value); +/*! + Removes an integer number with a definite index + from the sequence of integer numbers stored in the Attribute. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Remove(in long index); +/*! + Substitutes an integer number with a definite index for another integer number. +*/ + void ChangeValue(in long index, in long value); +/*! + Returns an integer number with a definite index + in the sequence of integer numbers stored in the Attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + long Value(in short index); +/*! + Returns the length of the sequence of integer numbers stored in the Attribute. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + long Length(); + }; + + //========================================================================== +/*! \brief Name attribute + + This attribute stores a string value, which corresponds to the name of the %SObject + or to the name of corresponding object. +*/ + //========================================================================== + + interface AttributeName : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + string Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in string value); + }; + + //========================================================================== +/*! \brief Comment attribute + + This attribute stores a string value containing supplementary information about + the %SObject. In particular it contains the data type of the %SComponent. +*/ + //========================================================================== + interface AttributeComment : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + string Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in string value); + }; + //========================================================================== +/*! \brief IOR attribute + + This attribute stores a string value identifying a runtime object.In particular + it contains CORBA Interoperable Object Reference. +*/ + //========================================================================== + interface AttributeIOR : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + string Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in string value); + }; + + //========================================================================== +/*! \brief Persistent reference attribute + + This attribute stores a persistent identifier of the object. +*/ + //========================================================================== + interface AttributePersistentRef : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + string Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in string value); + }; + + //========================================================================== + //Below the list of presentation attributes for display study tree in browser + //========================================================================== + + + //========================================================================== +/*! \brief Drawable flag Attribute. + + This is a presentation attribute necessary for display of the study tree in the browser. + The item associated to SObject is created/displayed if TRUE. +*/ + //========================================================================== + interface AttributeDrawable : GenericAttribute + { +/*! + Returns TRUE if the item is drawable (as it is by default) and FALSE if it isn't. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean IsDrawable(); +/*! +Sets the items to be drawable if value is TRUE (the default) or not to be selectable if valueis FALSE. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetDrawable(in boolean value); + }; + + //========================================================================== +/*! \brief Selectable flag Attribute. + + This is a presentation attribute necessary for display of the study tree in the browser. + The item is selectable by %SALOME selection mechanism if TRUE. +*/ + //========================================================================== + interface AttributeSelectable : GenericAttribute + { +/*! + Returns TRUE if the item is selectable (as it is by default) and FALSE if it isn't. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean IsSelectable(); +/*! +Sets the items to be selectable if value is TRUE (the default) or not to be selectable if valueis FALSE. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetSelectable(in boolean value); + }; + + //========================================================================== +/*! \brief Expandable flag Attribute. + + This is a presentation attribute necessary for display of the study tree in the browser. + It sets this item to be expandable even if it has no children if value is TRUE. If value is FALSE + expandable only if it has children. +*/ + //========================================================================== + interface AttributeExpandable : GenericAttribute + { +/*! + Returns TRUE if this item is expandable even when it has no children. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean IsExpandable(); +/*! + Sets this item to be expandable even if it has no children if value is TRUE, and to be + expandable only if it has children if value is FALSE (the default). +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetExpandable(in boolean value); + }; + + //========================================================================== +/*! \brief Opened flag Attribute. + + This is a presentation attribute necessary for display of the study tree in the browser. + It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children + are not visible) if bool is FALSE. +*/ + //========================================================================== + interface AttributeOpened : GenericAttribute + { +/*! + Returns TRUE if this item is open (its children are visible) and FALSE if it isn't. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean IsOpened(); +/*! + Sets this item to be open (its children are visible) if value is TRUE, and to be closed +(its children are not visible) if value is FALSE. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetOpened(in boolean value); + }; + //========================================================================== +/*! \brief TextColorAttribute. + + This attribute sets the color of an item. +*/ + //========================================================================== + interface AttributeTextColor : GenericAttribute + { +/*! + Returns the color of an item. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + Color TextColor(); +/*! + Sets the color of an item. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetTextColor(in Color value); + }; + + //========================================================================== + /*! \brief TextHighlightColorAttribute. + + This attribute sets the highlight color of an item. +*/ + //========================================================================== + interface AttributeTextHighlightColor : GenericAttribute + { +/*! + Returns the highlight color of an item. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + Color TextHighlightColor(); +/*! + Sets the highlight color of an item. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetTextHighlightColor(in Color value); + }; + //========================================================================== +/*! \brief PixMapAttribute. + + This attribute stores an icon which is put before the name of an item. +*/ + //========================================================================== + interface AttributePixMap : GenericAttribute + { +/*! + Returns True if there is an icon before the name of the item. +*/ + boolean HasPixMap(); +/*! + Returns the name of the icon. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + string GetPixMap(); +/*! + Sets the name of the icon. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetPixMap(in string value); + }; + + //========================================================================== +/*! \brief TreeNodeAttribute. + + A set of these attributes on the %SObjects of the %study forms an inner auxiliary + tree whith its own structure and identifier. The quantity of such trees with different + identifiers can be arbitrary. +
See also an example of usage of the methods of this interface in batchmode of %SALOME application. + +*/ + //========================================================================== + interface AttributeTreeNode : GenericAttribute + { +/*! + Sets the father TreeNode to this TreeNode. +*/ + void SetFather(in AttributeTreeNode value); +/*! + Returns True if there is the father TreeNode of this TreeNode. +*/ + boolean HasFather(); +/*! + Returns the father Treenode of this TreeNode. +*/ + AttributeTreeNode GetFather(); +/*! + Sets the previous brother TreeNode to this treeNode. +*/ + void SetPrevious(in AttributeTreeNode value); +/*! + Returns True if there is the previous brother TreeNode of this TreeNode. +*/ + boolean HasPrevious(); +/*! + Returns the previous brother TreeNode of this TreeNode. +*/ + AttributeTreeNode GetPrevious(); +/*! + Sets the next brother TreeNode to this treeNode. +*/ + void SetNext(in AttributeTreeNode value); +/*! + Returns True if there is the next brother TreeNode of this TreeNode. +*/ + boolean HasNext(); +/*! + Returns the previous brother TreeNode of this TreeNode. +*/ + AttributeTreeNode GetNext(); +/*! + Sets the first child TreeNode to this treeNode. +*/ + void SetFirst(in AttributeTreeNode value); +/*! + Returns True if there is the first child TreeNode of this TreeNode. +*/ + boolean HasFirst(); +/*! + Returns the first child TreeNode of this TreeNode. +*/ + AttributeTreeNode GetFirst(); +/*! + Sets ID of the tree. TreeNodes of one tree have the same ID. +*/ + void SetTreeID(in string value); +/*! + Gets ID of the tree. +*/ + string GetTreeID(); + +/*! + Adds a child TreeNode to the end of the list of children of this Treenode. +*/ + void Append(in AttributeTreeNode value); +/*! + Adds a child TreeNode to the beginning of the list of children of this Treenode. + +*/ + void Prepend(in AttributeTreeNode value); +/*! + Adds a brother TreeNode before this Treenode. + In this case the both TreeNodes will belong to the same father. +*/ + void InsertBefore(in AttributeTreeNode value); +/*! + Adds a brother TreeNode after this Treenode. + In this case the both TreeNodes will belong to the same father. +*/ + void InsertAfter(in AttributeTreeNode value); +/*! + Deletes a TreeNode. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Remove(); + +/*! + Returns the depth of the TreeNode in the + structure, it means the number of fathers of the given TreeNode. + (i.e.: the depth of the root TreeNode is 0). +*/ + long Depth(); +/*! + Returns True if it is a root TreeNode. +*/ + boolean IsRoot(); +/*! + Returns True if this TreeNode is a descendant of the TreeNode. +*/ + boolean IsDescendant(in AttributeTreeNode value); +/*! + Returns True if this TreeNode is the father of the TreeNode. +*/ + boolean IsFather(in AttributeTreeNode value); +/*! + Returns True if this TreeNode is a child of the TreeNode. +*/ + boolean IsChild(in AttributeTreeNode value); +/*! + Returns ID of the according %SObject. +*/ + string Label(); + }; + //========================================================================== +/*! \brief LocalID attribute + + Attribute describing the link between a %SObject and a local object in the component. +*/ + //========================================================================== + interface AttributeLocalID : GenericAttribute + { +/*! + Returns the value of this attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + long Value(); +/*! + Sets the value of this attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in long value); + }; + + //========================================================================== +/*! \brief Attribute storing GUID + + Attribute allowing to store GUID +*/ + //========================================================================== + interface AttributeUserID : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + string Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in string value); + }; + + //========================================================================== +/*! \brief %AttributeTarget iterface + + This attribute stores the list of all %SObjects that refer + to this %SObject. This attribute is used for inner purposes of the application. + It is also needed for optimization. +*/ + //========================================================================== + + interface AttributeTarget : GenericAttribute + { +/*! + Adds a %SObject to the list of %SObjects which refer to this %SObject. + +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Add(in SObject anObject); +/*! + Returns the list of %SObjects which refer to this %SObject. +*/ + SALOMEDS::Study::ListOfSObject Get(); +/*! + Deletes a %SObject from the list of %SObjects which refer to this %SObject. + +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Remove(in SObject anObject); + }; + //========================================================================== + /*! \brief %AttributeTableOfInteger interface + + This attribute allows to store a table of integers (indexing from 1 like in CASCADE) + and string titles of this table, of each row, of each column. +
See also an example of usage of these methods in batchmode of %SALOME application. + +*/ + //========================================================================== + + interface AttributeTableOfInteger : GenericAttribute + { +/*! + This exception is raised when an incorrect index is passed as parameter. +*/ + exception IncorrectIndex {}; +/*! + This exception is raised when an incorrect length of the argument is passed as parameter. +*/ + exception IncorrectArgumentLength {}; + + // titles: for table, for each row, for each column +/*! + Sets the title of the table. +*/ + void SetTitle(in string theTitle); +/*! + Returns the title of the table. +*/ + string GetTitle(); +/*! + Sets the title of a row with a definite index. +*/ + void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all rows of the table. +*/ + void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all rows of the table. +*/ + StringSeq GetRowTitles(); +/*! + Sets the title of a column with a definite index. +*/ + void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all columns of the table. +*/ + void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all columns of the table. +*/ + StringSeq GetColumnTitles(); + + //Rows units +/*! + Sets the unit of a row with a definite index. +*/ + void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); +/*! + Sets the units for all rows of the table. +*/ + void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); +/*! + Returns the units of all rows of the table. +*/ + StringSeq GetRowUnits(); + + // table information +/*! + Returns the number of rows of the table. +*/ + long GetNbRows(); +/*! + Returns the number of columns of the table. +*/ + long GetNbColumns(); + + // operations with rows +/*! + Adds a row to the end of the table. +*/ + void AddRow(in LongSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the row. +*/ + void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the row of the table. +*/ + LongSeq GetRow(in long theRow) raises(IncorrectIndex); + + // operations with columns +/*! + Adds a column to the end of the table. +*/ + void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the column. +*/ + void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the column of the table. +*/ + LongSeq GetColumn(in long theColumn) raises(IncorrectIndex); + + // operations with elements +/*! + Puts a value in the table. + \param theRow The row, where the value will be placed. + \param theColumn The column, where the value will be placed. +*/ + void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex); +/*! + Returns True if there is a value in the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + boolean HasValue(in long theRow, in long theColumn); +/*! + Returns the value from the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); + +/*! + Sets the max number of colums in the table. + \note It'd better to set it before filling the table. +*/ + void SetNbColumns(in long theNbColumns); + +/*! + Returns the indices of the row where the values are defined. +*/ + LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); + // operations with files +/*! + Reads a table from a file. +*/ + boolean ReadFromFile(in SALOMEDS::TMPFile theStream); +/*! + Saves a table into a file. +*/ + SALOMEDS::TMPFile SaveToFile(); + }; + + //========================================================================== +/*! \brief %AttributeTableOfReal interface + + This attribute allows to store a table of reals (indexing from 1 like in CASCADE) + and string titles of this table, of each row, of each column. +
See also an example of usage of these methods in batchmode of %SALOME application. + +*/ + //========================================================================== + + interface AttributeTableOfReal : GenericAttribute + { +/*! + This exception is raised when an incorrect index is passed as parameter. +*/ + exception IncorrectIndex {}; +/*! + This exception is raised when an incorrect length of the argument is passed as parameter. +*/ + exception IncorrectArgumentLength {}; + + // titles: for table, for each row, for each column +/*! + Sets the title of the table. +*/ + void SetTitle(in string theTitle); +/*! + Returns the title of the table. +*/ + string GetTitle(); +/*! + Sets the title of a row with a definite index. +*/ + void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all rows of the table. +*/ + void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all rows of the table. +*/ + StringSeq GetRowTitles(); +/*! + Sets the title of a column with a definite index. +*/ + void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all columns of the table. +*/ + void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all columns of the table. +*/ + StringSeq GetColumnTitles(); + + //Rows units +/*! + Sets the unit of a row with a definite index. +*/ + void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); +/*! + Sets the units for all rows of the table. +*/ + void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); +/*! + Returns the units of all rows of the table. +*/ + StringSeq GetRowUnits(); + + // table information +/*! + Returns the number of rows of the table. +*/ + long GetNbRows(); +/*! + Returns the number of columns of the table. +*/ + long GetNbColumns(); + + // operations with rows +/*! + Adds a row to the end of the table. +*/ + void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the row. +*/ + void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the row of the table. +*/ + DoubleSeq GetRow(in long theRow) raises(IncorrectIndex); + + // operations with columns +/*! + Adds a column to the end of the table. +*/ + void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the column. +*/ + void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the column of the table. +*/ + DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex); + + // operations with elements +/*! + Puts a value in the table. + \param theRow The row, where the value will be placed. + \param theColumn The column, where the value will be placed. +*/ + void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex); +/*! + Returns True if there is a value in the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + boolean HasValue(in long theRow, in long theColumn); +/*! + Returns the value from the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); + +/*! + Sets the max number of colums in the table. + \note It'd better to set it before filling the table. +*/ + void SetNbColumns(in long theNbColumns); + +/*! + Returns the indices of the row where the values are defined. +*/ + LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); + // operations with files +/*! + Reads a table from a file. +*/ + boolean ReadFromFile(in SALOMEDS::TMPFile theStream); +/*! + Saves a table into a file. +*/ + SALOMEDS::TMPFile SaveToFile(); + }; + + + + //========================================================================== +/*! \brief %AttributeTableOfString interface + + This attribute allows to store a table of strings (indexing from 1 like in CASCADE) + and string titles of this table, of each row, of each column. +
See also an example of usage of these methods in batchmode of %SALOME application. + +*/ + //========================================================================== + + interface AttributeTableOfString : GenericAttribute + { +/*! + This exception is raised when an incorrect index is passed as parameter. +*/ + exception IncorrectIndex {}; +/*! + This exception is raised when an incorrect length of the argument is passed as parameter. +*/ + exception IncorrectArgumentLength {}; + + // titles: for table, for each row, for each column +/*! + Sets the title of the table. +*/ + void SetTitle(in string theTitle); +/*! + Returns the title of the table. +*/ + string GetTitle(); +/*! + Sets the title of a row with a definite index. +*/ + void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all rows of the table. +*/ + void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all rows of the table. +*/ + StringSeq GetRowTitles(); +/*! + Sets the title of a column with a definite index. +*/ + void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all columns of the table. +*/ + void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all columns of the table. +*/ + StringSeq GetColumnTitles(); + + //Rows units +/*! + Sets the unit of a row with a definite index. +*/ + void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); +/*! + Sets the units for all rows of the table. +*/ + void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); +/*! + Returns the units of all rows of the table. +*/ + StringSeq GetRowUnits(); + + // table information +/*! + Returns the number of rows of the table. +*/ + long GetNbRows(); +/*! + Returns the number of columns of the table. +*/ + long GetNbColumns(); + + // operations with rows +/*! + Adds a row to the end of the table. +*/ + void AddRow(in StringSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the row. +*/ + void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the row of the table. +*/ + StringSeq GetRow(in long theRow) raises(IncorrectIndex); + + // operations with columns +/*! + Adds a column to the end of the table. +*/ + void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the column. +*/ + void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the column of the table. +*/ + StringSeq GetColumn(in long theColumn) raises(IncorrectIndex); + + // operations with elements +/*! + Puts a value in the table. + \param theRow The row, where the value will be placed. + \param theColumn The column, where the value will be placed. +*/ + void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex); +/*! + Returns True if there is a value in the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + boolean HasValue(in long theRow, in long theColumn); +/*! + Returns the value from the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); + +/*! + Sets the max number of colums in the table. + \note It'd better to set it before filling the table. +*/ + void SetNbColumns(in long theNbColumns); + +/*! + Returns the indices of the row where the values are defined. +*/ + LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); + // operations with files +/*! + Reads a table from a file. +*/ + boolean ReadFromFile(in SALOMEDS::TMPFile theStream); +/*! + Saves a table into a file. +*/ + SALOMEDS::TMPFile SaveToFile(); + }; + + + //========================================================================== +/*! \brief %AttributeStudyProperties interface + + This attribute allows to store study properties: user name, creation date, creation + mode, modified flag, locked flag. +
See also an example of usage of these methods in batchmode of %SALOME application. + +*/ + //========================================================================== + + interface AttributeStudyProperties : GenericAttribute + { +/*! + Sets the name of the author of the %Study +*/ + void SetUserName(in string theName); +/*! + Returns the name of the user of the %Study. + \note
It returns a null string, if user name is not set +*/ + string GetUserName(); +/*! + Sets creation date of the %Study. +*/ + void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear); +/*! + Returns creation date of the %Study and True if creation date is set. +*/ + boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear); +/*! + Sets creation mode of the %Study. + \note
Creation mode must be: "from scratch" or "copy from". +*/ + void SetCreationMode(in string theMode); +/*! + Returns creation mode: "from scratch", "copy from", or null string + if creation mode is not set +*/ + string GetCreationMode(); +/*! + Sets the number of transactions executed after the last saving of the document. +*/ + void SetModified(in long theModified); +/*! + Returns True, if the document has been modified and not saved. +*/ + boolean IsModified(); +/*! + Returns the number of transactions executed after the last saving of the document. +*/ + long GetModified(); +/*! + Sets the document locked for modifications if theLocked is True. +*/ + void SetLocked(in boolean theLocked); +/*! + Returns True if the document is locked for modifications. +*/ + boolean IsLocked(); +/*! + Appends modification parameters to the modifications list. +*/ + void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear); +/*! + Returns a list of mosdifiers user names, modification dates. + /note
If theWithCreator is True, then the output list will also contain the name of the author and the date of creation. +*/ + void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator); + }; + //========================================================================== +/*! \brief %AttributePythonObject interface + + Attribute allowing to store pyton objects as a sequence of chars. +*/ + //========================================================================== + + interface AttributePythonObject : GenericAttribute + { +/*! + Sets in the attribute a Python object converted into a sequence of chars. + \param theSequence A sequence of chars. + \param IsScript Defines (if True) whether this sequence of chars is a Python script. +*/ + void SetObject(in string theSequence, in boolean IsScript); +/*! + Returns a Python object stored in the attribute as a sequence of chars. +*/ + string GetObject(); +/*! + Returns True if the sequence of bytes stored in the attribute corresponds + to a Python script. +*/ + boolean IsScript(); + }; +}; +#endif diff --git a/idl/SALOME/SALOME_Component.idl b/idl/SALOME/SALOME_Component.idl new file mode 100644 index 0000000..085bf91 --- /dev/null +++ b/idl/SALOME/SALOME_Component.idl @@ -0,0 +1,137 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_Component.idl +// Author : Paul RASCLE, EDF +// $Header: /dn05/salome/CVS/SALOME_ROOT/idl/SALOME_Component.idl + +#ifndef _SALOME_COMPONENT_IDL_ +#define _SALOME_COMPONENT_IDL_ +/*! \ingroup Kernel + +This is a package of interfaces used for connecting new components to %SALOME application. It also contains a set of interfaces used +for management of %MED component in %SALOME application. +*/ +module Engines +{ + interface Component ; + +/*! \brief Interface of the %Container + + This interface defines the process of loading and registration + of new components in SALOME application +*/ + interface Container + { +/*! + Initializes the %container with a definite name. +*/ + Container start_impl( in string ContainerName ) ; + +/*! + Loads into the container a new component, registers it and starts it's CORBA servant. + \param nameToRegister Name of the component which will be registered in Registry (or Name Service) + \param componentName Name of the constructed library of the %component +*/ + Component load_impl(in string nameToRegister, in string componentName); + +/*! + Stops the component servant, and deletes all related objects +*/ + void remove_impl(in Component component_i); + +/*! + Discharges all components from the container. +*/ + void finalize_removal() ; +/*! + Determines whether the server has been loaded or not. +*/ + + void ping(); +/*! + Name of the %container +*/ + readonly attribute string name ; +/*! + Name of the machine containing this container (location of the container). +*/ + readonly attribute string machineName ; +/*! + Returns True if the %container has been killed +*/ + boolean Kill_impl() ; + }; +/*! \brief Interface of the %component + + This interface is used for interaction between the %container and the %component and between + the components inside the container. +*/ + interface Component + { +/*! + The name of the instance of the %Component +*/ + readonly attribute string instanceName ; +/*! + The name of the interface of the %Component +*/ + readonly attribute string interfaceName ; +/*! + Determines whether the server has already been loaded or not. +*/ + void ping(); +/*! + Deactivates the %Component. +*/ + void destroy() ; +/*! + Returns the container that the %Component refers to. +*/ + Container GetContainerRef() ; +/*! + This method is used by the %SUPERVISOR component. It sets the names of the graph and of the node. +*/ + void Names( in string aGraphName , in string aNodeName ) ; +/*! + Returns True if the %Component has been killed. +*/ + boolean Kill_impl() ; +/*! + Returns True if the activity of the %Component has been stopped. (It's action can't be resumed) +*/ + boolean Stop_impl() ; +/*! + Returns True if the activity of the %Component has been suspended. (It's action can be resumed) +*/ + boolean Suspend_impl() ; +/*! + Returns True if the activity of the %Component has been resumed. +*/ + boolean Resume_impl() ; +/*! + Returns the Cpu used (long does not run with python !...) +*/ + long CpuUsed_impl() ; + } ; +} ; + +#endif diff --git a/idl/SALOME/SALOME_DataTypeCatalog.idl b/idl/SALOME/SALOME_DataTypeCatalog.idl new file mode 100644 index 0000000..ad1767e --- /dev/null +++ b/idl/SALOME/SALOME_DataTypeCatalog.idl @@ -0,0 +1,49 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_DataTypeCatalog.idl +// Author : Estelle Deville, Paul Rascle +// $Header$ + +module SALOME_DataTypeCatalog{ +// Type definitions + +// List of Data Type Names + typedef sequence ListOfDataTypeName ; + + // Exception thrown if a DataType is not found in the catalog + exception NotFound {}; +//-------------------------------------------------------------------------- +// Interfaces + +// Catalog interface : +// methods to : +// - obtain the data type names of the catalog +// - test the compatibility between two type names +interface DataCatalog +{ + ListOfDataTypeName GetDataTypeList() ; + boolean isDerivedFrom(in string type_in, in string type_out) raises(NotFound); + string GetDataInterfaceRead(in string type) raises(NotFound); + string GetDataInterfaceWrite(in string type)raises(NotFound); + ListOfDataTypeName GetDataTypeParents(in string type) raises(NotFound); +} ; +}; diff --git a/idl/SALOME/SALOME_Exception.idl b/idl/SALOME/SALOME_Exception.idl new file mode 100644 index 0000000..6c55944 --- /dev/null +++ b/idl/SALOME/SALOME_Exception.idl @@ -0,0 +1,67 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_Exception.idl +// Author : Paul RASCLE, EDF +// $Header$ + +/*! \file SALOME_Exception.idl This file contains the objects defining the main exception used +in %SALOME application. +*/ +#ifndef _SALOME_EXCEPTION_IDL_ +#define _SALOME_EXCEPTION_IDL_ + +/*! +Module SALOME regroups all idl definitions for SALOME Kernel +*/ + +module SALOME +{ +/*! +This enumeration contains the elements indicating the type of the exception. +*/ + enum ExceptionType + { + COMM, /*!< Communication problem */ + BAD_PARAM, /*!< Bad User parameters */ + INTERNAL_ERROR /*!< SALOME Bug, irrecoverable */ + }; +/*! +This struct contains a set of fields defining the structure of the exception. +*/ + struct ExceptionStruct + { + ExceptionType type; /*! ListOfServicesParameter; +/*! +This struct contains fields completely defining each service. +*/ + + struct Service + { + string ServiceName; /*! ListOfInterfaceService; +/*! +List of services. +*/ + typedef sequence ListOfServices ; +/*! +This struct contains fields defining each interface. +*/ + struct DefinitionInterface + { + string interfacename ; /*! ListOfDefInterface ; +/*! +List of interfaces. +*/ + typedef sequence ListOfInterfaces ; +/*! +List of names of components. +*/ + typedef sequence ListOfComponents ; +/*! +List of names of computers. +*/ + typedef sequence ListOfComputers ; +/*! +This struct contains GUI elements used for representation of the module in %IAPP component. +*/ + struct IAPP_Affich + { + string modulename; /*! ListOfIAPP_Affich ; + +/*! + This exception is raised when a %component, a %service or a % pathPrefix is not found. +*/ + exception NotFound + { + string what ; /*!If the specified interface doesn't exist, Notfound exception is thrown + \param interfacename Name of the interface + \return Required interface + */ + DefinitionInterface GetInterface(in string interfacename) raises(NotFound); + + // GetServiceList : operation to get a list of the services name of + // an interface of a component + /*! + Gets a list of names of services of a definite interface belonging to the component. + \note
If the specified interface doesn't exist, Notfound exception is thrown. + \param interfacename Name of the interface + \return List of services of the required interface + */ + ListOfServices GetServiceList(in string interfacename) raises(NotFound); + + + // GetService : operation to get one service of an interface of a component + + /*! + Gets a definite service of an interface of the component. + \note
If the required service or the specified interface don't exist, Notfound exception is thrown. + \param interfacename Name of the interface + \param servicename Name of the service + \return Required service + */ + + Service GetService(in string interfacename, + in string servicename) raises(NotFound); + + // GetDefaultService : operation to get the default service + // of an interface of a component +/*! + Gets the default service of an interface of the component. + \note
If the required service or the specified interface don't exist, Notfound exception is thrown. + \param interfacename Name of the interface + \return Required service + */ + + Service GetDefaultService(in string interfacename) raises(NotFound); + + // GetPathPrefix : operation to get the PathPrefix of a computer + /*! + Gets the prefix path of the computer containing the %component. + \note
If the required computer doesn't exist, Notfound exception is thrown + \param machinename Name of the machine + \return Prefix path + */ + + string GetPathPrefix(in string machinename) raises(NotFound); + +/*! + Sets/gets the constraint affected to the component + (to be resolved by LifeCycle for the computer choice) +*/ + readonly attribute string constraint ; + +/*! +Sets/gets the name of the component +*/ + readonly attribute string componentname; + +/*! +Defines whether the component can be multistudy or not +*/ + readonly attribute boolean multistudy; + +/*! +Defines the type of the component +*/ + readonly attribute ComponentType component_type ; + +/*! +Sets/gets the icone of the component (for IAPP) +*/ + readonly attribute string component_icone; + } ; +/*! \brief %Module catalog interface + +This interface is used for creation of the module catalog in %SALOME application. +*/ + interface ModuleCatalog + { + void ping(); + +/*! + Gets a list of names of computers of the catalog +*/ + ListOfComputers GetComputerList(); + +/*! +Gets the %PathPrefix of a computer +*/ + string GetPathPrefix(in string machinename) raises(NotFound); +/*! + Gets a list of names of components of the catalog +*/ + ListOfComponents GetComponentList(); +/*! +Gets a list of pair GUI elements (component name, component icone) +used for representation of the module in %IAPP component. +*/ + + ListOfIAPP_Affich GetComponentIconeList(); +/*! +Gets a list of names of components of a particular type, which belong to this catalog. +*/ + // GetComponentList : operation to get a list of the components name of + // a particular type of the catalog + ListOfComponents GetTypedComponentList(in ComponentType _component_type); + +/*! +Gets one component of the catalog. +*/ + Acomponent GetComponent(in string componentname) raises(NotFound); + } ; +}; diff --git a/idl/SALOME/SALOME_Registry.idl b/idl/SALOME/SALOME_Registry.idl new file mode 100644 index 0000000..b890429 --- /dev/null +++ b/idl/SALOME/SALOME_Registry.idl @@ -0,0 +1,61 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_Registry.idl + +# ifndef __registry_idl__ +# define __registry_idl__ + +module Registry +{ + struct Infos + { + string name; + long pid; + string machine; + string adip; + long uid; + string pwname; + long tc_start; + long tc_hello; + long tc_end; + long difftime; + string cdir; + long status; + string ior; // client + }; + + typedef sequence AllInfos; + + interface Components + { + void ping(); + unsigned long add ( in Infos lesInfos ) ; + void remove ( in unsigned long id ) ; + unsigned long size() ; + AllInfos getall () ; + AllInfos history () ; + oneway void end() ; + oneway void hello( in unsigned long id ) ; + } ; +} ; + +# endif diff --git a/idl/SALOME/SALOME_RessourcesCatalog.idl b/idl/SALOME/SALOME_RessourcesCatalog.idl new file mode 100755 index 0000000..a0336d7 --- /dev/null +++ b/idl/SALOME/SALOME_RessourcesCatalog.idl @@ -0,0 +1,64 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_RessourcesCatalog.idl +// Author : Estelle Deville +// $Header$ + +module SALOME_RessourcesCatalog{ + // Type Definitions + + //Proc_info : information about a processor + struct proc_info{ + long number; + string model_name; + float cpu_mhz; + float cache_size; + }; + + typedef sequence ListOfProc; + + //Computer_info : information about a computer + // Os and informations about processors + struct computer_info{ + string name; + string OS; + string OS_version; + ListOfProc procs; + }; + + enum ContainerType {Cpp, python, NP}; + typedef sequence ListOfContainerType; + + typedef sequence ListOfComputer; + + // exception thrown if a computer is not found in the catalog + + exception NotFound {}; + + //------------------------------------------------------------------ + //Interface + interface RessourcesCatalog { + ListOfComputer GetComputerList(); + ListOfContainerType GetContainerTypeList (in string computer) raises(NotFound); + computer_info GetComputerInfo(in string computer) raises(NotFound); + }; +}; diff --git a/idl/SALOME/SALOME_Session.idl b/idl/SALOME/SALOME_Session.idl new file mode 100644 index 0000000..d0c95e8 --- /dev/null +++ b/idl/SALOME/SALOME_Session.idl @@ -0,0 +1,103 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_Session.idl +// Author : Paul RASCLE, EDF +// $Header$ + +#include "SALOME_Component.idl" +/*! \defgroup Kernel SALOME KERNEL module +*/ + +/*! \ingroup Kernel + + This package contains interfaces used for management of the session in %SALOME application. +*/ +module SALOME +{ +/*! \brief State of the session + + This enumeration contains values defining the state of the session + +*/ + enum SessionState {asleep, running} ; + +/*! \brief %Session State and Statistics + + + This struct contains a field list with general information about the session +*/ + + struct StatSession + { +/*! \brief State of the session + + It can be: + * -# asleep : no running study + * -# running : one or more running studies +*/ + SessionState state ; +/*! Number of running studies +*/ + short runningStudies ; +/*! It is True if GUI is active in the session +*/ + boolean activeGUI ; + } ; +/*! \brief Interface of the session + + The %session Server launches and stops GUI (Graphical User Interface). + The %session can be active without GUI (It can contain one or more running studies) +*/ + + interface Session + { +/*! + This exception is raised when trying to stop the %session with active GUI +*/ + exception GUIActive {} ; +/*! + This exception is raised when trying to stop the %session with a number of running studies. +*/ + exception RunningStudies {} ; + +/*! + Launches GUI in the session +*/ + void GetInterface(); + Engines::Component GetVisuGen(); + +/*! + Stops the %Session (It must be idle) +*/ + void StopSession() raises(GUIActive, RunningStudies) ; + +/*! + Gets Session State +*/ + StatSession GetStatSession() ; +/*! + Determines whether the server has already been loaded or not. +*/ + void ping(); + } ; + +} ; diff --git a/idl/SALOME/SALOME_TestComponent.idl b/idl/SALOME/SALOME_TestComponent.idl new file mode 100644 index 0000000..96de5a0 --- /dev/null +++ b/idl/SALOME/SALOME_TestComponent.idl @@ -0,0 +1,36 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_TestComponent.idl +// Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA +// $Header$ + +#include "SALOME_Component.idl" + +module Engines +{ + + interface TestComponent : Component + { + string Coucou(in long L); + }; + +}; diff --git a/idl/SALOME/TestNotif.idl b/idl/SALOME/TestNotif.idl new file mode 100644 index 0000000..fa20946 --- /dev/null +++ b/idl/SALOME/TestNotif.idl @@ -0,0 +1,33 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : TestNotif.idl + +# ifndef __TESTNOTIF_IDL_ +# define __TESTNOTIF_IDL_ + +interface Solver +{ + boolean Connect(); + oneway void Start() ; + oneway void ReStart() ; +} ; +# endif diff --git a/idl/SALOME/TypeData.idl b/idl/SALOME/TypeData.idl new file mode 100644 index 0000000..c3d99e2 --- /dev/null +++ b/idl/SALOME/TypeData.idl @@ -0,0 +1,44 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : TypeData.idl + +#ifndef _SALOME_TYPEDATA_IDL_ +#define _SALOME_TYPEDATA_IDL_ + +module Engines +{ + + typedef sequence DoubleVec ; + typedef sequence IntVec; + + typedef struct CSR { + unsigned long nbpos; + unsigned long nbval; + IntVec pos; + IntVec col; + DoubleVec data; + } CSRMatStruct; + +} ; + +#endif + diff --git a/idl/SALOMEDS.idl b/idl/SALOMEDS.idl new file mode 100644 index 0000000..5fcb8c1 --- /dev/null +++ b/idl/SALOMEDS.idl @@ -0,0 +1,1371 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS.idl +// Author : Yves FRICAUD +// $Header$ + +/*! \mainpage + \image html Application-About.png + +*/ +/*! \page page1 Mapping of IDL definitions to Python language. +\section Intro Introduction +%SALOME PRO is a distributed client/server application using the Common Object Request Broker Architecture (CORBA). +CORBA architecture uses the Interface Definition Language (IDL), which specifies interfaces between CORBA objects. So with help of IDL +CORBA's language independence is ensured . Because interfaces described in IDL can be mapped to the most of currently used programming languages, CORBA applications and components are thus +independent of the language(s) used to implement them. In other words, a client written in C++ can communicate with a server written in Java, which in turn can communicate with +another server written in COBOL, and so forth. + +One important thing to remember about IDL is that it is not an implementation language. That is, applications can't be written in IDL. The sole purpose of IDL is to define interfaces; +providing implementations for these interfaces is performed using some other language. + +This page contains an abridged reference manual for mapping of IDL definitions to Python language. It will be useful for Python programmers who are not familiar +with IDL language. All examples are taken from %SALOME PRO source files. +The complete version of Python Language Mapping Specification can be found here. + +
CONTENTS: +- \ref subsection1 +- \ref subsection2 +- \ref subsection3 +- \ref subsection4 +- \ref subsection5 +- \ref subsection6 +- \ref subsection7 + +\subsection subsection1 Using Scoped Names + +Python implements a module concept that is similar to the IDL scoping mechanisms, +except that it does not allow for nested modules. In addition, Python requires each +object to be implemented in a module; globally visible objects are not supported. + +Because of these constraints, scoped names are translated into Python using the +following rules: + +• An IDL module mapped into a Python module. Modules containing modules are +mapped to packages (i.e., directories with an __init__ module containing all +definitions excluding the nested modules). An implementation can chose to map toplevel +definitions (including the module CORBA) to modules in an implementationdefined +package, to allow concurrent installations of different CORBA runtime +libraries. In that case, the implementation must provide additional modules so that +toplevel modules can be used without importing them from a package. + +• For all other scopes, a Python class is introduced that contains all the definitions +inside this scope. + +• Other global definitions (except modules) appear in a module whose name is +implementation dependent. Implementations are encouraged to use the name of the +IDL file when defining the name of that module. + +For instance, + +\verbatim +module SALOMEDS { + interface StudyManager { + void Close(in Study aStudy); + }; +}; +\endverbatim + +would introduce a module SALOMEDS.py, which contains the following definitions: + +\verbatim +# module SALOMEDS.py +class StudyManager: + def _Close(self,aStudy): + pass #interfaces are discussed later +\endverbatim + +To avoid conflicts, IDL names that are also Python identifiers are prefixed with an underscore (‘_’). + +\subsection subsection2 Mapping for Template and Array Types + +Both the bounded and the unbounded string type of IDL are mapped to the Python +string type. Wide strings are represented by an implementation-defined type with the +following properties: + +• For the wide string X and the integer n, X[n] returns the nth character, which is a +wide string of length 1. + +• len(X) returns the number of characters of wide string X. + +• CORBA.wstr(c) returns a wide character with the code point c in an +implementation-defined encoding. + +• X+Y returns the concatenation of wide strings X and Y. + +• CORBA.word(CORBA.wstr(c)) == c + +The sequence template is mapped to sequence objects (e.g., tuples or lists). +Applications should not assume that values of a sequence type are mutable. Sequences +and arrays of octets and characters are mapped to the string type for efficiency reasons. + +For example, given the IDL definitions + +\verbatim +module SALOMEDS { + typedef sequence StringSeq; + + interface AttributeTableOfInteger : GenericAttribute { + + void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); + }; +}; +\endverbatim + +a client could invoke the operation + +\verbatim +print My_AttributeTableOfInteger.SetRowTitles(["X","F"]) +\endverbatim + +Array types are mapped like sequence templates. The application in this example also expects an +IncorrectArgumentLength exception if it passes sequences that violate the bounds constraint or +arrays of wrong size. + +Another example with arrays. The following IDL definition + +\verbatim +module SALOMEDS { + typedef sequence ListOfAttributes; + interface SObject { + ListOfAttributes GetAllAttributes(); + }; +}; +\endverbatim + +is equal to + +\verbatim +import SALOMEDS + +attributes=[] + +attributes = My_SObject.GetAllAttributes() + +length = len(attributes) + +print "Attributes number = ", length +print attributes +\endverbatim + +\subsection subsection3 Mapping for Objects and Operations + +A CORBA object reference is represented as a Python object at run-time. This object +provides all the operations that are available on the interface of the object. Although +this specification does not mandate the use of classes for stub objects, the following +discussion uses classes to indicate the interface. + +The nil object is represented by None. + +If an operation expects parameters of the IDL Object type, any Python object +representing an object reference might be passed as actual argument. + +If an operation expects a parameter of an abstract interface, either an object +implementing that interface, or a value supporting this interface may be passed as +actual argument. The semantics of abstract values then define whether the argument is +passed by value or by reference. + +Operations of an interface map to methods available on the object references. +Parameters with a parameter attribute of in or inout +are passed from left to right tothe method, skipping out parameters. +The return value of a method depends on the number of out parameters +and the return type. If the operation returns a value, this +value forms the first result value. All inout or out +parameters form consecutive result values. The method result depends then on the number +of result values: + +• If there is no result value, the method returns None. + +• If there is exactly one result value, it is returned as a single value. + +• If there is more than one result value, all of them are packed into a tuple, and this +tuple is returned. + +Assuming the IDL definition + +\verbatim +module SALOMEDS{ + interface StudyBuilder{ + boolean FindAttribute ( in SObject anObject, + out GenericAttribute anAttribute, + in string aTypeOfAttribute ); + }; +}; +\endverbatim + +a client could write + +\verbatim +from SALOMEDS import StudyBuilder; +my_StudyBuilder=... + + res,A=my_StudyBuilder.FindAttribute(Sobj, "AttributeSequenceOfReal") +\endverbatim + +In this example A corresponds to the return value anAttribute and +res to the boolean return value. + +If an interface defines an attribute name, for example, the attribute is mapped into an +operation _get_name. If the attribute is not readonly, there is an +additional operation _set_name. + +The IDL definition + +\verbatim +module SALOMEDS{ + interface Study{ + attribute string Name; + }; +}; +\endverbatim + +is equal to the following + +\verbatim +from SALOMEDS import Study +My_Study=... + Name=My_Study._get_name(); + Name=My_Study._set_name(); +\endverbatim + +\subsection subsection4 Narrowing Object References + +Python objects returned from CORBA operations or pseudo-operations (such as +string_to_object) might have a dynamic type, which is more specific than the +static type as defined in the operation signature. + +Since there is no efficient and reliable way of automatically creating the most specific +type, explicit narrowing is necessary. To narrow an object reference A to an interface +class AttributeSequenceOfReal, the client can use the following operation + +\verbatim +A = A._narrow(SALOMEDS.AttributeSequenceOfReal) +\endverbatim + +\subsection subsection5 Mapping for Exceptions + +An IDL exception is translated into a Python class derived from +CORBA.UserException. System exceptions are derived from CORBA.SystemException. +Both base classes are derived from CORBA.Exception. The parameters of the +exception are mapped in the same way as the fields of a struct definition. When +raising an exception, a new instance of the class is created; the constructor +expects the exception parameters. For example, the definition + +\verbatim +module SALOMEDS{ + interface StudyBuilder{ + exception LockProtection {}; + void CommitCommand() raises(LockProtection); + }; +}; +\endverbatim + +could be used caught as + +\verbatim +from SALOMEDS import StudyBuilder; +my_StudyBuilder=... +try: + my_StudyBuilder.CommitCommand(); +except StudyBuilder.LockProtection,value: + print "Error! Study is locked for modifications" +\endverbatim + + +\subsection subsection6 Mapping for Enumeration Types + +An enumeration is mapped into a number of constant objects in the name space where +the enumeration is defined. An application may only test for equivalence of two +enumeration values, and not assume that they behave like numbers. +For example, the definition + +\verbatim +module VISU { + interface PrsObject{ + + enum PrsObjType{ TCURVE, TTABLE, TMESH, TCONTAINER, + TSCALARMAP, TISOSURFACE, TDEFORMEDSHAPE, + TCUTPLANES, TVECTORS }; + }; +}; +\endverbatim + +introduces the objects + +\verbatim +from VISU import PrsObject +VISU.PrsObjType.TCURVE,VISU.PrsObjType.TTABLE,VISU.PrsObjType.TMESH,VISU.PrsObjType.TCONTAINER, +VISU.PrsObjType.TSCALARMAP,VISU.PrsObjType.TISOSURFACE,VISU.PrsObjType.TDEFORMEDSHAPE,VISU.PrsObjType.TCUTPLANES, +VISU.PrsObjType.TVECTORS +\endverbatim + +\subsection subsection7 Mapping for Structured Types + +An IDL struct definition is mapped into a Python class or type. For each field in the +struct, there is a corresponding attribute in the class with the same name as the field. +The constructor of the class expects the field values, from left to right. +For example, the IDL definition + +\verbatim +struct SDate { + short Second; + short Minute; + short Hour; + short Day; + short Month; + short Year; + }; +\endverbatim + +could be used in the Python statements + +\verbatim +Date=SDate(30, 12, 15, 26, 1, 79) +print Date.Second,Date.Minute,Date.Hour,Date.Day,Date.Month,Date.Year +\endverbatim +*/ +/*! \page page2 Mapping of SALOME IDL definitions to Python language. + + + - %SALOME STUDY module + - Mapping of %SALOMEDS functions + - Mapping of SALOMEDS_Attributes functions + - %SAlOME KERNEL module + - Mapping of %Med_Gen functions + - Mapping of %SALOME_Session functions + - Mapping of %SALOME_ModuleCatalog functions + - Mapping of %SALOME_Exception functions + - Mapping of %SALOME_Component functions + - %SALOME MED component + - Mapping of %Med functions + - %SALOME SUPERVISION module + - Mapping of %SUPERV functions + - %SALOME %VISU module + - Mapping of %VISU_Gen functions + +*/ + +/*! \defgroup Study SALOME STUDY module +*/ + +/*! + \file SALOMEDS.idl This file contains a set of interfaces used for creation, managment + and modification of the %Study +*/ + +#ifndef _SALOMEDS_IDL_ +#define _SALOMEDS_IDL_ + +#include "SALOME_Exception.idl" + +/*! \ingroup Study + This package contains the interfaces used for creation, managment + and modification of the %Study +*/ +module SALOMEDS +{ +/*! \typedef URL + Name of the file in which the %Study is saved. + +*/ + typedef string URL; + +/*! Main identifier of an object in %SALOME application +*/ + typedef string ID; + +/*! While saving the data, IOR is transformed into persistent reference +*/ + typedef string PersistentReference; + +/*! IOR of the study in %SALOME application +*/ + typedef string SalomeReference; +/*! List of names of open studies in a %SALOME session +*/ + typedef sequence ListOfOpenStudies; +/*! List of file names +*/ + typedef sequence ListOfFileNames; +/*! List of modification dates of the study +*/ + typedef sequence ListOfDates ; +/*! An unbounded sequence of strings +*/ + typedef sequence ListOfStrings ; +/*! A byte stream which is used for binary data transfer between components +*/ + typedef sequence TMPFile; + + // Reference to other objects is treated with function AddReference + // and ReferencedObject + // All other type of attributes defined in AttributeType enum are + // treated with AddAdttribute and GetAttribute + // The difference is made because Reference attribute don't contain + // strings but reference to ID of other objects + + interface GenericAttribute; + interface Study; + interface StudyManager; + interface StudyBuilder; + interface SObject; + interface SComponent; + interface SComponentIterator; + interface ChildIterator; + interface Driver; + interface AttributeStudyProperties; + interface UseCaseIterator; + interface UseCaseBuilder; + interface Callback; +/*! List of attributes +*/ + typedef sequence ListOfAttributes; +/*! Exception indicating that this feature hasn't been implemented +*/ + exception NotImplemented {}; + + + //=========================================================================== + /*! \brief %Study Interface + + The purpose of the %Study is to manage the data produced by various components of %SALOME platform. + Most of the %Study operations are handled by the StudyManager and the StudyBuilder. + What is left in the %Study interface are elementary inquiries. + (Incidentally, we recall that a CORBA attribute is implemented as a pair of get + and set methods.) A %Study is explored by a set of tools, mainly iterators + , which are described further. Nevertheless, the %Study + interface allows the search of an object by name or by ID. + \note +
The Path of an object in %SALOME application is much alike a standard path of a file. + In general it's a string of names of directories divided by a slash '/'. +
The Context is the current directory of an object.

+*/ + + interface Study + { + exception StudyInvalidContext {}; + exception StudyInvalidComponent {}; +/*! Invalid directory of the %study exception +*/ + exception StudyInvalidDirectory {}; +/*! Exception pointing that this name of the study has already been used. +*/ + exception StudyNameAlreadyUsed {}; + exception StudyObjectAlreadyExists {}; +/*! Invalid name of the %study exception +*/ + exception StudyNameError {}; + exception StudyCommentError {}; +/*! \brief The name of the %Study + + This is equivalent to the methods setName() & getName() +*/ + attribute string Name; // equivalent to setName() & getName() +/*! \brief The ID of the %Study + + This is equivalent to the methods setID() & getID() +*/ + attribute short StudyId; +/*! Sequence containing %SObjects +*/ + typedef sequence ListOfSObject; +/*! + Gets a persistent reference to the %Study. +*/ + PersistentReference GetPersistentReference(); +/*! + Gets a transient reference to the %Study. +*/ + SalomeReference GetTransientReference(); + +/*! + Returns True if the %Study is empty +*/ + boolean IsEmpty(); +/*! + Allows to find a %SComponent by its name. + \param aComponentName It's a string value in the Comment Attribute of the Component, + which is looked for, defining the data type of this Component. + +
See also an example of this method usage in batchmode of %SALOME application. +*/ + SComponent FindComponent (in string aComponentName); +/*! + Allows to find a %SComponent by ID of the according %SObject +*/ + SComponent FindComponentID(in ID aComponentID); +/*! + Allows to find a %SObject by the Name Attribute of this %SObject +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + SObject FindObject (in string anObjectName); +/*! + Allows to find a %SObject by its ID +*/ + SObject FindObjectID (in ID aObjectID); +/*! + Allows to find a %SObject by IOR of the object belonging to this %SObject. +*/ + SObject FindObjectIOR (in ID aObjectIOR); +/*! + Returns a list of %SObjects belonging to this %Component. The Name Attribute + of these %SObjects should correspond to anObjectName. +*/ + ListOfSObject FindObjectByName(in string anObjectName, in string aComponentName); +/*! + Allows to find a %SObject by the path to it. +*/ + SObject FindObjectByPath(in string thePath); +/*! + Returns the path to the %SObject. +*/ + string GetObjectPath(in Object theObject); + +/*! + Sets the context of the %Study. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetContext(in string thePath); +/*! + Gets the context of the %Study +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + string GetContext(); +/*! + Returns a list of names of objects corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. +*/ + ListOfStrings GetObjectNames(in string theContext); +/*! + Returns a list of names of directories and subdirectories corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. +*/ + ListOfStrings GetDirectoryNames(in string theContext); +/*! + Returns a list of names of Files corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. +*/ + ListOfStrings GetFileNames(in string theContext); +/*! + Returns a list of names of Components corresponding to the context. + \note If the parameter theContext is empty, then the current context will be used. +*/ + ListOfStrings GetComponentNames(in string theContext); +/*! \brief Creation of a new iterator of child levels + + Creates a new iterator of child levels of the %SObject +*/ + ChildIterator NewChildIterator(in SObject aSO); +/*! \brief Creation of a new iterator of the %SComponent + + Creates a new iterator of the %SComponent. +*/ + SComponentIterator NewComponentIterator(); +/*! \brief Creation of a %StudyBuilder + + Creates a new %StudyBuilder to add or modify an object in the study. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + StudyBuilder NewBuilder() ; +/*! \brief Labels dependency + + Updates the map with IOR attribute. It's an inner method used for optimization. +*/ + void UpdateIORLabelMap(in string anIOR, in string anEntry); + +/*! \brief Getting properties of the study + + Returns the attriubte, which contains the properties of this study. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + AttributeStudyProperties GetProperties(); +/*! + Determines whether the %study has been saved +*/ + attribute boolean IsSaved; +/*! + Returns True if the %study has been modified and not saved. +*/ + boolean IsModified(); +/*! + Determines the file where the %study has been saved +*/ + attribute string URL; + +/*! \brief List of %SObjects + + Returns the list of %SObjects which refers to %anObject. +*/ + ListOfSObject FindDependances(in SObject anObject); + +/*! \brief The date of the last saving of the study + + Returns the date of the last saving of study with format: "DD/MM/YYYY HH:MM" +*/ + string GetLastModificationDate(); +/*! \brief The list of modification dates of the study + + Returns the list of modification dates (without creation date) with format "DD/MM/YYYY HH:MM". + Note : the first modification begins the list. +*/ + ListOfDates GetModificationsDate(); +/*! \brief Object conversion. + + Converts an object into IOR. + \return IOR +*/ + string ConvertObjectToIOR(in Object theObject); +/*! \brief Object conversion. + + Converts IOR into an object. + \return An object +*/ + Object ConvertIORToObject(in string theIOR); +/*! + Gets a new %UseCaseBuilder. +*/ + UseCaseBuilder GetUseCaseBuilder(); + +/*! + Closes the components in the study, removes itself from the %StudyManager. +*/ + void Close(); + +/*! + Enables(if isEnabled = True)/disables automatic addition of new %SObjects to the use case. +*/ + void EnableUseCaseAutoFilling(in boolean isEnabled); + }; + + //========================================================================== +/*! \brief %Study Builder Interface + + The purpose of the Builder is to add and/or remove objects and attributes. + A %StudyBuilder is linked to a %Study. A + command management is provided for the undo/redo functionalities. + \note +
The Tag of an item in %SALOME application is a symbolic description of + item's position in the tree-type structure of the browser. In general it has the following + form: 0:2:1:1 +*/ + //========================================================================== + + interface StudyBuilder + { +/*! \brief %LockProtection Exception + + This exception is raised while attempting to modify a locked %study. +*/ + exception LockProtection {}; +/*! \brief Creation of a new %SComponent. + + Creates a new %SComponent + \param ComponentDataType Data type of the %SComponent which will be created. + +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + SComponent NewComponent(in string ComponentDataType); +/*! \brief Definition of the instance to the %SComponent + + Defines the instance to the %SComponent. +*/ + void DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR); +/*! \brief Deletion of the %SComponent + + Removes the %SComponent. +*/ + void RemoveComponent(in SComponent aComponent); + +/*! \brief Creation of a new %SObject + + Creates a new %SObject. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + SObject NewObject (in SObject theFatherObject); +/*! \brief Creation of a new %SObject with a definite %tag + + Creates a new %SObject with a definite %tag. +*/ + SObject NewObjectToTag (in SObject theFatherObject, in long atag); +/*! \brief Deletion of the %SObject + + Removes a %SObject from the %StudyBuilder. +*/ + void RemoveObject (in SObject anObject); +/*! \brief Deletion of the %SObject with all his child objects. + + Removes the %SObject with all his child objects. +*/ + void RemoveObjectWithChildren(in SObject anObject); + +/*! + Loads a %SComponent. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception); +/*! + Loads a %SObject. +*/ + void Load (in SObject sco); + +/*! \brief Looking for or creating an attribute assigned to the %SObject + + Allows to find or create an attribute of a specific type which is assigned to the object. + \param anObject The %SObject corresponding to the attribute which is looked for. + \param aTypeOfAttribute Type of the attribute. + +
See also an example of this method usage in batchmode of %SALOME application. +*/ + + GenericAttribute FindOrCreateAttribute(in SObject anObject, + in string aTypeOfAttribute); + +/*! \brief Looking for an attribute assigned to %SObject + + Allows to find an attribute of a specific type which is assigned to the object. + \param anObject The %SObject corresponding to the attribute which is looked for. + \param aTypeOfAttribute Type of the attribute. + \param anAttribute Where the attribute is placed if it's found. + \return True if it finds an attribute. + */ + + boolean FindAttribute(in SObject anObject, + out GenericAttribute anAttribute, + in string aTypeOfAttribute); +/*! \brief Deleting the attribute assigned to the %SObject + + Removes the attribute of a specific type which is assigned to the object. + \param anObject The %SObject corresponding to the attribute. + \param aTypeOfAttribute Type of the attribute. + +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void RemoveAttribute(in SObject anObject, + in string aTypeOfAttribute); +/*! \brief Addition of a reference + + Adds a reference between %anObject and %theReferencedObject. +*/ + + void Addreference(in SObject anObject, + in SObject theReferencedObject) ; +/*! + Adds a directory in the %Study. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void AddDirectory(in string theName); + +/*! \brief Identification of the %SObject's substructure. + + Identification of the %SObject's substructure by GUID. + It has the following format "00000000-0000-0000-0000-000000000000" +*/ + + void SetGUID(in SObject anObject, in string theGUID); +/*! + + Returns True if the %SObject has GUID. +*/ + boolean IsGUID(in SObject anObject, in string theGUID); + +/*! \brief Creation of a new command + + Creates a new command which can contain several different actions. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void NewCommand(); // command management +/*! \brief Execution of the command + + Commits all actions declared within this command. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void CommitCommand() raises(LockProtection); // command management +/*! + Returns True if at this moment there is a command under execution. +*/ + boolean HasOpenCommand(); +/*! \brief Cancelation of the command + + Cancels all actions declared within the command. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void AbortCommand(); // command management +/*! \brief Undolimit + + The number of actions which can be undone +*/ + attribute long UndoLimit; +/*! \brief Undo method + + Cancels all actions of the last command. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Undo() raises (LockProtection); +/*! \brief Redo method + + Redoes all actions of the last command. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Redo() raises (LockProtection); +/*! + Returns True if at this moment there are any actions which can be canceled. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean GetAvailableUndos(); +/*! + Returns True if at this moment there are any actions which can be redone. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean GetAvailableRedos(); +/*! + Sets the callback for addition of the given %SObject. Returns the previous callback. +*/ + Callback SetOnAddSObject(in Callback theCallback); +/*! + Sets the callback for removal of the given %SObject. Returns the previous callback. +*/ + Callback SetOnRemoveSObject(in Callback theCallback); + + }; + + //========================================================================== +/*! \brief %Study Manager interface + + The purpose of the Manager is to manipulate the %Studies. You will find in this + interface the methods to create, open, + close, and save a %Study. Since a %SALOME session is multi-document, you will + also find the methods allowing to navigate + through the collection of studies present in a session. +*/ + //========================================================================== + + interface StudyManager + { +/*! + Determines whether the server has already been loaded or not. +*/ + void ping(); + +/*! \brief Creation of a new %Study + + Creates a new %Study with a definite name. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + Study NewStudy(in string study_name); + +/*! \brief Open a study + + Reads and activates the structure of the study %Objects. + \warning This method doesn't activate the corba objects. Only a component can do it. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception); + +/*! \brief Closing the study + + Closes the study. +*/ + void Close(in Study aStudy); +/*! \brief Saving the study + + Saves the study. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Save(in Study aStudy, in boolean theMultiFile); + + void SaveASCII(in Study aStudy, in boolean theMultiFile); +/*! \brief Saving the study in a file + + Saves the study in a specified file. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SaveAs(in URL aUrl, // if the file already exists + in Study aStudy, + in boolean theMultiFile); // overwrite (as option) + + void SaveAsASCII(in URL aUrl, // if the file already exists + in Study aStudy, + in boolean theMultiFile); // overwrite (as option) + + +/*! \brief List of open studies. + + Returns the list of open studies in the current session. +*/ + ListOfOpenStudies GetOpenStudies(); + +/*! \brief Getting a particular %Study picked by name + + Activates a particular %Study + amongst the session collection picking it by name. +*/ + Study GetStudyByName (in string aStudyName); + +/*! \brief Getting a particular %Study picked by ID + + Activates a particular %Study + amongst the session collection picking it by ID. +*/ + Study GetStudyByID (in short aStudyID); + + // copy/paste methods + +/*! + Returns True, if the given %SObject can be copied to the clipboard. +*/ + boolean CanCopy(in SObject theObject); +/*! + Returns True, if the given %SObject is copied to the clipboard. +*/ + boolean Copy(in SObject theObject); +/*! + Returns True, if the object from the clipboard can be pasted to the given %SObject. +*/ + boolean CanPaste(in SObject theObject); +/*! + Returns the %SObject in which the object from the clipboard was pasted to. +*/ + SObject Paste(in SObject theObject) raises (SALOMEDS::StudyBuilder::LockProtection); + }; + + + //========================================================================== +/*! \brief %SObject interface + + The objects in the %study are built by the %StudyBuilder. The %SObject interface + provides methods for elementary inquiries, like getting an object %ID or its attribuites. + \note +
Tag of an item in %SALOME application is an integer value uniquely defining an item + in the tree-type data structure. +
ID of an item is a description of item's position in the tree-type data structure. + ID is a list of tags and it has the following form: 0:2:1:1. +*/ + //========================================================================== + + interface SObject + { +/*! Name of the %SObject +*/ + attribute string Name; // equivalent to setName() & getName() +/*! \brief Getting an object %ID + + Returns ID of the %SObject. +*/ + ID GetID(); +/*! \brief Acquisition of the father %Component of the %SObject + + Returns the father %Component of the %SObject. +*/ + SComponent GetFatherComponent(); +/*! \brief Acquisition of the father %SObject of the %SObject + + Returns the father %SObject of the given %SObject. +*/ + SObject GetFather(); +/*! \brief %Tag of %SObject + + Returns the %tag of the %SObject. +*/ + short Tag(); +/*! \brief Looking for subobjects of an object. + + Returns True if it finds a subobject of the %SObject with a definite tag. +*/ + + boolean FindSubObject (in long atag, out SObject obj); +/*! \brief Looking for attributes of the %SObject + + Returns True if it finds an attribute of a definite type of the %SObject. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + boolean FindAttribute(out GenericAttribute anAttribute, + in string aTypeOfAttribute); +/*! + Returns the object which this %SObject refers to. It also returns True if it finds + this object. +*/ + boolean ReferencedObject(out SObject obj); // A REVOIR +/*! \brief Getting all attributes of the %SObject + + Returns the list of all attributes of the %SObject. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + ListOfAttributes GetAllAttributes(); +/*! \brief Returning the study + + Returns the study containing the given %SObject. +*/ + Study GetStudy(); + }; + + + //========================================================================== +/*! \brief %Generic attribute interface + + %Generic attribute is a base interface for all attributes which inherit + its methods. +*/ + //========================================================================== + interface GenericAttribute + { +/*! \brief Exception locking all changes + + This exception locks all modifications in attributes. +*/ + exception LockProtection {}; +/*! \brief Method CheckLocked + + Checks whether the %Study is protected for modifications. + \note
This exception is raised only outside the transaction. +*/ + void CheckLocked() raises (LockProtection); + }; + + + + //========================================================================== +/*! \brief %SComponent interface + + The %SComponent interface is a specialization of the %SObject interface. + It inherits the most of its methods from the %SObject interface. +*/ + //========================================================================== + interface SComponent : SObject + { +/*! \brief Data type of the %SComponent + + Returns the data type of the %SComponent. +*/ + string ComponentDataType(); +/*! + Returns IOR of the according component. +*/ + boolean ComponentIOR (out ID theID); //returns True if there is an instance + //In this case ID identifies this one + }; + + + //========================================================================== +/*! \brief %SComponentIterator interface + + This interface contains the methods allowing to iterate over all components in the list. + The search is started from the first %SComponent in the list. +*/ + //========================================================================== + interface SComponentIterator + { +/*! \brief Initialization of the Iterator + +Activates the %SComponentIterator. +*/ + void Init(); +/*! \brief Method More + + Returns True if there is one more %SComponent in the list. +*/ + boolean More(); +/*! \brief Moving the iterator to the next %SComponent + +Moves the iterator to the next %SComponent in the list. +*/ + void Next(); +/*! + Returns the %SComponent corresponding to the current %SComponent found by the iterator. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + SComponent Value(); + }; + + //========================================================================== +/*! \brief %ChildIterator interface + + This interface contains methods which allow to iterate over all child + levels. +*/ + //========================================================================== + interface ChildIterator + { +/*! \brief Initialization of the Iterator. + +Activates the %ChildIterator. +*/ + void Init(); +/*! \brief Initialization of the Iterator for all child levels. + +Activates the %ChildIterator (if True) for all child levels. +*/ + void InitEx(in boolean allLevels); +/*! \brief Method More + + Returns True if the %ChildIterator finds one more child level. +*/ + boolean More(); +/*! + Passes the iterator to the next level. +*/ + void Next(); +/*! + Returns the %SObject corresponding to the current object found by the iterator. +*/ + SObject Value(); + }; + + //========================================================================== + //========================================================================== +/*! \brief Interface of the %UseCaseIterator. + + This interface contains a set of methods used for iteration over the objects in the use case. +*/ + interface UseCaseIterator + { +/*! \brief Initialization of the Iterator. + +Activates the %UseCaseIterator. If allLevels is True the Iterator is activated for all subobjects. +*/ + void Init(in boolean allLevels); +/*! \brief Method More + + Returns True if the %UseCaseIterator finds one more object. +*/ + boolean More(); +/*! + Passes the iterator to the next object. +*/ + void Next(); +/*! + Returns the %SObject corresponding to the current object found by the Iterator. +*/ + SObject Value(); + }; + + //========================================================================== + //========================================================================== +/*! \brief Interface of the %UseCaseBuilder + + Use case in the study represents a user-managed subtree, containing all or some of the objects which exist in the study. + The %UseCaseBuilder interface contains a set of methods used for management of the use case in the study. +*/ + interface UseCaseBuilder + { +/*! + Adds to the use case an object theObject as a child of the current object of the use case. +*/ + boolean Append(in SObject theObject); +/*! + Removes an object theObject from the use case. +*/ + boolean Remove(in SObject theObject); +/*! + Adds a child object theObject to the given father theFather object in the use case. +*/ + boolean AppendTo(in SObject theFather, in SObject theObject); +/*! + Inserts in the use case the object theFirst before the object theNext. +*/ + boolean InsertBefore(in SObject theFirst, in SObject theNext); +/*! + Sets the current object of the use case. +*/ + boolean SetCurrentObject(in SObject theObject); +/*! + Makes the root object to be the current object of the use case. +*/ + boolean SetRootCurrent(); +/*! + Returns True if the given object theObject of the use case has child objects. +*/ + boolean HasChildren(in SObject theObject); +/*! + Sets the name of the use case. +*/ + boolean SetName(in string theName); +/*! + Gets the name of the use case. +*/ + string GetName(); +/*! + Returns True if the given object theObject represents a use case. +*/ + boolean IsUseCase(in SObject theObject); +/*! + Gets the current object of the use case. +*/ + SObject GetCurrentObject(); +/*! + Creates a new use case in the use case browser. +*/ + SObject AddUseCase(in string theName); +/*! + Returns the %UseCaseIterator for the given object theObject in the use case. +*/ + UseCaseIterator GetUseCaseIterator(in SObject theObject); + }; + //========================================================================== + //========================================================================== +/*! \brief The callback interface + + The %StudyBuilder can be created with the method NewBuilder. While invocation of this method a new object of the class Callback is created + and this object is assigned to the newly created Builder as callback which should be called when adding and removing of the ojects. +*/ + interface Callback + { +/*! + Invokes the corresponding method Append of the %UseCaseBuilder. +*/ + void OnAddSObject(in SObject theObject); +/*! + Invokes the corresponding method Remove of the %UseCaseBuilder. +*/ + void OnRemoveSObject(in SObject theObject); + }; + + //========================================================================== +/*! \brief %Driver interface + + This interface contains a set of methods used for the management + of the object produced in the %study by a component. +*/ + //========================================================================== + interface Driver + { + + /*! \brief Saving the data. + + This method is called by the StudyManager when saving a study. + \param theComponent %SComponent corresponding to this Component + \return A byte stream TMPFile that contains all saved data + +
See also an example of this method usage in batchmode of %SALOME application. + + */ + + + TMPFile Save(in SComponent theComponent, in string theURL, in boolean isMultiFile); + + TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile); + + /*! \brief Loading the data. + + This method is called by the StudyManager when opening a study. + \param theComponent %SComponent corresponding to this Component + \param theStream The file which contains all data saved by the component on Save method + */ + + boolean Load(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile); + + boolean LoadASCII(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile); + + /*! \brief Closing of the study + + This method Close is called by the StudyManager when closing a study. + + */ + + void Close (in SComponent aSComponent); + //void Close ( in string aIORSComponent); + + /*! \brief The type of the data + + Returns the type of data produced by the Component in the study. + */ + + string ComponentDataType(); + + // Driver Transient -> persistent called for each object in study +/*! + Transforms IOR into PersistentID of the object. It is called for each + object in the %study. +*/ + string IORToLocalPersistentID (in SObject theSObject, + in string IORString, + in boolean isMultiFile, + in boolean isASCII); +/*! + Transforms PersistentID into IOR of the object. It is called for each + object in the %study. +*/ + string LocalPersistentIDToIOR (in SObject theSObject, + in string aLocalPersistentID, + in boolean isMultiFile, + in boolean isASCII) + raises (SALOME::SALOME_Exception); + + // Publishing in the study +/*! \brief Publishing in the study + + Returns True if the given %Component can publish the %object in the %study. +*/ + boolean CanPublishInStudy(in Object theIOR) raises (SALOME::SALOME_Exception); +/*! \brief Publishing in the study + + Publishes the given object in the %study, using the algorithm of this component. + \param theStudy The %study in which the object is published + \param theSObject If this parameter is null the object is published for the first time. Otherwise + this parameter should contain a reference to the object published earlier + \param theObject The object which is published + \param theName The name of the published object. If this parameter is empty, the name is generated + automatically by the component. +*/ + SObject PublishInStudy(in Study theStudy, in SObject theSObject, in Object theObject, in string theName); + + // copy/paste methods + +/*! + Returns True, if the given %SObject can be copied to the clipboard. +*/ + boolean CanCopy(in SObject theObject); +/*! + Returns the object %ID and the %TMPFile of the object from the given %SObject. +*/ + TMPFile CopyFrom(in SObject theObject, out long theObjectID); +/*! + Returns True, if the component can paste the object with given %ID of the component with name theComponentName. +*/ + boolean CanPaste(in string theComponentName, in long theObjectID); +/*! + Returns the %SObject of the pasted object. +*/ + SObject PasteInto(in TMPFile theStream, in long theObjectID, in SObject theObject); + + }; +}; + +#endif diff --git a/idl/SALOMEDS_Attributes.idl b/idl/SALOMEDS_Attributes.idl new file mode 100644 index 0000000..b47f39b --- /dev/null +++ b/idl/SALOMEDS_Attributes.idl @@ -0,0 +1,1181 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS.idl +// Author : Yves FRICAUD +// $Header$ + +/*! \file SALOMEDS_Attributes.idl This file contains a set of interfaces + for the attributes which can be assigned to %SObject +*/ +#ifndef _SALOMEDS_AttributesIDL_ +#define _SALOMEDS_AttributesIDL_ + +#include "SALOMEDS.idl" + +module SALOMEDS +{ +/*! Sequence of double values +*/ + typedef sequence DoubleSeq; +/*! Sequence of long values +*/ + typedef sequence LongSeq; +/*! Sequence of string values +*/ + typedef sequence StringSeq; +/*! \struct Color + This structure stores a set of elements defining the color based on RGB. +*/ + struct Color { +/*! Red color +*/ + double R; +/*! Green color +*/ + double G; +/*! Blue color +*/ + double B; + }; + //========================================================================== +/*! \brief Attribute allowing to store a real value + + Attribute allowing to store a real value +*/ + //========================================================================== + interface AttributeReal : GenericAttribute + { +/*! + Returns the value of this attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + double Value(); +/*! + Sets the value of this attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in double value); + }; + //========================================================================== +/*! \brief Attribute allowing to store an integer value + + Attribute allowing to store an integer value +*/ + //========================================================================== + interface AttributeInteger : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + long Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in long value); + }; + //========================================================================== +/*! \brief Attribute - sequence of real values + + Attribute - sequence of real values, indexing from 1 (like in CASCADE). +*/ + //========================================================================== + interface AttributeSequenceOfReal : GenericAttribute + { +/*! + Initialization of the attribute with initial data. + \param other Initially assigned sequence of real numbers. +*/ + void Assign (in DoubleSeq other); +/*! + Returns the sequence of real numbers stored in the attribute. +*/ + DoubleSeq CorbaSequence(); +/*! + Adds to the end of the sequence a real number. + \param value A real number added to the sequence. + +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void Add (in double value); +/*! + Removes a real number with a definite index + from the sequence of real numbers stored in the Attribute. +*/ + void Remove(in long index); +/*! + Substitutes a real number with a definite index for another real number. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void ChangeValue(in long index, in double value); +/*! + Returns a real number with a definite index + in the sequence of real numbers stored in the Attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + double Value(in short index); +/*! + Returns the length of the sequence of real numbers stored in the Attribute. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + long Length(); + }; + //========================================================================== +/*! \brief Attribute - sequence of integer + + Attribute - sequence of integer, indexing from 1 (like in CASCADE) +*/ + //========================================================================== + interface AttributeSequenceOfInteger : GenericAttribute + { +/*! + Initialization of the attribute with initial data. + \param other Initially assigned sequence of integer numbers. +*/ + void Assign (in LongSeq other); +/*! + Returns the sequence of integer numbers stored in the Attribute. +*/ + LongSeq CorbaSequence(); +/*! + Adds to the end of the sequence an integer number. + \param value An integer number added to the sequence. + +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Add (in long value); +/*! + Removes an integer number with a definite index + from the sequence of integer numbers stored in the Attribute. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Remove(in long index); +/*! + Substitutes an integer number with a definite index for another integer number. +*/ + void ChangeValue(in long index, in long value); +/*! + Returns an integer number with a definite index + in the sequence of integer numbers stored in the Attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + long Value(in short index); +/*! + Returns the length of the sequence of integer numbers stored in the Attribute. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + long Length(); + }; + + //========================================================================== +/*! \brief Name attribute + + This attribute stores a string value, which corresponds to the name of the %SObject + or to the name of corresponding object. +*/ + //========================================================================== + + interface AttributeName : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + string Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in string value); + }; + + //========================================================================== +/*! \brief Comment attribute + + This attribute stores a string value containing supplementary information about + the %SObject. In particular it contains the data type of the %SComponent. +*/ + //========================================================================== + interface AttributeComment : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + string Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in string value); + }; + //========================================================================== +/*! \brief IOR attribute + + This attribute stores a string value identifying a runtime object.In particular + it contains CORBA Interoperable Object Reference. +*/ + //========================================================================== + interface AttributeIOR : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + string Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in string value); + }; + + //========================================================================== +/*! \brief Persistent reference attribute + + This attribute stores a persistent identifier of the object. +*/ + //========================================================================== + interface AttributePersistentRef : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + string Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in string value); + }; + + //========================================================================== + //Below the list of presentation attributes for display study tree in browser + //========================================================================== + + + //========================================================================== +/*! \brief Drawable flag Attribute. + + This is a presentation attribute necessary for display of the study tree in the browser. + The item associated to SObject is created/displayed if TRUE. +*/ + //========================================================================== + interface AttributeDrawable : GenericAttribute + { +/*! + Returns TRUE if the item is drawable (as it is by default) and FALSE if it isn't. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean IsDrawable(); +/*! +Sets the items to be drawable if value is TRUE (the default) or not to be selectable if valueis FALSE. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetDrawable(in boolean value); + }; + + //========================================================================== +/*! \brief Selectable flag Attribute. + + This is a presentation attribute necessary for display of the study tree in the browser. + The item is selectable by %SALOME selection mechanism if TRUE. +*/ + //========================================================================== + interface AttributeSelectable : GenericAttribute + { +/*! + Returns TRUE if the item is selectable (as it is by default) and FALSE if it isn't. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean IsSelectable(); +/*! +Sets the items to be selectable if value is TRUE (the default) or not to be selectable if valueis FALSE. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetSelectable(in boolean value); + }; + + //========================================================================== +/*! \brief Expandable flag Attribute. + + This is a presentation attribute necessary for display of the study tree in the browser. + It sets this item to be expandable even if it has no children if value is TRUE. If value is FALSE + expandable only if it has children. +*/ + //========================================================================== + interface AttributeExpandable : GenericAttribute + { +/*! + Returns TRUE if this item is expandable even when it has no children. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean IsExpandable(); +/*! + Sets this item to be expandable even if it has no children if value is TRUE, and to be + expandable only if it has children if value is FALSE (the default). +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetExpandable(in boolean value); + }; + + //========================================================================== +/*! \brief Opened flag Attribute. + + This is a presentation attribute necessary for display of the study tree in the browser. + It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children + are not visible) if bool is FALSE. +*/ + //========================================================================== + interface AttributeOpened : GenericAttribute + { +/*! + Returns TRUE if this item is open (its children are visible) and FALSE if it isn't. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + boolean IsOpened(); +/*! + Sets this item to be open (its children are visible) if value is TRUE, and to be closed +(its children are not visible) if value is FALSE. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetOpened(in boolean value); + }; + //========================================================================== +/*! \brief TextColorAttribute. + + This attribute sets the color of an item. +*/ + //========================================================================== + interface AttributeTextColor : GenericAttribute + { +/*! + Returns the color of an item. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + Color TextColor(); +/*! + Sets the color of an item. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetTextColor(in Color value); + }; + + //========================================================================== + /*! \brief TextHighlightColorAttribute. + + This attribute sets the highlight color of an item. +*/ + //========================================================================== + interface AttributeTextHighlightColor : GenericAttribute + { +/*! + Returns the highlight color of an item. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + Color TextHighlightColor(); +/*! + Sets the highlight color of an item. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetTextHighlightColor(in Color value); + }; + //========================================================================== +/*! \brief PixMapAttribute. + + This attribute stores an icon which is put before the name of an item. +*/ + //========================================================================== + interface AttributePixMap : GenericAttribute + { +/*! + Returns True if there is an icon before the name of the item. +*/ + boolean HasPixMap(); +/*! + Returns the name of the icon. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + string GetPixMap(); +/*! + Sets the name of the icon. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void SetPixMap(in string value); + }; + + //========================================================================== +/*! \brief TreeNodeAttribute. + + A set of these attributes on the %SObjects of the %study forms an inner auxiliary + tree whith its own structure and identifier. The quantity of such trees with different + identifiers can be arbitrary. +
See also an example of usage of the methods of this interface in batchmode of %SALOME application. + +*/ + //========================================================================== + interface AttributeTreeNode : GenericAttribute + { +/*! + Sets the father TreeNode to this TreeNode. +*/ + void SetFather(in AttributeTreeNode value); +/*! + Returns True if there is the father TreeNode of this TreeNode. +*/ + boolean HasFather(); +/*! + Returns the father Treenode of this TreeNode. +*/ + AttributeTreeNode GetFather(); +/*! + Sets the previous brother TreeNode to this treeNode. +*/ + void SetPrevious(in AttributeTreeNode value); +/*! + Returns True if there is the previous brother TreeNode of this TreeNode. +*/ + boolean HasPrevious(); +/*! + Returns the previous brother TreeNode of this TreeNode. +*/ + AttributeTreeNode GetPrevious(); +/*! + Sets the next brother TreeNode to this treeNode. +*/ + void SetNext(in AttributeTreeNode value); +/*! + Returns True if there is the next brother TreeNode of this TreeNode. +*/ + boolean HasNext(); +/*! + Returns the previous brother TreeNode of this TreeNode. +*/ + AttributeTreeNode GetNext(); +/*! + Sets the first child TreeNode to this treeNode. +*/ + void SetFirst(in AttributeTreeNode value); +/*! + Returns True if there is the first child TreeNode of this TreeNode. +*/ + boolean HasFirst(); +/*! + Returns the first child TreeNode of this TreeNode. +*/ + AttributeTreeNode GetFirst(); +/*! + Sets ID of the tree. TreeNodes of one tree have the same ID. +*/ + void SetTreeID(in string value); +/*! + Gets ID of the tree. +*/ + string GetTreeID(); + +/*! + Adds a child TreeNode to the end of the list of children of this Treenode. +*/ + void Append(in AttributeTreeNode value); +/*! + Adds a child TreeNode to the beginning of the list of children of this Treenode. + +*/ + void Prepend(in AttributeTreeNode value); +/*! + Adds a brother TreeNode before this Treenode. + In this case the both TreeNodes will belong to the same father. +*/ + void InsertBefore(in AttributeTreeNode value); +/*! + Adds a brother TreeNode after this Treenode. + In this case the both TreeNodes will belong to the same father. +*/ + void InsertAfter(in AttributeTreeNode value); +/*! + Deletes a TreeNode. +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Remove(); + +/*! + Returns the depth of the TreeNode in the + structure, it means the number of fathers of the given TreeNode. + (i.e.: the depth of the root TreeNode is 0). +*/ + long Depth(); +/*! + Returns True if it is a root TreeNode. +*/ + boolean IsRoot(); +/*! + Returns True if this TreeNode is a descendant of the TreeNode. +*/ + boolean IsDescendant(in AttributeTreeNode value); +/*! + Returns True if this TreeNode is the father of the TreeNode. +*/ + boolean IsFather(in AttributeTreeNode value); +/*! + Returns True if this TreeNode is a child of the TreeNode. +*/ + boolean IsChild(in AttributeTreeNode value); +/*! + Returns ID of the according %SObject. +*/ + string Label(); + }; + //========================================================================== +/*! \brief LocalID attribute + + Attribute describing the link between a %SObject and a local object in the component. +*/ + //========================================================================== + interface AttributeLocalID : GenericAttribute + { +/*! + Returns the value of this attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + long Value(); +/*! + Sets the value of this attribute. +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in long value); + }; + + //========================================================================== +/*! \brief Attribute storing GUID + + Attribute allowing to store GUID +*/ + //========================================================================== + interface AttributeUserID : GenericAttribute + { +/*! + Returns the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + string Value(); +/*! + Sets the value of this attribute +
See also an example of this method usage in batchmode of %SALOME application. +*/ + void SetValue(in string value); + }; + + //========================================================================== +/*! \brief %AttributeTarget iterface + + This attribute stores the list of all %SObjects that refer + to this %SObject. This attribute is used for inner purposes of the application. + It is also needed for optimization. +*/ + //========================================================================== + + interface AttributeTarget : GenericAttribute + { +/*! + Adds a %SObject to the list of %SObjects which refer to this %SObject. + +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Add(in SObject anObject); +/*! + Returns the list of %SObjects which refer to this %SObject. +*/ + SALOMEDS::Study::ListOfSObject Get(); +/*! + Deletes a %SObject from the list of %SObjects which refer to this %SObject. + +
See also an example of this method usage in batchmode of %SALOME application. + +*/ + void Remove(in SObject anObject); + }; + //========================================================================== + /*! \brief %AttributeTableOfInteger interface + + This attribute allows to store a table of integers (indexing from 1 like in CASCADE) + and string titles of this table, of each row, of each column. +
See also an example of usage of these methods in batchmode of %SALOME application. + +*/ + //========================================================================== + + interface AttributeTableOfInteger : GenericAttribute + { +/*! + This exception is raised when an incorrect index is passed as parameter. +*/ + exception IncorrectIndex {}; +/*! + This exception is raised when an incorrect length of the argument is passed as parameter. +*/ + exception IncorrectArgumentLength {}; + + // titles: for table, for each row, for each column +/*! + Sets the title of the table. +*/ + void SetTitle(in string theTitle); +/*! + Returns the title of the table. +*/ + string GetTitle(); +/*! + Sets the title of a row with a definite index. +*/ + void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all rows of the table. +*/ + void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all rows of the table. +*/ + StringSeq GetRowTitles(); +/*! + Sets the title of a column with a definite index. +*/ + void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all columns of the table. +*/ + void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all columns of the table. +*/ + StringSeq GetColumnTitles(); + + //Rows units +/*! + Sets the unit of a row with a definite index. +*/ + void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); +/*! + Sets the units for all rows of the table. +*/ + void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); +/*! + Returns the units of all rows of the table. +*/ + StringSeq GetRowUnits(); + + // table information +/*! + Returns the number of rows of the table. +*/ + long GetNbRows(); +/*! + Returns the number of columns of the table. +*/ + long GetNbColumns(); + + // operations with rows +/*! + Adds a row to the end of the table. +*/ + void AddRow(in LongSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the row. +*/ + void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the row of the table. +*/ + LongSeq GetRow(in long theRow) raises(IncorrectIndex); + + // operations with columns +/*! + Adds a column to the end of the table. +*/ + void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the column. +*/ + void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the column of the table. +*/ + LongSeq GetColumn(in long theColumn) raises(IncorrectIndex); + + // operations with elements +/*! + Puts a value in the table. + \param theRow The row, where the value will be placed. + \param theColumn The column, where the value will be placed. +*/ + void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex); +/*! + Returns True if there is a value in the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + boolean HasValue(in long theRow, in long theColumn); +/*! + Returns the value from the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); + +/*! + Sets the max number of colums in the table. + \note It'd better to set it before filling the table. +*/ + void SetNbColumns(in long theNbColumns); + +/*! + Returns the indices of the row where the values are defined. +*/ + LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); + // operations with files +/*! + Reads a table from a file. +*/ + boolean ReadFromFile(in SALOMEDS::TMPFile theStream); +/*! + Saves a table into a file. +*/ + SALOMEDS::TMPFile SaveToFile(); + }; + + //========================================================================== +/*! \brief %AttributeTableOfReal interface + + This attribute allows to store a table of reals (indexing from 1 like in CASCADE) + and string titles of this table, of each row, of each column. +
See also an example of usage of these methods in batchmode of %SALOME application. + +*/ + //========================================================================== + + interface AttributeTableOfReal : GenericAttribute + { +/*! + This exception is raised when an incorrect index is passed as parameter. +*/ + exception IncorrectIndex {}; +/*! + This exception is raised when an incorrect length of the argument is passed as parameter. +*/ + exception IncorrectArgumentLength {}; + + // titles: for table, for each row, for each column +/*! + Sets the title of the table. +*/ + void SetTitle(in string theTitle); +/*! + Returns the title of the table. +*/ + string GetTitle(); +/*! + Sets the title of a row with a definite index. +*/ + void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all rows of the table. +*/ + void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all rows of the table. +*/ + StringSeq GetRowTitles(); +/*! + Sets the title of a column with a definite index. +*/ + void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all columns of the table. +*/ + void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all columns of the table. +*/ + StringSeq GetColumnTitles(); + + //Rows units +/*! + Sets the unit of a row with a definite index. +*/ + void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); +/*! + Sets the units for all rows of the table. +*/ + void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); +/*! + Returns the units of all rows of the table. +*/ + StringSeq GetRowUnits(); + + // table information +/*! + Returns the number of rows of the table. +*/ + long GetNbRows(); +/*! + Returns the number of columns of the table. +*/ + long GetNbColumns(); + + // operations with rows +/*! + Adds a row to the end of the table. +*/ + void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the row. +*/ + void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the row of the table. +*/ + DoubleSeq GetRow(in long theRow) raises(IncorrectIndex); + + // operations with columns +/*! + Adds a column to the end of the table. +*/ + void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the column. +*/ + void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the column of the table. +*/ + DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex); + + // operations with elements +/*! + Puts a value in the table. + \param theRow The row, where the value will be placed. + \param theColumn The column, where the value will be placed. +*/ + void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex); +/*! + Returns True if there is a value in the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + boolean HasValue(in long theRow, in long theColumn); +/*! + Returns the value from the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); + +/*! + Sets the max number of colums in the table. + \note It'd better to set it before filling the table. +*/ + void SetNbColumns(in long theNbColumns); + +/*! + Returns the indices of the row where the values are defined. +*/ + LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); + // operations with files +/*! + Reads a table from a file. +*/ + boolean ReadFromFile(in SALOMEDS::TMPFile theStream); +/*! + Saves a table into a file. +*/ + SALOMEDS::TMPFile SaveToFile(); + }; + + + + //========================================================================== +/*! \brief %AttributeTableOfString interface + + This attribute allows to store a table of strings (indexing from 1 like in CASCADE) + and string titles of this table, of each row, of each column. +
See also an example of usage of these methods in batchmode of %SALOME application. + +*/ + //========================================================================== + + interface AttributeTableOfString : GenericAttribute + { +/*! + This exception is raised when an incorrect index is passed as parameter. +*/ + exception IncorrectIndex {}; +/*! + This exception is raised when an incorrect length of the argument is passed as parameter. +*/ + exception IncorrectArgumentLength {}; + + // titles: for table, for each row, for each column +/*! + Sets the title of the table. +*/ + void SetTitle(in string theTitle); +/*! + Returns the title of the table. +*/ + string GetTitle(); +/*! + Sets the title of a row with a definite index. +*/ + void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all rows of the table. +*/ + void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all rows of the table. +*/ + StringSeq GetRowTitles(); +/*! + Sets the title of a column with a definite index. +*/ + void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); +/*! + Sets the titles for all columns of the table. +*/ + void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); +/*! + Returns the titles of all columns of the table. +*/ + StringSeq GetColumnTitles(); + + //Rows units +/*! + Sets the unit of a row with a definite index. +*/ + void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); +/*! + Sets the units for all rows of the table. +*/ + void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); +/*! + Returns the units of all rows of the table. +*/ + StringSeq GetRowUnits(); + + // table information +/*! + Returns the number of rows of the table. +*/ + long GetNbRows(); +/*! + Returns the number of columns of the table. +*/ + long GetNbColumns(); + + // operations with rows +/*! + Adds a row to the end of the table. +*/ + void AddRow(in StringSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the row. +*/ + void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the row of the table. +*/ + StringSeq GetRow(in long theRow) raises(IncorrectIndex); + + // operations with columns +/*! + Adds a column to the end of the table. +*/ + void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength); +/*! + Sets the values of all elements of the column. +*/ + void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); +/*! + Returns the column of the table. +*/ + StringSeq GetColumn(in long theColumn) raises(IncorrectIndex); + + // operations with elements +/*! + Puts a value in the table. + \param theRow The row, where the value will be placed. + \param theColumn The column, where the value will be placed. +*/ + void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex); +/*! + Returns True if there is a value in the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + boolean HasValue(in long theRow, in long theColumn); +/*! + Returns the value from the table. + \param theRow The row containing the value + \param theColumn The column containing the value +*/ + string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); + +/*! + Sets the max number of colums in the table. + \note It'd better to set it before filling the table. +*/ + void SetNbColumns(in long theNbColumns); + +/*! + Returns the indices of the row where the values are defined. +*/ + LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); + // operations with files +/*! + Reads a table from a file. +*/ + boolean ReadFromFile(in SALOMEDS::TMPFile theStream); +/*! + Saves a table into a file. +*/ + SALOMEDS::TMPFile SaveToFile(); + }; + + + //========================================================================== +/*! \brief %AttributeStudyProperties interface + + This attribute allows to store study properties: user name, creation date, creation + mode, modified flag, locked flag. +
See also an example of usage of these methods in batchmode of %SALOME application. + +*/ + //========================================================================== + + interface AttributeStudyProperties : GenericAttribute + { +/*! + Sets the name of the author of the %Study +*/ + void SetUserName(in string theName); +/*! + Returns the name of the user of the %Study. + \note
It returns a null string, if user name is not set +*/ + string GetUserName(); +/*! + Sets creation date of the %Study. +*/ + void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear); +/*! + Returns creation date of the %Study and True if creation date is set. +*/ + boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear); +/*! + Sets creation mode of the %Study. + \note
Creation mode must be: "from scratch" or "copy from". +*/ + void SetCreationMode(in string theMode); +/*! + Returns creation mode: "from scratch", "copy from", or null string + if creation mode is not set +*/ + string GetCreationMode(); +/*! + Sets the number of transactions executed after the last saving of the document. +*/ + void SetModified(in long theModified); +/*! + Returns True, if the document has been modified and not saved. +*/ + boolean IsModified(); +/*! + Returns the number of transactions executed after the last saving of the document. +*/ + long GetModified(); +/*! + Sets the document locked for modifications if theLocked is True. +*/ + void SetLocked(in boolean theLocked); +/*! + Returns True if the document is locked for modifications. +*/ + boolean IsLocked(); +/*! + Appends modification parameters to the modifications list. +*/ + void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear); +/*! + Returns a list of mosdifiers user names, modification dates. + /note
If theWithCreator is True, then the output list will also contain the name of the author and the date of creation. +*/ + void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator); + }; + //========================================================================== +/*! \brief %AttributePythonObject interface + + Attribute allowing to store pyton objects as a sequence of chars. +*/ + //========================================================================== + + interface AttributePythonObject : GenericAttribute + { +/*! + Sets in the attribute a Python object converted into a sequence of chars. + \param theSequence A sequence of chars. + \param IsScript Defines (if True) whether this sequence of chars is a Python script. +*/ + void SetObject(in string theSequence, in boolean IsScript); +/*! + Returns a Python object stored in the attribute as a sequence of chars. +*/ + string GetObject(); +/*! + Returns True if the sequence of bytes stored in the attribute corresponds + to a Python script. +*/ + boolean IsScript(); + }; +}; +#endif diff --git a/idl/SALOME_Component.idl b/idl/SALOME_Component.idl new file mode 100644 index 0000000..085bf91 --- /dev/null +++ b/idl/SALOME_Component.idl @@ -0,0 +1,137 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_Component.idl +// Author : Paul RASCLE, EDF +// $Header: /dn05/salome/CVS/SALOME_ROOT/idl/SALOME_Component.idl + +#ifndef _SALOME_COMPONENT_IDL_ +#define _SALOME_COMPONENT_IDL_ +/*! \ingroup Kernel + +This is a package of interfaces used for connecting new components to %SALOME application. It also contains a set of interfaces used +for management of %MED component in %SALOME application. +*/ +module Engines +{ + interface Component ; + +/*! \brief Interface of the %Container + + This interface defines the process of loading and registration + of new components in SALOME application +*/ + interface Container + { +/*! + Initializes the %container with a definite name. +*/ + Container start_impl( in string ContainerName ) ; + +/*! + Loads into the container a new component, registers it and starts it's CORBA servant. + \param nameToRegister Name of the component which will be registered in Registry (or Name Service) + \param componentName Name of the constructed library of the %component +*/ + Component load_impl(in string nameToRegister, in string componentName); + +/*! + Stops the component servant, and deletes all related objects +*/ + void remove_impl(in Component component_i); + +/*! + Discharges all components from the container. +*/ + void finalize_removal() ; +/*! + Determines whether the server has been loaded or not. +*/ + + void ping(); +/*! + Name of the %container +*/ + readonly attribute string name ; +/*! + Name of the machine containing this container (location of the container). +*/ + readonly attribute string machineName ; +/*! + Returns True if the %container has been killed +*/ + boolean Kill_impl() ; + }; +/*! \brief Interface of the %component + + This interface is used for interaction between the %container and the %component and between + the components inside the container. +*/ + interface Component + { +/*! + The name of the instance of the %Component +*/ + readonly attribute string instanceName ; +/*! + The name of the interface of the %Component +*/ + readonly attribute string interfaceName ; +/*! + Determines whether the server has already been loaded or not. +*/ + void ping(); +/*! + Deactivates the %Component. +*/ + void destroy() ; +/*! + Returns the container that the %Component refers to. +*/ + Container GetContainerRef() ; +/*! + This method is used by the %SUPERVISOR component. It sets the names of the graph and of the node. +*/ + void Names( in string aGraphName , in string aNodeName ) ; +/*! + Returns True if the %Component has been killed. +*/ + boolean Kill_impl() ; +/*! + Returns True if the activity of the %Component has been stopped. (It's action can't be resumed) +*/ + boolean Stop_impl() ; +/*! + Returns True if the activity of the %Component has been suspended. (It's action can be resumed) +*/ + boolean Suspend_impl() ; +/*! + Returns True if the activity of the %Component has been resumed. +*/ + boolean Resume_impl() ; +/*! + Returns the Cpu used (long does not run with python !...) +*/ + long CpuUsed_impl() ; + } ; +} ; + +#endif diff --git a/idl/SALOME_DataTypeCatalog.idl b/idl/SALOME_DataTypeCatalog.idl new file mode 100644 index 0000000..ad1767e --- /dev/null +++ b/idl/SALOME_DataTypeCatalog.idl @@ -0,0 +1,49 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_DataTypeCatalog.idl +// Author : Estelle Deville, Paul Rascle +// $Header$ + +module SALOME_DataTypeCatalog{ +// Type definitions + +// List of Data Type Names + typedef sequence ListOfDataTypeName ; + + // Exception thrown if a DataType is not found in the catalog + exception NotFound {}; +//-------------------------------------------------------------------------- +// Interfaces + +// Catalog interface : +// methods to : +// - obtain the data type names of the catalog +// - test the compatibility between two type names +interface DataCatalog +{ + ListOfDataTypeName GetDataTypeList() ; + boolean isDerivedFrom(in string type_in, in string type_out) raises(NotFound); + string GetDataInterfaceRead(in string type) raises(NotFound); + string GetDataInterfaceWrite(in string type)raises(NotFound); + ListOfDataTypeName GetDataTypeParents(in string type) raises(NotFound); +} ; +}; diff --git a/idl/SALOME_Exception.idl b/idl/SALOME_Exception.idl new file mode 100644 index 0000000..6c55944 --- /dev/null +++ b/idl/SALOME_Exception.idl @@ -0,0 +1,67 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_Exception.idl +// Author : Paul RASCLE, EDF +// $Header$ + +/*! \file SALOME_Exception.idl This file contains the objects defining the main exception used +in %SALOME application. +*/ +#ifndef _SALOME_EXCEPTION_IDL_ +#define _SALOME_EXCEPTION_IDL_ + +/*! +Module SALOME regroups all idl definitions for SALOME Kernel +*/ + +module SALOME +{ +/*! +This enumeration contains the elements indicating the type of the exception. +*/ + enum ExceptionType + { + COMM, /*!< Communication problem */ + BAD_PARAM, /*!< Bad User parameters */ + INTERNAL_ERROR /*!< SALOME Bug, irrecoverable */ + }; +/*! +This struct contains a set of fields defining the structure of the exception. +*/ + struct ExceptionStruct + { + ExceptionType type; /*! ListOfServicesParameter; +/*! +This struct contains fields completely defining each service. +*/ + + struct Service + { + string ServiceName; /*! ListOfInterfaceService; +/*! +List of services. +*/ + typedef sequence ListOfServices ; +/*! +This struct contains fields defining each interface. +*/ + struct DefinitionInterface + { + string interfacename ; /*! ListOfDefInterface ; +/*! +List of interfaces. +*/ + typedef sequence ListOfInterfaces ; +/*! +List of names of components. +*/ + typedef sequence ListOfComponents ; +/*! +List of names of computers. +*/ + typedef sequence ListOfComputers ; +/*! +This struct contains GUI elements used for representation of the module in %IAPP component. +*/ + struct IAPP_Affich + { + string modulename; /*! ListOfIAPP_Affich ; + +/*! + This exception is raised when a %component, a %service or a % pathPrefix is not found. +*/ + exception NotFound + { + string what ; /*!If the specified interface doesn't exist, Notfound exception is thrown + \param interfacename Name of the interface + \return Required interface + */ + DefinitionInterface GetInterface(in string interfacename) raises(NotFound); + + // GetServiceList : operation to get a list of the services name of + // an interface of a component + /*! + Gets a list of names of services of a definite interface belonging to the component. + \note
If the specified interface doesn't exist, Notfound exception is thrown. + \param interfacename Name of the interface + \return List of services of the required interface + */ + ListOfServices GetServiceList(in string interfacename) raises(NotFound); + + + // GetService : operation to get one service of an interface of a component + + /*! + Gets a definite service of an interface of the component. + \note
If the required service or the specified interface don't exist, Notfound exception is thrown. + \param interfacename Name of the interface + \param servicename Name of the service + \return Required service + */ + + Service GetService(in string interfacename, + in string servicename) raises(NotFound); + + // GetDefaultService : operation to get the default service + // of an interface of a component +/*! + Gets the default service of an interface of the component. + \note
If the required service or the specified interface don't exist, Notfound exception is thrown. + \param interfacename Name of the interface + \return Required service + */ + + Service GetDefaultService(in string interfacename) raises(NotFound); + + // GetPathPrefix : operation to get the PathPrefix of a computer + /*! + Gets the prefix path of the computer containing the %component. + \note
If the required computer doesn't exist, Notfound exception is thrown + \param machinename Name of the machine + \return Prefix path + */ + + string GetPathPrefix(in string machinename) raises(NotFound); + +/*! + Sets/gets the constraint affected to the component + (to be resolved by LifeCycle for the computer choice) +*/ + readonly attribute string constraint ; + +/*! +Sets/gets the name of the component +*/ + readonly attribute string componentname; + +/*! +Defines whether the component can be multistudy or not +*/ + readonly attribute boolean multistudy; + +/*! +Defines the type of the component +*/ + readonly attribute ComponentType component_type ; + +/*! +Sets/gets the icone of the component (for IAPP) +*/ + readonly attribute string component_icone; + } ; +/*! \brief %Module catalog interface + +This interface is used for creation of the module catalog in %SALOME application. +*/ + interface ModuleCatalog + { + void ping(); + +/*! + Gets a list of names of computers of the catalog +*/ + ListOfComputers GetComputerList(); + +/*! +Gets the %PathPrefix of a computer +*/ + string GetPathPrefix(in string machinename) raises(NotFound); +/*! + Gets a list of names of components of the catalog +*/ + ListOfComponents GetComponentList(); +/*! +Gets a list of pair GUI elements (component name, component icone) +used for representation of the module in %IAPP component. +*/ + + ListOfIAPP_Affich GetComponentIconeList(); +/*! +Gets a list of names of components of a particular type, which belong to this catalog. +*/ + // GetComponentList : operation to get a list of the components name of + // a particular type of the catalog + ListOfComponents GetTypedComponentList(in ComponentType _component_type); + +/*! +Gets one component of the catalog. +*/ + Acomponent GetComponent(in string componentname) raises(NotFound); + } ; +}; diff --git a/idl/SALOME_Registry.idl b/idl/SALOME_Registry.idl new file mode 100644 index 0000000..b890429 --- /dev/null +++ b/idl/SALOME_Registry.idl @@ -0,0 +1,61 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_Registry.idl + +# ifndef __registry_idl__ +# define __registry_idl__ + +module Registry +{ + struct Infos + { + string name; + long pid; + string machine; + string adip; + long uid; + string pwname; + long tc_start; + long tc_hello; + long tc_end; + long difftime; + string cdir; + long status; + string ior; // client + }; + + typedef sequence AllInfos; + + interface Components + { + void ping(); + unsigned long add ( in Infos lesInfos ) ; + void remove ( in unsigned long id ) ; + unsigned long size() ; + AllInfos getall () ; + AllInfos history () ; + oneway void end() ; + oneway void hello( in unsigned long id ) ; + } ; +} ; + +# endif diff --git a/idl/SALOME_RessourcesCatalog.idl b/idl/SALOME_RessourcesCatalog.idl new file mode 100755 index 0000000..a0336d7 --- /dev/null +++ b/idl/SALOME_RessourcesCatalog.idl @@ -0,0 +1,64 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_RessourcesCatalog.idl +// Author : Estelle Deville +// $Header$ + +module SALOME_RessourcesCatalog{ + // Type Definitions + + //Proc_info : information about a processor + struct proc_info{ + long number; + string model_name; + float cpu_mhz; + float cache_size; + }; + + typedef sequence ListOfProc; + + //Computer_info : information about a computer + // Os and informations about processors + struct computer_info{ + string name; + string OS; + string OS_version; + ListOfProc procs; + }; + + enum ContainerType {Cpp, python, NP}; + typedef sequence ListOfContainerType; + + typedef sequence ListOfComputer; + + // exception thrown if a computer is not found in the catalog + + exception NotFound {}; + + //------------------------------------------------------------------ + //Interface + interface RessourcesCatalog { + ListOfComputer GetComputerList(); + ListOfContainerType GetContainerTypeList (in string computer) raises(NotFound); + computer_info GetComputerInfo(in string computer) raises(NotFound); + }; +}; diff --git a/idl/SALOME_Session.idl b/idl/SALOME_Session.idl new file mode 100644 index 0000000..d0c95e8 --- /dev/null +++ b/idl/SALOME_Session.idl @@ -0,0 +1,103 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_Session.idl +// Author : Paul RASCLE, EDF +// $Header$ + +#include "SALOME_Component.idl" +/*! \defgroup Kernel SALOME KERNEL module +*/ + +/*! \ingroup Kernel + + This package contains interfaces used for management of the session in %SALOME application. +*/ +module SALOME +{ +/*! \brief State of the session + + This enumeration contains values defining the state of the session + +*/ + enum SessionState {asleep, running} ; + +/*! \brief %Session State and Statistics + + + This struct contains a field list with general information about the session +*/ + + struct StatSession + { +/*! \brief State of the session + + It can be: + * -# asleep : no running study + * -# running : one or more running studies +*/ + SessionState state ; +/*! Number of running studies +*/ + short runningStudies ; +/*! It is True if GUI is active in the session +*/ + boolean activeGUI ; + } ; +/*! \brief Interface of the session + + The %session Server launches and stops GUI (Graphical User Interface). + The %session can be active without GUI (It can contain one or more running studies) +*/ + + interface Session + { +/*! + This exception is raised when trying to stop the %session with active GUI +*/ + exception GUIActive {} ; +/*! + This exception is raised when trying to stop the %session with a number of running studies. +*/ + exception RunningStudies {} ; + +/*! + Launches GUI in the session +*/ + void GetInterface(); + Engines::Component GetVisuGen(); + +/*! + Stops the %Session (It must be idle) +*/ + void StopSession() raises(GUIActive, RunningStudies) ; + +/*! + Gets Session State +*/ + StatSession GetStatSession() ; +/*! + Determines whether the server has already been loaded or not. +*/ + void ping(); + } ; + +} ; diff --git a/idl/SALOME_TestComponent.idl b/idl/SALOME_TestComponent.idl new file mode 100644 index 0000000..96de5a0 --- /dev/null +++ b/idl/SALOME_TestComponent.idl @@ -0,0 +1,36 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_TestComponent.idl +// Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA +// $Header$ + +#include "SALOME_Component.idl" + +module Engines +{ + + interface TestComponent : Component + { + string Coucou(in long L); + }; + +}; diff --git a/idl/SMESH/SMESH_BasicHypothesis.idl b/idl/SMESH/SMESH_BasicHypothesis.idl new file mode 100644 index 0000000..5884a45 --- /dev/null +++ b/idl/SMESH/SMESH_BasicHypothesis.idl @@ -0,0 +1,83 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_BasicHypothesis.idl +// Author : Paul RASCLE, EDF +// $Header$ + +#ifndef _SMESH_BASICHYPOTHESIS_IDL_ +#define _SMESH_BASICHYPOTHESIS_IDL_ + +#include "SALOME_Exception.idl" +#include "SMESH_Hypothesis.idl" + + +module SMESH +{ + interface SMESH_LocalLength : SMESH_Hypothesis + { + void SetLength(in double length) + raises (SALOME::SALOME_Exception); + double GetLength(); + }; + + interface SMESH_NumberOfSegments : SMESH_Hypothesis + { + void SetNumberOfSegments(in long segmentsNumber) + raises (SALOME::SALOME_Exception); + long GetNumberOfSegments(); + void SetScaleFactor(in double scaleFactor) + raises (SALOME::SALOME_Exception); + double GetScaleFactor(); + }; + + interface SMESH_MaxElementArea : SMESH_Hypothesis + { + void SetMaxElementArea(in double area) + raises (SALOME::SALOME_Exception); + double GetMaxElementArea(); + }; + + interface SMESH_MaxElementVolume : SMESH_Hypothesis + { + void SetMaxElementVolume(in double volume) + raises (SALOME::SALOME_Exception); + double GetMaxElementVolume(); + }; + + interface SMESH_Regular_1D : SMESH_1D_Algo + { + }; + + interface SMESH_MEFISTO_2D : SMESH_2D_Algo + { + }; + + interface SMESH_Quadrangle_2D : SMESH_2D_Algo + { + }; + + interface SMESH_Hexa_3D : SMESH_3D_Algo + { + }; +}; + +#endif diff --git a/idl/SMESH/SMESH_Gen.idl b/idl/SMESH/SMESH_Gen.idl new file mode 100644 index 0000000..c30750b --- /dev/null +++ b/idl/SMESH/SMESH_Gen.idl @@ -0,0 +1,112 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_Gen.idl +// Author : Paul RASCLE, EDF +// $Header$ + +#ifndef _SMESH_GEN_IDL_ +#define _SMESH_GEN_IDL_ + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" + +#include "GEOM_Gen.idl" +#include "GEOM_Shape.idl" + +#include "SMESH_Mesh.idl" +#include "SMESH_Hypothesis.idl" + +module SMESH +{ + typedef sequence shape_array; + + interface SMESH_Gen : Engines::Component, SALOMEDS::Driver + { + /*! + * Create an hypothesis that can be shared by differents parts of the mesh. + * An hypothesis is either: + * - a method used to generate or modify a part of the mesh (algorithm). + * - a parameter or a law used by an algorithm. + * Algorithms are 1D, 2D or 3D. + */ + SMESH_Hypothesis CreateHypothesis( in string anHyp, + in long studyId) + raises (SALOME::SALOME_Exception); + + /*! + * Create a Mesh object, given a geometry shape. + * Mesh is created empty (no points, no elements). + * Shape is explored via GEOM_Client to create local copies. + * of TopoDS_Shapes and bind CORBA references of shape & subshapes + * with TopoDS_Shapes + */ + SMESH_Mesh Init(in GEOM::GEOM_Gen geomEngine, + in long studyId, + in GEOM::GEOM_Shape aShape) + raises (SALOME::SALOME_Exception); + + /*! + * Create a Mesh object, without a geometry shape reference + */ +// SMESH_Mesh NewEmpty(in GEOM::GEOM_Gen geomEngine, +// in long studyId) +// raises (SALOME::SALOME_Exception); + + /*! + * Mesh a subShape. + * First, verify list of hypothesis associated with the subShape, + * return NOK if hypothesis are not sufficient + */ + boolean Compute(in SMESH_Mesh aMesh, in GEOM::GEOM_Shape aSubShape) + raises (SALOME::SALOME_Exception); + + /*! + * + */ + + boolean IsReadyToCompute(in SMESH_Mesh aMesh, in GEOM::GEOM_Shape aSubShape) + raises (SALOME::SALOME_Exception); + + /*! + * + */ + long_array GetSubShapesId(in GEOM::GEOM_Gen geomEngine, + in long studyId, + in GEOM::GEOM_Shape mainShape, + in shape_array listOfSubShape) + raises (SALOME::SALOME_Exception); + + /*! + * + */ + // long_array GetSubMeshesState(in GEOM::GEOM_Gen geomEngine, + // in long studyId, + // in shape_array listOfSubShape) + // raises (SALOME::SALOME_Exception); + + + }; + +}; + +#endif diff --git a/idl/SMESH/SMESH_Hypothesis.idl b/idl/SMESH/SMESH_Hypothesis.idl new file mode 100644 index 0000000..e3e82b8 --- /dev/null +++ b/idl/SMESH/SMESH_Hypothesis.idl @@ -0,0 +1,87 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_Hypothesis.idl +// Author : Paul RASCLE, EDF +// $Header$ + +#ifndef _SMESH_HYPOTHESIS_IDL_ +#define _SMESH_HYPOTHESIS_IDL_ + +#include "SALOME_Exception.idl" + +module SMESH +{ + interface SMESH_Hypothesis; + + typedef sequence ListOfHypothesis; + typedef sequence ListOfHypothesisName; + + interface SMESH_Hypothesis + { + /*! + * Get the Hypothesis typeName + */ + string GetName(); + + /*! + * Get the internal Id + */ + long GetId(); + }; + + interface SMESH_Algo : SMESH_Hypothesis + { + /*! + * Get list of hypothesis that can be used with this algorithm + */ + ListOfHypothesisName GetCompatibleHypothesis(); + + }; + + interface SMESH_1D_Algo : SMESH_Algo + { + /*! + * + */ + }; + + interface SMESH_2D_Algo : SMESH_Algo + { + /*! + * + */ + }; + + interface SMESH_3D_Algo : SMESH_Algo + { + /*! + * + */ + }; +}; + + // ----------------------------------------------------------------- + // Specific Algorithms in separate idl file + // ----------------------------------------------------------------- + + +#endif diff --git a/idl/SMESH/SMESH_Mesh.idl b/idl/SMESH/SMESH_Mesh.idl new file mode 100644 index 0000000..a051ada --- /dev/null +++ b/idl/SMESH/SMESH_Mesh.idl @@ -0,0 +1,277 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_Mesh.idl +// Author : Paul RASCLE, EDF +// $Header$ + +#ifndef _SMESH_MESH_IDL_ +#define _SMESH_MESH_IDL_ + +#include "SALOME_Exception.idl" +#include "SMESH_Hypothesis.idl" + +#include "GEOM_Shape.idl" +#include "MED.idl" + +module SMESH +{ + typedef sequence double_array ; + typedef sequence long_array ; + typedef sequence string_array ; + + enum log_command + { + ADD_NODE, + ADD_EDGE, + ADD_TRIANGLE, + ADD_QUADRANGLE, + ADD_TETRAHEDRON, + ADD_PYRAMID, + ADD_PRISM, + ADD_HEXAHEDRON, + REMOVE_NODE, + REMOVE_ELEMENT + }; + + struct log_block + { + long commandType; + long number; + double_array coords; + long_array indexes; + }; + + typedef sequence log_array; + + interface SMESH_subMesh; + interface SMESH_MeshEditor; + interface SMESH_Mesh + { + /*! + * Associate a Shape to a Mesh created with NewEmpty + */ + +// boolean SetMesh(in GEOM::GEOM_Shape aShape) +// raises (SALOME::SALOME_Exception); + + /*! + * Get the subMesh object associated to a subShape. The subMesh object + * gives access to nodes and elements IDs. + * SubMesh will be used instead of SubShape in a next idl version to + * adress a specific subMesh... + */ + SMESH_subMesh GetElementsOnShape(in GEOM::GEOM_Shape aSubShape) + raises (SALOME::SALOME_Exception); + + /*! + * Create a subMesh without reference to a subShape + */ +// SMESH_subMesh NewEmpty() +// raises (SALOME::SALOME_Exception); + + /*! + * Add hypothesis to the mesh, under a particular subShape + * (or the main shape itself) + * The Add method is only used to prepare the build of the mesh and store + * the algorithms and associated parameters. + * Actual job of mesh the shape is done by MESH_Gen. + * @params + * - aSubShape : subShape obtained by a shape explode in GEOM + * (or main shape) + * - anHyp : hypothesis object + * @return + * - OK if the hypothesis is compatible with the subShape + * (and all previous hypothesis on the subShape) + * - NOK if the hypothesis is not compatible with the subShape + * (or one previous hypothesis on the subShape) + * raises exception if hypothesis has not been created + */ + boolean AddHypothesis(in GEOM::GEOM_Shape aSubShape, in SMESH_Hypothesis anHyp) + raises (SALOME::SALOME_Exception); +// boolean AddHypothesis(in SMESH_subMesh aSubMesh, in SMESH_Hypothesis anHyp) +// raises (SALOME::SALOME_Exception); + + + /*! + * Remove an hypothesis previouly added with AddHypothesis. + */ + boolean RemoveHypothesis(in GEOM::GEOM_Shape aSubShape, + in SMESH_Hypothesis anHyp) + raises (SALOME::SALOME_Exception); +// boolean RemoveHypothesis(in SMESH_subMesh aSubMesh, +// in SMESH_Hypothesis anHyp) +// raises (SALOME::SALOME_Exception); + + /*! + * Get the list of hypothesis added on a subShape + */ + ListOfHypothesis GetHypothesisList(in GEOM::GEOM_Shape aSubShape) + raises (SALOME::SALOME_Exception); +// ListOfHypothesis GetHypothesisList(in SMESH_subMesh aSubMesh) +// raises (SALOME::SALOME_Exception); + + /*! + * Get the log of nodes and elements added or removed since previous + * clear of the log. + * @params + * - clearAfterGet : log is emptied after Get (safe if concurrents access) + */ + // string_array GetLog(in boolean clearAfterGet) + // raises (SALOME::SALOME_Exception); + log_array GetLog(in boolean clearAfterGet) + raises (SALOME::SALOME_Exception); + + /*! + * Clear the log of nodes and elements added or removed since previous + * clear. Must be used immediately after GetLog if clearAfterGet is false. + */ + void ClearLog() + raises (SALOME::SALOME_Exception); + + /*! + * Get the internal Id + */ + long GetId(); + + /*! + * Get the study Id + */ + long GetStudyId(); + + SMESH_MeshEditor GetMeshEditor() + raises (SALOME::SALOME_Exception); + + /*! + * Export Mesh with DAT and MED Formats + */ + void ExportDAT( in string file ) + raises (SALOME::SALOME_Exception); + void ExportMED( in string file ) + raises (SALOME::SALOME_Exception); + void ExportUNV( in string file ) + raises (SALOME::SALOME_Exception); + + /*! + * Get MED Mesh + */ + SALOME_MED::MESH GetMEDMesh() + raises (SALOME::SALOME_Exception); + + long NbNodes() + raises (SALOME::SALOME_Exception); + + long NbEdges() + raises (SALOME::SALOME_Exception); + + long NbFaces() + raises (SALOME::SALOME_Exception); + + long NbTriangles() + raises (SALOME::SALOME_Exception); + + long NbQuadrangles() + raises (SALOME::SALOME_Exception); + + long NbVolumes() + raises (SALOME::SALOME_Exception); + + long NbTetras() + raises (SALOME::SALOME_Exception); + + long NbHexas() + raises (SALOME::SALOME_Exception); + + long NbSubMesh() + raises (SALOME::SALOME_Exception); + }; + + interface SMESH_subMesh + { + /*! + * + */ + long GetNumberOfElements() + raises (SALOME::SALOME_Exception); + + /*! + * + */ + long GetNumberOfNodes() + raises (SALOME::SALOME_Exception); + + /*! + * + */ + long_array GetElementsId() + raises (SALOME::SALOME_Exception); + + /*! + * + */ + long_array GetNodesId() + raises (SALOME::SALOME_Exception); + + /*! + * Get SMESH_Mesh which stores nodes coordinates & elements definition + */ + SMESH_Mesh GetFather() + raises (SALOME::SALOME_Exception); + + /*! + * Get the internal Id + */ + long GetId(); + + /*! + * Get MED subMesh + */ + SALOME_MED::FAMILY GetFamily() + raises (SALOME::SALOME_Exception); + }; + + /* + * This interface makes modifications on the Mesh - removing elements and nodes + */ + interface SMESH_MeshEditor { + + + boolean RemoveElements(in long_array IDsOfElements) + raises (SALOME::SALOME_Exception); + + boolean RemoveNodes(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + + boolean AddNode(in double x, in double y, in double z) + raises (SALOME::SALOME_Exception); + + boolean AddEdge(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + + boolean AddFace(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + + boolean AddVolume(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + }; +}; + +#endif diff --git a/idl/SMESH_BasicHypothesis.idl b/idl/SMESH_BasicHypothesis.idl new file mode 100644 index 0000000..5884a45 --- /dev/null +++ b/idl/SMESH_BasicHypothesis.idl @@ -0,0 +1,83 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_BasicHypothesis.idl +// Author : Paul RASCLE, EDF +// $Header$ + +#ifndef _SMESH_BASICHYPOTHESIS_IDL_ +#define _SMESH_BASICHYPOTHESIS_IDL_ + +#include "SALOME_Exception.idl" +#include "SMESH_Hypothesis.idl" + + +module SMESH +{ + interface SMESH_LocalLength : SMESH_Hypothesis + { + void SetLength(in double length) + raises (SALOME::SALOME_Exception); + double GetLength(); + }; + + interface SMESH_NumberOfSegments : SMESH_Hypothesis + { + void SetNumberOfSegments(in long segmentsNumber) + raises (SALOME::SALOME_Exception); + long GetNumberOfSegments(); + void SetScaleFactor(in double scaleFactor) + raises (SALOME::SALOME_Exception); + double GetScaleFactor(); + }; + + interface SMESH_MaxElementArea : SMESH_Hypothesis + { + void SetMaxElementArea(in double area) + raises (SALOME::SALOME_Exception); + double GetMaxElementArea(); + }; + + interface SMESH_MaxElementVolume : SMESH_Hypothesis + { + void SetMaxElementVolume(in double volume) + raises (SALOME::SALOME_Exception); + double GetMaxElementVolume(); + }; + + interface SMESH_Regular_1D : SMESH_1D_Algo + { + }; + + interface SMESH_MEFISTO_2D : SMESH_2D_Algo + { + }; + + interface SMESH_Quadrangle_2D : SMESH_2D_Algo + { + }; + + interface SMESH_Hexa_3D : SMESH_3D_Algo + { + }; +}; + +#endif diff --git a/idl/SMESH_Gen.idl b/idl/SMESH_Gen.idl new file mode 100644 index 0000000..c30750b --- /dev/null +++ b/idl/SMESH_Gen.idl @@ -0,0 +1,112 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_Gen.idl +// Author : Paul RASCLE, EDF +// $Header$ + +#ifndef _SMESH_GEN_IDL_ +#define _SMESH_GEN_IDL_ + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" + +#include "GEOM_Gen.idl" +#include "GEOM_Shape.idl" + +#include "SMESH_Mesh.idl" +#include "SMESH_Hypothesis.idl" + +module SMESH +{ + typedef sequence shape_array; + + interface SMESH_Gen : Engines::Component, SALOMEDS::Driver + { + /*! + * Create an hypothesis that can be shared by differents parts of the mesh. + * An hypothesis is either: + * - a method used to generate or modify a part of the mesh (algorithm). + * - a parameter or a law used by an algorithm. + * Algorithms are 1D, 2D or 3D. + */ + SMESH_Hypothesis CreateHypothesis( in string anHyp, + in long studyId) + raises (SALOME::SALOME_Exception); + + /*! + * Create a Mesh object, given a geometry shape. + * Mesh is created empty (no points, no elements). + * Shape is explored via GEOM_Client to create local copies. + * of TopoDS_Shapes and bind CORBA references of shape & subshapes + * with TopoDS_Shapes + */ + SMESH_Mesh Init(in GEOM::GEOM_Gen geomEngine, + in long studyId, + in GEOM::GEOM_Shape aShape) + raises (SALOME::SALOME_Exception); + + /*! + * Create a Mesh object, without a geometry shape reference + */ +// SMESH_Mesh NewEmpty(in GEOM::GEOM_Gen geomEngine, +// in long studyId) +// raises (SALOME::SALOME_Exception); + + /*! + * Mesh a subShape. + * First, verify list of hypothesis associated with the subShape, + * return NOK if hypothesis are not sufficient + */ + boolean Compute(in SMESH_Mesh aMesh, in GEOM::GEOM_Shape aSubShape) + raises (SALOME::SALOME_Exception); + + /*! + * + */ + + boolean IsReadyToCompute(in SMESH_Mesh aMesh, in GEOM::GEOM_Shape aSubShape) + raises (SALOME::SALOME_Exception); + + /*! + * + */ + long_array GetSubShapesId(in GEOM::GEOM_Gen geomEngine, + in long studyId, + in GEOM::GEOM_Shape mainShape, + in shape_array listOfSubShape) + raises (SALOME::SALOME_Exception); + + /*! + * + */ + // long_array GetSubMeshesState(in GEOM::GEOM_Gen geomEngine, + // in long studyId, + // in shape_array listOfSubShape) + // raises (SALOME::SALOME_Exception); + + + }; + +}; + +#endif diff --git a/idl/SMESH_Hypothesis.idl b/idl/SMESH_Hypothesis.idl new file mode 100644 index 0000000..e3e82b8 --- /dev/null +++ b/idl/SMESH_Hypothesis.idl @@ -0,0 +1,87 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_Hypothesis.idl +// Author : Paul RASCLE, EDF +// $Header$ + +#ifndef _SMESH_HYPOTHESIS_IDL_ +#define _SMESH_HYPOTHESIS_IDL_ + +#include "SALOME_Exception.idl" + +module SMESH +{ + interface SMESH_Hypothesis; + + typedef sequence ListOfHypothesis; + typedef sequence ListOfHypothesisName; + + interface SMESH_Hypothesis + { + /*! + * Get the Hypothesis typeName + */ + string GetName(); + + /*! + * Get the internal Id + */ + long GetId(); + }; + + interface SMESH_Algo : SMESH_Hypothesis + { + /*! + * Get list of hypothesis that can be used with this algorithm + */ + ListOfHypothesisName GetCompatibleHypothesis(); + + }; + + interface SMESH_1D_Algo : SMESH_Algo + { + /*! + * + */ + }; + + interface SMESH_2D_Algo : SMESH_Algo + { + /*! + * + */ + }; + + interface SMESH_3D_Algo : SMESH_Algo + { + /*! + * + */ + }; +}; + + // ----------------------------------------------------------------- + // Specific Algorithms in separate idl file + // ----------------------------------------------------------------- + + +#endif diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl new file mode 100644 index 0000000..a051ada --- /dev/null +++ b/idl/SMESH_Mesh.idl @@ -0,0 +1,277 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_Mesh.idl +// Author : Paul RASCLE, EDF +// $Header$ + +#ifndef _SMESH_MESH_IDL_ +#define _SMESH_MESH_IDL_ + +#include "SALOME_Exception.idl" +#include "SMESH_Hypothesis.idl" + +#include "GEOM_Shape.idl" +#include "MED.idl" + +module SMESH +{ + typedef sequence double_array ; + typedef sequence long_array ; + typedef sequence string_array ; + + enum log_command + { + ADD_NODE, + ADD_EDGE, + ADD_TRIANGLE, + ADD_QUADRANGLE, + ADD_TETRAHEDRON, + ADD_PYRAMID, + ADD_PRISM, + ADD_HEXAHEDRON, + REMOVE_NODE, + REMOVE_ELEMENT + }; + + struct log_block + { + long commandType; + long number; + double_array coords; + long_array indexes; + }; + + typedef sequence log_array; + + interface SMESH_subMesh; + interface SMESH_MeshEditor; + interface SMESH_Mesh + { + /*! + * Associate a Shape to a Mesh created with NewEmpty + */ + +// boolean SetMesh(in GEOM::GEOM_Shape aShape) +// raises (SALOME::SALOME_Exception); + + /*! + * Get the subMesh object associated to a subShape. The subMesh object + * gives access to nodes and elements IDs. + * SubMesh will be used instead of SubShape in a next idl version to + * adress a specific subMesh... + */ + SMESH_subMesh GetElementsOnShape(in GEOM::GEOM_Shape aSubShape) + raises (SALOME::SALOME_Exception); + + /*! + * Create a subMesh without reference to a subShape + */ +// SMESH_subMesh NewEmpty() +// raises (SALOME::SALOME_Exception); + + /*! + * Add hypothesis to the mesh, under a particular subShape + * (or the main shape itself) + * The Add method is only used to prepare the build of the mesh and store + * the algorithms and associated parameters. + * Actual job of mesh the shape is done by MESH_Gen. + * @params + * - aSubShape : subShape obtained by a shape explode in GEOM + * (or main shape) + * - anHyp : hypothesis object + * @return + * - OK if the hypothesis is compatible with the subShape + * (and all previous hypothesis on the subShape) + * - NOK if the hypothesis is not compatible with the subShape + * (or one previous hypothesis on the subShape) + * raises exception if hypothesis has not been created + */ + boolean AddHypothesis(in GEOM::GEOM_Shape aSubShape, in SMESH_Hypothesis anHyp) + raises (SALOME::SALOME_Exception); +// boolean AddHypothesis(in SMESH_subMesh aSubMesh, in SMESH_Hypothesis anHyp) +// raises (SALOME::SALOME_Exception); + + + /*! + * Remove an hypothesis previouly added with AddHypothesis. + */ + boolean RemoveHypothesis(in GEOM::GEOM_Shape aSubShape, + in SMESH_Hypothesis anHyp) + raises (SALOME::SALOME_Exception); +// boolean RemoveHypothesis(in SMESH_subMesh aSubMesh, +// in SMESH_Hypothesis anHyp) +// raises (SALOME::SALOME_Exception); + + /*! + * Get the list of hypothesis added on a subShape + */ + ListOfHypothesis GetHypothesisList(in GEOM::GEOM_Shape aSubShape) + raises (SALOME::SALOME_Exception); +// ListOfHypothesis GetHypothesisList(in SMESH_subMesh aSubMesh) +// raises (SALOME::SALOME_Exception); + + /*! + * Get the log of nodes and elements added or removed since previous + * clear of the log. + * @params + * - clearAfterGet : log is emptied after Get (safe if concurrents access) + */ + // string_array GetLog(in boolean clearAfterGet) + // raises (SALOME::SALOME_Exception); + log_array GetLog(in boolean clearAfterGet) + raises (SALOME::SALOME_Exception); + + /*! + * Clear the log of nodes and elements added or removed since previous + * clear. Must be used immediately after GetLog if clearAfterGet is false. + */ + void ClearLog() + raises (SALOME::SALOME_Exception); + + /*! + * Get the internal Id + */ + long GetId(); + + /*! + * Get the study Id + */ + long GetStudyId(); + + SMESH_MeshEditor GetMeshEditor() + raises (SALOME::SALOME_Exception); + + /*! + * Export Mesh with DAT and MED Formats + */ + void ExportDAT( in string file ) + raises (SALOME::SALOME_Exception); + void ExportMED( in string file ) + raises (SALOME::SALOME_Exception); + void ExportUNV( in string file ) + raises (SALOME::SALOME_Exception); + + /*! + * Get MED Mesh + */ + SALOME_MED::MESH GetMEDMesh() + raises (SALOME::SALOME_Exception); + + long NbNodes() + raises (SALOME::SALOME_Exception); + + long NbEdges() + raises (SALOME::SALOME_Exception); + + long NbFaces() + raises (SALOME::SALOME_Exception); + + long NbTriangles() + raises (SALOME::SALOME_Exception); + + long NbQuadrangles() + raises (SALOME::SALOME_Exception); + + long NbVolumes() + raises (SALOME::SALOME_Exception); + + long NbTetras() + raises (SALOME::SALOME_Exception); + + long NbHexas() + raises (SALOME::SALOME_Exception); + + long NbSubMesh() + raises (SALOME::SALOME_Exception); + }; + + interface SMESH_subMesh + { + /*! + * + */ + long GetNumberOfElements() + raises (SALOME::SALOME_Exception); + + /*! + * + */ + long GetNumberOfNodes() + raises (SALOME::SALOME_Exception); + + /*! + * + */ + long_array GetElementsId() + raises (SALOME::SALOME_Exception); + + /*! + * + */ + long_array GetNodesId() + raises (SALOME::SALOME_Exception); + + /*! + * Get SMESH_Mesh which stores nodes coordinates & elements definition + */ + SMESH_Mesh GetFather() + raises (SALOME::SALOME_Exception); + + /*! + * Get the internal Id + */ + long GetId(); + + /*! + * Get MED subMesh + */ + SALOME_MED::FAMILY GetFamily() + raises (SALOME::SALOME_Exception); + }; + + /* + * This interface makes modifications on the Mesh - removing elements and nodes + */ + interface SMESH_MeshEditor { + + + boolean RemoveElements(in long_array IDsOfElements) + raises (SALOME::SALOME_Exception); + + boolean RemoveNodes(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + + boolean AddNode(in double x, in double y, in double z) + raises (SALOME::SALOME_Exception); + + boolean AddEdge(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + + boolean AddFace(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + + boolean AddVolume(in long_array IDsOfNodes) + raises (SALOME::SALOME_Exception); + }; +}; + +#endif diff --git a/idl/SUPERV.idl b/idl/SUPERV.idl index cfe17a4..c92b7bf 100644 --- a/idl/SUPERV.idl +++ b/idl/SUPERV.idl @@ -1,9 +1,27 @@ -// File: SUPERV.idl -// Created: Jan 03 2002 -// Author: Jean Rahuel -// Project: SALOME -// Copyright : CEA/DEN/DMSS/LGLS -// $Header: +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERV.idl +// Author : Jean Rahuel +// $Header: /*! \file SUPERV.idl This file contains a set of interfaces of the %SUPERVISION module */ @@ -439,6 +457,8 @@ Returns the position of the node along Y-axis. */ long Y() ; + long CpuUsed() ; + } ; ////////////// diff --git a/idl/SUPERV/SUPERV.idl b/idl/SUPERV/SUPERV.idl new file mode 100644 index 0000000..c92b7bf --- /dev/null +++ b/idl/SUPERV/SUPERV.idl @@ -0,0 +1,896 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERV.idl +// Author : Jean Rahuel +// $Header: + +/*! \file SUPERV.idl This file contains a set of interfaces of the %SUPERVISION module +*/ +/*! + \defgroup Supervision SALOME SUPERVISION module +*/ +#ifndef __SUPERV_IDL__ +#define __SUPERV_IDL__ + +#include "SALOME_ModuleCatalog.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" +/*! \ingroup Supervision + The main package of interfaces of %SUPERVISION module +*/ +module SUPERV { + +/*! +This enumeration contains a set of elements defining the type of the port. +\note
In general, ports represent input or output parameters of the functions, +implemented in different kinds of nodes of the graph. +*/ + enum KindOfPort { UndefinedParameter , ServiceParameter , GateParameter , + InLineParameter , LoopParameter , SwitchParameter , + EndSwitchParameter , GOTOParameter } ; + +/*! +This enumeration contains a set of elements defining the type of the node. +*/ + enum KindOfNode { FactoryNode , DataFlowNode , ComputingNode , + InLineNode , LoopNode , EndLoopNode , + SwitchNode , EndSwitchNode , GOTONode , UnknownNode }; + +/*! +This struct contains fields defining the date. +*/ + struct SDate { + short Second; + short Minute; + short Hour; + short Day; + short Month; + short Year; + }; +/*! +This enumeration contains a set of elements defining the type of operation, which has been performed +on this node(graph). +*/ + + enum GraphEvent { UndefinedEvent , NoEvent , NewThreadEvent , + WaitingEvent , ReadyEvent , + RunningEvent , DoneEvent , ErroredEvent , + SuspendEvent , ResumeEvent , + KillEvent , StopEvent , + ReRunEvent , ReStartEvent } ; + + // UndefinedState : Non existing Node, Port etc... +/*! +This enumeration contains a set of elements defining the current state of the node(graph). +*/ + + enum GraphState { UndefinedState , NoState , EditingState , SuspendState , + WaitingState , ReadyState , SuspendReadyState , + RunningState , + DoneState , ErrorState , + SuspendDoneState , SuspendErroredState , + KillState , StopState , + ReRunState , ReStartState , + NumberOfGraphStates } ; + + typedef sequence ListOfStrings ; + + interface Value ; + + interface Link ; + + typedef sequence ListOfLinks ; + + interface Port ; + + typedef sequence ListOfPorts ; + + interface CNode ; + interface FNode ; + interface INode ; + interface GNode ; + interface LNode ; + interface ELNode ; + interface SNode ; + interface ESNode ; + typedef sequence ListOfCNodes ; + typedef sequence ListOfFNodes ; + typedef sequence ListOfINodes ; + typedef sequence ListOfGNodes ; + typedef sequence ListOfLNodes ; + typedef sequence ListOfELNodes ; + typedef sequence ListOfSNodes ; + typedef sequence ListOfESNodes ; + + struct ListOfNodes { + ListOfCNodes CNodes ; + ListOfFNodes FNodes ; + ListOfINodes INodes ; + ListOfGNodes GNodes ; + ListOfLNodes LNodes ; + ListOfELNodes ELNodes ; + ListOfSNodes SNodes ; + ListOfESNodes ESNodes ; + } ; + + interface Graph ; + + typedef sequence ListOfGraphs ; + + // ToSuspendState : will be Suspended before running if waiting or + // will be Suspended while running or + // will be Suspended after run + // ToSuspendStartState : will be Suspended at the beginning of execution + // ToSuspendDoneState : will be Suspended after run +/*! +This enumeration contains a set of elements defining the %ControlState of the node. +The %ControlState gives a possibility to determine the "control actions" which have been done by +the user (Suspend, SuspendDone, Kill, etc...). +*/ + enum ControlState { VoidState , ToSuspendStartState , + ToSuspendState , ToSuspendDoneState , + ToKillState , ToKillDoneState , ToStopState , + NumberOfControlStates } ; +/*! +The AutomatonState is an internal state of the automaton of the Executor +of the %SuperVision %Engine. It is used for inner debugging purposes only. +*/ + + enum AutomatonState { UnKnownState , + DataUndefState , + DataWaitingState , + DataReadyState , + SuspendedReadyState, + SuspendedReadyToResumeState , + ResumedReadyState , + KilledReadyState , + StoppedReadyState , + ExecutingState , + SuspendedExecutingState , + ResumedExecutingState , + KilledExecutingState , + StoppedExecutingState , + SuccessedExecutingState , + ErroredExecutingState , + SuspendedSuccessedState , + SuspendedErroredState, + ResumedSuccessedState , + ResumedErroredState , + KilledSuccessedState , + KilledErroredState , + StoppedSuccessedState , + StoppedErroredState , + SuccessedState , + ErroredState , + SuspendedState , + KilledState , + StoppedState , + SuspendedSuccessedToReStartState , + SuspendedErroredToReStartState , + ReRunnedState , + ReStartedState , + NumberOfAutomatonStates + } ; + + + + + + + + + //////////////// +/*! \brief interface %SuperG + +This interface contains a set of methods necessary for management of a %graph. +*/ + interface SuperG : Engines::Component, SALOMEDS::Driver { + //////////////// +/*! + Constructs a graph with possibility to read/edit it + \param aGraph %aGraphName or %aGraphXmlFile +*/ + SUPERV::Graph Graph(in string aGraph ) ; // aGraphName or aGraphXmlFile + +/*! + Constructs a read Only graph ( for execution ). + \note
In this graph there is also a possibility to update nodes, coordinates of the links, + of container names and input data. + \param aGraph %aGraphName or %aGraphXmlFile +*/ + SUPERV::Graph GraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile + +/*! +Creates a value for %Input method in interface %Node. +*/ + SUPERV::Value StringValue( in string aString ) ; + SUPERV::Value AnyValue( in any anAny ) ; +/*! + Gets a graph from its %IOR +*/ + SUPERV::Graph getGraph(in string ior); // get Graph from is IOR + + }; + +/*! \brief Interface of a node + +This interface includes a set of methods used for management of the nodes in the graph. +*/ + + ////////////// + interface CNode : Engines::Component { + ////////////// + + +/*! +Returns the name of the node(graph). +*/ + string Name() ; +/*! +Returns the service of this node . +*/ + SALOME_ModuleCatalog::Service Service() ; +/*! +Returns the type of the node. +*/ + SUPERV::KindOfNode Kind() ; +/*! +Returns the date of creation of the node(graph). +*/ + SUPERV::SDate CreationDate() ; +/*! +Returns the date of last update of the node(graph). +*/ + SUPERV::SDate LastUpdateDate() ; +/*! +Returns the name of the version of the node(graph). +*/ + string Version() ; +/*! +Returns the name of the author of the node(graph). +*/ + string Author() ; +/*! +Returns the string containing comments about this node(graph). +*/ + string Comment() ; + + +/*! +Sets the name of the node(graph). Returns True if it is updated. +*/ + boolean SetName(in string aNewName ) ; +/*! +Sets the name of the author. Returns True if it is updated. +*/ + boolean SetAuthor(in string anAuthor ) ; +/*! +Allows to update the comments about this node(graph). +*/ + boolean SetComment(in string aComment ) ; + +/*! + Gets a port of the node. +*/ + SUPERV::Port Port( in string aParameterName ) ; + +/*! + Enters a value into an Input %Port +*/ + SUPERV::Port Input( in string InputParameterName , + in Value aValue ) ; + + + // Create an Input %Port and an Output Port in LabelNode or ControlNode + // boolean BusPort( in string InOutParameterName , + // in string InOutParameterType , + // out SUPERV::Port InputPort , + // out SUPERV::Port OutputPort ) ; + // boolean BusPorts( in string InputParameterName , + // in string InputParameterType , + // in string OutputParameterName , + // in string OutputParameterType , + // out SUPERV::Port InputPort , + // out SUPERV::Port OutputPort ) ; + +/*! + Gets a list of ports of the node(graph) +*/ + SUPERV::ListOfPorts Ports() ; + + // Get list of Links + SUPERV::ListOfLinks Links() ; + +/*! +Returns True if this node is a graph. +\note
A node of the graph can also represent in its turn another graph. +*/ + boolean IsGraph() ; +/*! +Returns True if the node appears to be a %computing node. +*/ + boolean IsComputing() ; + boolean IsFactory() ; + boolean IsInLine() ; + boolean IsGOTO() ; + boolean IsLoop() ; + boolean IsEndLoop() ; + boolean IsSwitch() ; + boolean IsEndSwitch() ; + +/*! + Returns the number of SubGraphs +*/ + long SubGraph() ; + +/*! +Returns nuber of threads. +*/ + long Thread() ; + +/*! + Returns True if the node(graph) is waiting for Data input +*/ + boolean IsWaiting() ; + +/*! + Returns True if the node(graph) is ready for execution +*/ + boolean IsReady() ; + + /*! + Returns True if the node(graph) is running +*/ + boolean IsRunning() ; + +/*! + Returns True if execution is finished +*/ + + boolean IsDone() ; +/*! + Returns True if execution is suspended +*/ + + boolean IsSuspended() ; +/*! +Returns the current state of the graph. +*/ + SUPERV::GraphState State() ; + + // wait for ready_to_run state, Suspend and return + boolean ReadyW() ; + + // wait for running state, Suspend and return + boolean RunningW() ; + + // wait for done state, Suspend and return + boolean DoneW() ; + + // wait for Suspend state and return + boolean SuspendedW() ; + + // boolean Ping(); + + // if not running : will be killed when ready to run + // if running : Kill immediatly + boolean Kill(); + + // will be killed only just after running (only for nodes) + boolean KillDone(); + + // if not running : will be stopped when ready to run + // if running : Stop immediatly + boolean Stop(); + + // if not running : will be Suspended when ready to run + // if running : Suspend immediatly + boolean Suspend(); + + // will be Suspended only just after running + boolean SuspendDone(); + + // if Suspended : running will continue + // if not Suspended : cancel current ControlState ( Suspend, Kill, ...) + boolean Resume(); + +/*! + Restarts execution of the node(graph). +*/ + boolean ReRun(); +/*! +Restarts execution of the graph beginning from a definite node. +*/ + boolean ReRunAt( in string aNodeName ); + +/*! + Restarts and suspends execution of the node(graph). +*/ + boolean ReStart(); +/*! +Restarts and suspends execution of the graph beginning from a definite node. +*/ + boolean ReStartAt( in string aNodeName ); + +/*! + Returns automaton execution state of the node(graph). +*/ + SUPERV::AutomatonState AutoState() ; + + // Control state required : Kill, Suspend, Stop + SUPERV::ControlState Control() ; +/*! +Clears the control state of the node(graph). +*/ + void ControlClear() ; + + boolean ContainerKill(); +/*! +Sets the position of the node in the window. +*/ + void Coords( in long X , in long Y ) ; +/*! +Returns the position of the node along X-axis. +*/ + long X() ; +/*! +Returns the position of the node along Y-axis. +*/ + long Y() ; + + long CpuUsed() ; + + } ; + + ////////////// + interface FNode : CNode { + ////////////// + + string GetComponentName() ; + string GetInterfaceName() ; + string GetContainer() ; + boolean SetComponentName(in string aComponentName ) ; + boolean SetInterfaceName(in string anInterfaceName ) ; + boolean SetContainer(in string aContainer ) ; + } ; + + // InLine Nodes + ////////////// + interface INode : CNode { + ////////////// + + void SetPyFunction( in string FuncName , + in SUPERV::ListOfStrings aPyInitFunction ) ; + SUPERV::ListOfStrings PyFunction() ; + string PyFuncName() ; + + // Create Input/Output Port in InLineNodes + SUPERV::Port InPort( in string aParameterName , in string aParameterType ) ; + SUPERV::Port OutPort( in string aParameterName , in string aParameterType ) ; + } ; + + // GOTO/EndLoop/EndSwitch Nodes + /////////////// + interface GNode : INode { + /////////////// + + boolean SetCoupled( in string anInLineNode ) ; + SUPERV::INode Coupled() ; + } ; + + // Loop Nodes + /////////////// + interface LNode : GNode { + /////////////// + + void SetPyInit( in string MoreName , + in SUPERV::ListOfStrings aPyMoreFunction ) ; + SUPERV::ListOfStrings PyInit() ; + string PyInitName() ; + + void SetPyMore( in string MoreName , + in SUPERV::ListOfStrings aPyMoreFunction ) ; + SUPERV::ListOfStrings PyMore() ; + string PyMoreName() ; + + void SetPyNext( in string NextName , + in SUPERV::ListOfStrings aPyNextFunction ) ; + SUPERV::ListOfStrings PyNext() ; + string PyNextName() ; + + } ; + + // EndOfLoop Nodes + //////////////// + interface ELNode : GNode { + //////////////// + } ; + + // Switch Nodes + /////////////// + interface SNode : GNode { + /////////////// + } ; + + // EndOfSwitch Nodes + //////////////// + interface ESNode : GNode { + //////////////// + } ; + +/*! \brief Interface of a graph + +This interface includes a set of methods used for management of the graphs in %SUPERVISION module. +*/ + + /////////////// + interface Graph : INode { + /////////////// + + // Create a Computing Node in a Graph + SUPERV::CNode CNode( in SALOME_ModuleCatalog::Service aService ) ; + + // Create a Factory Node in a Graph + SUPERV::FNode FNode( in string aComponentName , + in string anInterfaceName , + in SALOME_ModuleCatalog::Service aService ) ; + + // Create an InLine Node in a Graph + SUPERV::INode INode( in string FuncName , in ListOfStrings aPythonFunction ) ; + + // Create a GOTO node and link to the corresponding InLine node + SUPERV::GNode GNode( in string FuncName , in ListOfStrings aPythonFunction , + in string anINode ) ; + + // Create a "for" or "while" node and the corresponding end of loop node + SUPERV::LNode LNode( in string InitName , in ListOfStrings InitFunction , + in string MoreName , in ListOfStrings MoreFunction , + in string NextName , in ListOfStrings NextFunction , + out SUPERV::INode anEndOfLoop ) ; + + // Create a "if/elseif/else" or "switch" node and the corresponding end node + SUPERV::SNode SNode( in string FuncName , in ListOfStrings aPythonFunction , + out SUPERV::INode anEndOfSwitch ) ; + + // Create a CORBA Component Object Reference + Engines::Component ComponentRef( in string aComputerContainer , + in string aComponentName ) ; + +/*! + Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph +*/ + SUPERV::Link Link( in SUPERV::Port OutputPort , + in SUPERV::Port InputPort ) ; + +/*! +Imports a graph into a file with XML format +*/ + boolean Import( in string anXmlFile ) ; +/*! +Exports a graph from a file with XML format +*/ + boolean Export( in string anXmlFile ) ; +/*! +Returns True if the graph is read Only. +*/ + boolean IsReadOnly() ; + +/*! + Starts asynchronous execution of the graph. +*/ + boolean Run() ; + +/*! + Assigns to the %Node an %Event and a %State of the %Node, if the Event is + available. And returns immediately Nil, NoEvent and NoState if not. + Returns false if the graph is finished, suspended, killed or stopped. +\param aNode %Node for which this method is called +\param anEvent An operation, which has been performed on this node(graph). +\param aState Current state of the graph +*/ + boolean EventNoW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent , + out SUPERV::GraphState aState ) ; + +/*! + Assigns to the %Node an %Event and a %State of the %Node, if the Event is + available. Waits if it is not available at the current moment. + Returns false if the graph is finished, suspended, killed or stopped. +\param aNode %Node for which this method is called +\param anEvent An operation, which has been performed on this node(graph). +\param aState Current state of the graph +*/ + boolean Event( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent , + out SUPERV::GraphState aState ) ; + + // Same as Event but execution of the thread is suspended between the + // return of EventW and the next call to EventW +/*! + Assigns to the %Node an %Event and a %State of the %Node, if the Event is + available. And returns immediately Nil, NoEvent and NoState if not. + Returns false if the graph is finished, suspended, killed or stopped. +\note
Execution of the thread is suspended between the return of this +method and its next usage. +\param aNode %Node for which this method is called +\param anEvent An operation, which has been performed on this node(graph). +\param aState Current state of the graph +*/ + boolean EventW( out SUPERV::CNode aNode , out SUPERV::GraphEvent anEvent , + out SUPERV::GraphState aState ) ; + + long LevelMax() ; + SUPERV::ListOfNodes LevelNodes( in long aLevel ) ; + long ThreadsMax() ; +/*! +Returns the number of independent subgraphs +*/ + long GraphsNumber() ; +/*! +Returns the number of currently running threads. +*/ + long Threads(); +/*! +Returns the number of suspended threads. +*/ + long SuspendedThreads(); +/*! +Returns True if the graph is valid. +*/ + boolean IsValid() ; +/*! +Returns True if the graph can be executed. +*/ + boolean IsExecutable() ; +/*! +Returns True if the graph represents a working algorithm. +*/ + boolean IsDataFlow() ; + +/*! +Returns True if the graph is being currently edited. +*/ + boolean IsEditing() ; +/*! +Returns True if the graph is being currently executed. +*/ + boolean IsExecuting() ; + + long LastLevelDone() ; + +/*! + Launches step-by-step execution of the graph. +\note The execution is suspended immediatly after performance of operations of the first node and +user can specify the nodes, where execution will be again suspended after its resuming. +*/ + boolean Start() ; +/*! +Allows to copy one graph into another. +*/ + SUPERV::Graph Copy() ; +/*! +Merges two graphs +*/ + boolean Merge( in Graph aGraph ) ; +/*! +Returns a list of nodes of the graph. +*/ + SUPERV::ListOfNodes Nodes() ; +/*! +Returns a list of links of the graph. +*/ + SUPERV::ListOfLinks GLinks() ; +/*! +Gets IOR of the garph. +*/ + string getIOR(); + +/*! +Returns a list of graphs. +\note Not implemented +*/ + SUPERV::ListOfGraphs Graphs() ; + + } ; + + + + + +/*! \brief Interface of the %link + +This interface contains a set of methods used for representation and management of the links +connecting nodes in a %graph. +*/ + + ////////////// + interface Link : Engines::Component { + ////////////// +/*! +Associates an %Output %Port to the Link +*/ + SUPERV::Port OutPort() ; + +/*! +Associates an %Input %Port to the Link +*/ + SUPERV::Port InPort() ; + + // For GUI : +/*! \name Methods used for representation of links in GUI of %SALOME application : +*/ +/*@{*/ +/*! +Returns the number of coordinate points which are included in the link. +\note
Every link can contain a set of coordinate points which constitute it. These points have +index numbers (beginning from 1) and coordinates defining their position in the window. Indexing of +the points starts from input port to output port of the corresponding link. +*/ + long CoordsSize() ; +/*! +Adds a coordinate point to the link. +\param index Index of the point. +\param X Coordinates of the point. +\param Y Coordinates of the point. +*/ + boolean AddCoord( in long index , in long X , in long Y ) ; +/*! +Changes the location of a definite coordinate point of the link. +\param index Index of the point. +\param X Coordinates of the point. +\param Y Coordinates of the point. +*/ + + boolean ChangeCoord( in long index , in long X , in long Y ) ; +/*! +Removes a coordinate point of the link. +\param index Index of the point. +*/ + + boolean RemoveCoord( in long index ) ; + +/*! +Sets the location of a coordinate point of the link. +\param index Index of the point. +\param X Coordinates of the point. +\param Y Coordinates of the point. +*/ + + boolean Coords( in long index , out long X , out long Y ) ; +/*@}*/ + + // void Destroy() ; + + } ; + +/*! \brief %Value interface + +This interface contains a set of methods used for setting initial parameters of the ports +*/ + + /////////////// + interface Value : Engines::Component { + /////////////// +/*! +Converts the given value into a value of string type. +*/ + string ToString() ; +/*! +Converts the given value into a value of independant data type. +*/ + any ToAny() ; +/*! +Returns True if the value represents an IOR. +*/ + boolean IsIOR() ; +/*! +Gets data type of the component. +*/ + string ComponentDataType() ; + + // void Destroy() ; + + } ; +/*! \brief %Port interface + +This interface contains a set of methods used for management of the ports. +*/ + + ////////////// + interface Port : Value { + ////////////// + +/*! + Gives a value to an Input %Port +*/ + boolean Input( in SUPERV::Value aValue ) ; + +/*! +Returns the node of the port +*/ + SUPERV::CNode Node() ; +/*! +Sets the name of the port. +*/ + string Name() ; + + // Type of a Port + string Type() ; + + // Link of an Input Port +/*! +Returns the link of an %Input %Port +*/ + SUPERV::Link Link() ; + +/*! +Returns a list of links of an Input %Port of an EndSwitchNode +*/ + SUPERV::ListOfLinks Links() ; + +/*! +Returns True if this port appears to be an %Input %Port of a Node +*/ + boolean IsInput() ; + +/*! +Returns True if an %Input %Value exists for that %Input %Port (without link) +*/ + boolean HasInput() ; + +/*! +Returns True if the %Port is linked (without value) +*/ +// Port with link (without Value) + boolean IsLinked() ; + + // Kind of a Port + SUPERV::KindOfPort Kind() ; + + // Port from the service of the node +/*! +Returns True if the %Port is a parameter of a service +*/ + boolean IsParam() ; + // Port is a Gate of the node +/*! +Returns True if the %Port appears to be a GatePort of the node +*/ + boolean IsGate() ; + // Port is a parameter of an InLineNode + boolean IsInLine() ; + // Port is a LoopParameter (InitLoop or DoLoop) of an LoopNode + boolean IsLoop() ; + // Port is an output parameter of a SwitchNode connected to an InGate +/*! +Returns True if the %Port appears to be a parameter of a switch node +*/ + // Port is a parameter of a switch node + boolean IsSwitch() ; + // Port is an Input parameter of a EndSwitchNode connected to several output ports + boolean IsEndSwitch() ; + + SUPERV::GraphState State() ; + boolean IsDone() ; + + } ; + +}; +#endif diff --git a/idl/SubComponent.idl b/idl/SubComponent.idl new file mode 100644 index 0000000..6f2295e --- /dev/null +++ b/idl/SubComponent.idl @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SubComponent.idl +// Author : +// $Header$ + +#ifndef _SUBCOMPONENT_IDL +#define _SUBCOMPONENT_IDL + +#include "SALOME_Component.idl" + +module SuperVisionTest { + + interface SubComponent : Engines::Component { + void Sub( in double x , in double y , out double z ) ; + } ; +}; + + +#endif diff --git a/idl/SyrComponent.idl b/idl/SyrComponent.idl new file mode 100755 index 0000000..aaa3335 --- /dev/null +++ b/idl/SyrComponent.idl @@ -0,0 +1,77 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SyrComponent.idl +// Author : +// $Header$ + +#ifndef _SYRCOMPONENT_IDL +#define _SYRCOMPONENT_IDL + +#include "SALOME_Component.idl" + +module SuperVisionTest { + + typedef sequence SeqOfSyr ; + + interface ListOfSyr ; + + interface Syr ; + + interface SyrComponent : Engines::Component { + + long C_ISEVEN( in long anInteger ) ; + long C_ISONE( in long anOddInteger ) ; + long C_M3( in long anOddInteger ) ; + long C_M3P1( in long anOddInteger ) ; + long C_DIV2( in long anEvenInteger ) ; + long C_INCR( in long aCount ) ; + long C_MIN( in long aMinVal , in long anInteger ) ; + long C_MAX( in long aMaxVal , in long anInteger ) ; + ListOfSyr C_LISTOFSYR() ; + ListOfSyr C_AVERAGE( in ListOfSyr aListOfSyr , in long anInteger , + in long aCount , out double anAverage ) ; + + Syr Init( in long anOddInteger ) ; + + }; + + interface ListOfSyr : Engines::Component { + SuperVisionTest::SeqOfSyr GetSeqOfSyr() ; + void SetSeqOfSyr( in SuperVisionTest::SeqOfSyr aSeqOfSyr ) ; + }; + + interface Syr : SyrComponent { + + long Initial() ; + long Current() ; + long IsEven() ; + long IsOne() ; + long Count() ; + void M3p1() ; + void Div2() ; + void Incr() ; + + }; + +} ; + +#endif diff --git a/idl/SyrControlComponent.idl b/idl/SyrControlComponent.idl new file mode 100644 index 0000000..cca1589 --- /dev/null +++ b/idl/SyrControlComponent.idl @@ -0,0 +1,39 @@ +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SyrControlComponent.idl +// Author : Jean Rahuel +// $Header: + +#ifndef _SYRCONTROLCOMPONENT_IDL +#define _SYRCONTROLCOMPONENT_IDL + +#include "SALOME_Component.idl" + +module SuperVisionTest { + + interface SyrControlComponent : Engines::Component { + + void L_OneEven( in long ValOne , in long ValEven , + out long Finished , out long Incr , + out long Even , out long Odd ) ; + + void C_NotOneIsEven( out long ValOne , out long ValEven ) ; + + void LOOPN( in long InLoop , in long NN , in long KK , + in long min , in long max , + out long OutLoop , out long N , out long K ) ; + + void WHILENOTONE( in long N , out long OutLoop ) ; + + void IFNOTEVEN( in long N , out long Odd , out long Even ) ; + + void LOOPi( in long InLoop , in long ii , out long OutLoop , out long i ) ; + + void WHILEEVEN( in long N , out long OutLoop ) ; + + }; + +}; +#endif diff --git a/idl/TestNotif.idl b/idl/TestNotif.idl new file mode 100644 index 0000000..fa20946 --- /dev/null +++ b/idl/TestNotif.idl @@ -0,0 +1,33 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : TestNotif.idl + +# ifndef __TESTNOTIF_IDL_ +# define __TESTNOTIF_IDL_ + +interface Solver +{ + boolean Connect(); + oneway void Start() ; + oneway void ReStart() ; +} ; +# endif diff --git a/idl/TypeData.idl b/idl/TypeData.idl new file mode 100644 index 0000000..c3d99e2 --- /dev/null +++ b/idl/TypeData.idl @@ -0,0 +1,44 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : TypeData.idl + +#ifndef _SALOME_TYPEDATA_IDL_ +#define _SALOME_TYPEDATA_IDL_ + +module Engines +{ + + typedef sequence DoubleVec ; + typedef sequence IntVec; + + typedef struct CSR { + unsigned long nbpos; + unsigned long nbval; + IntVec pos; + IntVec col; + DoubleVec data; + } CSRMatStruct; + +} ; + +#endif + diff --git a/idl/VISU/VISU_Gen.idl b/idl/VISU/VISU_Gen.idl new file mode 100644 index 0000000..ff5e358 --- /dev/null +++ b/idl/VISU/VISU_Gen.idl @@ -0,0 +1,928 @@ +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : VISU_Gen.idl +// Author : Alexey Petrov + +/*! \file VISU_Gen.idl This file conatins a set of interfaces of %VISU module. + This module will provide various forms of data visualization in %SALOME application. + These forms include data tables, XY plots, 3d representations + and combination of these forms. +*/ +/*! + \defgroup Visu SALOME VISU module +*/ + +#ifndef __VISU_GEN__ +#define __VISU_GEN__ + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" +#include "SALOMEDS_Attributes.idl" +#include "MED.idl" + +/*! \ingroup Visu + The main package of interfaces of the module %VISU. +*/ +module VISU { + //------------------------------------------------------- + typedef string IdType; + enum Scaling{ LINEAR, LOGARITHMIC}; + enum Entity{ NODE, EDGE, FACE, CELL}; + //enum Entity{ CELL, FACE, EDGE, NODE}; +/*! + This enumeration contains a set of elements defining the type of the module. +*/ + enum VISUType{ TNONE, + TCURVE, TTABLE, TCONTAINER, TMESH, TSCALARMAP, + TISOSURFACE, TDEFORMEDSHAPE, TCUTPLANES, TCUTLINES, TVECTORS, TSTREAMLINES, + TVISUGEN, TVIEWMANAGER, TRESULT, + TXYPLOT, TTABLEVIEW, TVIEW3D, + TENTITY, TFAMILY, TGROUP, TFIELD, TTIMESTAMP, + TALL}; + interface Base { +/*! + Returns ID of the object. +*/ + IdType GetID(); +/*! +Returns the type of the presentable object +*/ + VISUType GetType(); + }; +/*! \brief Presentable object interface + + It is the root class of all presentable objects. +*/ + interface PrsObject : Base{ + }; + //------------------------------------------------------- +/*! \brief %Table representation interface + +Presentation parameters of the %Table view. +*/ + interface Table : PrsObject { +/*! +Sets the title of the table. +*/ + void SetTitle(in string theTitle); +/*! +Gets the title of the table. +*/ + string GetTitle(); +/*! + This enumeration contains a set of elements defining the orientation of the table. +*/ + enum Orientation{ HORIZONTAL, /*!Returns nil if there are no views currently opened. +*/ + + View GetCurrentView(); +/*! \brief Creation of a 3d %View. + + Returns an object reference to the newly created 3d %View. +*/ + View3D Create3DView(); + + TableView CreateTableView(in Table theTable); + + XYPlot CreateXYPlot(); + + void Destroy(in View theView); + + }; +}; +#endif + + diff --git a/idl/VISU_Gen.idl b/idl/VISU_Gen.idl new file mode 100644 index 0000000..ff5e358 --- /dev/null +++ b/idl/VISU_Gen.idl @@ -0,0 +1,928 @@ +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : VISU_Gen.idl +// Author : Alexey Petrov + +/*! \file VISU_Gen.idl This file conatins a set of interfaces of %VISU module. + This module will provide various forms of data visualization in %SALOME application. + These forms include data tables, XY plots, 3d representations + and combination of these forms. +*/ +/*! + \defgroup Visu SALOME VISU module +*/ + +#ifndef __VISU_GEN__ +#define __VISU_GEN__ + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" +#include "SALOMEDS_Attributes.idl" +#include "MED.idl" + +/*! \ingroup Visu + The main package of interfaces of the module %VISU. +*/ +module VISU { + //------------------------------------------------------- + typedef string IdType; + enum Scaling{ LINEAR, LOGARITHMIC}; + enum Entity{ NODE, EDGE, FACE, CELL}; + //enum Entity{ CELL, FACE, EDGE, NODE}; +/*! + This enumeration contains a set of elements defining the type of the module. +*/ + enum VISUType{ TNONE, + TCURVE, TTABLE, TCONTAINER, TMESH, TSCALARMAP, + TISOSURFACE, TDEFORMEDSHAPE, TCUTPLANES, TCUTLINES, TVECTORS, TSTREAMLINES, + TVISUGEN, TVIEWMANAGER, TRESULT, + TXYPLOT, TTABLEVIEW, TVIEW3D, + TENTITY, TFAMILY, TGROUP, TFIELD, TTIMESTAMP, + TALL}; + interface Base { +/*! + Returns ID of the object. +*/ + IdType GetID(); +/*! +Returns the type of the presentable object +*/ + VISUType GetType(); + }; +/*! \brief Presentable object interface + + It is the root class of all presentable objects. +*/ + interface PrsObject : Base{ + }; + //------------------------------------------------------- +/*! \brief %Table representation interface + +Presentation parameters of the %Table view. +*/ + interface Table : PrsObject { +/*! +Sets the title of the table. +*/ + void SetTitle(in string theTitle); +/*! +Gets the title of the table. +*/ + string GetTitle(); +/*! + This enumeration contains a set of elements defining the orientation of the table. +*/ + enum Orientation{ HORIZONTAL, /*!Returns nil if there are no views currently opened. +*/ + + View GetCurrentView(); +/*! \brief Creation of a 3d %View. + + Returns an object reference to the newly created 3d %View. +*/ + View3D Create3DView(); + + TableView CreateTableView(in Table theTable); + + XYPlot CreateXYPlot(); + + void Destroy(in View theView); + + }; +}; +#endif + + diff --git a/resources/Supervision_en.xml b/resources/Supervision_en.xml new file mode 100755 index 0000000..0542605 --- /dev/null +++ b/resources/Supervision_en.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Supervision_fr.xml b/resources/Supervision_fr.xml new file mode 100755 index 0000000..cd45f74 --- /dev/null +++ b/resources/Supervision_fr.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/config b/resources/config new file mode 100644 index 0000000..6925397 --- /dev/null +++ b/resources/config @@ -0,0 +1 @@ +language=en \ No newline at end of file diff --git a/src/GraphBase/DataFlowBase_Base.cxx b/src/GraphBase/DataFlowBase_Base.cxx index ede6362..22d6b6a 100644 --- a/src/GraphBase/DataFlowBase_Base.cxx +++ b/src/GraphBase/DataFlowBase_Base.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_Base.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_Base.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include "DataFlowBase_Base.hxx" char *SuperVision_Version = "1.04" ; diff --git a/src/GraphBase/DataFlowBase_Base.hxx b/src/GraphBase/DataFlowBase_Base.hxx index dafa25a..174a1ea 100644 --- a/src/GraphBase/DataFlowBase_Base.hxx +++ b/src/GraphBase/DataFlowBase_Base.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_Base.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_Base.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOW_BASE_HXX #define _DATAFLOW_BASE_HXX diff --git a/src/GraphBase/DataFlowBase_ComputingNode.cxx b/src/GraphBase/DataFlowBase_ComputingNode.cxx index 6889c90..ad86cd8 100644 --- a/src/GraphBase/DataFlowBase_ComputingNode.cxx +++ b/src/GraphBase/DataFlowBase_ComputingNode.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_Node.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_Node.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include #include @@ -204,20 +207,8 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB , if ( Graph_prof_debug ) SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; -// if ( !IsOneOfInLineNodes() ) { DefPortsOfNode( ORB , aService , NamePtr() , Kind() , - IsDataFlowNode() || IsComputingNode() || - IsFactoryNode() , // DataFlowOrComputing - IsLoopNode() || IsEndLoopNode() , // WithInLoop - IsComputingNode() || IsFactoryNode() ||// WithInGate - IsInLineNode() || IsLoopNode() || IsSwitchNode() || - IsEndSwitchNode() , -// IsGOTONode() || IsEndLoopNode() || IsEndSwitchNode() , - IsComputingNode() || IsFactoryNode() || // WithOutGate - IsInLineNode() || IsSwitchNode() || IsGOTONode() , -// IsEndLoopNode() || IsEndSwitchNode() , Graph_prof_debug , Graph_fdebug ) ; -// } cdebug_in << "GraphBase::ComputingNode::ComputingNode(" << aService.ServiceName << "," << aNodeName << "," << akind @@ -470,6 +461,22 @@ void GraphBase::ComputingNode::ReNameLink( const char* OldNodeName , cdebug_out << "GraphBase::ComputingNode::ReNameLink" << endl ; } +#include +#include +#include + +const long GraphBase::ComputingNode::CpuUsed() { + struct rusage usage ; + if ( getrusage( RUSAGE_SELF , &usage ) == -1 ) { + perror("GraphBase::CpuUsed") ; + return 0 ; + } +// return usage.ru_utime.__time_t tv_sec ; + cdebug << "CpuUsed " << usage.ru_utime.tv_sec << " " << usage.ru_utime.tv_usec << " " + << usage.ru_stime.tv_sec << " " << usage.ru_stime.tv_usec << endl ; + return usage.ru_utime.tv_sec ; +} + #if 0 const GraphBase::ListOfParameters * GraphBase::ComputingNode::GetListOfParameters() const { GraphBase::ListOfParameters * aListOfParameters = new GraphBase::ListOfParameters ; @@ -683,7 +690,12 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf // f << Tabs << " " << FuncNames[i].c_str() // << "" << endl ; QDomElement FuncName = Graph.createElement("FuncName") ; - aField = Graph.createTextNode( FuncNames[i].c_str() ) ; + if ( strlen( FuncNames[i].c_str() ) ) { + aField = Graph.createTextNode( FuncNames[i].c_str() ) ; + } + else { + aField = Graph.createTextNode( "?" ) ; + } PyFunction.appendChild( FuncName ) ; FuncName.appendChild( aField ) ; // } diff --git a/src/GraphBase/DataFlowBase_ComputingNode.hxx b/src/GraphBase/DataFlowBase_ComputingNode.hxx index 9680028..91a0f2d 100644 --- a/src/GraphBase/DataFlowBase_ComputingNode.hxx +++ b/src/GraphBase/DataFlowBase_ComputingNode.hxx @@ -1,10 +1,13 @@ -//============================================================================= -// File : DataFlowBase_ComputingNode.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_ComputingNode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_NODE_HXX #define _DATAFLOWBASE_NODE_HXX @@ -244,6 +247,8 @@ namespace GraphBase { // const GraphBase::ListOfParameters * GetListOfParameters() const ; + const long CpuUsed() ; + bool SaveXML( QDomDocument & Graph , QDomElement & info , int X , int Y ) const { ListOfFuncName aFuncNames ; diff --git a/src/GraphBase/DataFlowBase_DataNode.cxx b/src/GraphBase/DataFlowBase_DataNode.cxx index fa17d1a..63051cd 100644 --- a/src/GraphBase/DataFlowBase_DataNode.cxx +++ b/src/GraphBase/DataFlowBase_DataNode.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_DataNode.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_DataNode.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include "DataFlowBase_DataNode.hxx" GraphBase::DataNode::DataNode() : @@ -54,7 +74,8 @@ void GraphBase::DataNode::DataService( // cout << "GraphBase::DataNode::DataService : DataFlowPortsOfNode of " // << aService.ServiceName << endl ; // DefPortsOfNode( aService , aService.ServiceName ) ; - DefPortsOfNode( ORB , aService , NamePtr() , Kind() , true , false , false , false , + DefPortsOfNode( ORB , aService , NamePtr() , Kind() , +// true , false , false , false , Graph_prof_debug , Graph_fdebug ) ; if ( _Created ) @@ -67,9 +88,9 @@ void GraphBase::DataNode::DataService( // cout << "GraphBase::DataNode::DataService : Mirrored DataFlowPortsOfNode of " // << aReversedService.ServiceName << endl ; _DataFlowDataPorts->DefPortsOfNode( ORB , aReversedService , NamePtr() , - Kind() , true , false , false , false , + Kind() , +// true , false , false , false , Graph_prof_debug , Graph_fdebug ) ; -// aReversedService.ServiceName ) ; _Created = true ; } diff --git a/src/GraphBase/DataFlowBase_DataNode.hxx b/src/GraphBase/DataFlowBase_DataNode.hxx index 10509ef..d3ed5e0 100644 --- a/src/GraphBase/DataFlowBase_DataNode.hxx +++ b/src/GraphBase/DataFlowBase_DataNode.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_DataNode.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_DataNode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_DATANODE_HXX #define _DATAFLOWBASE_DATANODE_HXX diff --git a/src/GraphBase/DataFlowBase_DataPort.cxx b/src/GraphBase/DataFlowBase_DataPort.cxx index 13ab608..4334283 100644 --- a/src/GraphBase/DataFlowBase_DataPort.cxx +++ b/src/GraphBase/DataFlowBase_DataPort.cxx @@ -1,18 +1,40 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_DataPort.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_DataPort.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; +#include #include "DataFlowBase_DataPort.hxx" GraphBase::DataPort::DataPort( const char *const * NodeName , const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ) : Port( NodeName , aserviceParameter ) { + pthread_mutex_init( &_MutexWait , NULL ) ; InitialValues( CORBA::Any() ) ; } @@ -40,7 +62,8 @@ void GraphBase::DataPort::InitialValues(CORBA::Any aValue ) { } else if ( !strcmp( Type , "objref" ) ) { cdebug << "objref" << endl ; - InitialValue.replace(CORBA::_tc_Object, NULL); +// InitialValue.replace(CORBA::_tc_Object, NULL); + InitialValue <<= CORBA::Object::_nil() ; } else { cdebug << "InitialValues ERROR (other) " << Type << endl ; @@ -55,12 +78,21 @@ void GraphBase::DataPort::Value( const CORBA::Any & aDataValue ) { } void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) { +// cdebug << pthread_self() << " Value(aDataValue) --> pthread_mutex_lock " << &_MutexWait +// << endl ; + if ( pthread_mutex_lock( &_MutexWait ) ) { + perror( "lock DataValue" ) ; + exit( 0 ) ; + } +// cdebug << pthread_self() << " Value(aDataValue) pthread_mutex_locked " << &_MutexWait +// << endl ; + delete _theValue ; _theValue = aDataValue ; *_Value = aDataValue ; // Done( true ) ; -//#if 0 +#if 0 cdebug << "NewValue " << NodeName() << " " << PortName() << " " << PortType() << " : " << _Value << " *_Value " << *_Value << " " ; switch (_theValue->type()->kind()) { @@ -91,8 +123,14 @@ void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) { break; } } - cdebug << endl; -//#endif + cdebug << endl ; +#endif + if ( pthread_mutex_unlock( &_MutexWait ) ) { + perror( "unlock DataValue" ) ; + exit( 0 ) ; + } +// cdebug << pthread_self() << " Value(aDataValue) --> pthread_mutex_unlocked " << &_MutexWait +// << endl ; } @@ -132,29 +170,37 @@ void GraphBase::DataPort::Value( const CORBA::Any ** aDataSharedValue ) { } CORBA::Any const * GraphBase::DataPort::Value() const { + pthread_mutex_t * aMutexWait = (pthread_mutex_t *) &_MutexWait ; +// cdebug << pthread_self() << " Value() --> pthread_mutex_lock " << aMutexWait << endl ; + if ( pthread_mutex_lock( aMutexWait ) ) { + perror( "lock DataValue" ) ; + exit( 0 ) ; + } +// cdebug << pthread_self() << " Value() --> pthread_mutex_locked " << aMutexWait << endl ; const CORBA::Any *const Value = *_Value ; CORBA::Any * theValue ; - cdebug << "Value " << NodeName() << " " << PortName() << " " << PortType() - << " _Value " << _Value << " *_Value " << *_Value << " " ; +// cdebug << pthread_self() << " Value " << NodeName() << " " << PortName() << " " +// << PortType() << " _Value " << _Value << " *_Value " << *_Value << " kind " +// << Value->type()->kind() << " :" << endl ; if ( Done() ) { theValue = new CORBA::Any( *Value ) ; - switch (theValue->type()->kind()) { + switch ( theValue->type()->kind() ) { case CORBA::tk_string: { char * t; *theValue >>= t; - cdebug << "GraphBase::DataPort::Value() : " << t << " (string) " << endl; +// cdebug << "GraphBase::DataPort::Value() : " << t << " (string) " << endl ; break; } case CORBA::tk_double: { double d; *theValue >>= d; - cdebug << "GraphBase::DataPort::Value() : " << d << " (double) " << endl; +// cdebug << "GraphBase::DataPort::Value() : " << d << " (double) " << endl ; break; } case CORBA::tk_long: { long l; *theValue >>= l; - cdebug << "GraphBase::DataPort::Value() : " << l << " (long) " << endl; +// cdebug << "GraphBase::DataPort::Value() : " << l << " (long) " << endl ; break; } case CORBA::tk_objref: { @@ -163,8 +209,8 @@ CORBA::Any const * GraphBase::DataPort::Value() const { try { *theValue >>= obj ; retstr = ObjectToString( obj ); - cdebug << "GraphBase::DataPort::Value() : " << retstr - << "(object reference) " << endl; +// cdebug << "GraphBase::DataPort::Value() : " << retstr +// << "(object reference) " << endl; } catch( ... ) { cdebug << "ToString( object ) Catched ERROR" << endl ; @@ -173,15 +219,20 @@ CORBA::Any const * GraphBase::DataPort::Value() const { } default: { cdebug << "GraphBase::DataPort::Value() : " - << "(other(tk_string,tk_double,tk_long,tk_objref)) ERROR" << endl; + << "(other(tk_string,tk_double,tk_long,tk_objref)) ERROR" << endl ; break; } } } else { - cdebug << "GraphBase::DataPort::InitialValue() " << endl; +// cdebug << "GraphBase::DataPort::InitialValue() " << endl ; theValue = new CORBA::Any( *Value ) ; } + if ( pthread_mutex_unlock( aMutexWait ) ) { + perror( "unlock DataValue" ) ; + exit( 0 ) ; + } +// cdebug << pthread_self() << " Value() --> pthread_mutex_unlocked " << aMutexWait << endl ; return theValue ; } @@ -189,12 +240,26 @@ CORBA::Any const * GraphBase::DataPort::Value() const { bool GraphBase::DataPort::BoolValue() const { bool RetVal = false ; long val ; + pthread_mutex_t * aMutexWait = (pthread_mutex_t *) &_MutexWait ; +// cdebug << pthread_self() << " BoolValue() --> pthread_mutex_lock " << aMutexWait << endl ; + if ( pthread_mutex_lock( aMutexWait ) ) { + perror( "lock DataValue" ) ; + exit( 0 ) ; + } +// cdebug << pthread_self() << " BoolValue() --> pthread_mutex_locked " << aMutexWait +// << endl ; if ( (*_Value)->type()->kind() == CORBA::tk_long ) { **_Value >>= val ; if ( val ) { RetVal = true ; } } + if ( pthread_mutex_unlock( aMutexWait ) ) { + perror( "unlock DataValue" ) ; + exit( 0 ) ; + } +// cdebug << pthread_self() << " BoolValue() --> pthread_mutex_unlocked " << aMutexWait +// << endl ; return RetVal ; } @@ -203,10 +268,19 @@ const CORBA::Any ** GraphBase::DataPort::ValuePtr() const { } void GraphBase::DataPort::StringValue(ostream & f ) const { + pthread_mutex_t * aMutexWait = (pthread_mutex_t *) &_MutexWait ; +// cdebug << pthread_self() << " StringValue() --> pthread_mutex_lock " << aMutexWait +// << endl ; + if ( pthread_mutex_lock( aMutexWait ) ) { + perror( "lock DataValue" ) ; + exit( 0 ) ; + } +// cdebug << pthread_self() << " StringValue() --> pthread_mutex_locked " << aMutexWait +// << endl ; if ( Done() ) { - cdebug << "StringValue " << NodeName() << " " << PortName() << " " << PortType() - << " _Value " << _Value << " *_Value " - << *_Value << " " << endl ; +// cdebug << "StringValue " << NodeName() << " " << PortName() << " " << PortType() +// << " _Value " << _Value << " *_Value " +// << *_Value << " " << endl ; const CORBA::Any * theValue = *_Value ; switch (theValue->type()->kind()) { case CORBA::tk_string: @@ -225,7 +299,14 @@ void GraphBase::DataPort::StringValue(ostream & f ) const { f << l << " (long)" ; break; case CORBA::tk_objref: - f << "(object reference)" ; + CORBA::Object_ptr ObjRef ; + try { + *theValue >>= ObjRef ; + f << "(object reference) " << ObjectToString( ObjRef ) ; + } + catch(...) { + f << "(object reference) catched error" ; + } break; default: f << "(other ERROR)" ; @@ -233,8 +314,14 @@ void GraphBase::DataPort::StringValue(ostream & f ) const { } } else { - f << "Default(undefined)" ; + f << " Default (undefined) NOT DONE" ; + } + if ( pthread_mutex_unlock( aMutexWait ) ) { + perror( "unlock DataValue" ) ; + exit( 0 ) ; } +// cdebug << pthread_self() << " StringValue() --> pthread_mutex_unlocked " << aMutexWait +// << endl ; } diff --git a/src/GraphBase/DataFlowBase_DataPort.hxx b/src/GraphBase/DataFlowBase_DataPort.hxx index a5f57fc..08ed859 100644 --- a/src/GraphBase/DataFlowBase_DataPort.hxx +++ b/src/GraphBase/DataFlowBase_DataPort.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_DataPort.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_DataPort.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_DATAPORT_HXX #define _DATAFLOWBASE_DATAPORT_HXX @@ -20,6 +40,7 @@ namespace GraphBase { CORBA::Any const * * _Value ; SUPERV::GraphState _State ; bool _Done ; + pthread_mutex_t _MutexWait ; public : diff --git a/src/GraphBase/DataFlowBase_EndOfLoopNode.cxx b/src/GraphBase/DataFlowBase_EndOfLoopNode.cxx index f1931ff..b88d135 100644 --- a/src/GraphBase/DataFlowBase_EndOfLoopNode.cxx +++ b/src/GraphBase/DataFlowBase_EndOfLoopNode.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_EndOfLoopNode.cxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_EndOfLoopNode.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include #include diff --git a/src/GraphBase/DataFlowBase_EndOfLoopNode.hxx b/src/GraphBase/DataFlowBase_EndOfLoopNode.hxx index ac01c2e..2e3de4b 100644 --- a/src/GraphBase/DataFlowBase_EndOfLoopNode.hxx +++ b/src/GraphBase/DataFlowBase_EndOfLoopNode.hxx @@ -1,10 +1,13 @@ -//============================================================================= -// File : DataFlowBase_EndOfLoopNode.hxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_EndOfLoopNode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_ENDOFLOOPNODE_HXX #define _DATAFLOWBASE_ENDOFLOOPNODE_HXX diff --git a/src/GraphBase/DataFlowBase_EndOfSwitchNode.cxx b/src/GraphBase/DataFlowBase_EndOfSwitchNode.cxx index 266c91c..da5459a 100644 --- a/src/GraphBase/DataFlowBase_EndOfSwitchNode.cxx +++ b/src/GraphBase/DataFlowBase_EndOfSwitchNode.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_EndOfSwitchNode.cxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_EndOfSwitchNode.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include #include diff --git a/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx b/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx index 9ac1195..501b7cf 100644 --- a/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx +++ b/src/GraphBase/DataFlowBase_EndOfSwitchNode.hxx @@ -1,10 +1,13 @@ -//============================================================================= -// File : DataFlowBase_EndOfSwitchNode.hxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_EndOfSwitchNode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_ENDOFSWITCHNODE_HXX #define _DATAFLOWBASE_ENDOFSWITCHNODE_HXX diff --git a/src/GraphBase/DataFlowBase_FactoryNode.cxx b/src/GraphBase/DataFlowBase_FactoryNode.cxx index 4dc6b87..52d09f5 100644 --- a/src/GraphBase/DataFlowBase_FactoryNode.cxx +++ b/src/GraphBase/DataFlowBase_FactoryNode.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_FactoryNode.cxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_FactoryNode.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include #include @@ -166,6 +169,7 @@ bool GraphBase::FactoryNode::Computer(const char *c) { if ( _Computer != FACTORYSERVER ) delete [] _Computer ; _Computer = my_strdup(c); + cdebug_in << "GraphBase::FactoryNode::Computer('" << _Computer << "')" << endl; cdebug_out << "GraphBase::FactoryNode::Computer" << endl; return true ; } diff --git a/src/GraphBase/DataFlowBase_FactoryNode.hxx b/src/GraphBase/DataFlowBase_FactoryNode.hxx index d45dfbf..7c7e03d 100644 --- a/src/GraphBase/DataFlowBase_FactoryNode.hxx +++ b/src/GraphBase/DataFlowBase_FactoryNode.hxx @@ -1,10 +1,13 @@ -//============================================================================= -// File : DataFlowBase_FactoryNode.hxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_FactoryNode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_FACTORYNODE_HXX #define _DATAFLOWBASE_FACTORYNODE_HXX @@ -61,7 +64,10 @@ namespace GraphBase { _ObjComponent = anObjComponent ; } ; char * ComponentName() const { return my_strdup( _ComponentName ) ; } ; char * InterfaceName() const { return my_strdup( _InterfaceName ) ; } ; - char * Computer() const { return my_strdup( _Computer ) ; } ; + char * Computer() const { +// cdebug_in << "GraphBase::FactoryNode::Computer returns '" << _Computer << "'" +// << endl; + return my_strdup( _Computer ) ; } ; bool ComponentName( const char * aComponentName ) ; bool InterfaceName( const char * anInterfaceName ) ; diff --git a/src/GraphBase/DataFlowBase_GOTONode.cxx b/src/GraphBase/DataFlowBase_GOTONode.cxx index 9120aaa..1aba05f 100644 --- a/src/GraphBase/DataFlowBase_GOTONode.cxx +++ b/src/GraphBase/DataFlowBase_GOTONode.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_GOTONode.cxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_GOTONode.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include #include diff --git a/src/GraphBase/DataFlowBase_GOTONode.hxx b/src/GraphBase/DataFlowBase_GOTONode.hxx index e644730..b3aa9c9 100644 --- a/src/GraphBase/DataFlowBase_GOTONode.hxx +++ b/src/GraphBase/DataFlowBase_GOTONode.hxx @@ -1,10 +1,13 @@ -//============================================================================= -// File : DataFlowBase_GOTONode.hxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_GOTONode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_GOTONODE_HXX #define _DATAFLOWBASE_GOTONODE_HXX @@ -41,34 +44,34 @@ namespace GraphBase { virtual ~GOTONode() ; void CoupledNode( InLineNode * aCoupledNode ) { - cdebug << Name() << ".GraphBase::GOTONode::CoupledNode( " ; - if ( aCoupledNode ) { - cdebug << aCoupledNode->Name() ; - } - else { - cdebug << "NULL" ; - } - cdebug << " )" << endl ; +// cdebug << Name() << ".GraphBase::GOTONode::CoupledNode( " ; +// if ( aCoupledNode ) { +// cdebug << aCoupledNode->Name() ; +// } +// else { +// cdebug << "NULL" ; +// } +// cdebug << " )" << endl ; _CoupledNode = aCoupledNode ; } ; const InLineNode * CoupledNode() const { - cdebug << Name() << ".GraphBase::GOTONode::CoupledNode() --> " ; - if ( _CoupledNode ) { - cdebug << _CoupledNode->Name() ; - } - else { - cdebug << "NULL" ; - } - cdebug << endl ; +// cdebug << Name() << ".GraphBase::GOTONode::CoupledNode() --> " ; +// if ( _CoupledNode ) { +// cdebug << _CoupledNode->Name() ; +// } +// else { +// cdebug << "NULL" ; +// } +// cdebug << endl ; return _CoupledNode ; } ; InLineNode * CoupledNode() { - cdebug << Name() << ".GraphBase::GOTONode::CoupledNode() --> " ; - if ( _CoupledNode ) { - cdebug << _CoupledNode->Name() ; - } - else { - cdebug << "NULL" ; - } - cdebug << endl ; +// cdebug << Name() << ".GraphBase::GOTONode::CoupledNode() --> " ; +// if ( _CoupledNode ) { +// cdebug << _CoupledNode->Name() ; +// } +// else { +// cdebug << "NULL" ; +// } +// cdebug << endl ; return _CoupledNode ; } ; // bool SaveXML(ostream &f , char *Tabs , int X , int Y ) const ; diff --git a/src/GraphBase/DataFlowBase_Graph.cxx b/src/GraphBase/DataFlowBase_Graph.cxx index ad22c1d..f9db952 100644 --- a/src/GraphBase/DataFlowBase_Graph.cxx +++ b/src/GraphBase/DataFlowBase_Graph.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_Graph.cxx -// Created : 2001 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_Graph.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include "DataFlowBase_Graph.hxx" #include "SALOME_LifeCycleCORBA.hxx" @@ -798,8 +818,8 @@ bool GraphBase::Graph::GetLink(const char* ToNodeName , const char* ToServiceParameterName , char** FromNodeName , char** FromServiceParameterName ) { - cdebug_in << "GraphBase::Graph::GetLink " << ToNodeName << "(" - << ToServiceParameterName << ")" << endl; +// cdebug_in << "GraphBase::Graph::GetLink " << ToNodeName << "(" +// << ToServiceParameterName << ")" << endl; bool RetVal = false ; GraphBase::ComputingNode * toNode = GetChangeGraphNode( ToNodeName ) ; if ( toNode ) { @@ -810,8 +830,16 @@ bool GraphBase::Graph::GetLink(const char* ToNodeName , *FromServiceParameterName = my_strdup( anOutPort->PortName() ) ; RetVal = true ; } + else { + cdebug << "GraphEditor::OutNode::GetLink ERROR no InPort or NotConnected " << ToNodeName + << " " << ToServiceParameterName << " " << RetVal << endl; + } } - cdebug_out << "GraphEditor::OutNode::GetLink " << RetVal << endl; + else { + cdebug << "GraphEditor::OutNode::GetLink ERROR no Node " << ToNodeName << " " << RetVal + << endl; + } +// cdebug_out << "GraphEditor::OutNode::GetLink " << RetVal << endl; return RetVal ; } @@ -1201,50 +1229,50 @@ bool GraphBase::Graph::InLineServices() { for ( j = 0 ; j < aINode->GetNodeInPortsSize() ; j++ ) { if ( aINode->GetChangeNodeInPort(j)->IsGate() || aINode->GetChangeNodeInPort(j)->IsLoop() ) { - cdebug << "GraphBase::Graph::InLineServices In" << j << " " - << aINode->GetChangeNodeInPort(j)->Kind() << " " - << aINode->GetChangeNodeInPort(j)->PortType() << " " - << aINode->GetChangeNodeInPort(j)->PortName() << " ignored " - << aINode->GetChangeNodeInPort(j)->IsGate() << " " - << aINode->GetChangeNodeInPort(j)->IsLoop() << endl; +// cdebug << "GraphBase::Graph::InLineServices In" << j << " " +// << aINode->GetChangeNodeInPort(j)->Kind() << " " +// << aINode->GetChangeNodeInPort(j)->PortType() << " " +// << aINode->GetChangeNodeInPort(j)->PortName() << " ignored " +// << aINode->GetChangeNodeInPort(j)->IsGate() << " " +// << aINode->GetChangeNodeInPort(j)->IsLoop() << endl; } else { aService.ServiceinParameter.length( InService+1 ) ; aService.ServiceinParameter[InService].Parametertype = CORBA::string_dup( aINode->GetChangeNodeInPort(j)->PortType() ) ; aService.ServiceinParameter[InService++].Parametername = CORBA::string_dup( aINode->GetChangeNodeInPort(j)->PortName() ) ; - cdebug << "GraphBase::Graph::InLineServices In" << j << " " - << aINode->GetChangeNodeInPort(j)->Kind() << " " - << aINode->GetChangeNodeInPort(j)->PortType() << " " - << aINode->GetChangeNodeInPort(j)->PortName() << " " - << aINode->GetChangeNodeInPort(j)->IsGate() << " " - << aINode->GetChangeNodeInPort(j)->IsLoop() << endl; +// cdebug << "GraphBase::Graph::InLineServices In" << j << " " +// << aINode->GetChangeNodeInPort(j)->Kind() << " " +// << aINode->GetChangeNodeInPort(j)->PortType() << " " +// << aINode->GetChangeNodeInPort(j)->PortName() << " " +// << aINode->GetChangeNodeInPort(j)->IsGate() << " " +// << aINode->GetChangeNodeInPort(j)->IsLoop() << endl; } } int OutService = 0 ; for ( j = 0 ; j < aINode->GetNodeOutPortsSize() ; j++ ) { if ( aINode->GetChangeNodeOutPort(j)->IsGate() || aINode->GetChangeNodeOutPort(j)->IsLoop() ) { - cdebug << "GraphBase::Graph::InLineServices Out" << j << " " - << aINode->GetChangeNodeOutPort(j)->Kind() << " " - << aINode->GetChangeNodeOutPort(j)->PortType() << " " - << aINode->GetChangeNodeOutPort(j)->PortName() << " ignored " - << aINode->GetChangeNodeOutPort(j)->IsGate() << " " - << aINode->GetChangeNodeOutPort(j)->IsLoop() << endl; +// cdebug << "GraphBase::Graph::InLineServices Out" << j << " " +// << aINode->GetChangeNodeOutPort(j)->Kind() << " " +// << aINode->GetChangeNodeOutPort(j)->PortType() << " " +// << aINode->GetChangeNodeOutPort(j)->PortName() << " ignored " +// << aINode->GetChangeNodeOutPort(j)->IsGate() << " " +// << aINode->GetChangeNodeOutPort(j)->IsLoop() << endl; } else { aService.ServiceoutParameter.length( OutService+1 ) ; aService.ServiceoutParameter[OutService].Parametertype = CORBA::string_dup( aINode->GetChangeNodeOutPort(j)->PortType() ) ; aService.ServiceoutParameter[OutService++].Parametername = CORBA::string_dup( aINode->GetChangeNodeOutPort(j)->PortName() ) ; - cdebug << "GraphBase::Graph::InLineServices Out" << j << " " - << aINode->GetChangeNodeOutPort(j)->Kind() << " " - << aINode->GetChangeNodeOutPort(j)->PortType() << " " - << aINode->GetChangeNodeOutPort(j)->PortName() << " " - << aINode->GetChangeNodeOutPort(j)->IsGate() << " " - << aINode->GetChangeNodeOutPort(j)->IsLoop() << endl; +// cdebug << "GraphBase::Graph::InLineServices Out" << j << " " +// << aINode->GetChangeNodeOutPort(j)->Kind() << " " +// << aINode->GetChangeNodeOutPort(j)->PortType() << " " +// << aINode->GetChangeNodeOutPort(j)->PortName() << " " +// << aINode->GetChangeNodeOutPort(j)->IsGate() << " " +// << aINode->GetChangeNodeOutPort(j)->IsLoop() << endl; } } aINode->SetService( aService ) ; - cdebug << "GraphBase::Graph::InLineServices" << *aINode->GetService() << endl; +// cdebug << "GraphBase::Graph::InLineServices" << *aINode->GetService() << endl; } } @@ -1668,8 +1696,8 @@ const CORBA::Any * GraphBase::Graph::PortInData( const char* ToNodeName , const CORBA::Any * aRet = new CORBA::Any() ; char *theNode ; char *aPort ; - cdebug_in << "GraphBase::Graph::PortData " << ToNodeName << " " - << ToServiceParameterName << endl ; +// cdebug_in << "GraphBase::Graph::PortInData " << ToNodeName << " " +// << ToServiceParameterName << endl ; NodePort( ToNodeName , ToServiceParameterName , &theNode , &aPort ) ; GraphBase::ComputingNode * aNode = GetChangeGraphNode( theNode ) ; @@ -1681,15 +1709,27 @@ const CORBA::Any * GraphBase::Graph::PortInData( const char* ToNodeName , anOutPort = anInPort->GetOutPort() ; if ( anOutPort ) { aRet = anOutPort->Value() ; - cdebug << "OutPort value " << anOutPort->NodeName() << "(" - << anOutPort->PortName() << ") --> InPort " << anInPort->NodeName() - << "(" << anInPort->PortName() << ")" << endl ; +// cdebug << "OutPort value " << anOutPort->NodeName() << "(" +// << anOutPort->PortName() << ") --> InPort " << anInPort->NodeName() +// << "(" << anInPort->PortName() << ")" << endl ; + } + else { + cdebug << "GraphBase::Graph::PortInData " << ToNodeName << " " + << ToServiceParameterName << " ERROR no OutPort" << endl ; } } + else { + cdebug << "GraphBase::Graph::PortInData " << ToNodeName << " " + << ToServiceParameterName << " ERROR no InPort" << endl ; + } + } + else { + cdebug << "GraphBase::Graph::PortInData " << ToNodeName << " " + << ToServiceParameterName << " ERROR no Node" << endl ; } delete theNode ; delete aPort ; - cdebug_out << "GraphBase::Graph::PortData " << endl ; +// cdebug_out << "GraphBase::Graph::PortInData " << endl ; return aRet ; } @@ -1698,8 +1738,8 @@ const CORBA::Any * GraphBase::Graph::PortOutData( const char* FromNodeName , const CORBA::Any * aRet = new CORBA::Any() ; char *theNode ; char *aPort ; - cdebug_in << "GraphBase::Graph::PortOutData " << FromNodeName << " " - << FromServiceParameterName << endl ; +// cdebug_in << "GraphBase::Graph::PortOutData " << FromNodeName << " " +// << FromServiceParameterName << endl ; NodePort( FromNodeName , FromServiceParameterName , &theNode , &aPort ) ; GraphBase::ComputingNode * aNode = GetChangeGraphNode( theNode ) ; @@ -1707,12 +1747,21 @@ const CORBA::Any * GraphBase::Graph::PortOutData( const char* FromNodeName , if ( aNode ) { GraphBase::OutPort *anOutPort ; anOutPort = aNode->GetChangeOutPort( aPort ); - if ( anOutPort ) + if ( anOutPort ) { aRet = anOutPort->Value() ; + } + else { + cdebug << "GraphBase::Graph::PortOutData " << FromNodeName << " " + << FromServiceParameterName << " ERROR no OutPort" << endl ; + } + } + else { + cdebug << "GraphBase::Graph::PortOutData " << FromNodeName << " " + << FromServiceParameterName << " ERROR no Node" << endl ; } delete theNode ; delete aPort ; - cdebug_out << "GraphBase::Graph::PortOutData " << endl ; +// cdebug_out << "GraphBase::Graph::PortOutData " << endl ; return aRet ; } diff --git a/src/GraphBase/DataFlowBase_Graph.hxx b/src/GraphBase/DataFlowBase_Graph.hxx index cafe53a..4be9739 100644 --- a/src/GraphBase/DataFlowBase_Graph.hxx +++ b/src/GraphBase/DataFlowBase_Graph.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_Graph.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_Graph.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_GRAPH_HXX #define _DATAFLOWBASE_GRAPH_HXX diff --git a/src/GraphBase/DataFlowBase_InLineNode.cxx b/src/GraphBase/DataFlowBase_InLineNode.cxx index 300e570..b6285e6 100644 --- a/src/GraphBase/DataFlowBase_InLineNode.cxx +++ b/src/GraphBase/DataFlowBase_InLineNode.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_InLineNode.cxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_InLineNode.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include #include diff --git a/src/GraphBase/DataFlowBase_InLineNode.hxx b/src/GraphBase/DataFlowBase_InLineNode.hxx index c2d7345..e818348 100644 --- a/src/GraphBase/DataFlowBase_InLineNode.hxx +++ b/src/GraphBase/DataFlowBase_InLineNode.hxx @@ -1,10 +1,13 @@ -//============================================================================= -// File : DataFlowBase_InLineNode.hxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_InLineNode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_INLINENODE_HXX #define _DATAFLOWBASE_INLINENODE_HXX diff --git a/src/GraphBase/DataFlowBase_InPort.cxx b/src/GraphBase/DataFlowBase_InPort.cxx index 98ba633..27ec517 100644 --- a/src/GraphBase/DataFlowBase_InPort.cxx +++ b/src/GraphBase/DataFlowBase_InPort.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_InPort.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_InPort.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include "DataFlowBase_InPort.hxx" #include "DataFlowBase_OutPort.hxx" diff --git a/src/GraphBase/DataFlowBase_InPort.hxx b/src/GraphBase/DataFlowBase_InPort.hxx index e425e48..497270d 100644 --- a/src/GraphBase/DataFlowBase_InPort.hxx +++ b/src/GraphBase/DataFlowBase_InPort.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_InPort.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_InPort.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_INPORT_HXX #define _DATAFLOWBASE_INPORT_HXX @@ -41,10 +61,10 @@ namespace GraphBase { << NodeName() << endl ; } ; void State( SUPERV::GraphState aState ) { - cdebug << pthread_self() << " " << PortName() << " from " - << NodeName() << " SUPERV::GraphState " << _State << " " - << " --> " << aState << " _EndSwitchPort " - << IsEndSwitch() << endl ; +// cdebug << pthread_self() << " " << PortName() << " from " +// << NodeName() << " SUPERV::GraphState " << _State << " " +// << " --> " << aState << " _EndSwitchPort " +// << IsEndSwitch() << endl ; _State = aState ; } ; SUPERV::GraphState State() { return _State ; } ; diff --git a/src/GraphBase/DataFlowBase_LoadXml.cxx b/src/GraphBase/DataFlowBase_LoadXml.cxx index 4e63775..3fffa50 100644 --- a/src/GraphBase/DataFlowBase_LoadXml.cxx +++ b/src/GraphBase/DataFlowBase_LoadXml.cxx @@ -1,5 +1,30 @@ -using namespace std; +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_LoadXml.cxx +// Module : SUPERV +using namespace std; #include "DataFlowBase_XmlHandler.hxx" //#include diff --git a/src/GraphBase/DataFlowBase_LoopNode.cxx b/src/GraphBase/DataFlowBase_LoopNode.cxx index 12d0f32..5166dec 100644 --- a/src/GraphBase/DataFlowBase_LoopNode.cxx +++ b/src/GraphBase/DataFlowBase_LoopNode.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_LoopNode.cxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_LoopNode.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include #include diff --git a/src/GraphBase/DataFlowBase_LoopNode.hxx b/src/GraphBase/DataFlowBase_LoopNode.hxx index 1939f73..08054ac 100644 --- a/src/GraphBase/DataFlowBase_LoopNode.hxx +++ b/src/GraphBase/DataFlowBase_LoopNode.hxx @@ -1,10 +1,13 @@ -//============================================================================= -// File : DataFlowBase_LoopNode.hxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_LoopNode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_LOOPNODE_HXX #define _DATAFLOWBASE_LOOPNODE_HXX diff --git a/src/GraphBase/DataFlowBase_OutPort.cxx b/src/GraphBase/DataFlowBase_OutPort.cxx index 4b7f834..67a16e1 100644 --- a/src/GraphBase/DataFlowBase_OutPort.cxx +++ b/src/GraphBase/DataFlowBase_OutPort.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_OutPort.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_OutPort.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include "DataFlowBase_OutPort.hxx" //GraphBase::OutPort::~OutPort() { diff --git a/src/GraphBase/DataFlowBase_OutPort.hxx b/src/GraphBase/DataFlowBase_OutPort.hxx index 35e73a2..92253d4 100644 --- a/src/GraphBase/DataFlowBase_OutPort.hxx +++ b/src/GraphBase/DataFlowBase_OutPort.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_OutPort.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_OutPort.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_OUTPORT_HXX #define _DATAFLOWBASE_OUTPORT_HXX diff --git a/src/GraphBase/DataFlowBase_Port.cxx b/src/GraphBase/DataFlowBase_Port.cxx index e0395bc..2e773b6 100644 --- a/src/GraphBase/DataFlowBase_Port.cxx +++ b/src/GraphBase/DataFlowBase_Port.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_Port.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_Port.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include "DataFlowBase_Port.hxx" //GraphBase::Port::~Port() { diff --git a/src/GraphBase/DataFlowBase_Port.hxx b/src/GraphBase/DataFlowBase_Port.hxx index ceb5b7c..72c8427 100644 --- a/src/GraphBase/DataFlowBase_Port.hxx +++ b/src/GraphBase/DataFlowBase_Port.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_Port.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_Port.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_PORT_HXX #define _DATAFLOWBASE_PORT_HXX diff --git a/src/GraphBase/DataFlowBase_PortsOfNode.cxx b/src/GraphBase/DataFlowBase_PortsOfNode.cxx index fb98961..a06b2a0 100644 --- a/src/GraphBase/DataFlowBase_PortsOfNode.cxx +++ b/src/GraphBase/DataFlowBase_PortsOfNode.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_PortsOfNode.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_PortsOfNode.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include "DataFlowBase_PortsOfNode.hxx" GraphBase::PortsOfNode::PortsOfNode() : @@ -42,14 +62,28 @@ void GraphBase::PortsOfNode::DefPortsOfNode( const SALOME_ModuleCatalog::Service& aService , const char *const * NodeName , const SUPERV::KindOfNode aKind , - const bool DataFlowOrComputing , - const bool WithInLoop , - const bool WithInGate , - const bool WithOutGate , +// const bool DataFlowOrComputing , +// const bool WithInLoop , +// const bool WithInGate , +// const bool WithOutGate , int * Graph_prof_debug , ostream * Graph_fdebug ) { int i ; cdebug_in << "DefPortsOfNode : " << *NodeName << endl ; + const bool DataFlowOrComputing = (aKind == SUPERV::DataFlowNode) || + (aKind == SUPERV::ComputingNode) || + (aKind == SUPERV::FactoryNode) ; +// WithInLoop : InitLoop or DoLoop + const bool WithInLoop = (aKind == SUPERV::LoopNode) || (aKind == SUPERV::EndLoopNode) ; +// WithInGate : InGate or Default + const bool WithInGate = (aKind == SUPERV::ComputingNode) || (aKind == SUPERV::FactoryNode) || + (aKind == SUPERV::InLineNode) || (aKind == SUPERV::LoopNode) || + (aKind == SUPERV::SwitchNode) || (aKind == SUPERV::EndSwitchNode) || + (aKind == SUPERV::GOTONode) ; +// WithOutGate : OutGate or Default + const bool WithOutGate = (aKind == SUPERV::ComputingNode) || (aKind == SUPERV::FactoryNode) || + (aKind == SUPERV::InLineNode) || (aKind == SUPERV::SwitchNode) || + (aKind == SUPERV::GOTONode) ; SUPERV::KindOfPort aPortKind = SUPERV::ServiceParameter ; if ( aKind == SUPERV::InLineNode ) { aPortKind = SUPERV::InLineParameter ; @@ -189,7 +223,7 @@ void GraphBase::PortsOfNode::DefPortsOfNode( SUPERV::LoopParameter ); // _NodeOutPorts[iVec-1]->Kind( SUPERV::LoopParameter ) ; _NodeOutPorts[iVec-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; - cdebug << "DefPortsOfNode : " << "_MapOfNodeInPorts[ " << aParametername + cdebug << "DefPortsOfNode : " << "_MapOfNodeOutPorts[ " << aParametername << " ] = " << iVec << " " << _NodeOutPorts[iVec-1]->Kind() << " " << _NodeOutPorts[iVec-1] << endl ; } diff --git a/src/GraphBase/DataFlowBase_PortsOfNode.hxx b/src/GraphBase/DataFlowBase_PortsOfNode.hxx index 0e29234..0b22633 100644 --- a/src/GraphBase/DataFlowBase_PortsOfNode.hxx +++ b/src/GraphBase/DataFlowBase_PortsOfNode.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_PortsOfNode.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_PortsOfNode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_PORTSOFNODE_HXX #define _DATAFLOWBASE_PORTSOFNODE_HXX @@ -39,9 +59,10 @@ namespace GraphBase { const SALOME_ModuleCatalog::Service& NodeService , const char *const * NodeName , const SUPERV::KindOfNode aKind , - const bool DataFlowOrComputing , - const bool WithGateArg , - const bool WithInGate , const bool WithOutGate , +// const bool DataFlowOrComputing , +// const bool WithGateArg , +// const bool WithInGate , +// const bool WithOutGate , int * Graph_prof_debug , ostream * Graph_fdebug ) ; diff --git a/src/GraphBase/DataFlowBase_Service.cxx b/src/GraphBase/DataFlowBase_Service.cxx index 4740e49..8ef3689 100644 --- a/src/GraphBase/DataFlowBase_Service.cxx +++ b/src/GraphBase/DataFlowBase_Service.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_Service.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_Service.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include "DataFlowBase_Service.hxx" void GraphBase::Service::SetService( const SALOME_ModuleCatalog::Service aService ) { diff --git a/src/GraphBase/DataFlowBase_Service.hxx b/src/GraphBase/DataFlowBase_Service.hxx index d558fc6..4283b53 100644 --- a/src/GraphBase/DataFlowBase_Service.hxx +++ b/src/GraphBase/DataFlowBase_Service.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_Service.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_Service.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_SERVICE_HXX #define _DATAFLOWBASE_SERVICE_HXX diff --git a/src/GraphBase/DataFlowBase_ServicesParameter.hxx b/src/GraphBase/DataFlowBase_ServicesParameter.hxx index 33bb756..f20f4a7 100644 --- a/src/GraphBase/DataFlowBase_ServicesParameter.hxx +++ b/src/GraphBase/DataFlowBase_ServicesParameter.hxx @@ -1,3 +1,29 @@ +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_ServicesParameter.hxx +// Module : SUPERV + #ifndef _DATAFLOWBASE_SERVICESPARAMETER_HXX #define _DATAFLOWBASE_SERVICESPARAMETER_HXX diff --git a/src/GraphBase/DataFlowBase_SwitchNode.cxx b/src/GraphBase/DataFlowBase_SwitchNode.cxx index 45cf94a..411abe6 100644 --- a/src/GraphBase/DataFlowBase_SwitchNode.cxx +++ b/src/GraphBase/DataFlowBase_SwitchNode.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_SwitchNode.cxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_SwitchNode.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include #include diff --git a/src/GraphBase/DataFlowBase_SwitchNode.hxx b/src/GraphBase/DataFlowBase_SwitchNode.hxx index e5e7b2b..4f44757 100644 --- a/src/GraphBase/DataFlowBase_SwitchNode.hxx +++ b/src/GraphBase/DataFlowBase_SwitchNode.hxx @@ -1,10 +1,13 @@ -//============================================================================= -// File : DataFlowBase_SwitchNode.hxx -// Created : 2003 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : DataFlowBase_SwitchNode.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWBASE_SWITCHNODE_HXX #define _DATAFLOWBASE_SWITCHNODE_HXX diff --git a/src/GraphBase/DataFlowBase_XmlHandler.cxx b/src/GraphBase/DataFlowBase_XmlHandler.cxx index 4b26c8a..9330837 100644 --- a/src/GraphBase/DataFlowBase_XmlHandler.cxx +++ b/src/GraphBase/DataFlowBase_XmlHandler.cxx @@ -1,19 +1,32 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_XmlHandler.cxx -// Created : Thu Sept 13 14:20:36 2001 -// Author : Arnaud RES -// Project : SALOME -// Copyright : CEA +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_XmlHandler.cxx +// Author : Arnaud RES +// Module : SUPERV // $Header$ -//#include "SALOME_NamingService.hxx" - -//#include -//#include CORBA_CLIENT_HEADER(SALOME_SuperVision) - -//#include "DataFlow_debug.hxx" - +using namespace std; #include "DataFlowBase_XmlHandler.hxx" #include @@ -658,7 +671,8 @@ bool GraphBase::XmlHandler::endElement( const QString&, break; } case CORBA::tk_objref: { - aLink.aLinkValue.replace(CORBA::_tc_Object, NULL); +// aLink.aLinkValue.replace(CORBA::_tc_Object, NULL); + aLink.aLinkValue <<= CORBA::Object::_nil() ; #if TRACE MESSAGE( " (object reference)" ); #endif @@ -899,7 +913,12 @@ bool GraphBase::XmlHandler::endElement( const QString&, return returnfalse( this , "depth5-8" , qName ) ; int l = aNode.theListOfFuncName.size() ; aNode.theListOfFuncName.resize( l+1 ) ; - aNode.theListOfFuncName[ l ] = fieldvalue[depth].c_str() ; + if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) { + aNode.theListOfFuncName[ l ] = fieldvalue[depth].c_str() ; + } + else { + aNode.theListOfFuncName[ l ] = "" ; + } aNode.theListOfPythonFunctions.resize( l+1 ) ; aNode.theListOfPythonFunctions[ l ] = new SUPERV::ListOfStrings() ; #if TRACE diff --git a/src/GraphBase/DataFlowBase_XmlHandler.hxx b/src/GraphBase/DataFlowBase_XmlHandler.hxx index 23eefac..9d00b72 100755 --- a/src/GraphBase/DataFlowBase_XmlHandler.hxx +++ b/src/GraphBase/DataFlowBase_XmlHandler.hxx @@ -1,9 +1,29 @@ -//============================================================================= -// File : GraphBase_XmlHandler.hxx -// Created : Thu Jun 14 14:02:23 2001 -// Author : Arnaud RES -// Project : SALOME -// Copyright : CEA +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GraphBase_XmlHandler.hxx +// Author : Arnaud RES +// Module : SUPERV // $Header$ #define INCLUDE_MENUITEM_DEF diff --git a/src/GraphBase/Makefile.in b/src/GraphBase/Makefile.in index 6b44cf6..fa16046 100644 --- a/src/GraphBase/Makefile.in +++ b/src/GraphBase/Makefile.in @@ -1,15 +1,33 @@ -#============================================================================== -# File : Makefile.in -# Created : aug 21 2001 -# Author : , CEA -# Project : SALOME -# Copyright : CEA 2001 +# SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Author : , CEA +# Module : SUPERV # $Header: -#============================================================================== -# source path top_srcdir=@top_srcdir@ -top_builddir=../.. +top_builddir=../../.. srcdir=@srcdir@ VPATH=.:@srcdir@:@top_srcdir@/idl @@ -72,16 +90,10 @@ BIN = SuperVisionBase_CheckOfUndefined BIN_SRC = BIN_SERVER_IDL = -CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) \ - -I${KERNEL_ROOT_DIR}/include/salome -CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 \ - -I${KERNEL_ROOT_DIR}/include/salome -#LDFLAGS= -L../../../lib $(CORBA_LIBS) -lomniORB3 -ltcpwrapGK -lomniDynamic3 -lomnithread -lCOS3 -lCOSDynamic3 -lSalomeNS -lSalomeLifeCycleCORBA -lOpUtil -lSalomeLoggerServer -lc $(PYTHON_LIBS) $(QT_MT_LIBS) $(OGL_LIBS) -LDFLAGS= $(CORBA_LIBS) -lomniORB3 -ltcpwrapGK -lomniDynamic3 -lomnithread -lCOS3 \ - -lCOSDynamic3 -lSalomeNS -lSalomeLifeCycleCORBA -lOpUtil -lSalomeLoggerServer \ - -lc $(QT_MT_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome - -LIBS += -L../../lib/salome +CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) +CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 +LDFLAGS= -L../../../lib $(CORBA_LIBS) -lomniORB3 -ltcpwrapGK -lomniDynamic3 -lomnithread -lCOS3 -lCOSDynamic3 -lSalomeNS -lSalomeLifeCycleCORBA -lOpUtil -lSalomeLoggerServer -lc $(PYTHON_LIBS) $(QT_MT_LIBS) $(OGL_LIBS) +#LDFLAGS= -L../../../lib $(CORBA_LIBS) -lomniORB4 -lomniDynamic4 -lomnithread -lCOS4 -lCOSDynamic4 -lSalomeNS -lSalomeLifeCycleCORBA -lOpUtil -lSalomeLoggerServer -lc $(QT_MT_LIBS) @CONCLUDE@ diff --git a/src/GraphBase/SuperVisionBase_CheckOfUndefined.cxx b/src/GraphBase/SuperVisionBase_CheckOfUndefined.cxx index 5050f68..8787352 100644 --- a/src/GraphBase/SuperVisionBase_CheckOfUndefined.cxx +++ b/src/GraphBase/SuperVisionBase_CheckOfUndefined.cxx @@ -1,13 +1,73 @@ +// SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes. +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SuperVisionBase_CheckOfUndefined.cxx +// Module : SUPERV + using namespace std; #include #include #include -#include "DataFlowBase_Base.hxx" -#include "DataFlowBase_Graph.hxx" +#include "Utils_ORB_INIT.hxx" +#include "Utils_SINGLETON.hxx" + +#include "SALOME_NamingService.hxx" +#include "SALOME_LifeCycleCORBA.hxx" + +int _ArgC ; +char ** _ArgV ; int main(int argc, char **argv) { -// debugFile("TestSuperVision.log"); + + Engines::Component_var objComponent ; + CORBA::Any * anAny = new CORBA::Any() ; + CORBA::Object_ptr obj ; + char * IOR ; + + ORB_INIT &init = *SINGLETON_::Instance() ; + ASSERT(SINGLETON_::IsAlreadyExisting()) ; + CORBA::ORB_var &orb = init( argc , argv ) ; + + SALOME_NamingService * NamingService = new SALOME_NamingService( orb ) ; + + SALOME_LifeCycleCORBA LCC( NamingService ) ; + objComponent = LCC.FindOrLoad_Component( "FactoryServer" , "AddComponent" ); + if ( CORBA::is_nil( objComponent ) ) { + cout << " LCC.FindOrLoad_Component( FactoryServer , AddComponent )" << endl; + return 0 ; + } + + *anAny <<= objComponent ; + IOR = orb->object_to_string( objComponent ); + cout << "objComponent " << objComponent << " IOR " << IOR << " nil " << CORBA::is_nil( objComponent ) + << endl ; + + *anAny >>= obj ; + IOR = orb->object_to_string( obj ); + cout << "obj " << obj << " IOR " << IOR << " nil " << CORBA::is_nil( obj ) + << endl ; + return 0; } diff --git a/src/GraphEditor/DataFlowEditor_DataFlow.cxx b/src/GraphEditor/DataFlowEditor_DataFlow.cxx index 836dac0..40e2639 100644 --- a/src/GraphEditor/DataFlowEditor_DataFlow.cxx +++ b/src/GraphEditor/DataFlowEditor_DataFlow.cxx @@ -1,5 +1,30 @@ -using namespace std; +// SUPERV GraphEditor : contains classes that permit edition of graphs +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowEditor_DataFlow.cxx +// Module : SUPERV +using namespace std; #include "DataFlowEditor_DataFlow.hxx" // Implementation de la classe GraphEditor::Graph diff --git a/src/GraphEditor/DataFlowEditor_DataFlow.hxx b/src/GraphEditor/DataFlowEditor_DataFlow.hxx index d415fe1..2209f7c 100644 --- a/src/GraphEditor/DataFlowEditor_DataFlow.hxx +++ b/src/GraphEditor/DataFlowEditor_DataFlow.hxx @@ -1,3 +1,29 @@ +// SUPERV GraphEditor : contains classes that permit edition of graphs +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowEditor_DataFlow.hxx +// Module : SUPERV + #ifndef _DATAFLOWEDITOR_DATAFLOW_HXX #define _DATAFLOWEDITOR_DATAFLOW_HXX @@ -16,6 +42,7 @@ namespace GraphEditor { GraphExecutor::DataFlow * _DataFlowExecutor ; bool _ReadOnly ; bool _Executing ; + bool _EditedAfterExecution ; public: @@ -117,6 +144,11 @@ namespace GraphEditor { const char* ToServiceParameterName , const CORBA::Any aValue = CORBA::Any() ) ; + bool RemoveLink( const char* FromNodeName , + const char* FromServiceParameterName , + const char* ToNodeName , + const char* ToServiceParameterName ) ; + bool GetLink(const char* ToNodeName , const char* ToServiceParameterName , char** FromNodeName , @@ -165,11 +197,6 @@ namespace GraphEditor { const char* ToServiceParameterName , const int index , long &X , long &Y ) ; - bool RemoveLink( const char* FromNodeName , - const char* FromServiceParameterName , - const char* ToNodeName , - const char* ToServiceParameterName ) ; - bool AddInputData( const char* ToNodeName , const char* ToParameterName , const CORBA::Any aValue = CORBA::Any() ) ; @@ -188,6 +215,8 @@ namespace GraphEditor { bool IsExecuting() ; bool IsEditing() ; + void EditedAfterExecution(bool EditedAfterExecution ) ; + bool EditedAfterExecution() ; bool IsReadOnly() ; diff --git a/src/GraphEditor/DataFlowEditor_DataFlow.lxx b/src/GraphEditor/DataFlowEditor_DataFlow.lxx index 3eb2e8d..b248b3b 100644 --- a/src/GraphEditor/DataFlowEditor_DataFlow.lxx +++ b/src/GraphEditor/DataFlowEditor_DataFlow.lxx @@ -1,3 +1,29 @@ +// SUPERV GraphEditor : contains classes that permit edition of graphs +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowEditor_DataFlow.lxx +// Module : SUPERV + #ifndef _DATAFLOWEDITOR_DATAFLOW_LXX #define _DATAFLOWEDITOR_DATAFLOW_LXX @@ -35,18 +61,21 @@ inline bool GraphEditor::DataFlow::LoadDataFlow( const GraphBase::SGraph *aDataFlow ) { if ( _ReadOnly ) return false ; + _EditedAfterExecution = true ; return GraphEditor::OutNode::LoadDataFlow( aDataFlow ) ; } ; inline bool GraphEditor::DataFlow::LoadXml( const char* myFileName ) { if ( _ReadOnly ) return false ; + _EditedAfterExecution = true ; return GraphEditor::OutNode::LoadXml( myFileName ) ; } ; inline bool GraphEditor::DataFlow::LoadInfo( const GraphBase::SNode &aDataFlowInfo ) { if ( _ReadOnly ) return false ; + _EditedAfterExecution = true ; return GraphEditor::OutNode::LoadInfo( aDataFlowInfo ) ; } ; @@ -108,6 +137,7 @@ inline GraphEditor::InNode * GraphEditor::DataFlow::AddNode( const int NodeY) { if ( _ReadOnly ) return (GraphEditor::InNode * ) NULL ; + _EditedAfterExecution = true ; return GraphEditor::OutNode::AddNode( NodeService , aFuncName , aPythonFunction , NodeComponentName , @@ -127,6 +157,7 @@ inline GraphEditor::InNode * GraphEditor::DataFlow::GetNode( const char* NodeNam inline bool GraphEditor::DataFlow::RemoveNode( const char* NodeName ) { if ( _ReadOnly ) return false ; + _EditedAfterExecution = true ; return GraphEditor::OutNode::RemoveNode( NodeName ) ; } ; @@ -134,6 +165,7 @@ inline bool GraphEditor::DataFlow::ReNameNode( const char* OldNodeName , const char* NewNodeName ) { if ( _ReadOnly ) return false ; + _EditedAfterExecution = true ; return GraphEditor::OutNode::ReNameNode( OldNodeName , NewNodeName ) ; } ; @@ -145,6 +177,7 @@ inline const SALOME_ModuleCatalog::Service * GraphEditor::DataFlow::NodeService( } inline void GraphEditor::DataFlow::Coordinates( const int X , const int Y ) { + _EditedAfterExecution = true ; return GraphEditor::OutNode::Coordinates( X , Y ) ; } ; @@ -194,6 +227,7 @@ inline bool GraphEditor::DataFlow::AddLink( const char* FromNodeName , if ( _ReadOnly ) return false ; CORBA::Any const * theValue = GetNode( FromNodeName )->GetOutPort( FromServiceParameterName )->Value() ; // Keep the type ! + _EditedAfterExecution = true ; return GraphEditor::OutNode::AddLink( FromNodeName , FromServiceParameterName , ToNodeName , @@ -225,6 +259,7 @@ inline bool GraphEditor::DataFlow::AddLinkCoord( const int nXY , const int* X , const int* Y ) { + _EditedAfterExecution = true ; return GraphEditor::OutNode::AddLinkCoord( FromNodeName , FromServiceParameterName , ToNodeName , @@ -240,6 +275,7 @@ inline bool GraphEditor::DataFlow::AddLinkCoord( const int index , const int X , const int Y ) { + _EditedAfterExecution = true ; return GraphEditor::OutNode::AddLinkCoord( FromNodeName , FromServiceParameterName , ToNodeName , @@ -255,6 +291,7 @@ inline bool GraphEditor::DataFlow::ChangeLinkCoord( const int index , const int X , const int Y ) { + _EditedAfterExecution = true ; return GraphEditor::OutNode::ChangeLinkCoord( FromNodeName , FromServiceParameterName , ToNodeName , @@ -268,6 +305,7 @@ inline bool GraphEditor::DataFlow::RemoveLinkCoord( const char* ToNodeName , const char* ToServiceParameterName , const int index ) { + _EditedAfterExecution = true ; return GraphEditor::OutNode::RemoveLinkCoord( FromNodeName , FromServiceParameterName , ToNodeName , @@ -319,6 +357,7 @@ inline bool GraphEditor::DataFlow::RemoveLink( const char* ToServiceParameterName ) { if ( _ReadOnly ) return false ; + _EditedAfterExecution = true ; return GraphEditor::OutNode::RemoveLink( FromNodeName , FromServiceParameterName , ToNodeName , @@ -404,6 +443,14 @@ inline bool GraphEditor::DataFlow::IsEditing() { return !IsExecuting() ; } +inline void GraphEditor::DataFlow::EditedAfterExecution(bool EditedAfterExecution ) { + _EditedAfterExecution = EditedAfterExecution ; +} + +inline bool GraphEditor::DataFlow::EditedAfterExecution() { + return _EditedAfterExecution ; +} + inline bool GraphEditor::DataFlow::IsReadOnly() { return _ReadOnly ; } @@ -434,6 +481,7 @@ inline long GraphEditor::DataFlow::GraphsNumber() { inline void GraphEditor::DataFlow::Executor( GraphExecutor::DataFlow * DataFlowExecutor ) { + _Executing = true ; _DataFlowExecutor = DataFlowExecutor ; } diff --git a/src/GraphEditor/DataFlowEditor_InNode.cxx b/src/GraphEditor/DataFlowEditor_InNode.cxx index 398cd2a..034c99e 100644 --- a/src/GraphEditor/DataFlowEditor_InNode.cxx +++ b/src/GraphEditor/DataFlowEditor_InNode.cxx @@ -1,3 +1,29 @@ +// SUPERV GraphEditor : contains classes that permit edition of graphs +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowEditor_InNode.cxx +// Module : SUPERV + using namespace std; #include #include diff --git a/src/GraphEditor/DataFlowEditor_InNode.hxx b/src/GraphEditor/DataFlowEditor_InNode.hxx index 6082e33..2c8cfd9 100644 --- a/src/GraphEditor/DataFlowEditor_InNode.hxx +++ b/src/GraphEditor/DataFlowEditor_InNode.hxx @@ -1,3 +1,29 @@ +// SUPERV GraphEditor : contains classes that permit edition of graphs +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowEditor_InNode.hxx +// Module : SUPERV + #ifndef _DATAFLOWEDITOR_INNODE_HXX #define _DATAFLOWEDITOR_INNODE_HXX diff --git a/src/GraphEditor/DataFlowEditor_OutNode.cxx b/src/GraphEditor/DataFlowEditor_OutNode.cxx index 4385cf1..bdb00d8 100644 --- a/src/GraphEditor/DataFlowEditor_OutNode.cxx +++ b/src/GraphEditor/DataFlowEditor_OutNode.cxx @@ -1,5 +1,30 @@ -using namespace std; +// SUPERV GraphEditor : contains classes that permit edition of graphs +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowEditor_OutNode.cxx +// Module : SUPERV +using namespace std; #include "DataFlowEditor_OutNode.hxx" #include "DataFlowBase_EndOfLoopNode.hxx" #include "DataFlowBase_EndOfSwitchNode.hxx" @@ -184,10 +209,13 @@ bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes , aMapOfNodes[ *aNodetheName ] = GetGraphNodeIndex( anInNode->Name() ) ; if ( anInNode->IsOneOfInLineNodes() ) { anInNode->GraphEditor::InNode::InLineNode()->DefPortsOfNode( - _Orb , aNode.theService , anInNode->NamePtr() , - anInNode->Kind() , false , - anInNode->IsLoopNode() || anInNode->IsEndLoopNode() , - true , true , Graph_prof_debug() , Graph_fdebug() ) ; + _Orb , aNode.theService , anInNode->NamePtr() , + anInNode->Kind() , +// false , // DataFlowOrComputing +// anInNode->IsLoopNode() || anInNode->IsEndLoopNode() , // WithInLoop +// anInNode->IsInLineNode() || anInNode->IsLoopNode() || anInNode->IsSwitchNode() || anInNode->IsEndSwitchNode() , // WithInGate +// anInNode->IsInLineNode() || anInNode->IsSwitchNode() || anInNode->IsGOTONode() , // WithOutGate + Graph_prof_debug() , Graph_fdebug() ) ; GraphBase::InLineNode * aINode = anInNode->InLineNode() ; GraphBase::LoopNode * aLNode = NULL ; if ( aINode->IsLoopNode() ) { @@ -253,6 +281,10 @@ bool GraphEditor::OutNode::LoadLinks(map< string , int > & aMapOfNodes , GraphBase::SLink aLink = aListOfLinks[ i ] ; string * aLinkFromNodeName = new string( aLink.FromNodeName.c_str() ) ; string * aLinkToNodeName = new string( aLink.ToNodeName.c_str() ) ; + cdebug << "LoadLinks " << aLinkFromNodeName->c_str() << "( " + << aLink.FromServiceParameterName.c_str() << " ) --> " + << aLinkToNodeName->c_str() << "( " + << aLink.FromServiceParameterName.c_str() << " )" << endl ; RetVal = AddLink( GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() , aLink.FromServiceParameterName.c_str() , GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() , @@ -684,20 +716,20 @@ bool GraphEditor::OutNode::Executable() { const CORBA::Any *GraphEditor::OutNode::GetInData( const char * ToNodeName , const char * ToParameterName ) { - cdebug_in << "GraphEditor::OutNode::GetInData" << endl ; +// cdebug_in << "GraphEditor::OutNode::GetInData " << ToNodeName +// << " " << ToParameterName << endl ; const CORBA::Any * retdata = PortInData( ToNodeName , ToParameterName ) ; - cdebug_out << "GraphEditor::OutNode::GetInData " << ToNodeName - << " " << ToParameterName << endl ; +// cdebug_out << "GraphEditor::OutNode::GetInData" << endl ; return retdata ; } const CORBA::Any *GraphEditor::OutNode::GetOutData( const char * FromNodeName , const char * FromParameterName ) { - cdebug_in << "GraphEditor::OutNode::GetOutData" << endl ; +// cdebug_in << "GraphEditor::OutNode::GetOutData " << FromNodeName +// << " " << FromParameterName << endl ; const CORBA::Any * retdata = PortOutData( FromNodeName , FromParameterName ) ; - cdebug_out << "GraphEditor::OutNode::GetOutData " << FromNodeName - << " " << FromParameterName << endl ; +// cdebug_out << "GraphEditor::OutNode::GetOutData" << endl ; return retdata ; } diff --git a/src/GraphEditor/DataFlowEditor_OutNode.hxx b/src/GraphEditor/DataFlowEditor_OutNode.hxx index 713834b..780bee9 100644 --- a/src/GraphEditor/DataFlowEditor_OutNode.hxx +++ b/src/GraphEditor/DataFlowEditor_OutNode.hxx @@ -1,3 +1,29 @@ +// SUPERV GraphEditor : contains classes that permit edition of graphs +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowEditor_OutNode.hxx +// Module : SUPERV + #ifndef _DATAFLOWEDITOR_OUTNODE_HXX #define _DATAFLOWEDITOR_OUTNODE_HXX @@ -101,7 +127,13 @@ namespace GraphEditor { const int NodeX , const int NodeY ) ; GraphEditor::InNode * GetNode( const char* NodeName ) { - return (GraphEditor::InNode * ) (GraphBase::Graph::GetGraphNode( NodeName )->GetInNode()) ; } ; + const GraphBase::Graph::ComputingNode * aNode = GraphBase::Graph::GetGraphNode( NodeName ) ; + if ( aNode ) { + return (GraphEditor::InNode * ) (aNode->GetInNode()) ; + } + else { + return (GraphEditor::InNode * ) NULL ; + } } ; bool RemoveNode( const char* NodeName ) { DateModification() ; _Valid = false ; diff --git a/src/GraphEditor/Makefile.in b/src/GraphEditor/Makefile.in index 7e38461..1d61899 100644 --- a/src/GraphEditor/Makefile.in +++ b/src/GraphEditor/Makefile.in @@ -1,15 +1,33 @@ -#============================================================================== -# File : Makefile.in -# Created : aug 21 2001 -# Author : , CEA -# Project : SALOME -# Copyright : CEA 2001 +# SUPERV GraphEditor : contains classes that permit edition of graphs +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Author : , CEA +# Module : SUPERV # $Header: -#============================================================================== -# source path top_srcdir=@top_srcdir@ -top_builddir=../.. +top_builddir=../../.. srcdir=@srcdir@ VPATH=.:@srcdir@:@top_srcdir@/idl @@ -40,12 +58,10 @@ LIB_CLIENT_IDL = SALOME_ModuleCatalog.idl \ BIN_SRC = BIN_SERVER_IDL = -CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome -CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -I${KERNEL_ROOT_DIR}/include/salome +CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) +CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 #LDFLAGS+= -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lSalomeSuperVisionExecutor -lOpUtil -lSalomeLoggerServer -lc $(PYTHON_LIBS) $(QT_MT_LIBS) $(OGL_LIBS) -LDFLAGS+= -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase \ - -lSalomeSuperVisionExecutor -lOpUtil -lSalomeLoggerServer \ - -lc $(QT_MT_LIBS) $(OGL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome +LDFLAGS+= -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lSalomeSuperVisionExecutor -lOpUtil -lSalomeLoggerServer -lc $(QT_MT_LIBS) $(OGL_LIBS) @CONCLUDE@ diff --git a/src/GraphEditor/SuperVisionEditor_CheckOfUndefined.cxx b/src/GraphEditor/SuperVisionEditor_CheckOfUndefined.cxx index 9e1a93c..5dcb456 100644 --- a/src/GraphEditor/SuperVisionEditor_CheckOfUndefined.cxx +++ b/src/GraphEditor/SuperVisionEditor_CheckOfUndefined.cxx @@ -1,3 +1,29 @@ +// SUPERV GraphEditor : contains classes that permit edition of graphs +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SuperVisionEditor_CheckOfUndefined.cxx +// Module : SUPERV + using namespace std; #include #include @@ -10,6 +36,9 @@ using namespace std; #include "DataFlowEditor_DataFlow.hxx" #include "DataFlowEditor_DataFlow.lxx" +int _ArgC ; +char ** _ArgV ; + int main(int argc, char **argv) { return 1; diff --git a/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx b/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx index 653fafb..ce71218 100644 --- a/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx +++ b/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx @@ -1,5 +1,30 @@ -using namespace std; +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowExecutor_DataFlow.cxx +// Module : SUPERV +using namespace std; #include "DataFlowExecutor_DataFlow.hxx" // Implementation de la classe GraphExecutor::Graph @@ -120,10 +145,8 @@ bool GraphExecutor::DataFlow::KillDone( const char *aNodeName ) { bool GraphExecutor::DataFlow::Suspend() { cdebug_in << "GraphExecutor::DataFlow::Suspend()" << endl; - bool RetVal = false ; - MESSAGE("Suspend not yet implemented.") ; - cdebug << "Suspend not yet implemented." << endl; - cdebug_out << "GraphExecutor::DataFlow::Suspend()" << endl; + bool RetVal = GraphExecutor::OutNode::Suspend() ; + cdebug_out << "GraphExecutor::DataFlow::Suspend()" << RetVal << endl; return RetVal ; } @@ -159,9 +182,8 @@ bool GraphExecutor::DataFlow::SuspendDone( const char *aNodeName ) { bool GraphExecutor::DataFlow::Resume() { cdebug_in << "GraphExecutor::DataFlow::Resume()" << endl; - bool RetVal = false ; - cdebug << "Resume not yet implemented." << endl; - cdebug_out << "GraphExecutor::DataFlow::Resume()" << endl; + bool RetVal = GraphExecutor::OutNode::Resume() ; + cdebug_out << "GraphExecutor::DataFlow::Resume()" << RetVal << endl; return RetVal ; } diff --git a/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx b/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx index 7e65137..0206493 100644 --- a/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx +++ b/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx @@ -1,3 +1,29 @@ +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowExecutor_DataFlow.hxx +// Module : SUPERV + #ifndef _DATAFLOWEXECUTOR_DATAFLOW_HXX #define _DATAFLOWEXECUTOR_DATAFLOW_HXX diff --git a/src/GraphExecutor/DataFlowExecutor_DataFlow.lxx b/src/GraphExecutor/DataFlowExecutor_DataFlow.lxx index 77dfb03..41397d5 100644 --- a/src/GraphExecutor/DataFlowExecutor_DataFlow.lxx +++ b/src/GraphExecutor/DataFlowExecutor_DataFlow.lxx @@ -1,3 +1,29 @@ +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowExecutor_DataFlow.lxx +// Module : SUPERV + #ifndef _DATAFLOWEXECUTOR_DATAFLOW_LXX #define _DATAFLOWEXECUTOR_DATAFLOW_LXX diff --git a/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx b/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx index 25d3b22..8e4ae74 100644 --- a/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx +++ b/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_DynInvoke.cxx -// Created : 2002 -// Author : Marc Tajchman, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_DynInvoke.cxx +// Author : Marc Tajchman, CEA +// Module : SUPERV +// $Header: +using namespace std; #include #include diff --git a/src/GraphExecutor/DataFlowExecutor_DynInvoke.hxx b/src/GraphExecutor/DataFlowExecutor_DynInvoke.hxx index 097e5a3..825db19 100644 --- a/src/GraphExecutor/DataFlowExecutor_DynInvoke.hxx +++ b/src/GraphExecutor/DataFlowExecutor_DynInvoke.hxx @@ -1,3 +1,29 @@ +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowExecutor_DynInvoke.hxx +// Module : SUPERV + #ifndef _DATAFLOWEXECUTOR_DYNINVOKE_ #define _DATAFLOWEXECUTOR_DYNINVOKE_ diff --git a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx index 0f847d0..5449455 100644 --- a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx +++ b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : DataFlowBase_FiniteStateMachine.cxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_FiniteStateMachine.cxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: +using namespace std; #include #include #include diff --git a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.hxx b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.hxx index aba11ae..aaeac24 100644 --- a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.hxx +++ b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.hxx @@ -1,10 +1,30 @@ -//============================================================================= -// File : DataFlowBase_FiniteStateMachine.hxx -// Created : 2002 -// Author : Jean Rahuel, CEA -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DataFlowBase_FiniteStateMachine.hxx +// Author : Jean Rahuel, CEA +// Module : SUPERV +// $Header: #ifndef _DATAFLOWEXECUTOR_FINITESTATEMACHINE #define _DATAFLOWEXECUTOR_FINITESTATEMACHINE diff --git a/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx b/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx index 927370f..847324d 100644 --- a/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx +++ b/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx @@ -649,7 +649,7 @@ int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() { bool LoopBeginning = false ; bool SwitchFinished = false ; - if ( IsEndLoopNode() && !GetChangeNodeInPort( 1 )->GetOutPort()->BoolValue() ) { + if ( IsEndLoopNode() && !GetChangeNodeInPort( 0 )->GetOutPort()->BoolValue() ) { LoopFinished = true ; // End of Loop } if ( IsLoopNode() && GetChangeNodeInPort( 1 )->GetOutPort()->BoolValue() ) { @@ -1001,6 +1001,7 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { if ( IsOneOfInLineNodes() ) { bool StsPyDynInvoke = true ; + _OutNode->PThreadLock() ; try { if ( IsInLineNode() && (*InLineNode()->PythonFunction()).length() && strlen( InLineNode()->PyFuncName() ) ) { @@ -1020,7 +1021,7 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { StsPyDynInvoke = PyDynInvoke( InLineNode()->PyRunMethod() , InLineNode()->PyFuncName() , &aListOfInParameters[2] , ServiceInParameter().length() , - &aListOfOutParameters[2] , ServiceOutParameter().length() ) ; + &aListOfOutParameters[1] , ServiceOutParameter().length() ) ; } else { cdebug << ThreadNo() << " !ObjInterface " << Name() @@ -1029,7 +1030,7 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { StsPyDynInvoke = PyDynInvoke( LoopNode()->PyNextMethod() , LoopNode()->PyNextName() , &aListOfInParameters[2] , ServiceInParameter().length() , - &aListOfOutParameters[2] , ServiceOutParameter().length() ) ; + &aListOfOutParameters[1] , ServiceOutParameter().length() ) ; } if ( StsPyDynInvoke ) { cdebug << ThreadNo() << " !ObjInterface " << Name() @@ -1038,8 +1039,8 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << " OutParameters" << endl ; int i ; for ( i = 0 ; i < ServiceInParameter().length() ; i++ ) { - aListOfInParameters[2 + i].Value = aListOfOutParameters[2+ i].Value ; - aListOfInParameters[2 + i].Name = aListOfOutParameters[2+ i].Name ; + aListOfInParameters[2 + i].Value = aListOfOutParameters[1+ i].Value ; + aListOfInParameters[2 + i].Name = aListOfOutParameters[1+ i].Name ; switch ( aListOfInParameters[2 + i].Value.type()->kind() ) { case CORBA::tk_string : cdebug << "Arg" << i << " : " @@ -1070,7 +1071,7 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { StsPyDynInvoke = PyDynInvoke( LoopNode()->PyMoreMethod() , LoopNode()->PyMoreName() , &aListOfInParameters[2] , ServiceInParameter().length() , - &aListOfOutParameters[1] , ServiceOutParameter().length()+1 ) ; + &aListOfOutParameters[0] , ServiceOutParameter().length()+1 ) ; } else { Err = true ; @@ -1107,7 +1108,7 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { StsPyDynInvoke = PyDynInvoke( InLineNode()->PyRunMethod() , InLineNode()->PyFuncName() , &aListOfInParameters[1] , ServiceInParameter().length() , - &aListOfOutParameters[1] , ServiceOutParameter().length() ) ; + &aListOfOutParameters[0] , ServiceOutParameter().length() ) ; } else if ( (*InLineNode()->PythonFunction()).length() == 0 || strlen( InLineNode()->PyFuncName() ) == 0 ) { @@ -1115,41 +1116,44 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << " Copy of " << ServiceInParameter().length() << " OutParameters" << endl ; int i ; - int argind0 = 1 ; - if ( IsEndLoopNode() ) { - argind0 = 2 ; + int argind0 = 0 ; + if ( IsEndSwitchNode() ) { + argind0 = 0 ; + } + else if ( IsEndLoopNode() || IsGOTONode() ) { + argind0 = 1 ; } for ( i = 0 ; i < ServiceInParameter().length() ; i++ ) { - aListOfOutParameters[argind0 + i].Value = aListOfInParameters[argind0 + i].Value ; + aListOfOutParameters[argind0 + i].Value = aListOfInParameters[ 1 + i].Value ; // aListOfOutParameters[argind0 + i].Name = aListOfInParameters[argind0 + i].Name ; - switch ( aListOfInParameters[argind0 + i].Value.type()->kind() ) { + switch ( aListOfInParameters[ 1 + i].Value.type()->kind() ) { case CORBA::tk_string : cdebug << "Arg" << i << " : " - << aListOfInParameters[argind0 + i].Name.c_str() + << aListOfInParameters[ 1 + i].Name.c_str() << " Value(string) " << aListOfOutParameters[argind0 + i].Name.c_str() << endl ; break ; case CORBA::tk_double : cdebug << "Arg" << i << " : " - << aListOfInParameters[argind0 + i].Name.c_str() + << aListOfInParameters[ 1 + i].Name.c_str() << " Value(double) " << aListOfOutParameters[argind0 + i].Name.c_str() << endl ; break ; case CORBA::tk_long : cdebug << "Arg" << i << " : " - << aListOfInParameters[argind0 + i].Name.c_str() + << aListOfInParameters[ 1 + i].Name.c_str() << " Value(long) " << aListOfOutParameters[argind0 + i].Name.c_str() << endl ; break ; case CORBA::tk_objref : cdebug << "Arg" << i << " : " - << aListOfInParameters[argind0 + i].Name.c_str() + << aListOfInParameters[ 1 + i].Name.c_str() << " Value(object reference) " << aListOfOutParameters[argind0 + i].Name.c_str() << endl ; break ; default : cdebug << "Arg" << i << " : " - << aListOfInParameters[argind0 + i].Name.c_str() + << aListOfInParameters[ 1 + i].Name.c_str() << " Value(other) ERROR " << aListOfOutParameters[argind0 + i].Name.c_str() << endl ; } @@ -1168,6 +1172,7 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { << " Python Dynamic Call Exception catched ERROR" << endl ; } + _OutNode->PThreadUnLock() ; } // else if ( !ObjInterface() ) { else if ( IsFactoryNode() ) { @@ -1464,18 +1469,19 @@ int GraphExecutor::InNode::Successed_SuccessAction() { DoneAction() ; if ( IsGOTONode() || - ( IsEndLoopNode() && GetNodeInPort(1)->GetOutPort()->BoolValue() ) ) { - int index ; - if ( IsGOTONode() ) { - index = 0 ; - } - else { - index = 1 ; - CORBA::Any * anAny = new CORBA::Any() ; - *anAny <<= (long ) 0 ; - GetChangeNodeOutPort(1)->Value( anAny ) ; // Loop(InLoop) = false - } - const GraphBase::OutPort * GateOutPort = GetNodeOutPort(index) ; + ( IsEndLoopNode() && GetNodeInPort(0)->GetOutPort()->BoolValue() ) ) { +// int index ; +// if ( IsGOTONode() ) { +// index = 0 ; +// } +// else { +// index = 1 ; +// CORBA::Any * anAny = new CORBA::Any() ; +// *anAny <<= (long ) 0 ; +// GetChangeNodeOutPort(1)->Value( anAny ) ; // Loop(InLoop) = false +// } +// const GraphBase::OutPort * GateOutPort = GetNodeOutPort(index) ; + const GraphBase::OutPort * GateOutPort = GetNodeOutPort(0) ; for ( i = 0 ; i < GateOutPort->InPortsSize() ; i++ ) { const GraphBase::InPort * anInPort = GateOutPort->InPorts( i ) ; GraphExecutor::InNode * aLabelNode = (GraphExecutor::InNode *) _OutNode->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ; @@ -1483,19 +1489,12 @@ int GraphExecutor::InNode::Successed_SuccessAction() { for ( j = 1 ; j < GetNodeOutPortsSize() ; j++ ) { GraphBase::OutPort * aBusParamOutPort = GetChangeNodeOutPort( j ) ; GraphBase::InPort * aBusParamChangeInPort = NULL ; - if ( aBusParamOutPort->IsLoop() ) { - aBusParamChangeInPort = aLabelNode->GetChangeInPort( "InitLoop" ) ; - } - else { +// if ( aBusParamOutPort->IsLoop() ) { +// aBusParamChangeInPort = aLabelNode->GetChangeInPort( "InitLoop" ) ; +// } +// else { aBusParamChangeInPort = aLabelNode->GetChangeInPort( aBusParamOutPort->PortName() ) ; - } -// const GraphBase::InPort * aBusParamInPort = aBusParamChangeInPort ; -// if ( aBusParamInPort ) { -// GraphBase::OutPort * anOutPort = aBusParamInPort->GetOutPort() ; -// anOutPort->Value( aBusParamOutPort->Value() ) ; -// GraphExecutor::InNode * aFromLabelNode = (GraphExecutor::InNode *) _OutNode->GetChangeGraphNode( anOutPort->NodeName() )->GetInNode() ; -// if ( aFromLabelNode && !aLabelNode->IsLockedDataWait() ) { -// res = aLabelNode->SendSomeDataReady( aFromLabelNode->Name() , EndTest ) ; +// } if ( aBusParamChangeInPort ) { aBusParamChangeInPort->ChangeOutPort( aBusParamOutPort ) ; if ( !aLabelNode->IsLockedDataWait() ) { @@ -1525,7 +1524,6 @@ int GraphExecutor::InNode::Successed_SuccessAction() { << aLabelNode->Name() << " with datas from " << aBusParamOutPort->PortName() << " to port " << aBusParamChangeInPort->PortName() << endl; -// aBusParamChangeInPort->State( SUPERV::ReadyState ) ; } } else { @@ -1534,10 +1532,14 @@ int GraphExecutor::InNode::Successed_SuccessAction() { << aLabelNode->Name() << endl; } } - const GraphBase::OutPort * aGateOutPort = GetNodeOutPort( index ) ; - const GraphBase::InPort * aGateInPort = aLabelNode->GetNodeInPort( index ) ; +// const GraphBase::OutPort * aGateOutPort = GetNodeOutPort( index ) ; +// const GraphBase::InPort * aGateInPort = aLabelNode->GetNodeInPort( index ) ; + const GraphBase::OutPort * aGateOutPort = GetNodeOutPort( 0 ) ; // DoLoop or OutGate + const GraphBase::InPort * aGateInPort = aLabelNode->GetNodeInPort( 0 ) ; if ( aGateInPort ) { - aGateInPort->GetOutPort()->Value( aGateOutPort->Value() ) ; + if ( aGateInPort->GetOutPort() ) { + aGateInPort->GetOutPort()->Value( aGateOutPort->Value() ) ; + } if ( !aLabelNode->IsLockedDataWait() ) { res = aLabelNode->SendSomeDataReady( Name() ) ; if ( res ) { @@ -1597,7 +1599,7 @@ int GraphExecutor::InNode::Successed_SuccessAction() { } } if ( toNode && IsLoopNode() ) { - GraphBase::OutPort * fromLoopOutPort = GetChangeNodeOutPort(1) ; + GraphBase::OutPort * fromLoopOutPort = GetChangeNodeOutPort(0) ; if ( !fromLoopOutPort->BoolValue() ) { if ( strcmp( toNode->Name() , CoupledNode()->Name() ) ) { IgnoreForEndLoop = true ; // toNode is the EndLoopNode @@ -2089,8 +2091,8 @@ void GraphExecutor::InNode::InOutParameters( string _Type = CORBA::string_dup(GetChangeNodeOutPort(i)->GetServicesParameter().Parametertype) ; const char * Type = _Type.c_str() ; bool OutDone = GetChangeNodeOutPort(i)->Done() ; -// cdebug << ThreadNo() << " ArgOut" << i << " " << D.Name << " Done(" -// << OutDone << ") " << Type << " : " << endl ; + cdebug << ThreadNo() << " ArgOut" << i << " " << D.Name << " Done(" + << OutDone << ") " << Type << " : " << endl ; if ( !strcmp( Type , "string" ) ) { D.Value <<= (char *) NULL ; } @@ -2101,10 +2103,11 @@ void GraphExecutor::InNode::InOutParameters( D.Value <<= (long ) 0 ; } else { - D.Value.replace(CORBA::_tc_Object, NULL); +// D.Value.replace(CORBA::_tc_Object, NULL); + D.Value <<= CORBA::Object::_nil() ; } // GetChangeNodeOutPort(i)->Value( D.Value ) ; -#if 0 +//#if 0 switch (D.Value.type()->kind()) { case CORBA::tk_string: char * t; @@ -2127,7 +2130,7 @@ void GraphExecutor::InNode::InOutParameters( default: cdebug << ThreadNo() << " " << "(other ERROR)" << endl ; } -#endif +//#endif aListOfOutParameters[i] = D ; } } diff --git a/src/GraphExecutor/DataFlowExecutor_OutNode.cxx b/src/GraphExecutor/DataFlowExecutor_OutNode.cxx index 231674b..5f30b89 100644 --- a/src/GraphExecutor/DataFlowExecutor_OutNode.cxx +++ b/src/GraphExecutor/DataFlowExecutor_OutNode.cxx @@ -15,6 +15,9 @@ extern GraphExecutor::FiniteStateMachine * theAutomaton ; static const char *ComponentName = "SalomeSuperVisionComponent" ; +extern int _ArgC ; +extern char ** _ArgV ; + GraphExecutor::OutNode::OutNode() : Graph() { _Valid = false ; @@ -195,9 +198,8 @@ bool GraphExecutor::OutNode::LoadNodes(const GraphBase::ListOfNodes &aListOfNode if ( anInNode->IsOneOfInLineNodes() ) { anInNode->GraphExecutor::InNode::InLineNode()->DefPortsOfNode( _Orb , aNode.theService , anInNode->NamePtr() , - anInNode->Kind() , false , - anInNode->IsLoopNode() || anInNode->IsEndLoopNode() , - true , true , Graph_prof_debug() , Graph_fdebug() ) ; + anInNode->Kind() , + Graph_prof_debug() , Graph_fdebug() ) ; #if 0 GraphBase::InLineNode * aINode = anInNode->InLineNode() ; GraphBase::LoopNode * aLNode = NULL ; @@ -404,7 +406,8 @@ bool GraphExecutor::OutNode::Run( const bool AndSuspend ) { GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) GraphNodes( i )->GetInNode() ; if ( !PyInitialized() && anInNode->IsOneOfInLineNodes() ) { if ( !Py_IsInitialized() ) { - Py_Initialize() ; +// Py_Initialize() ; + PySys_SetArgv( _ArgC , _ArgV ) ; } anInNode->InitPython() ; PyInitialized( true ) ; @@ -540,8 +543,8 @@ void GraphExecutor::OutNode::CheckAllDone() { // PushEvent AFTER State and _Done ! ... PushEvent( NULL , GraphExecutor::EndExecuteEvent , OutNodeState ) ; - Py_Finalize() ; - PyInitialized( false ) ; +// Py_Finalize() ; +// PyInitialized( false ) ; } } cdebug_out << "GraphExecutor::OutNode::CheckAllDone " << _Done @@ -550,6 +553,50 @@ void GraphExecutor::OutNode::CheckAllDone() { << _SuspendedThreads << endl ; } +void GraphExecutor::OutNode::PThreadLock( pthread_mutex_t * aMutex , char * errmsg ) { +// if ( strcmp( errmsg , "EventLoop" ) && strcmp( errmsg , "EventW" ) ) { +// cdebug << "GraphExecutor::OutNode::PThreadLock " << pthread_self() << " " << aMutex << " " +// << errmsg << endl ; +// } + if ( pthread_mutex_lock( aMutex ) ) { + perror( errmsg ) ; + exit( 0 ) ; + } +// if ( strcmp( errmsg , "EventLoop" ) && strcmp( errmsg , "EventW" ) ) { +// cdebug << "GraphExecutor::OutNode::PThreadLocked " << pthread_self() << " " << aMutex << " " +// << errmsg << endl ; +// } +} + +void GraphExecutor::OutNode::PThreadUnLock( pthread_mutex_t * aMutex , char * errmsg ) { +// if ( strcmp( errmsg , "EventLoop" ) && strcmp( errmsg , "EventW" ) ) { +// cdebug << " GraphExecutor::OutNode::PThreadUnLock " << pthread_self() << " " << aMutex << " " +// << errmsg << endl ; +// } + if ( pthread_mutex_unlock( aMutex ) ) { + perror( errmsg ) ; + exit( 0 ) ; + } +} + +void GraphExecutor::OutNode::PThreadLock() { + cout << " GraphExecutor::OutNode::PThreadLock " << pthread_self() << endl ; + if ( pthread_mutex_lock( &_MutexWait ) ) { + perror( "GraphExecutor::OutNode::PThreadLock" ) ; + exit( 0 ) ; + } + cout << " GraphExecutor::OutNode::PThreadLocked " << pthread_self() << endl ; +} + +void GraphExecutor::OutNode::PThreadUnLock() { + cout << " GraphExecutor::OutNode::PThreadUnLock " << pthread_self() << endl ; + if ( pthread_mutex_unlock( &_MutexWait ) ) { + perror( "GraphExecutor::OutNode::PThreadUnLock" ) ; + exit( 0 ) ; + } + cout << " GraphExecutor::OutNode::PThreadUnLocked " << pthread_self() << endl ; +} + void GraphExecutor::OutNode::NewThread() { if ( pthread_mutex_lock( &_MutexWait ) ) { perror("pthread_mutex_lock _NewThread") ; @@ -932,8 +979,8 @@ SUPERV::GraphState GraphExecutor::OutNode::AutomatonGraphState(SUPERV::Automaton bool GraphExecutor::OutNode::PushEvent( GraphExecutor::InNode * aNode , GraphExecutor::NodeEvent anEvent , SUPERV::AutomatonState aState ) { - cdebug_in << "PushEvent Threads " << Threads() << " SuspendedThreads " - << SuspendedThreads() << endl ; +// cdebug_in << "PushEvent Threads " << Threads() << " SuspendedThreads " +// << SuspendedThreads() << endl ; if ( pthread_mutex_lock( &_MutexWait ) ) { perror("PushEvent pthread_mutex_lock ") ; exit( 0 ) ; @@ -948,19 +995,19 @@ bool GraphExecutor::OutNode::PushEvent( GraphExecutor::InNode * aNode , _States.push_back( aState ) ; pthread_cond_broadcast( &_EventWait ); if ( aNode ) { - cdebug << aNode->ThreadNo() << " PushEvent " << aNode->Name() ; - cdebug << " " << aNode->Automaton()->EventName( anEvent ) - << " " << aNode->Automaton()->StateName( aState ) - << " ControleState " - << aNode->Automaton()->ControlStateName( aNode->ControlState() ) ; +// cdebug << aNode->ThreadNo() << " PushEvent " << aNode->Name() ; +// cdebug << " " << aNode->Automaton()->EventName( anEvent ) +// << " " << aNode->Automaton()->StateName( aState ) +// << " ControleState " +// << aNode->Automaton()->ControlStateName( aNode->ControlState() ) ; } else { - cdebug << "PushEvent " << Name() ; - cdebug << " " << theAutomaton->EventName( anEvent ) << " " - << theAutomaton->StateName( aState ) ; +// cdebug << "PushEvent " << Name() ; +// cdebug << " " << theAutomaton->EventName( anEvent ) << " " +// << theAutomaton->StateName( aState ) ; } - cdebug_out << "PushEvent Threads " << Threads() << " SuspendedThreads " - << SuspendedThreads() << endl ; +// cdebug_out << "PushEvent Threads " << Threads() << " SuspendedThreads " +// << SuspendedThreads() << endl ; if ( pthread_mutex_unlock( &_MutexWait ) ) { perror("PushEvent pthread_mutex_unlock ") ; exit( 0 ) ; @@ -1662,20 +1709,20 @@ long GraphExecutor::OutNode::LastLevelDone() { const CORBA::Any *GraphExecutor::OutNode::GetInData( const char * NodeName , const char * ServiceParameterName ) { - cdebug_in << "GraphExecutor::OutNode::GetInData " << NodeName << " " - << ServiceParameterName << endl ; +// cdebug_in << "GraphExecutor::OutNode::GetInData " << NodeName << " " +// << ServiceParameterName << endl ; const CORBA::Any * retdata = PortInData( NodeName , ServiceParameterName ) ; - cdebug_out << "GraphExecutor::OutNode::GetInData" << endl ; +// cdebug_out << "GraphExecutor::OutNode::GetInData" << endl ; return retdata ; } const CORBA::Any *GraphExecutor::OutNode::GetOutData( const char * NodeName , const char * ServiceParameterName ) { - cdebug_in << "GraphExecutor::OutNode::GetData " << NodeName << " " - << ServiceParameterName << endl ; +// cdebug_in << "GraphExecutor::OutNode::GetOutData " << NodeName << " " +// << ServiceParameterName << endl ; const CORBA::Any * retdata = PortOutData( NodeName , ServiceParameterName ) ; - cdebug_out << "GraphExecutor::OutNode::GetOutData" << endl ; +// cdebug_out << "GraphExecutor::OutNode::GetOutData" << endl ; return retdata ; } diff --git a/src/GraphExecutor/DataFlowExecutor_OutNode.hxx b/src/GraphExecutor/DataFlowExecutor_OutNode.hxx index d13a9d0..fb54a37 100644 --- a/src/GraphExecutor/DataFlowExecutor_OutNode.hxx +++ b/src/GraphExecutor/DataFlowExecutor_OutNode.hxx @@ -113,6 +113,11 @@ namespace GraphExecutor { void CheckAllDone() ; + void PThreadLock( pthread_mutex_t * aMutex , char * errmsg ) ; + void PThreadUnLock( pthread_mutex_t * aMutex , char * errmsg ) ; + void PThreadLock() ; + void PThreadUnLock() ; + void NewThread() ; void ExitThread() ; void SuspendThread() ; @@ -139,6 +144,8 @@ namespace GraphExecutor { SUPERV::GraphState & aState ) ; void State(SUPERV::AutomatonState aState ) ; + const char * StateName(SUPERV::AutomatonState aState ) { + return theAutomaton->StateName( aState ) ; } SUPERV::GraphState State() ; SUPERV::GraphState State( const char * NodeName ) ; diff --git a/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx b/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx index 31e0c0c..38adfb7 100644 --- a/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx +++ b/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx @@ -43,11 +43,11 @@ bool GraphExecutor::InNode::InitPython() { aPyFunc += "import omniORB\n" ; aPyFunc += "print 'PyObjRef'\n" ; aPyFunc += "def PyObjRef( IORObjStr ) :\n" ; -// aPyFunc += " print 'PyObjRef',IORObjStr\n" ; + aPyFunc += " print 'PyObjRef',IORObjStr\n" ; aPyFunc += " orb = CORBA.ORB_init( sys.argv , CORBA.ORB_ID )\n" ; + aPyFunc += " print 'PyObjRef orb',orb\n" ; aPyFunc += " objref = orb.string_to_object( IORObjStr )\n" ; -// aPyFunc += " print IORObjStr,objref\n" ; -// aPyFunc += " return objref,objref\n" ; + aPyFunc += " print 'PyObjRef IORObjStr objref',IORObjStr,objref\n" ; aPyFunc += " return objref\n" ; aPyFunc += "InitPyRunMethod.RunMethod( PyObjRef )\n" ; if ( PyRun_SimpleString( (char *) aPyFunc.c_str() ) ) { @@ -61,11 +61,11 @@ bool GraphExecutor::InNode::InitPython() { aPyFunc += "import CORBA\n" ; aPyFunc += "import omniORB\n" ; aPyFunc += "def PyObjIor( ObjRef ) :\n" ; -// aPyFunc += " print 'PyObjIor',ObjRef\n" ; + aPyFunc += " print 'PyObjIor',ObjRef\n" ; aPyFunc += " orb = CORBA.ORB_init( sys.argv , CORBA.ORB_ID )\n" ; -// aPyFunc += " print 'PyObjIor',orb\n" ; + aPyFunc += " print 'PyObjIor orb',orb\n" ; aPyFunc += " objIor = orb.object_to_string( ObjRef )\n" ; -// aPyFunc += " print 'PyObjIor',ObjRef,objIor\n" ; + aPyFunc += " print 'PyObjIor ObjRef objIor',ObjRef,objIor\n" ; aPyFunc += " return objIor\n" ; aPyFunc += "InitPyRunMethod.RunMethod( PyObjIor )\n" ; if ( PyRun_SimpleString( (char *) aPyFunc.c_str() ) ) { @@ -150,14 +150,15 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , int n_out = nOutParams ; const char * sname; - cdebug_in << "GraphExecutor::InNode::PyDynInvoke " << method << endl ; + cdebug_in << ThreadNo() << "GraphExecutor::InNode::PyDynInvoke " << method << " " << n_in + << " InArgs " << n_out << " OutArgs" << endl ; CORBA::Any data ; PyObject * ArgsList = NULL ; - PyObject * ArgValue ; - PyObject * ArgResult ; - PyObject * Result ; + PyObject * ArgValue = NULL ; + PyObject * ArgResult = NULL ; + PyObject * Result = NULL ; PyObject * MyPyObjRefList = NULL ; PyObject * ResultObj = NULL ; PyObject * MyPyObjIorList = NULL ; @@ -176,7 +177,7 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , data >>= t ; ArgValue = Py_BuildValue( "s" , t ) ; PyTuple_SetItem( ArgsList , i , ArgValue ) ; - cdebug << "ArgIn" << i << " : " << sname << " Value " << t << " (string) " + cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << t << " (string) " << ArgsList->ob_refcnt << endl ; break ; } @@ -185,7 +186,7 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , data >>= d ; ArgValue = Py_BuildValue( "d" , d ) ; PyTuple_SetItem( ArgsList , i , ArgValue ) ; - cdebug << "ArgIn" << i << " : " << sname << " Value " << d << " (double) " + cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << d << " (double) " << ArgsList->ob_refcnt << endl ; break ; } @@ -194,7 +195,7 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , data >>= l ; ArgValue = Py_BuildValue( "l" , l ) ; PyTuple_SetItem( ArgsList , i , ArgValue ) ; - cdebug << "ArgIn" << i << " : " << sname << " Value " << l + cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << l << " (long) ArgsList->ob_refcnt" << ArgsList->ob_refcnt << endl ; break ; } @@ -205,14 +206,14 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , IORObjRef = ObjectToString( ObjRef ) ; ObjValue = Py_BuildValue( "s" , IORObjRef ) ; PyTuple_SetItem( MyPyObjRefList , 0 , ObjValue ) ; - cdebug << "ArgIn" << i << " : " << sname << " Value " << IORObjRef << " (objref) " + cdebug << "ArgIn" << i << " : " << sname << method << " " << " Value " << IORObjRef << " (objref) " << MyPyObjRefList->ob_refcnt << endl ; ResultObj = PyEval_CallObject( MyPyObjRef , MyPyObjRefList ) ; cdebug << "MyPyObjRefList->ob_refcnt" << MyPyObjRefList->ob_refcnt << " " << "ResultObj->ob_refcnt" << ResultObj->ob_refcnt << endl ; PyObject_Print( ResultObj , stdout , 0 ) ; PyTuple_SetItem( ArgsList , i , ResultObj ) ; - cdebug << "ArgIn" << i << " : " << sname << " Value (objref) ArgsList->ob_refcnt" + cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value (objref) ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ResultObj->ob_refcnt" << ResultObj->ob_refcnt << endl ; break ; @@ -241,21 +242,27 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , if ( ArgValue == NULL ) { ArgValue = Result ; } + if ( !PyString_Check( ArgValue ) ) { + cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (string)" << endl ; + } t = PyString_AsString( ArgValue ) ; data <<= t ; - cdebug << "ArgOut" << i << " : " << sname << " Value " << t << " (string)" + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << t << " (string)" << endl ; break ; } case CORBA::tk_double : { double d ; ArgValue = PyTuple_GetItem( Result , i ) ; + if ( !PyFloat_Check( ArgValue ) ) { + cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (double)" << endl ; + } if ( ArgValue == NULL ) { ArgValue = Result ; } d = PyFloat_AsDouble( ArgValue ) ; data <<= d ; - cdebug << "ArgOut" << i << " : " << sname << " Value " << d << " (double)" + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << d << " (double)" << endl ; break ; } @@ -265,9 +272,12 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , if ( ArgValue == NULL ) { ArgValue = Result ; } + if ( !PyInt_Check( ArgValue ) ) { + cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (long)" << endl ; + } l = PyInt_AsLong( ArgValue ) ; data <<= l ; - cdebug << "ArgOut" << i << " : " << sname << " Value " << l << " (long)" << endl ; + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << l << " (long)" << endl ; break ; } case CORBA::tk_objref : { @@ -276,6 +286,8 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , if ( ObjIor == NULL ) { ObjIor = Result ; } + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << "(object reference) "<< endl ; + cout << "ArgOut" << i << " : " << sname << " " << method << " Value " << "(object reference) : " ; Py_INCREF( ObjIor ) ; PyObject_Print( ObjIor , stdout , 0 ) ; PyTuple_SetItem( MyPyObjIorList , 0 , ObjIor ) ; @@ -290,18 +302,18 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , ObjRef = StringToObject( IOR ) ; data <<= ObjRef ; IORObjRef = ObjectToString( ObjRef ) ; - cdebug << "ArgOut" << i << " : " << sname << " Value " << "(object reference) " + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << "(object reference) " << IORObjRef << endl ; } else { cdebug_out << "GraphExecutor::InNode::PyDynInvoke Error ResultIor == NULL" - << endl ; + << method << " " << endl ; RetVal = false ; } break ; } default : { - cdebug << "ArgOut" << i << " : " << sname << " Value " << "(other ERROR)" << endl ; + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << "(other ERROR)" << endl ; } } outParams[i].Value = data ; @@ -309,12 +321,18 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , if ( MyPyObjIorList ) { int cnt = MyPyObjIorList->ob_refcnt ; - while ( cnt ) { + while ( cnt > 0 ) { cnt = MyPyObjIorList->ob_refcnt - 1 ; Py_DECREF( MyPyObjIorList ) ; + cdebug << "MyPyObjIorList->ob_refcnt" << MyPyObjIorList->ob_refcnt << endl ; + } + } + if ( ResultIor ) { + int cnt = ResultIor->ob_refcnt ; + while ( cnt > 0 ) { + cnt = ResultIor->ob_refcnt - 1 ; Py_DECREF( ResultIor ) ; - cdebug << "MyPyObjIorList->ob_refcnt" << MyPyObjIorList->ob_refcnt << " " - << "ResultIor->ob_refcnt" << ResultIor->ob_refcnt << endl ; + cdebug << "ResultIor->ob_refcnt" << ResultIor->ob_refcnt << endl ; } } Py_DECREF( Result ) ; @@ -323,12 +341,18 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , Py_DECREF( ArgsList ) ; if ( MyPyObjRefList ) { int cnt = MyPyObjRefList->ob_refcnt ; - while ( cnt ) { + while ( cnt > 0 ) { cnt = MyPyObjRefList->ob_refcnt - 1 ; Py_DECREF( MyPyObjRefList ) ; + cdebug << "MyPyObjRefList->ob_refcnt" << MyPyObjRefList->ob_refcnt << endl ; + } + } + if ( ResultObj ) { + int cnt = ResultObj->ob_refcnt ; + while ( cnt > 0 ) { + cnt = ResultObj->ob_refcnt - 1 ; Py_DECREF( ResultObj ) ; - cdebug << "MyPyObjRefList->ob_refcnt" << MyPyObjRefList->ob_refcnt << " " - << "ResultObj->ob_refcnt" << ResultObj->ob_refcnt << endl ; + cdebug << "ResultObj->ob_refcnt" << ResultObj->ob_refcnt << endl ; } } diff --git a/src/GraphExecutor/Makefile.in b/src/GraphExecutor/Makefile.in index c59c763..0732f2a 100644 --- a/src/GraphExecutor/Makefile.in +++ b/src/GraphExecutor/Makefile.in @@ -9,7 +9,7 @@ # source path top_srcdir=@top_srcdir@ -top_builddir=../.. +top_builddir=../../.. srcdir=@srcdir@ VPATH=.:@srcdir@:@top_srcdir@/idl @@ -45,10 +45,10 @@ LIB_CLIENT_IDL = SALOME_ModuleCatalog.idl \ BIN_SRC = BIN_SERVER_IDL = -CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome -CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -I${KERNEL_ROOT_DIR}/include/salome +CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) +CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 #LDFLAGS+= -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lOpUtil -lSalomeLoggerServer -lc $(PYTHON_LIBS) $(QT_MT_LIBS) $(OGL_LIBS) -LDFLAGS+= -export-dynamic -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lOpUtil -lSalomeLoggerServer -lc $(QT_MT_LIBS) $(OGL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome +LDFLAGS+= -export-dynamic -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lOpUtil -lSalomeLoggerServer -lc $(QT_MT_LIBS) $(OGL_LIBS) @CONCLUDE@ diff --git a/src/Makefile.in b/src/Makefile.in index 3e85fc2..fcc0048 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,18 +1,35 @@ -#============================================================================== -# File : Makefile.in -# Created : ven déc 7 13:32:20 CET 2001 -# Author : Paul RASCLE, EDF -# Project : SALOME -# Copyright : EDF 2001 +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Author : Patrick GOLDBRONN (CEA) +# Module : SUPERV # $Header$ -#============================================================================== -# source path top_srcdir=@top_srcdir@ -top_builddir=.. +top_builddir=../.. srcdir=@srcdir@ VPATH=.:@srcdir@ + @COMMENCE@ SUBDIRS = GraphBase GraphExecutor GraphEditor Supervision SUPERVGUI diff --git a/src/SUPERVGUI/Makefile.in b/src/SUPERVGUI/Makefile.in index cb275f6..bd71448 100644 --- a/src/SUPERVGUI/Makefile.in +++ b/src/SUPERVGUI/Makefile.in @@ -1,15 +1,33 @@ -##============================================================================== -# File : Makefile.in -# Created : aug 29 16:50:13 CEA 2001 -# Author : Arnaud RES, OPENCASCADE -# Project : SALOME -# Copyright : CEA 2001 +# SUPERV SUPERVGUI : GUI for Supervisor component +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Author : Arnaud RES, OPENCASCADE +# Module : SUPERV # $Header: -#============================================================================== -# source path top_srcdir=@top_srcdir@ -top_builddir=../.. +top_builddir=../../.. srcdir=@srcdir@ VPATH=.:@srcdir@ @@ -21,13 +39,13 @@ EXPORT_HEADERS = SUPERVGUI.h # .po files to transform in .qm PO_FILES = \ - SUPERVGUI_icons.po \ - SUPERVGUI_msg_en.po \ - SUPERVGUI_msg_fr.po + SupervisionGUI_icons.po \ + SupervisionGUI_msg_en.po \ + SupervisionGUI_msg_fr.po # Libraries targets -LIB = libSUPERVGUI.la +LIB = libSupervisionGUI.la LIB_SRC = SUPERVGUI.cxx \ SUPERVGUI_Service.cxx \ @@ -76,11 +94,10 @@ LIB_CLIENT_IDL = SALOMEDS.idl \ LIB_SERVER_IDL = CPPFLAGS+=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) \ - -ftemplate-depth-42 -I${KERNEL_ROOT_DIR}/include/salome + -I$(top_builddir)/inc -ftemplate-depth-42 LDFLAGS+=$(QT_MT_LIBS) $(OCC_LIBS) $(VTK_LIBS) $(OGL_LIBS) \ - -lSalomeGUI -lSalomeNS -lqsplitterP \ - -lSalomeLifeCycleCORBA -lSalomeNotification -lSUPERVGraph \ - -L${KERNEL_ROOT_DIR}/lib/salome + -L$(top_builddir)/lib -lSalomeGUI -lSalomeNS -lqsplitterP \ + -lSalomeLifeCycleCORBA -lSalomeNotification -lSUPERVGraph LIBS+= $(PYTHON_LIBS) diff --git a/src/SUPERVGUI/SUPERVGUI.cxx b/src/SUPERVGUI/SUPERVGUI.cxx index 7316204..75b583d 100644 --- a/src/SUPERVGUI/SUPERVGUI.cxx +++ b/src/SUPERVGUI/SUPERVGUI.cxx @@ -1,11 +1,31 @@ -using namespace std; -// File : SUPERVGUI.cxx -// Created : 31 octobre 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI.cxx +// Author : Francis KLOSS +// Module : SUPERV +using namespace std; #include "SUPERVGUI.h" #include "QAD_Resource.h" @@ -92,7 +112,7 @@ QAD_StudyFrame* SUPERVGUI::createGraph() { void SUPERVGUI::loadEngine(SALOME_NamingService* namingService) { Trace("SUPERVGUI::loadEngine") SALOME_LifeCycleCORBA LCC(namingService); - Engines::Component_var objComponent = LCC.FindOrLoad_Component("SuperVisionContainer", "SUPERV"); + Engines::Component_var objComponent = LCC.FindOrLoad_Component("SuperVisionContainer", "Supervision"); if (CORBA::is_nil(objComponent)) { QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_LOAD_SUPERV")); return; diff --git a/src/SUPERVGUI/SUPERVGUI.h b/src/SUPERVGUI/SUPERVGUI.h index 93e1812..3bf4606 100644 --- a/src/SUPERVGUI/SUPERVGUI.h +++ b/src/SUPERVGUI/SUPERVGUI.h @@ -1,9 +1,29 @@ -// File : SUPERVGUI.h -// Created : 31 octobre 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI.h +// Author : Francis KLOSS +// Module : SUPERV #ifndef SUPERVGUI_H #define SUPERVGUI_H diff --git a/src/SUPERVGUI/SUPERVGUI_Array.cxx b/src/SUPERVGUI/SUPERVGUI_Array.cxx index 6e533b4..a2b9b48 100644 --- a/src/SUPERVGUI/SUPERVGUI_Array.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Array.cxx @@ -1,16 +1,39 @@ -using namespace std; -// File : SUPERVGUI_Array.cxx -// Created : 08 / 02 / 2002 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Array.cxx +// Author : Francis KLOSS +// Module : SUPERV +using namespace std; #include "SUPERVGUI_Def.h" #include "SUPERVGUI_Array.h" #include "SUPERVGUI_Main.h" #include "SUPERVGUI_ComputeNode.h" #include "SUPERVGUI_BrowseNodeDlg.h" +#include "SUPERVGUI_Node.h" +#include "SUPERVGUI_GraphNode.h" +#include "SUPERVGUI_ControlNode.h" #include #include @@ -36,7 +59,7 @@ using namespace std; addChild(aNode, x, y); \ x += (CELL_WIDTH + CELL_SPACE); \ SUPERV_CNode aCNodeEnd = SUPERV::CNode::_narrow(nodes->NodesName[co]->Coupled()); \ - SUPERVGUI_Node* aNodeEnd = new SUPERVGUI_Cell(viewport(), main, aCNodeEnd); \ + SUPERVGUI_Node* aNodeEnd = new SUPERVGUI_CellEndControl(viewport(), main, aCNodeEnd, dynamic_cast(aNode)); \ ResizeGraph(aNodeEnd, x, y); \ addChild(aNodeEnd, x, y); \ x += (CELL_WIDTH + CELL_SPACE); \ @@ -124,6 +147,19 @@ void SUPERVGUI_Array::destroy() { }; delete ihmList; + + SUPERVGUI_CellEndControl* cellEC; + QObjectList* ihmListEC = queryList("SUPERVGUI_CellEndControl"); + QObjectListIt iEC(*ihmListEC); + + while ((cellEC=(SUPERVGUI_CellEndControl*)iEC.current()) != 0) { + ++iEC; + cellEC->updateStudy(); + cellEC->close(true); + }; + + delete ihmListEC; + } void SUPERVGUI_Array::sync() { @@ -193,11 +229,25 @@ SUPERVGUI_Cell::SUPERVGUI_Cell(QWidget* parent, SUPERVGUI_Main* m, SUPERV_CNode myStatus->reparent(this, pos()); aBox->addWidget(myStatus); - // QToolTip::add(service, myNode->Name()); - QToolTip::add(myTitle, myTitle->text()); + if(m->isEditable()) { + // QToolTip::add(service, myNode->Name()); + QToolTip::add(myTitle, myTitle->text()); + QToolTip::add(component, component->text()); + } myPopup->setItemEnabled(myDeleteItem, false); adjustSize(); + + myIsControl = false; + myIsStart = false; + + //check for control nodes + if (n->IsLoop() || n->IsSwitch()) { + myIsControl = true; + myIsStart = true; + } + if (n->IsEndLoop() || n->IsEndSwitch()) + myIsControl = true; } SUPERVGUI_Cell::~SUPERVGUI_Cell() { @@ -259,7 +309,55 @@ void SUPERVGUI_Cell::updateStudy() void SUPERVGUI_Cell::rename() { SUPERVGUI_Node::rename(); - myTitle->setText(myNode->Name()); + if (!myIsControl) { //not ControlNode + myTitle->setText(myNode->Name()); + } + else { + if (myIsStart) { //StartControlNode + if (myPairCell) { + QString nm = myNode->Name(); + if (!nm.isEmpty()) { + myTitle->setText(nm); + QString aStr(tr("ENDNODE_PREFIX")); + aStr += nm; + myPairCell->getTitle()->setText(aStr); + myPairCell->setNodeName(aStr); + // QToolTip::remove(myPairCell->getTitle()); + QToolTip::add(myPairCell->getTitle(), myPairCell->getTitle()->text()); + + } + } + } + } + // QToolTip::remove(myTitle); - //QToolTip::add(myTitle, myTitle->text()); + QToolTip::add(myTitle, myTitle->text()); +} + +void SUPERVGUI_Cell::setPairCell(SUPERVGUI_Cell* thePairCell) { + if (myIsControl) { //only for ControlNode + myPairCell = thePairCell; + } + else + myPairCell = 0; +} + +SUPERVGUI_Cell* SUPERVGUI_Cell::getPairCell() { + return myPairCell; +} + +SUPERVGUI_CellEndControl::SUPERVGUI_CellEndControl(QWidget* parent, SUPERVGUI_Main* m, SUPERV_CNode n, + SUPERVGUI_Cell* theStart) + :SUPERVGUI_Cell(parent, m, n) +{ + myPairCell = theStart; //set start cell for end cell as pair + myPairCell->setPairCell(dynamic_cast(this)); //set end cell for start cell as pair +} + +SUPERVGUI_CellEndControl::~SUPERVGUI_CellEndControl() { + Trace("SUPERVGUI_CellEndControl::~SUPERVGUI_CellEndControl"); + QToolTip::remove(myTitle); + if (guiNode != NULL) { + guiNode->close(); + } } diff --git a/src/SUPERVGUI/SUPERVGUI_Array.h b/src/SUPERVGUI/SUPERVGUI_Array.h index e7f1819..dc0529a 100644 --- a/src/SUPERVGUI/SUPERVGUI_Array.h +++ b/src/SUPERVGUI/SUPERVGUI_Array.h @@ -1,9 +1,29 @@ -// File : SUPERVGUI_Array.h -// Created : 08 / 02 / 2002 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Array.h +// Author : Francis KLOSS +// Module : SUPERV #ifndef SUPERVGUI_Array_H #define SUPERVGUI_Array_H @@ -12,6 +32,7 @@ using namespace std; #include "SUPERVGUI_Def.h" #include #include "SUPERVGUI_Node.h" +#include "SUPERVGUI_ControlNode.h" #include "SUPERVGUI_View.h" #include "SUPERVGUI_Label.h" @@ -57,17 +78,34 @@ class SUPERVGUI_Cell: public SUPERVGUI_Node { void showAll() {}; void updateStudy(); + SUPERVGUI_Label* getTitle() { return myTitle; } + SUPERVGUI_Label* getComponent() { return component; } + void setPairCell(SUPERVGUI_Cell* thePairCell); + SUPERVGUI_Cell* getPairCell(); public slots: virtual void rename(); - private: + protected: + SUPERVGUI_Cell* myPairCell; //for ControlNodes SUPERVGUI_Label* myTitle; SUPERVGUI_Node* guiNode; + + private: SUPERVGUI_Label* component; //SUPERVGUI_Label* service; int myShowItem; + bool myIsControl; + bool myIsStart; +}; + +class SUPERVGUI_CellEndControl: public SUPERVGUI_Cell { + Q_OBJECT + + public: + SUPERVGUI_CellEndControl(QWidget* parent, SUPERVGUI_Main* m, SUPERV_CNode n, SUPERVGUI_Cell* theStart); + virtual ~SUPERVGUI_CellEndControl(); }; #endif diff --git a/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.cxx b/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.cxx index 5ec6fac..a3e187a 100644 --- a/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.cxx +++ b/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.cxx @@ -1,12 +1,14 @@ -using namespace std; -// File : SUPERVGUI_BrowseNodeDlg.cxx -// Created : 10 / 01 / 2003 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE - +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_BrowseNodeDlg.cxx +// Author : Vitaly SMETANNIKOV +// Module : SUPERV +using namespace std; #include "SUPERVGUI_BrowseNodeDlg.h" #include "SUPERVGUI_Node.h" #include "SUPERVGUI.h" @@ -250,8 +252,11 @@ void SUPERVGUI_BrowseNodeDlg::onSelectionChanged() if (aObj->FindAttribute( anAttr, "AttributeIOR" ) ) { anIOR = SALOMEDS::AttributeIOR::_narrow( anAttr ); ior = anIOR->Value(); - myActiveField->setData( ior ); } + else { + ior = aObj->GetStudy()->ConvertObjectToIOR( aObj ); + } + myActiveField->setData( ior ); } } } @@ -449,8 +454,11 @@ void SUPERVGUI_GetValueDlg::onSelectionChanged() if (aObj->FindAttribute( anAttr, "AttributeIOR" ) ) { anIOR = SALOMEDS::AttributeIOR::_narrow( anAttr ); ior = anIOR->Value(); - myField->setData( ior ); } + else { + ior = aObj->GetStudy()->ConvertObjectToIOR( aObj ); + } + myField->setData( ior ); } } } diff --git a/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.h b/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.h index e938934..9575f2a 100644 --- a/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.h +++ b/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.h @@ -1,10 +1,12 @@ -// File : SUPERVGUI_BrowseNodeDlg.h -// Created : 10 / 01 / 2003 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE - +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_BrowseNodeDlg.h +// Author : Vitaly SMETANNIKOV +// Module : SUPERV #ifndef SUPERVGUI_BrowseNodeDlg_H #define SUPERVGUI_BrowseNodeDlg_H diff --git a/src/SUPERVGUI/SUPERVGUI_ComputeNode.cxx b/src/SUPERVGUI/SUPERVGUI_ComputeNode.cxx index 131d644..5fba779 100644 --- a/src/SUPERVGUI/SUPERVGUI_ComputeNode.cxx +++ b/src/SUPERVGUI/SUPERVGUI_ComputeNode.cxx @@ -1,12 +1,14 @@ -using namespace std; -// File : SUPERVGUI_ComputeNode.cxx -// Created : 09 / 01 / 2003 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE - +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_ComputeNode.cxx +// Author : Vitaly SMETANNIKOV +// Module : SUPERV +using namespace std; #include "SUPERVGUI_ComputeNode.h" #include "SUPERVGUI_Main.h" #include @@ -39,6 +41,7 @@ SUPERVGUI_ComputeNode::SUPERVGUI_ComputeNode(QWidget* theParent, SUPERVGUI_Main* myServiceBox = new QVBox(this, "service"); myComment = new SUPERVGUI_Label(myServiceBox, LABEL_WIDTH, LABEL_HEIGHT, aComment, QLabel::AlignLeft); connect(myComment, SIGNAL(MousePress(QMouseEvent*)), this, SLOT(showPopup(QMouseEvent*))); + QToolTip::add(myTitle, myTitle->text()); QToolTip::add(myComment, myComment->text()); aGridLayout->addMultiCellWidget(myServiceBox, 1, 1, 0, 1); @@ -66,6 +69,7 @@ SUPERVGUI_ComputeNode::SUPERVGUI_ComputeNode(QWidget* theParent, SUPERVGUI_Main* SUPERVGUI_ComputeNode::~SUPERVGUI_ComputeNode() { + QToolTip::remove(myTitle); QToolTip::remove(myComment); } @@ -138,6 +142,11 @@ void SUPERVGUI_ComputeNode::switchPorts() { myShowPopup->setItemChecked(myPortsItem, !aIsVisible); } +void SUPERVGUI_ComputeNode::rename() { + SUPERVGUI_Node::rename(); + // QToolTip::remove(myTitle); + QToolTip::add(myTitle, myTitle->text()); +} void SUPERVGUI_ComputeNode::updateShape() { qApp->processEvents(); diff --git a/src/SUPERVGUI/SUPERVGUI_ComputeNode.h b/src/SUPERVGUI/SUPERVGUI_ComputeNode.h index 6b66111..04f6887 100644 --- a/src/SUPERVGUI/SUPERVGUI_ComputeNode.h +++ b/src/SUPERVGUI/SUPERVGUI_ComputeNode.h @@ -1,10 +1,12 @@ -// File : SUPERVGUI_ComputeNode.h -// Created : 09 / 01 / 2003 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE - +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_ComputeNode.h +// Author : Vitaly SMETANNIKOV +// Module : SUPERV #ifndef SUPERVGUI_ComputeNode_H #define SUPERVGUI_ComputeNode_H @@ -22,11 +24,14 @@ class SUPERVGUI_ComputeNode: public SUPERVGUI_GraphNode { void sync(); void hideAll(); void showAll(); + SUPERVGUI_Label* getCommLabel() { return myComment; } + SUPERVGUI_Label* getTitleLabel() { return myTitle; } virtual void updateShape(); public slots: void switchService(); void switchPorts(); + virtual void rename(); private: diff --git a/src/SUPERVGUI/SUPERVGUI_ControlNode.cxx b/src/SUPERVGUI/SUPERVGUI_ControlNode.cxx index 5000ba0..2636dbc 100644 --- a/src/SUPERVGUI/SUPERVGUI_ControlNode.cxx +++ b/src/SUPERVGUI/SUPERVGUI_ControlNode.cxx @@ -1,12 +1,14 @@ -using namespace std; -// File : SUPERVGUI_ControlNode.cxx -// Created : 14 / 01 / 2003 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE - +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_ControlNode.cxx +// Author : Vitaly SMETANNIKOV +// Module : SUPERV +using namespace std; #include "SUPERVGUI_ControlNode.h" #include #include "SUPERVGUI_Main.h" @@ -96,6 +98,10 @@ void SUPERVGUI_StartControlNode::setEndNode(SUPERVGUI_EndControlNode* theEndNode myEndNode = theEndNode; } +SUPERVGUI_EndControlNode* SUPERVGUI_StartControlNode::getEndNode() { + return myEndNode; +} + void SUPERVGUI_StartControlNode::setShape() { int aH = height(); diff --git a/src/SUPERVGUI/SUPERVGUI_ControlNode.h b/src/SUPERVGUI/SUPERVGUI_ControlNode.h index aad601a..5fa06bc 100644 --- a/src/SUPERVGUI/SUPERVGUI_ControlNode.h +++ b/src/SUPERVGUI/SUPERVGUI_ControlNode.h @@ -1,9 +1,12 @@ -// File : SUPERVGUI_ControlNode.h -// Created : 14 / 01 / 2003 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_ControlNode.h +// Author : Vitaly SMETANNIKOV +// Module : SUPERV #ifndef SUPERVGUI_ControlNode_H #define SUPERVGUI_ControlNode_H @@ -34,6 +37,7 @@ class SUPERVGUI_StartControlNode: public SUPERVGUI_GraphNode { virtual void deletePort(SUPERVGUI_Port* thePort); void setEndNode(SUPERVGUI_EndControlNode* theEndNode); + SUPERVGUI_EndControlNode* getEndNode(); virtual QPoint getOutConnectPnt(); diff --git a/src/SUPERVGUI/SUPERVGUI_CtrlLink.cxx b/src/SUPERVGUI/SUPERVGUI_CtrlLink.cxx index c13e121..65b9557 100644 --- a/src/SUPERVGUI/SUPERVGUI_CtrlLink.cxx +++ b/src/SUPERVGUI/SUPERVGUI_CtrlLink.cxx @@ -1,12 +1,14 @@ -using namespace std; -// File : SUPERVGUI_CtrlLink.cxx -// Created : 14 / 05 / 2003 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE - +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_CtrlLink.cxx +// Author : Vitaly SMETANNIKOV +// Module : SUPERV +using namespace std; #include "SUPERVGUI_CtrlLink.h" #include "SUPERVGUI_Graph.h" #include "SUPERVGUI_GraphNode.h" diff --git a/src/SUPERVGUI/SUPERVGUI_CtrlLink.h b/src/SUPERVGUI/SUPERVGUI_CtrlLink.h index 85aecef..36f1e1e 100644 --- a/src/SUPERVGUI/SUPERVGUI_CtrlLink.h +++ b/src/SUPERVGUI/SUPERVGUI_CtrlLink.h @@ -1,10 +1,12 @@ -// File : SUPERVGUI_CtrlLink.h -// Created : 14 / 05 / 2003 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE - +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_CtrlLink.h +// Author : Vitaly SMETANNIKOV +// Module : SUPERV #ifndef SUPERVGUI_CTRLLink_H #define SUPERVGUI_CTRLLink_H diff --git a/src/SUPERVGUI/SUPERVGUI_Def.h b/src/SUPERVGUI/SUPERVGUI_Def.h index 64ae50c..a9f56cd 100644 --- a/src/SUPERVGUI/SUPERVGUI_Def.h +++ b/src/SUPERVGUI/SUPERVGUI_Def.h @@ -1,9 +1,12 @@ -// File : SUPERVGUI_Def.h -// Created : 18 / 11 / 2002 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_Def.h +// Author : Vitaly SMETANNIKOV +// Module : SUPERV #ifndef SUPERVGUI_DEF_H #define SUPERVGUI_DEF_H diff --git a/src/SUPERVGUI/SUPERVGUI_Graph.cxx b/src/SUPERVGUI/SUPERVGUI_Graph.cxx index 470b883..bd45007 100644 --- a/src/SUPERVGUI/SUPERVGUI_Graph.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Graph.cxx @@ -1,11 +1,31 @@ -using namespace std; -// File : SUPERVGUI_Graph.cxx -// Created : 17 / 10 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Graph.cxx +// Author : Francis KLOSS +// Module : SUPERV +using namespace std; #include "SUPERVGUI_Def.h" #include "SUPERVGUI_Graph.h" #include "SUPERVGUI_Main.h" diff --git a/src/SUPERVGUI/SUPERVGUI_Graph.h b/src/SUPERVGUI/SUPERVGUI_Graph.h index 4edd8b5..dcde3ea 100644 --- a/src/SUPERVGUI/SUPERVGUI_Graph.h +++ b/src/SUPERVGUI/SUPERVGUI_Graph.h @@ -1,9 +1,29 @@ -// File : SUPERVGUI_Graph.h -// Created : 17 / 10 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Graph.h +// Author : Francis KLOSS +// Module : SUPERV #ifndef SUPERVGUI_Graph_H #define SUPERVGUI_Graph_H @@ -50,6 +70,8 @@ class SUPERVGUI_Graph: public SUPERVGUI_View { void draw(); void clearView(); + bool isAnyLinkCreating() { return (myNewLink != 0);}; + signals: void mouseMoved(QMouseEvent* theEvent); void mousePressed(QMouseEvent* theEvent); diff --git a/src/SUPERVGUI/SUPERVGUI_GraphNode.cxx b/src/SUPERVGUI/SUPERVGUI_GraphNode.cxx index ad63444..c3c6c6c 100644 --- a/src/SUPERVGUI/SUPERVGUI_GraphNode.cxx +++ b/src/SUPERVGUI/SUPERVGUI_GraphNode.cxx @@ -1,11 +1,14 @@ -using namespace std; -// File : SUPERVGUI_ComputeNode.cxx -// Created : 09 / 01 / 2003 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_ComputeNode.cxx +// Author : Vitaly SMETANNIKOV +// Module : SUPERV +using namespace std; #include "SUPERVGUI_GraphNode.h" #include "SUPERVGUI_Graph.h" #include "SUPERVGUI_Main.h" @@ -61,14 +64,16 @@ SUPERVGUI_GraphNode::~SUPERVGUI_GraphNode() { } void SUPERVGUI_GraphNode::mouseTitlePress(QMouseEvent* e) { - if (e->button() == RightButton) { - MouseLeft = 0; - showPopup(e); - } else { - MouseLeft = 1; - SUPERVGUI_Graph* sv = myMain->getGraph(); - MouseX = sv->childX(this) - e->globalX(); - MouseY = sv->childY(this) - e->globalY(); + if (!myMain->getGraph()->isAnyLinkCreating()) { + if (e->button() == RightButton) { + MouseLeft = 0; + showPopup(e); + } else { + MouseLeft = 1; + SUPERVGUI_Graph* sv = myMain->getGraph(); + MouseX = sv->childX(this) - e->globalX(); + MouseY = sv->childY(this) - e->globalY(); + } } } @@ -245,6 +250,17 @@ void SUPERVGUI_GraphNode::sync() { pi->sync(); } delete ihmList; + + //check: is creation of link is complete + if (myMain->getGraph()->isAnyLinkCreating()) { + //not creation complete + //cout<<" --- $$$ 1"<setItemEnabled(myDeleteItem, false); + } + else { + //creation complete + myPopup->setItemEnabled(myDeleteItem, true); + } } diff --git a/src/SUPERVGUI/SUPERVGUI_GraphNode.h b/src/SUPERVGUI/SUPERVGUI_GraphNode.h index 1b90258..4647ba7 100644 --- a/src/SUPERVGUI/SUPERVGUI_GraphNode.h +++ b/src/SUPERVGUI/SUPERVGUI_GraphNode.h @@ -1,10 +1,12 @@ -// File : SUPERVGUI_GraphNode.h -// Created : 10 / 01 / 2003 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE - +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_GraphNode.h +// Author : Vitaly SMETANNIKOV +// Module : SUPERV #ifndef SUPERVGUI_GraphNode_H #define SUPERVGUI_GraphNode_H diff --git a/src/SUPERVGUI/SUPERVGUI_Information.cxx b/src/SUPERVGUI/SUPERVGUI_Information.cxx index 7909d7c..765c6bf 100644 --- a/src/SUPERVGUI/SUPERVGUI_Information.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Information.cxx @@ -1,11 +1,31 @@ -using namespace std; -// File : SUPERVGUI_Information.cxx -// Created : 22 / 01 / 2002 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Information.cxx +// Author : Francis KLOSS +// Module : SUPERV +using namespace std; #include "SUPERVGUI_Information.h" #include "QAD_Application.h" #include "QAD_Desktop.h" @@ -60,6 +80,23 @@ SUPERVGUI_Information::SUPERVGUI_Information(SUPERV_CNode node, bool isReadOnly) contV = new QLineEdit( TopGroup ); contV->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); contV->setMinimumSize( 200, 0 ); + contV->setReadOnly( true/*isReadOnly*/ ); + contV->setText( SUPERV::FNode::_narrow(node)->GetContainer() ); + + compnameL = new QLabel( tr( "COMPONENT_NAME_LBL" ), TopGroup ); + compnameV = new QLineEdit( TopGroup ); + compnameV->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); + compnameV->setMinimumSize( 200, 0 ); + compnameV->setReadOnly( true/*isReadOnly*/ ); + compnameV->setText( SUPERV::FNode::_narrow(node)->GetComponentName() ); + + intnameL = new QLabel( tr( "INTERFACE_NAME_LBL" ), TopGroup ); + intnameV = new QLineEdit( TopGroup ); + intnameV->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); + intnameV->setMinimumSize( 200, 0 ); + intnameV->setReadOnly( true/*isReadOnly*/ ); + intnameV->setText( SUPERV::FNode::_narrow(node)->GetInterfaceName() ); + } QLabel* cdatL = new QLabel( tr( "DATE_CREATION_LBL" ), TopGroup ); cdatV = new QLabel( TopGroup ); @@ -87,14 +124,18 @@ SUPERVGUI_Information::SUPERVGUI_Information(SUPERV_CNode node, bool isReadOnly) if (node->IsFactory()) { TopGroupLayout->addWidget( contL, 2, 0 ); TopGroupLayout->addWidget( contV, 2, 1 ); + TopGroupLayout->addWidget( compnameL, 3, 0 ); + TopGroupLayout->addWidget( compnameV, 3, 1 ); + TopGroupLayout->addWidget( intnameL, 4, 0 ); + TopGroupLayout->addWidget( intnameV, 4, 1 ); } - TopGroupLayout->addWidget( cdatL, 3, 0 ); - TopGroupLayout->addWidget( cdatV, 3, 1 ); - TopGroupLayout->addWidget( udatL, 4, 0 ); - TopGroupLayout->addWidget( udatV, 4, 1 ); - TopGroupLayout->addWidget( commL, 5, 0 ); - TopGroupLayout->addMultiCellWidget( commV, 5, 6, 1, 1 ); - TopGroupLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::Expanding ), 6, 0 ); + TopGroupLayout->addWidget( cdatL, 5, 0 ); + TopGroupLayout->addWidget( cdatV, 5, 1 ); + TopGroupLayout->addWidget( udatL, 6, 0 ); + TopGroupLayout->addWidget( udatV, 6, 1 ); + TopGroupLayout->addWidget( commL, 7, 0 ); + TopGroupLayout->addMultiCellWidget( commV, 7, 8, 1, 1 ); + TopGroupLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::Expanding ), 8, 0 ); TopGroupLayout->setColStretch( 1, 5 ); QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" ); @@ -223,10 +264,10 @@ void SUPERVGUI_Information::okButton() { Trace("SUPERVGUI_Information::okButton"); myNode->SetName( nameV->text().latin1()); myNode->SetAuthor( authV->text().latin1() ); - if (myNode->IsFactory()) { + /*if (myNode->IsFactory()) { SUPERV_FNode aFNode = SUPERV::FNode::_narrow(myNode); aFNode->SetContainer( contV->text().latin1() ); - } + }*/ myNode->SetComment( commV->text().latin1() ); accept(); } diff --git a/src/SUPERVGUI/SUPERVGUI_Information.h b/src/SUPERVGUI/SUPERVGUI_Information.h index dfd9c72..115b822 100644 --- a/src/SUPERVGUI/SUPERVGUI_Information.h +++ b/src/SUPERVGUI/SUPERVGUI_Information.h @@ -1,9 +1,29 @@ -// File : SUPERVGUI_Information.h -// Created : 22 / 01 / 2002 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Information.h +// Author : Francis KLOSS +// Module : SUPERV using namespace std; #ifndef SUPERVGUI_Information_H @@ -31,6 +51,13 @@ class SUPERVGUI_Information: public QDialog { QLineEdit* authV; QLineEdit* contV; QLabel* contL; + + QLineEdit* compnameV; + QLabel* compnameL; + + QLineEdit* intnameV; + QLabel* intnameL; + QMultiLineEdit* commV; QLabel* cdatV; QLabel* udatV; diff --git a/src/SUPERVGUI/SUPERVGUI_Label.cxx b/src/SUPERVGUI/SUPERVGUI_Label.cxx index 5c2e8d1..862519c 100644 --- a/src/SUPERVGUI/SUPERVGUI_Label.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Label.cxx @@ -1,11 +1,31 @@ -using namespace std; -// File : SUPERVGUI_Label.cxx -// Created : 24 / 10 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Label.cxx +// Author : Francis KLOSS +// Module : SUPERV +using namespace std; #include "SUPERVGUI_Label.h" #include "SUPERVGUI_Def.h" diff --git a/src/SUPERVGUI/SUPERVGUI_Label.h b/src/SUPERVGUI/SUPERVGUI_Label.h index 70e6daa..21d374b 100644 --- a/src/SUPERVGUI/SUPERVGUI_Label.h +++ b/src/SUPERVGUI/SUPERVGUI_Label.h @@ -1,11 +1,29 @@ -// File : SUPERVGUI_Label.h -// Created : 24 / 10 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA - -//#include "SUPERVGUI.h" +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Label.h +// Author : Francis KLOSS +// Module : SUPERV #ifndef SUPERVGUI_Label_H #define SUPERVGUI_Label_H diff --git a/src/SUPERVGUI/SUPERVGUI_Link.cxx b/src/SUPERVGUI/SUPERVGUI_Link.cxx index dee8570..cfc40bf 100644 --- a/src/SUPERVGUI/SUPERVGUI_Link.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Link.cxx @@ -1,13 +1,14 @@ -using namespace std; -// File : SUPERVGUI_Link.cxx -// Created : 20 / 12 / 2002 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE - - +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_Link.cxx +// Author : Vitaly SMETANNIKOV +// Module : SUPERV +using namespace std; #include "SUPERVGUI_Graph.h" #include "SUPERVGUI_Main.h" #include "SUPERVGUI_Link.h" @@ -746,7 +747,7 @@ int distance(int x1, int y1, int x2, int y2) { x = x * x; int y = y2 - y1; y = y * y; - return (int) sqrt(x + y); + return (int) sqrt((float)(x + y)); } diff --git a/src/SUPERVGUI/SUPERVGUI_Link.h b/src/SUPERVGUI/SUPERVGUI_Link.h index 13f724a..cfa22dc 100644 --- a/src/SUPERVGUI/SUPERVGUI_Link.h +++ b/src/SUPERVGUI/SUPERVGUI_Link.h @@ -1,9 +1,12 @@ -// File : SUPERVGUI_Link.h -// Created : 20 / 12 / 2002 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_Link.h +// Author : Vitaly SMETANNIKOV +// Module : SUPERV #ifndef SUPERVGUI_Link_H #define SUPERVGUI_Link_H diff --git a/src/SUPERVGUI/SUPERVGUI_Main.cxx b/src/SUPERVGUI/SUPERVGUI_Main.cxx index 94d901e..82d3792 100644 --- a/src/SUPERVGUI/SUPERVGUI_Main.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Main.cxx @@ -1,11 +1,31 @@ -using namespace std; -// File : SUPERVGUI_Main.cxx -// Created : 24 / 10 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Main.cxx +// Author : Francis KLOSS +// Module : SUPERV +using namespace std; #include "QAD_Splitter.h" #include "QAD_LeftFrame.h" #include "QAD_ObjectBrowser.h" @@ -155,8 +175,7 @@ void SUPERVGUI_Main::init(QAD_Desktop* theDesktop) { father = builder->NewComponent(STUDY_SUPERVISION); anAttr = builder->FindOrCreateAttribute(father, "AttributeName"); aName = SALOMEDS::AttributeName::_narrow(anAttr); - //aName->SetValue("Supervision"); - aName->SetValue( QAD_Application::getDesktop()->getComponentUserName( "SUPERV" ) ); + aName->SetValue("Supervision"); anAttr = builder->FindOrCreateAttribute(father, "AttributePixMap"); aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); @@ -426,6 +445,8 @@ void SUPERVGUI_Main::run() { QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_DF_NOTVALID")); } else if (!dataflow->IsExecutable()) { QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_DF_NOTEXECUTABLE")); + } else if (graph->isAnyLinkCreating()) { + QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CRL_NOTCOMPLETE")); } else { myRunTime = QDateTime::currentDateTime(); if (myIsKilled) { @@ -457,13 +478,15 @@ void SUPERVGUI_Main::run() { void SUPERVGUI_Main::startExecute() { Trace("SUPERVGUI_Main::startExecute") - if ((SUPERV_isNull(dataflow))) return; + if ((SUPERV_isNull(dataflow))) return; if (dataflow->IsEditing()) { if (!dataflow->IsValid()) { QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_DF_NOTVALID")); } else if (!dataflow->IsExecutable()) { QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_DF_NOTEXECUTABLE")); + } else if (graph->isAnyLinkCreating()) { + QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CRL_NOTCOMPLETE")); } else { myRunTime = QDateTime::currentDateTime(); if (myIsKilled) { @@ -953,6 +976,9 @@ bool SUPERVGUI_Main::putDataStudy(SUPERV_Port p, const char* inout) { isIn = false; return false; } + } else { // component has no drivel, but could store IORs (like Calculator) + SALOMEDS::SObject_var anIORSO = aStudy->FindObjectIOR(p->ToString()); + if (!CORBA::is_nil(anIORSO)) aBuilder->Addreference(aSO, anIORSO); } } } else { diff --git a/src/SUPERVGUI/SUPERVGUI_Main.h b/src/SUPERVGUI/SUPERVGUI_Main.h index 7d3b1d3..300b1c2 100644 --- a/src/SUPERVGUI/SUPERVGUI_Main.h +++ b/src/SUPERVGUI/SUPERVGUI_Main.h @@ -1,9 +1,29 @@ -// File : SUPERVGUI_Main.h -// Created : 24 / 10 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Main.h +// Author : Francis KLOSS +// Module : SUPERV #ifndef SUPERVGUI_Main_H #define SUPERVGUI_Main_H diff --git a/src/SUPERVGUI/SUPERVGUI_Node.cxx b/src/SUPERVGUI/SUPERVGUI_Node.cxx index 417170a..3c4515a 100644 --- a/src/SUPERVGUI/SUPERVGUI_Node.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Node.cxx @@ -1,11 +1,31 @@ -using namespace std; -// File : SUPERVGUI_Node.cxx -// Created : 24 / 10 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Node.cxx +// Author : Francis KLOSS +// Module : SUPERV +using namespace std; #include "SUPERVGUI_Node.h" #include "SUPERVGUI_Main.h" #include "SUPERVGUI_Python.h" @@ -13,6 +33,8 @@ using namespace std; #include "SUPERVGUI_BrowseNodeDlg.h" #include "SALOMEGUI_NameDlg.h" #include "SUPERVGUI_Information.h" +#include "SUPERVGUI_ComputeNode.h" +#include "SUPERVGUI_ControlNode.h" #include #include @@ -20,6 +42,7 @@ using namespace std; #include #include #include +#include @@ -52,13 +75,15 @@ SUPERVGUI_Node::SUPERVGUI_Node(QWidget* theParent, SUPERVGUI_Main* theMain, SUPE //create common popup myPopup = new QPopupMenu(this); - if (myMain->isEditable()) { + if (myMain->isEditable() && getNodeType() != SUPERV::EndLoopNode + && getNodeType() != SUPERV::EndSwitchNode) { myRenameItem = myPopup->insertItem(tr("MSG_RENAME"), this, SLOT(rename())); myDeleteItem = myPopup->insertItem(tr("MSG_DELETE"), this, SLOT(remove())); mySeparatorId = myPopup->insertSeparator(); } myPopup->insertItem(tr("MSG_BROWSE"), this, SLOT(browse())); - myPopup->insertItem(tr("MSG_CHANGE_INFO"), this, SLOT(changeInformation())); + if ((getNodeType() != SUPERV::EndLoopNode) && (getNodeType() != SUPERV::EndSwitchNode)) + myPopup->insertItem(tr("MSG_CHANGE_INFO"), this, SLOT(changeInformation())); //myPopup->insertItem(tr("MSG_CONFIGURE"), this, SLOT(configure())); if (myMain->isEditable() && (getNodeType() != SUPERV::FactoryNode) @@ -149,10 +174,10 @@ void SUPERVGUI_Node::setState(SUPERV::GraphState theState) break; } myTime->setPaletteBackgroundColor(myStatus->paletteBackgroundColor()); - int sec = 0; //myNode->getTime(); + long sec = 0; //myNode->CpuUsed(); // sec++; char hms[9]; - int s = sec/3600; + long s = sec/3600; hms[0]=(char)(((s/10)%10)+48); hms[1]=(char)((s%10)+48); hms[2]=':'; @@ -232,6 +257,55 @@ void SUPERVGUI_Node::changeInformation() { if (aDlg->exec() ) sync(); delete aDlg; + if (myNode->IsGOTO()) { + QString nmGT = myNode->Name(); + if ( !nmGT.isEmpty() ) { + setNodeName(nmGT); + } + } + if (myMain->isEditable()) { + if (myMain->isArrayShown()) { //Table View + if (myNode->IsLoop() || myNode->IsSwitch()) { //for synchronic names changing + QString nmA = myNode->Name(); + if ( !nmA.isEmpty() ) { + setNodeName(nmA); + QString aStrA(tr("ENDNODE_PREFIX")); + aStrA+=nmA; + (dynamic_cast(this))->getPairCell()->getTitle()->setText(aStrA); + (dynamic_cast(this))->getPairCell()->setNodeName(aStrA); + // QToolTip::remove((dynamic_cast(this))->getPairCell()->getTitle()); + QToolTip::add((dynamic_cast(this))->getPairCell()->getTitle(), + (dynamic_cast(this))->getPairCell()->getTitle()->text()); + + } + } + // QToolTip::remove((dynamic_cast(this))->getTitle()); + QToolTip::add((dynamic_cast(this))->getTitle(), + (dynamic_cast(this))->getTitle()->text()); + QToolTip::add((dynamic_cast(this))->getComponent(), + (dynamic_cast(this))->getComponent()->text()); + } + else { //Graph View + if (myNode->IsLoop() || myNode->IsSwitch()) { //for synchronic names changing + QString nm = myNode->Name(); + if ( !nm.isEmpty() ) { + setNodeName(nm); + QString aStr(tr("ENDNODE_PREFIX")); + aStr+=nm; + (dynamic_cast(this))->getEndNode()->setNodeName(aStr); + } + } + else { + if (!(myNode->IsGOTO())) { + // QToolTip::remove((dynamic_cast(this))->getCommLabel()); + QToolTip::add((dynamic_cast(this))->getCommLabel(), + (dynamic_cast(this))->getCommLabel()->text()); + QToolTip::add((dynamic_cast(this))->getTitleLabel(), + (dynamic_cast(this))->getTitleLabel()->text()); + } + } + } + } /* Trace("SUPERVGUI_Node::changeInformation") if (Supervision.information(myNode, !myMain->isEditable())) { myMain->syncAsync(); diff --git a/src/SUPERVGUI/SUPERVGUI_Node.h b/src/SUPERVGUI/SUPERVGUI_Node.h index 7f60bbe..08a9587 100644 --- a/src/SUPERVGUI/SUPERVGUI_Node.h +++ b/src/SUPERVGUI/SUPERVGUI_Node.h @@ -1,9 +1,29 @@ -// File : SUPERVGUI_Node.h -// Created : 24 / 10 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Node.h +// Author : Francis KLOSS +// Module : SUPERV #ifndef SUPERVGUI_Node_H #define SUPERVGUI_Node_H diff --git a/src/SUPERVGUI/SUPERVGUI_Notification.cxx b/src/SUPERVGUI/SUPERVGUI_Notification.cxx index 05e8293..7515fb0 100644 --- a/src/SUPERVGUI/SUPERVGUI_Notification.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Notification.cxx @@ -1,11 +1,31 @@ -using namespace std; -// File : SUPERVGUI_Notification.cxx -// Created : 21 / 02 / 2002 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Notification.cxx +// Author : Francis KLOSS +// Module : SUPERV +using namespace std; #include "SUPERVGUI_Notification.h" #include "QAD_Message.h" #include "QAD_FileDlg.h" diff --git a/src/SUPERVGUI/SUPERVGUI_Notification.h b/src/SUPERVGUI/SUPERVGUI_Notification.h index 3c5f93a..add42ce 100644 --- a/src/SUPERVGUI/SUPERVGUI_Notification.h +++ b/src/SUPERVGUI/SUPERVGUI_Notification.h @@ -1,9 +1,29 @@ -// File : SUPERVGUI_Notification.h -// Created : 21 / 02 / 2002 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Notification.h +// Author : Francis KLOSS +// Module : SUPERV #ifndef SUPERVGUI_Notification_H #define SUPERVGUI_Notification_H diff --git a/src/SUPERVGUI/SUPERVGUI_Port.cxx b/src/SUPERVGUI/SUPERVGUI_Port.cxx index 2d6d977..842687e 100644 --- a/src/SUPERVGUI/SUPERVGUI_Port.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Port.cxx @@ -1,11 +1,31 @@ -using namespace std; -// File : SUPERVGUI_Port.cxx -// Created : 25 / 10 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Port.cxx +// Author : Francis KLOSS +// Module : SUPERV +using namespace std; #include "SUPERVGUI_Port.h" #include "SUPERVGUI_Def.h" #include "SUPERVGUI_Main.h" diff --git a/src/SUPERVGUI/SUPERVGUI_Port.h b/src/SUPERVGUI/SUPERVGUI_Port.h index bb6d488..99b8125 100644 --- a/src/SUPERVGUI/SUPERVGUI_Port.h +++ b/src/SUPERVGUI/SUPERVGUI_Port.h @@ -1,9 +1,29 @@ -// File : SUPERVGUI_Port.h -// Created : 25 / 10 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Port.h +// Author : Francis KLOSS +// Module : SUPERV #ifndef SUPERVGUI_Port_H #define SUPERVGUI_Port_H diff --git a/src/SUPERVGUI/SUPERVGUI_Python.cxx b/src/SUPERVGUI/SUPERVGUI_Python.cxx index b307d89..f59a0f1 100644 --- a/src/SUPERVGUI/SUPERVGUI_Python.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Python.cxx @@ -1,11 +1,31 @@ -using namespace std; -// File : SUPERVGUI_Python.cxx -// Created : 18 / 06 / 2002 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Python.cxx +// Author : Francis KLOSS +// Module : SUPERV +using namespace std; #include "SUPERVGUI_Def.h" #include "QAD_PyEditor.h" #include "QAD_PyInterp.h" diff --git a/src/SUPERVGUI/SUPERVGUI_Python.h b/src/SUPERVGUI/SUPERVGUI_Python.h index 5549e8b..8e31fe1 100644 --- a/src/SUPERVGUI/SUPERVGUI_Python.h +++ b/src/SUPERVGUI/SUPERVGUI_Python.h @@ -1,9 +1,29 @@ -// File : SUPERVGUI_Python.h -// Created : 18 / 06 / 2002 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Python.h +// Author : Francis KLOSS +// Module : SUPERV #ifndef SUPERVGUI_Python_H #define SUPERVGUI_Python_H diff --git a/src/SUPERVGUI/SUPERVGUI_Service.cxx b/src/SUPERVGUI/SUPERVGUI_Service.cxx index dbed346..2b13b08 100644 --- a/src/SUPERVGUI/SUPERVGUI_Service.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Service.cxx @@ -1,11 +1,31 @@ -using namespace std; -// File : SUPERVGUI_Service.cxx -// Created : 7 / 11 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Service.cxx +// Author : Francis KLOSS +// Module : SUPERV +using namespace std; #include "SUPERVGUI_Service.h" #include "SUPERVGUI_Main.h" #include "SUPERVGUI.h" diff --git a/src/SUPERVGUI/SUPERVGUI_Service.h b/src/SUPERVGUI/SUPERVGUI_Service.h index 3857650..c04a154 100644 --- a/src/SUPERVGUI/SUPERVGUI_Service.h +++ b/src/SUPERVGUI/SUPERVGUI_Service.h @@ -1,9 +1,29 @@ -// File : SUPERVGUI_Service.h -// Created : 7 / 11 / 2001 -// Author : Francis KLOSS -// Project : SALOME -// Module : SUPERVGUI -// Copyright : CEA +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SUPERVGUI_Service.h +// Author : Francis KLOSS +// Module : SUPERV #ifndef SUPERVGUI_Service_H #define SUPERVGUI_Service_H diff --git a/src/SUPERVGUI/SUPERVGUI_View.cxx b/src/SUPERVGUI/SUPERVGUI_View.cxx index e1a875a..86fc5a6 100644 --- a/src/SUPERVGUI/SUPERVGUI_View.cxx +++ b/src/SUPERVGUI/SUPERVGUI_View.cxx @@ -1,12 +1,14 @@ -using namespace std; -// File : SUPERVGUI_View.cxx -// Created : 24 / 10 / 2002 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE - +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_View.cxx +// Author : Vitaly SMETANNIKOV +// Module : SUPERV +using namespace std; #include "SUPERVGUI_View.h" #include "SUPERVGUI_Main.h" #include "QAD_Config.h" diff --git a/src/SUPERVGUI/SUPERVGUI_View.h b/src/SUPERVGUI/SUPERVGUI_View.h index 59176d6..cfc8565 100644 --- a/src/SUPERVGUI/SUPERVGUI_View.h +++ b/src/SUPERVGUI/SUPERVGUI_View.h @@ -1,10 +1,12 @@ -// File : SUPERVGUI_View.h -// Created : 24 / 10 / 2002 -// Author : Vitaly SMETANNIKOV -// Project : SALOME -// Module : SUPERVGUI -// Copyright : Open CASCADE - +// SUPERV SUPERVGUI : GUI for Supervisor component +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SUPERVGUI_View.h +// Author : Vitaly SMETANNIKOV +// Module : SUPERV #ifndef SUPERVGUI_View_H #define SUPERVGUI_View_H diff --git a/src/SUPERVGUI/SupervisionGUI_icons.po b/src/SUPERVGUI/SupervisionGUI_icons.po new file mode 100644 index 0000000..9f0e10f --- /dev/null +++ b/src/SUPERVGUI/SupervisionGUI_icons.po @@ -0,0 +1,37 @@ +# SUPERV SUPERVGUI : GUI for Supervisor component +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : SupervisionGUI_icons.po +# Module : SUPERV + +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2001-09-11 12:08:44 PM CEST\n" +"PO-Revision-Date: YYYY-MM-DD\n" +"Last-Translator: FULLNAME \n" +"Content-Type: text/plain; charset=iso-8859-1\n" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_Supervision" +msgstr "Superv_tree_superv.png" \ No newline at end of file diff --git a/src/SUPERVGUI/SupervisionGUI_msg_en.po b/src/SUPERVGUI/SupervisionGUI_msg_en.po new file mode 100644 index 0000000..00b51c3 --- /dev/null +++ b/src/SUPERVGUI/SupervisionGUI_msg_en.po @@ -0,0 +1,611 @@ +# SUPERV SUPERVGUI : GUI for Supervisor component +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : SupervisionGUI_msg_en.po +# Module : SUPERV + +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2001-09-11 12:08:44 PM CEST\n" +"PO-Revision-Date: YYYY-MM-DD\n" +"Last-Translator: FULLNAME \n" +"Content-Type: text/plain; charset=iso-8859-1\n" + +#Title of error messages +msgid "ERROR" +msgstr "Error" + +#:SUPERVGUI_Main.cxx:246 +msgid "MSG_FILE_EXIST" +msgstr "File '%1' exists.\nReplace?" + +#:SUPERVGUI_Main.cxx:252 +msgid "MSG_BAD_WRITING" +msgstr "Bad Writing File" + +#:SUPERVGUI_Main.cxx:242 +msgid "TTL_EXPORT_DATAFLOW" +msgstr "Export Dataflow As..." + +#:SUPERVGUI_Main.cxx:41 +msgid "MSG_ACCESS_BAD_IOR" +msgstr "Can't Access Dataflow: bad IOR" + +#:SUPERVGUI_Main.cxx:47 +msgid "MSG_NOACCESS_BY_IOR" +msgstr "Can't Access Dataflow by IOR" + +#:SUPERVGUI_Main.cxx:53 +msgid "MSG_CANT_CREATE_DF" +msgstr "Can't Create a New Dataflow" + +#:SUPERVGUI_Main.cxx:72 +msgid "MSG_BAD_FILE" +msgstr "Bad File: %1" + +#:SUPERVGUI_Main.cxx:86 +msgid "MSG_CANT_COPY" +msgstr "Can't Copy Dataflow" + +#:SUPERVGUI_Main.cxx:102 +msgid "MSG_DEL_LAST_PNT" +msgstr "Delete Last Point" + +#:SUPERVGUI_Main.cxx:103 +msgid "MSG_DEL_LINK" +msgstr "Delete Link" + +#:SUPERVGUI_Main.cxx:104 +msgid "MSG_ORTHO_LINE" +msgstr "Ortho Mode" + +#:SUPERVGUI_Main.cxx:146 +msgid "WARNING" +msgstr "Supervision Warning" + +#:SUPERVGUI_Main.cxx:147 +msgid "MSG_DF_RUNNING" +msgstr "Dataflow Is Currently Running" + +#:SUPERVGUI_Main.cxx:148 +msgid "MSG_DF_EXECUTION" +msgstr "Background Execution" + +#:SUPERVGUI_Main.cxx:149 +msgid "MSG_DF_KILL" +msgstr "Kill Execution" + +#:SUPERVGUI_Main.cxx:185 +msgid "GRAPH_TITLE" +msgstr "Supervision: " + +#:SUPERVGUI_Main.cxx:195 +msgid "MSG_GRAPH_STARTED" +msgstr "===> Dataflow Execution is started" + +#:SUPERVGUI_Main.cxx:191 +msgid "MSG_GRAPH_READONLY" +msgstr "===> Dataflow is Read Only" + +#:SUPERVGUI_Main.cxx:191 +msgid "MSG_GRAPH_EDITING" +msgstr "===> Dataflow is Modifiable" + +#:SUPERVGUI_Main.cxx:200 +msgid "MSG_GRAPH_SUSPENDED" +msgstr "===> Dataflow Execution is Suspended" + +#:SUPERVGUI_Main.cxx:204 +msgid "MSG_GRAPH_FINISHED" +msgstr "===> Dataflow Execution is Finished" + +#:SUPERVGUI_Main.cxx:208 +msgid "MSG_GRAPH_ABORTED" +msgstr "===> Dataflow Execution is Aborted" + +#:SUPERVGUI_Main.cxx:212 +msgid "MSG_GRAPH_KILLED" +msgstr "===> Dataflow Execution is Killed" + +#:SUPERVGUI_Main.cxx:265 +msgid "MSG_GRAPH_INSERT" +msgstr "Insert a Dataflow" + +#:SUPERVGUI_Main.cxx:285 +msgid "MSG_DF_NOTVALID" +msgstr "Dataflow Not Valid" + +#:SUPERVGUI_Main.cxx:287 +msgid "MSG_DF_NOTEXECUTABLE" +msgstr "Dataflow Not Executable" + +#:SUPERVGUI_Main.cxx:289 +msgid "MSG_DF_BADEXECUTE" +msgstr "Dataflow Bad Execute" + +#:SUPERVGUI_Main.cxx:301 +msgid "MSG_DF_NOTRUNNING" +msgstr "Dataflow Is Not Running" + +#:SUPERVGUI_Main.cxx:305 +msgid "MSG_CANTKILL_DF" +msgstr "Can't Kill Dataflow" + +#:SUPERVGUI_Main.cxx:315 +msgid "MSG_DF_RESUMED" +msgstr "===> Dataflow Execution is Resumed" + +#:SUPERVGUI_Main.cxx:318 +msgid "MSG_CANT_RESUME" +msgstr "Can't Resume Dataflow" + +#:SUPERVGUI_Main.cxx:324 +msgid "MSG_CANT_SUSPEND" +msgstr "Can't Suspend Dataflow" + +#:SUPERVGUI_Main.cxx:335 +msgid "MSG_DF_RESTARTED" +msgstr "===> Dataflow Execution is Restarted" + +#:SUPERVGUI_Main.cxx:338 +msgid "MSG_CANT_RESTART" +msgstr "Can't Restart Dataflow" + +#:SUPERVGUI_Main.cxx:344 +msgid "MSG_CANT_STOP" +msgstr "Can't Stop Dataflow" + +#:SUPERVGUI_Main.cxx:477 +msgid "MSG_CHOOSE_OUTPUT" +msgstr "Choose an Output Port" + +#:SUPERVGUI_Main.cxx:477 +msgid "MSG_CHOOSE_INPUT" +msgstr "Choose an Input Port" + +#:SUPERVGUI_Main.cxx:486 +msgid "MSG_CANT_CREATE_LINK" +msgstr "Can't Create This Link" + +#:SUPERVGUI_Main.cxx:508 +msgid "MSG_CANT_CREATE_POINT" +msgstr "Can't Create Point(s) For This Link" + +#:SUPERVGUI_Main.cxx:541 +msgid "MSG_RIGHTLINE" +msgstr "Right Line" + +#:SUPERVGUI_Main.cxx:541 +msgid "MSG_FREEPOINT" +msgstr "Free Point" + +#:SUPERVGUI_Main.cxx:627 +msgid "MSG_CHOOSE_DATA" +msgstr "Choose a Data in Study" + +#:SUPERVGUI_Main.cxx:170 +msgid "MSG_GRAPH_DISPLAYED" +msgstr "The DataFlow %1 \nis already displayed. Open again?" + +#:SUPERVGUI_Main.cxx:288 +msgid "MSG_CRL_NOTCOMPLETE" +msgstr "Link Creation Is Not Complete" + +#:SUPERVGUI_Main.cxx:627 +msgid "MSG_NOTHING_COPY" +msgstr "Nothing to copy." + +msgid "MSG_CANT_CHANGELINK" +msgstr "Can't Change Point Coordinates For a Link" + +msgid "MSG_CANT_CHANGE_COORDLINK" +msgstr "Can't Change Coordinates For a Link" + +msgid "MSG_CANT_DEL_POINT" +msgstr "Can't Delete this Point" + +msgid "MSG_CANT_ADD_POINT" +msgstr "Can't Add this Point" + +msgid "MSG_CANT_GET_LNKCOORD" +msgstr "Can't Get Coordinates From a Link" + +msgid "MSG_NOT_IMPLEMENTED" +msgstr "Not Yet Implemented" + +msgid "MSG_CANT_STOPNODE" +msgstr "Can't Stop Node" + +msgid "MSG_CANT_RESTARTNODE" +msgstr "Can't Restart Node" + +msgid "MSG_CANT_KILLNODE" +msgstr "Can't Kill Node" + +msgid "MSG_CANT_SUSPENDNODE" +msgstr "Can't Suspend Node" + +msgid "MSG_CANT_RESUMENODE" +msgstr "Can't Resume Node" + +msgid "MSG_CANT_RENAMENODE" +msgstr "Can't Rename this Node" + +msgid "MSG_CHANGE_NODENAME" +msgstr "Change the Name of a Node" + +msgid "MSG_ENTER_NODENAME" +msgstr "Please, Enter a Node Name" + +msgid "MSG_STOP" +msgstr "Stop" + +msgid "MSG_RESTART" +msgstr "Restart" + +msgid "MSG_SUSPEND" +msgstr "Suspend" + +msgid "MSG_RESUME" +msgstr "Resume" + +msgid "MSG_KILL" +msgstr "Kill" + +msgid "MSG_DELETE" +msgstr "Delete" + +msgid "MSG_RENAME" +msgstr "Rename" + +msgid "MSG_CONFIGURE" +msgstr "Configure" + +msgid "MSG_CHANGE_INFO" +msgstr "Change Informations" + +msgid "MSG_SHOW_PYTHON" +msgstr "Show Python" + +msgid "MSG_ADD_BEFORE" +msgstr "Add Before" + +msgid "MSG_ADD_AFTER" +msgstr "Add After" + +msgid "MSG_DEL_POINT" +msgstr "Delete Point" + +msgid "MSG_NONODE_TOADD" +msgstr "No Node to Add in Dataflow" + +msgid "MSG_CANT_CHOOSE_SERVICE" +msgstr "Can't Choose a Service in a Component" + +msgid "MSG_NO_SUPERVISION_WINDOW" +msgstr "No Supervision Window Selected to Add Nodes in a Dataflow" + +msgid "MSG_SKETCH_LINK" +msgstr "Sketch Link" + +msgid "MSG_FROMSTUDY" +msgstr "Set From Study" + +msgid "MSG_SETVALUE" +msgstr "Set Value" + +msgid "MSG_BROWSE" +msgstr "Browse" + +msgid "MSG_DELLINK" +msgstr "Delete Link" + +msgid "MSG_CANT_SETVAL" +msgstr "Can't Set Input Value" + +msgid "TIT_INPUT_PORT" +msgstr "Constant for Input Port" + +msgid "MSG_ENTER_VALUE" +msgstr "Please, Enter a Value" + +msgid "MSG_IPORT_VAL" +msgstr "Input Port Value : " + +msgid "MSG_OPORT_VAL" +msgstr "Output Port Value : " + +msgid "MSG_INFO" +msgstr "Information" + +msgid "MSG_TERMINATE" +msgstr "Terminate" + +msgid "MSG_SHOWDATA" +msgstr "Show Data" + +msgid "MSG_CALL_DATASHOW" +msgstr "Call data show as soon ..." + +msgid "MSG_PUT_INSTUDY" +msgstr "Put in Study" + +msgid "MSG_NOT_INSTUDY" +msgstr "Not in Study" + +msgid "MSG_GRAPH_ISRUN" +msgstr "Dataflow is still executing. Kill it?" + +msgid "MSG_NOWINDOW_TO_SUSPEND" +msgstr "No Supervision Window Selected to Suspend or Resume a Dataflow" + +msgid "MSG_NOWINDOW_TO_ADD" +msgstr "No Supervision Window Selected to add new components" + +msgid "MSG_NOWINDOW_TO_EXPORT" +msgstr "No Supervision Window Selected to Export a Dataflow" + +msgid "MSG_CANT_LOAD_SUPERV" +msgstr "Cannot Find or Load Supervision Component" + +msgid "MSG_CANT_NARROW_SUPERV" +msgstr "Cannot _narrow Supervision Component" + +msgid "MSG_NOWINDOW_TO_RELOAD" +msgstr "No Supervision Window Selected to Reload a Dataflow" + +msgid "MSG_NOWINDOW_TO_RUN" +msgstr "No Supervision Window Selected to Run a Dataflow" + +msgid "MSG_NOWINDOW_TO_KILL" +msgstr "No Supervision Window Selected to Kill a Dataflow" + +msgid "MSG_IMPORT" +msgstr "Import Dataflow" + +msgid "MSG_NOTEDITABLE" +msgstr "Current Dataflow is not editable" + +msgid "MSG_ADD_STUDY" +msgstr "Add in Study" + +msgid "MSG_NO_DELLINK" +msgstr "No Link to Delete" + +msgid "MSG_NO_LINK_ADDPNT" +msgstr "No Link to Add a Point" + +msgid "MSG_ADD_NODE" +msgstr "Add Node" + +msgid "MSG_ADD_POINT" +msgstr "Add Point" + +msgid "MSG_INS_FILE" +msgstr "Insert File" + +msgid "MSG_COPY_DATAFLOW" +msgstr "Copy Dataflow" + +msgid "MSG_SWITCH_ARRAY" +msgstr "Switch Array" + +msgid "MSG_FILTER_NOTIFY" +msgstr "Filter Notification" + +msgid "MSG_SWITCH_GRAPH" +msgstr "Switch Graph" + +msgid "MSG_COPY_PREFIX" +msgstr "Copy%1_Of" + +msgid "TIT_RENAME" +msgstr "Rename Dataflow" + +msgid "TLT_INFORMATIONS" +msgstr "Informations" + +msgid "NAME_LBL" +msgstr "Name:" + +msgid "AUTHOR_LBL" +msgstr "Author:" + +msgid "CONTAINER_LBL" +msgstr "Container:" + +msgid "COMPONENT_NAME_LBL" +msgstr "ComponentName:" + +msgid "INTERFACE_NAME_LBL" +msgstr "InterfaceName:" + +msgid "DATE_CREATION_LBL" +msgstr "Created:" + +msgid "DATE_MODIFICATION_LBL" +msgstr "Updated:" + +msgid "COMMENT_LBL" +msgstr "Comment:" + +msgid "BUT_OK" +msgstr "&OK" + +msgid "BUT_CANCEL" +msgstr "&Cancel" + +msgid "MSG_CANT_CHANGE_INFO" +msgstr "Can't Change Informations" + +msgid "MSG_ASK_DELETE" +msgstr "Selected object and its subobjects will be deleted.\nContinue?" + +msgid "POP_VIEW" +msgstr "View" + +msgid "POP_FULLVIEW" +msgstr "Full" + +msgid "POP_CONTROLVIEW" +msgstr "Control" + +msgid "POP_TABLEVIEW" +msgstr "Table" + +msgid "POP_SHOW" +msgstr "Show" + +msgid "POP_SHOWTITLES" +msgstr "Comment" + +msgid "POP_SHOWPORTS" +msgstr "Ports" + +msgid "TIT_BROWSENODE" +msgstr "Browse Node " + +msgid "BUT_APPLY" +msgstr "Ok" + +msgid "BUT_CLOSE" +msgstr "Close" + +msgid "TIT_SETVALUE_PORT" +msgstr "Set Value" + +msgid "ENTER_OR_SELECT_LBL" +msgstr "Enter value or select any object from the study" + +msgid "TIT_SERVICES" +msgstr "Add Node" + +msgid "TLT_FILTER_NOTIFY" +msgstr "Filter Notification" + +msgid "COL_COMPONENTS" +msgstr "Components and services" + +msgid "NOTIFICATION_LOGGING_LBL" +msgstr "Notification Logging" + +msgid "SAVE_LOG_LBL" +msgstr "Save in File" + +msgid "FILTER_LOG_LBL" +msgstr "Filtered File" + +msgid "BUT_BROWSE" +msgstr "Browse" + +msgid "ALL_FILES" +msgstr "All files (*.*)" + +msgid "CHOOSE_LOG_FILES_TLT" +msgstr "Select log file" + +msgid "ERR_CANT_OPEN_LOG_FILE" +msgstr "Can't Open Log file" + +msgid "COL_PORTTYPE" +msgstr "Port type" + +msgid "COL_PORTWAY" +msgstr "Port way" + +msgid "TIT_ADDNODE" +msgstr "Add Node" + +msgid "TIT_ADDCNODE" +msgstr "Add Compute Node" + +msgid "TIT_ADDFNODE" +msgstr "Add Factory Node" + +msgid "BTN_FACTORYNODE" +msgstr "Factory" + +msgid "BTN_SWITCHNODE" +msgstr "Switch" + +msgid "BTN_LOOPNODE" +msgstr "Loop" + +msgid "MODULES_PANE" +msgstr "Factory" + +msgid "INLINE_PANE" +msgstr "Inline" + +msgid "ENDNODE_PREFIX" +msgstr "EndOf" + +msgid "BUT_LOAD" +msgstr "Load from file..." + +msgid "BUT_NEXT" +msgstr "Next Function" + +msgid "TIT_LOADSCRIPT" +msgstr "Load Script" + +msgid "MSG_CANT_LOADSCRIPT" +msgstr "Can't open file" + +msgid "MSG_EMTY_FILE" +msgstr "File is empty" + +msgid "MSG_NOMORE_FUNCTIONS" +msgstr "No more functions in this file" + +msgid "MSG_SCRIPTTIP" +msgstr "Define Name, Input and Output parameters, and body of function\nin fields below accordingly" + +msgid "POP_HIDEPORTS" +msgstr "Hide Ports" + +msgid "COMMENT_FROM" +msgstr " from " + +msgid "COMMENT_PYTHON" +msgstr "Python function" + +msgid "COMMENT_CNODE" +msgstr "Compute Node" + +msgid "TIT_FUNC_PYTHON" +msgstr "Edit function" + +msgid "LBL_NODETYPE" +msgstr "Node type" + +msgid "ITM_DEL_PORT" +msgstr "Delete" + +msgid "MSG_CANT_CREATE_NODE" +msgstr "Can't create node" + +msgid "MSG_PORT_EXIST" +msgstr "Port with such name already exists" + diff --git a/src/SUPERVGUI/SupervisionGUI_msg_fr.po b/src/SUPERVGUI/SupervisionGUI_msg_fr.po new file mode 100644 index 0000000..f1c2519 --- /dev/null +++ b/src/SUPERVGUI/SupervisionGUI_msg_fr.po @@ -0,0 +1,444 @@ +# SUPERV SUPERVGUI : GUI for Supervisor component +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : SupervisionGUI_msg_fr.po +# Module : SUPERV + +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2001-09-11 12:08:44 PM CEST\n" +"PO-Revision-Date: YYYY-MM-DD\n" +"Last-Translator: FULLNAME \n" +"Content-Type: text/plain; charset=iso-8859-1\n" + +#Title of error messages +msgid "ERROR" +msgstr "Supervision Error" + +#:SUPERVGUI_Main.cxx:246 +msgid "MSG_FILE_EXIST" +msgstr "File '%1' exists.\nReplace?" + +#:SUPERVGUI_Main.cxx:252 +msgid "MSG_BAD_WRITING" +msgstr "Bad Writing File" + +#:SUPERVGUI_Main.cxx:242 +msgid "TTL_EXPORT_DATAFLOW" +msgstr "Export Dataflow As..." + +#:SUPERVGUI_Main.cxx:41 +msgid "MSG_ACCESS_BAD_IOR" +msgstr "Can't Access Dataflow: bad IOR" + +#:SUPERVGUI_Main.cxx:47 +msgid "MSG_NOACCESS_BY_IOR" +msgstr "Can't Access Dataflow by IOR" + +#:SUPERVGUI_Main.cxx:53 +msgid "MSG_CANT_CREATE_DF" +msgstr "Can't Create a New Dataflow" + +#:SUPERVGUI_Main.cxx:72 +msgid "MSG_BAD_FILE" +msgstr "Bad File" + +#:SUPERVGUI_Main.cxx:86 +msgid "MSG_CANT_COPY" +msgstr "Can't Copy Dataflow" + +#:SUPERVGUI_Main.cxx:102 +msgid "MSG_DEL_LAST_PNT" +msgstr "Delete Last Point" + +#:SUPERVGUI_Main.cxx:103 +msgid "MSG_DEL_LINK" +msgstr "Delete Link" + +#:SUPERVGUI_Main.cxx:104 +msgid "MSG_ORTHO_LINE" +msgstr "Ortho Mode" + +#:SUPERVGUI_Main.cxx:146 +msgid "WARNING" +msgstr "Supervision Warning" + +#:SUPERVGUI_Main.cxx:147 +msgid "MSG_DF_RUNNING" +msgstr "Dataflow Is Currently Running" + +#:SUPERVGUI_Main.cxx:148 +msgid "MSG_DF_EXECUTION" +msgstr "Background Execution" + +#:SUPERVGUI_Main.cxx:149 +msgid "MSG_DF_KILL" +msgstr "Kill Execution" + +#:SUPERVGUI_Main.cxx:185 +msgid "GRAPH_TITLE" +msgstr "Supervision: " + +#:SUPERVGUI_Main.cxx:195 +msgid "MSG_GRAPH_STARTED" +msgstr "===> Dataflow Execution is started" + +#:SUPERVGUI_Main.cxx:191 +msgid "MSG_GRAPH_READONLY" +msgstr "===> Dataflow is Read Only" + +#:SUPERVGUI_Main.cxx:191 +msgid "MSG_GRAPH_EDITING" +msgstr "===> Dataflow is Modifiable" + +#:SUPERVGUI_Main.cxx:200 +msgid "MSG_GRAPH_SUSPENDED" +msgstr "===> Dataflow Execution is Suspended" + +#:SUPERVGUI_Main.cxx:204 +msgid "MSG_GRAPH_FINISHED" +msgstr "===> Dataflow Execution is Finished" + +#:SUPERVGUI_Main.cxx:208 +msgid "MSG_GRAPH_ABORTED" +msgstr "===> Dataflow Execution is Aborted" + +#:SUPERVGUI_Main.cxx:212 +msgid "MSG_GRAPH_KILLED" +msgstr "===> Dataflow Execution is Killed" + +#:SUPERVGUI_Main.cxx:265 +msgid "MSG_GRAPH_INSERT" +msgstr "Insert a Dataflow" + +#:SUPERVGUI_Main.cxx:285 +msgid "MSG_DF_NOTVALID" +msgstr "Dataflow Not Valid" + +#:SUPERVGUI_Main.cxx:287 +msgid "MSG_DF_NOTEXECUTABLE" +msgstr "Dataflow Not Executable" + +#:SUPERVGUI_Main.cxx:289 +msgid "MSG_DF_BADEXECUTE" +msgstr "Dataflow Bad Execute" + +#:SUPERVGUI_Main.cxx:301 +msgid "MSG_DF_NOTRUNNING" +msgstr "Dataflow Is Not Running" + +#:SUPERVGUI_Main.cxx:305 +msgid "MSG_CANTKILL_DF" +msgstr "Can't Kill Dataflow" + +#:SUPERVGUI_Main.cxx:315 +msgid "MSG_DF_RESUMED" +msgstr "===> Dataflow Execution is Resumed" + +#:SUPERVGUI_Main.cxx:318 +msgid "MSG_CANT_RESUME" +msgstr "Can't Resume Dataflow" + +#:SUPERVGUI_Main.cxx:324 +msgid "MSG_CANT_SUSPEND" +msgstr "Can't Suspend Dataflow" + +#:SUPERVGUI_Main.cxx:335 +msgid "MSG_DF_RESTARTED" +msgstr "===> Dataflow Execution is Restarted" + +#:SUPERVGUI_Main.cxx:338 +msgid "MSG_CANT_RESTART" +msgstr "Can't Restart Dataflow" + +#:SUPERVGUI_Main.cxx:344 +msgid "MSG_CANT_STOP" +msgstr "Can't Stop Dataflow" + +#:SUPERVGUI_Main.cxx:477 +msgid "MSG_CHOOSE_OUTPUT" +msgstr "Choose an Output Port" + +#:SUPERVGUI_Main.cxx:477 +msgid "MSG_CHOOSE_INPUT" +msgstr "Choose an Input Port" + +#:SUPERVGUI_Main.cxx:486 +msgid "MSG_CANT_CREATE_LINK" +msgstr "Can't Create This Link" + +#:SUPERVGUI_Main.cxx:508 +msgid "MSG_CANT_CREATE_POINT" +msgstr "Can't Create Point(s) For This Link" + +#:SUPERVGUI_Main.cxx:541 +msgid "MSG_RIGHTLINE" +msgstr "Right Line" + +#:SUPERVGUI_Main.cxx:541 +msgid "MSG_FREEPOINT" +msgstr "Free Point" + +#:SUPERVGUI_Main.cxx:627 +msgid "MSG_CHOOSE_DATA" +msgstr "Choose a Data in Study" + +#:SUPERVGUI_Main.cxx:170 +msgid "MSG_GRAPH_DISPLAYED" +msgstr "The DataFlow %1 \nis already displayed. Open again?" + +#:SUPERVGUI_Main.cxx:627 +msgid "MSG_NOTHING_COPY" +msgstr "Nothing to copy." + +msgid "MSG_CANT_CHANGELINK" +msgstr "Can't Change Point Coordinates For a Link" + +msgid "MSG_CANT_CHANGE_COORDLINK" +msgstr "Can't Change Coordinates For a Link" + +msgid "MSG_CANT_DEL_POINT" +msgstr "Can't Delete this Point" + +msgid "MSG_CANT_ADD_POINT" +msgstr "Can't Add this Point" + +msgid "MSG_CANT_GET_LNKCOORD" +msgstr "Can't Get Coordinates From a Link" + +msgid "MSG_NOT_IMPLEMENTED" +msgstr "Not Yet Implemented" + +msgid "MSG_CANT_STOPNODE" +msgstr "Can't Stop Node" + +msgid "MSG_CANT_RESTARTNODE" +msgstr "Can't Restart Node" + +msgid "MSG_CANT_KILLNODE" +msgstr "Can't Kill Node" + +msgid "MSG_CANT_SUSPENDNODE" +msgstr "Can't Suspend Node" + +msgid "MSG_CANT_RESUMENODE" +msgstr "Can't Resume Node" + +msgid "MSG_CANT_RENAMENODE" +msgstr "Can't Rename this Node" + +msgid "MSG_CHANGE_NODENAME" +msgstr "Change the Name of a Node" + +msgid "MSG_ENTER_NODENAME" +msgstr "Please, Enter a Node Name" + +msgid "MSG_STOP" +msgstr "Stop" + +msgid "MSG_RESTART" +msgstr "Restart" + +msgid "MSG_SUSPEND" +msgstr "Suspend" + +msgid "MSG_RESUME" +msgstr "Resume" + +msgid "MSG_KILL" +msgstr "Kill" + +msgid "MSG_DELETE" +msgstr "Delete" + +msgid "MSG_RENAME" +msgstr "Rename" + +msgid "MSG_CONFIGURE" +msgstr "Configure" + +msgid "MSG_CHANGE_INFO" +msgstr "Change Informations" + +msgid "MSG_SHOW_PYTHON" +msgstr "Show Python" + +msgid "MSG_ADD_BEFORE" +msgstr "Add Before" + +msgid "MSG_ADD_AFTER" +msgstr "Add After" + +msgid "MSG_DEL_POINT" +msgstr "Delete Point" + +msgid "MSG_NONODE_TOADD" +msgstr "No Node to Add in Dataflow" + +msgid "MSG_CANT_CHOOSE_SERVICE" +msgstr "Can't Choose a Service in a Component" + +msgid "MSG_NO_SUPERVISION_WINDOW" +msgstr "No Supervision Window Selected to Add Nodes in a Dataflow" + +msgid "MSG_SKETCH_LINK" +msgstr "Sketch Link" + +msgid "MSG_FROMSTUDY" +msgstr "Set From Study" + +msgid "MSG_SETVALUE" +msgstr "Set Value" + +msgid "MSG_BROWSE" +msgstr "Browse" + +msgid "MSG_DELLINK" +msgstr "Delete Link" + +msgid "MSG_CANT_SETVAL" +msgstr "Can't Set Input Value" + +msgid "TIT_INPUT_PORT" +msgstr "Constant for Input Port" + +msgid "MSG_ENTER_VALUE" +msgstr "Please, Enter a Value" + +msgid "MSG_IPORT_VAL" +msgstr "Input Port Value : " + +msgid "MSG_OPORT_VAL" +msgstr "Output Port Value : " + +msgid "MSG_INFO" +msgstr "Supervision Information" + +msgid "MSG_TERMINATE" +msgstr "Terminate" + +msgid "MSG_SHOWDATA" +msgstr "Show Data" + +msgid "MSG_CALL_DATASHOW" +msgstr "Call data show as soon ..." + +msgid "MSG_PUT_INSTUDY" +msgstr "Put in Study" + +msgid "MSG_NOT_INSTUDY" +msgstr "Not in Study" + +msgid "MSG_GRAPH_ISRUN" +msgstr "Dataflow is still executing. Kill it?" + +msgid "MSG_NOWINDOW_TO_SUSPEND" +msgstr "No Supervision Window Selected to Suspend or Resume a Dataflow" + +msgid "MSG_NOWINDOW_TO_ADD" +msgstr "No Supervision Window Selected to add new components" + +msgid "MSG_NOWINDOW_TO_EXPORT" +msgstr "No Supervision Window Selected to Export a Dataflow" + +msgid "MSG_CANT_LOAD_SUPERV" +msgstr "Cannot Find or Load Supervision Component" + +msgid "MSG_CANT_NARROW_SUPERV" +msgstr "Cannot _narrow Supervision Component" + +msgid "MSG_NOWINDOW_TO_RELOAD" +msgstr "No Supervision Window Selected to Reload a Dataflow" + +msgid "MSG_NOWINDOW_TO_RUN" +msgstr "No Supervision Window Selected to Run a Dataflow" + +msgid "MSG_NOWINDOW_TO_KILL" +msgstr "No Supervision Window Selected to Kill a Dataflow" + +msgid "MSG_IMPORT" +msgstr "Import Dataflow" + +msgid "MSG_NOTEDITABLE" +msgstr "Current Dataflow is not editable" + +msgid "MSG_ADD_STUDY" +msgstr "Add in Study" + +msgid "MSG_NO_DELLINK" +msgstr "No Link to Delete" + +msgid "MSG_NO_LINK_ADDPNT" +msgstr "No Link to Add a Point" + +msgid "MSG_ADD_NODE" +msgstr "Add Node" + +msgid "MSG_ADD_POINT" +msgstr "Add Point" + +msgid "MSG_INS_FILE" +msgstr "Insert File" + +msgid "MSG_COPY_DATAFLOW" +msgstr "Copy Dataflow" + +msgid "MSG_SWITCH_ARRAY" +msgstr "Switch Array" + +msgid "MSG_FILTER_NOTIFY" +msgstr "Filter Notification" + +msgid "MSG_SWITCH_GRAPH" +msgstr "Switch Graph" + +msgid "MSG_COPY_PREFIX" +msgstr "Copy%1_Of" + +msgid "TIT_RENAME" +msgstr "Rename Dataflow" + +msgid "MSG_ASK_DELETE" +msgstr "Selected object and its subobjects will be deleted.\nContinue?" + +msgid "POP_VIEW" +msgstr "View" + +msgid "POP_FULLVIEW" +msgstr "Full" + +msgid "POP_CONTROLVIEW" +msgstr "Control" + +msgid "POP_TABLEVIEW" +msgstr "Table" + +msgid "POP_SHOW" +msgstr "Show" + +msgid "POP_SHOWTITLES" +msgstr "Titles" + +msgid "POP_SHOWPORTS" +msgstr "Ports" diff --git a/src/Supervision/CNode_Impl.cxx b/src/Supervision/CNode_Impl.cxx index a65f2f2..ebcc16b 100644 --- a/src/Supervision/CNode_Impl.cxx +++ b/src/Supervision/CNode_Impl.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : CNode_Impl.cxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : CNode_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include @@ -57,7 +60,7 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , const char * FuncName , const SUPERV::ListOfStrings & PythonFunction ) : Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { - beginService( "CNode_Impl::CNode_Impl" ); +// beginService( "CNode_Impl::CNode_Impl" ); if ( FuncName && NodeName ) { cout << "CNode_Impl::CNode_Impl " << (void *) NodeName << " " << NodeName << " " << strlen(NodeName) << " " << (void *) FuncName << " " << FuncName @@ -85,7 +88,7 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , aFuncName , aPythonFunction ) ; _IsNode = true ; - endService( "CNode_Impl::CNode_Impl" ); +// endService( "CNode_Impl::CNode_Impl" ); } CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , @@ -929,7 +932,8 @@ SUPERV::GraphState CNode_Impl::State() { // beginService( "CNode_Impl::State" ); SUPERV::GraphState RetVal = SUPERV::EditingState ; GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; - if ( _DataFlowExecutor ) { + if ( _DataFlowExecutor && !_DataFlowEditor->EditedAfterExecution() ) { + //JR : 12/06/03 if ( _DataFlowExecutor ) { if ( _IsNode ) { RetVal = _DataFlowExecutor->State( Name() ) ; } @@ -1255,11 +1259,12 @@ bool CNode_Impl::Resume() { return RetVal ; } -bool CNode_Impl::ReRun() { - beginService( "CNode_Impl::ReRun" ); +bool CNode_Impl::Run() { + beginService( "CNode_Impl::Run" ); bool RetVal = false ; GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; if ( _DataFlowExecutor ) { + _DataFlowEditor->EditedAfterExecution( false ) ; if ( _IsNode ) { RetVal = _DataFlowExecutor->Run( Name() , Name() , false ) ; } @@ -1267,6 +1272,24 @@ bool CNode_Impl::ReRun() { RetVal = _DataFlowExecutor->Run( false ) ; } } + endService( "CNode_Impl::Run" ); + return RetVal ; +} + +bool CNode_Impl::ReRun() { + beginService( "CNode_Impl::ReRun" ); + bool RetVal = false ; + GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; + if ( _DataFlowExecutor ) { + _DataFlowEditor->EditedAfterExecution( false ) ; + if ( _IsNode ) { + RetVal = _DataFlowExecutor->Run( Name() , Name() , false ) ; + } + else if ( DataFlowEditor()->IsEditing() ) { + // RetVal = _DataFlowExecutor->Run( false ) ; + return ((Graph_Impl::Graph_Impl *) this)->Graph_Impl::Run() ; + } + } endService( "CNode_Impl::ReRun" ); return RetVal ; } @@ -1276,6 +1299,7 @@ bool CNode_Impl::ReRunAt( const char * aNodeName ) { bool RetVal = false ; GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; if ( _DataFlowExecutor ) { + _DataFlowEditor->EditedAfterExecution( false ) ; if ( _IsNode ) { RetVal = _DataFlowExecutor->Run( Name() , aNodeName , false ) ; } @@ -1313,3 +1337,21 @@ bool CNode_Impl::ReStartAt( const char * aNodeName ) { return RetVal ; } +long CNode_Impl::CpuUsed() { + long RetVal = 0 ; + GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; + if ( _DataFlowExecutor ) { + if ( _IsNode ) { +// RetVal = _DataFlowExecutor->CpuUsed( Name() ) ; + } + else { +// RetVal = _DataFlowExecutor->CpuUsed() ; + } + } + else { + return 0 ; + } + return RetVal ; +} + + diff --git a/src/Supervision/CNode_Impl.hxx b/src/Supervision/CNode_Impl.hxx index d6397a6..21ae26f 100644 --- a/src/Supervision/CNode_Impl.hxx +++ b/src/Supervision/CNode_Impl.hxx @@ -1,11 +1,13 @@ -//============================================================================= -// File : CNode_Impl.hxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : CNode_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _CNODE_IMPL_HXX_ #define _CNODE_IMPL_HXX_ @@ -189,11 +191,14 @@ class CNode_Impl : public POA_SUPERV::CNode , virtual bool SuspendDone() ; virtual bool Resume() ; + virtual bool Run() ; virtual bool ReRun() ; virtual bool ReRunAt( const char * aNodeName ) ; virtual bool ReStart() ; virtual bool ReStartAt( const char * aNodeName ) ; + virtual long CpuUsed() ; + } ; #endif diff --git a/src/Supervision/ELNode_Impl.cxx b/src/Supervision/ELNode_Impl.cxx index 747e5d7..39be6fe 100644 --- a/src/Supervision/ELNode_Impl.cxx +++ b/src/Supervision/ELNode_Impl.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : ELNode_Impl.cxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : ELNode_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include diff --git a/src/Supervision/ELNode_Impl.hxx b/src/Supervision/ELNode_Impl.hxx index 682b204..30b1d8a 100644 --- a/src/Supervision/ELNode_Impl.hxx +++ b/src/Supervision/ELNode_Impl.hxx @@ -1,11 +1,13 @@ -//============================================================================= -// File : ELNode_Impl.hxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : ELNode_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _ELNODE_IMPL_HXX_ #define _ELNODE_IMPL_HXX_ diff --git a/src/Supervision/ESNode_Impl.cxx b/src/Supervision/ESNode_Impl.cxx index cfaa8f3..5b20b25 100644 --- a/src/Supervision/ESNode_Impl.cxx +++ b/src/Supervision/ESNode_Impl.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : ESNode_Impl.cxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : ESNode_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include diff --git a/src/Supervision/ESNode_Impl.hxx b/src/Supervision/ESNode_Impl.hxx index 809e8e2..48d6886 100644 --- a/src/Supervision/ESNode_Impl.hxx +++ b/src/Supervision/ESNode_Impl.hxx @@ -1,11 +1,13 @@ -//============================================================================= -// File : ESNode_Impl.hxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA 2003 -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : ESNode_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _ESNODE_IMPL_HXX_ #define _ESNODE_IMPL_HXX_ diff --git a/src/Supervision/FNode_Impl.cxx b/src/Supervision/FNode_Impl.cxx index d9d29e2..130ecad 100644 --- a/src/Supervision/FNode_Impl.cxx +++ b/src/Supervision/FNode_Impl.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : FNode_Impl.cxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : FNode_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include @@ -33,7 +36,7 @@ FNode_Impl::FNode_Impl( CORBA::ORB_ptr orb , // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , NodeService , NodeName , NodeKindOfNode , (char * ) NULL ) { MESSAGE( NodeName << " " ); - beginService( "FNode_Impl::FNode_Impl" ); +// beginService( "FNode_Impl::FNode_Impl" ); _thisObj = this ; _id = _poa->activate_object(_thisObj); _Orb = CORBA::ORB::_duplicate(orb); @@ -44,7 +47,7 @@ FNode_Impl::FNode_Impl( CORBA::ORB_ptr orb , // NodeKindOfNode ) ) ; DataFlowNode()->ComponentName( NodeComponentName ) ; DataFlowNode()->InterfaceName( NodeInterfaceName ) ; - endService( "FNode_Impl::FNode_Impl" ); +// endService( "FNode_Impl::FNode_Impl" ); } FNode_Impl::FNode_Impl( CORBA::ORB_ptr orb , diff --git a/src/Supervision/FNode_Impl.hxx b/src/Supervision/FNode_Impl.hxx index fb5031e..295113a 100644 --- a/src/Supervision/FNode_Impl.hxx +++ b/src/Supervision/FNode_Impl.hxx @@ -1,11 +1,13 @@ -//============================================================================= -// File : FNode_Impl.hxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA 2001 -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : FNode_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _FNODE_IMPL_HXX_ #define _FNODE_IMPL_HXX_ diff --git a/src/Supervision/GNode_Impl.cxx b/src/Supervision/GNode_Impl.cxx index d5c559f..5d0951c 100644 --- a/src/Supervision/GNode_Impl.cxx +++ b/src/Supervision/GNode_Impl.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : GNode_Impl.cxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : GNode_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include diff --git a/src/Supervision/GNode_Impl.hxx b/src/Supervision/GNode_Impl.hxx index d645622..840ea23 100644 --- a/src/Supervision/GNode_Impl.hxx +++ b/src/Supervision/GNode_Impl.hxx @@ -1,11 +1,13 @@ -//============================================================================= -// File : GNode_Impl.hxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA 2003 -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : GNode_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _GNODE_IMPL_HXX_ #define _GNODE_IMPL_HXX_ diff --git a/src/Supervision/Graph_Impl.cxx b/src/Supervision/Graph_Impl.cxx index 7b3a08c..bfb13ce 100644 --- a/src/Supervision/Graph_Impl.cxx +++ b/src/Supervision/Graph_Impl.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : Graph_Impl.cxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : Graph_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include @@ -450,18 +470,35 @@ SUPERV::SNode_ptr Graph_Impl::SNode( SUPERV::CNode_ptr Graph_Impl::GetNode(char const * aNodeName ) { // beginService( "Graph_Impl::GetNode" ); SUPERV::CNode_var iobject = SUPERV::CNode::_nil() ; - if ( CORBA::is_nil( DataFlowEditor()->GetNode( aNodeName )->ObjRef() ) ) { - CNode_Impl * myNode = new CNode_Impl( _Orb , _Poa , _ContId , - instanceName() , interfaceName() , - DataFlowEditor() , - DataFlowEditor()->GetNode( aNodeName ) ) ; - PortableServer::ObjectId * id = myNode->getId() ; - CORBA::Object_var obj = _poa->id_to_reference(*id); - iobject = SUPERV::CNode::_narrow(obj) ; - myNode->SetObjRef( SUPERV::CNode::_duplicate( iobject ) ) ; - } - else { - iobject = DataFlowEditor()->GetNode( aNodeName )->ObjRef() ; + /* JR : 13/06/03 + if ( CORBA::is_nil( DataFlowEditor()->GetNode( aNodeName )->ObjRef() ) ) { + CNode_Impl * myNode = new CNode_Impl( _Orb , _Poa , _ContId , + instanceName() , interfaceName() , + DataFlowEditor() , + DataFlowEditor()->GetNode( aNodeName ) ) ; + PortableServer::ObjectId * id = myNode->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + iobject = SUPERV::CNode::_narrow(obj) ; + myNode->SetObjRef( SUPERV::CNode::_duplicate( iobject ) ) ; + } + else { + iobject = DataFlowEditor()->GetNode( aNodeName )->ObjRef() ; + */ + GraphEditor::InNode * anInNode = DataFlowEditor()->GetNode( aNodeName ) ; + if ( anInNode ) { + if ( CORBA::is_nil( anInNode->ObjRef() ) ) { + CNode_Impl * myNode = new CNode_Impl( _Orb , _Poa , _ContId , + instanceName() , interfaceName() , + DataFlowEditor() , + DataFlowEditor()->GetNode( aNodeName ) ) ; + PortableServer::ObjectId * id = myNode->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + iobject = SUPERV::CNode::_narrow(obj) ; + myNode->SetObjRef( SUPERV::CNode::_duplicate( iobject ) ) ; + } + else { + iobject = DataFlowEditor()->GetNode( aNodeName )->ObjRef() ; + } } // endService( "Graph_Impl::GetNode" ); return SUPERV::CNode::_duplicate( iobject ) ; @@ -499,7 +536,14 @@ SUPERV::Link_ptr Graph_Impl::Link( SUPERV::Port_ptr OutPort , SUPERV::ListOfNodes_var Graph_Impl::SetNode( SUPERV::ListOfNodes_var RetVal , GraphBase::ComputingNode * aNode ) { int index = 0 ; - MESSAGE("Graph_Impl::SetNode " << aNode->Name() << " " << aNode->Kind() ) ; +// MESSAGE("Graph_Impl::SetNode " << aNode->Name() << " " << aNode->Kind() ) ; +// if ( _DataFlowExecutor ) { +// MESSAGE("Graph_Impl::SetNode " << aNode->Name() << " " << aNode->Kind() << " " +// << _DataFlowExecutor->StateName( _DataFlowExecutor->AutomatonState( aNode->Name() ) ) ) ; +// } +// else { +// MESSAGE("Graph_Impl::SetNode " << aNode->Name() << " " << aNode->Kind() ) ; +// } if ( aNode->IsComputingNode() ) { index = RetVal->CNodes.length() ; RetVal->CNodes.length( index+1 ); @@ -671,14 +715,22 @@ SUPERV::ListOfNodes * Graph_Impl::Nodes() { GraphBase::ComputingNode * aNode = DataFlowEditor()->GraphNodes( i ) ; RetVal = SetNode( RetVal , aNode ) ; } - MESSAGE("Graph_Impl::Nodes CNodes " << RetVal->CNodes.length() - << " FNodes " << RetVal->FNodes.length() - << " INodes " << RetVal->INodes.length() - << " GNodes " << RetVal->GNodes.length() - << " LNodes " << RetVal->LNodes.length() - << " ELNodes " << RetVal->ELNodes.length() - << " SNodes " << RetVal->SNodes.length() - << " ESNodes " << RetVal->ESNodes.length() ) ; + char * aStateG = "" ; + if ( _DataFlowExecutor ) { + aStateG = (char *) _DataFlowExecutor->StateName( _DataFlowExecutor->AutomatonState() ) ; + } +// MESSAGE("Graph_Impl::Nodes GraphState " << aStateG +// << " CNodes " << RetVal->CNodes.length() +// << " FNodes " << RetVal->FNodes.length() +// << " INodes " << RetVal->INodes.length() +// << " GNodes " << RetVal->GNodes.length() +// << " LNodes " << RetVal->LNodes.length() +// << " ELNodes " << RetVal->ELNodes.length() +// << " SNodes " << RetVal->SNodes.length() +// << " ESNodes " << RetVal->ESNodes.length() ) ; +// if ( _DataFlowExecutor ) { +// _DataFlowExecutor->EventList() ; +// } endService( "Graph_Impl::Nodes" ); return ( RetVal._retn() ) ; } @@ -933,6 +985,7 @@ bool Graph_Impl::Begin() { _DataFlowExecutor = NULL ; DataFlowEditor()->Executor( NULL ) ; } + DataFlowEditor()->EditedAfterExecution( false ) ; _ExecNumber += 1 ; char ExecNumber[30] ; sprintf( ExecNumber , "_%d" , _ExecNumber ) ; @@ -958,14 +1011,14 @@ bool Graph_Impl::Run() { beginService( "Graph_Impl::Run" ); bool RetVal = false ; if ( DataFlowEditor()->IsEditing() ) { + MESSAGE( "Graph_Impl::Run IsEditing" ); RetVal = Begin() ; + MESSAGE( "Graph_Impl::(Re)Run " ); + RetVal = CNode_Impl::Run() ; } else { - RetVal = true ; - } - if ( RetVal ) { MESSAGE( "Graph_Impl::(Re)Run " ); - RetVal = ReRun() ; + RetVal = CNode_Impl::ReRun() ; } endService( "Graph_Impl::Run" ); return RetVal ; @@ -974,6 +1027,7 @@ bool Graph_Impl::Start() { beginService( "Graph_Impl::Start" ); bool RetVal = false ; if ( DataFlowEditor()->IsEditing() ) { + MESSAGE( "Graph_Impl::Start IsEditing" ); RetVal = Begin() ; } else { @@ -1006,7 +1060,7 @@ bool Graph_Impl::EventNoW( SUPERV::CNode_out aNode , } } else { - aNode = SUPERV::Graph::_duplicate( NULL ) ; + aNode = SUPERV::Graph::_duplicate( SUPERV::Graph::_nil() ) ; } } anEvent = theEvent ; diff --git a/src/Supervision/Graph_Impl.hxx b/src/Supervision/Graph_Impl.hxx index 54e06b8..090df65 100644 --- a/src/Supervision/Graph_Impl.hxx +++ b/src/Supervision/Graph_Impl.hxx @@ -1,11 +1,30 @@ -//============================================================================= -// File : Graph_Impl.hxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA 2001 -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : Graph_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _GRAPH_IMPL_HXX_ #define _GRAPH_IMPL_HXX_ diff --git a/src/Supervision/INode_Impl.cxx b/src/Supervision/INode_Impl.cxx index 6c10a63..29689d1 100644 --- a/src/Supervision/INode_Impl.cxx +++ b/src/Supervision/INode_Impl.cxx @@ -1,13 +1,15 @@ -using namespace std; -//============================================================================= -// File : INode_Impl.cxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : INode_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include diff --git a/src/Supervision/INode_Impl.hxx b/src/Supervision/INode_Impl.hxx index 3fdfa10..4a1fc23 100644 --- a/src/Supervision/INode_Impl.hxx +++ b/src/Supervision/INode_Impl.hxx @@ -1,11 +1,13 @@ -//============================================================================= -// File : INode_Impl.hxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : INode_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _INODE_IMPL_HXX_ #define _INODE_IMPL_HXX_ diff --git a/src/Supervision/LNode_Impl.cxx b/src/Supervision/LNode_Impl.cxx index 6f06bf3..9389664 100644 --- a/src/Supervision/LNode_Impl.cxx +++ b/src/Supervision/LNode_Impl.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : LNode_Impl.cxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : LNode_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include diff --git a/src/Supervision/LNode_Impl.hxx b/src/Supervision/LNode_Impl.hxx index efe7a5f..fca0906 100644 --- a/src/Supervision/LNode_Impl.hxx +++ b/src/Supervision/LNode_Impl.hxx @@ -1,11 +1,13 @@ -//============================================================================= -// File : LNode_Impl.hxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : LNode_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _LNODE_IMPL_HXX_ #define _LNODE_IMPL_HXX_ diff --git a/src/Supervision/Link_Impl.cxx b/src/Supervision/Link_Impl.cxx index f93996c..fe2d344 100644 --- a/src/Supervision/Link_Impl.cxx +++ b/src/Supervision/Link_Impl.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : Link_Impl.cxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : Link_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include diff --git a/src/Supervision/Link_Impl.hxx b/src/Supervision/Link_Impl.hxx index 8cbd9e5..9413b10 100644 --- a/src/Supervision/Link_Impl.hxx +++ b/src/Supervision/Link_Impl.hxx @@ -1,11 +1,30 @@ -//============================================================================= -// File : Link_Impl.hxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA 2001 -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : Link_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _LINK_IMPL_HXX_ #define _LINK_IMPL_HXX_ diff --git a/src/Supervision/Makefile.in b/src/Supervision/Makefile.in index 0d249bb..a14c72e 100755 --- a/src/Supervision/Makefile.in +++ b/src/Supervision/Makefile.in @@ -1,17 +1,35 @@ -#============================================================================== -# File : Makefile.in -# Created : aug 21 2001 -# Author : , CEA -# Project : SALOME -# Copyright : CEA 2001 +# SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Author : , CEA +# Module : SUPERV # $Header: -#============================================================================== -# source path top_srcdir=@top_srcdir@ -top_builddir=../.. +top_builddir=../../.. srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl +VPATH=.:@srcdir@:@top_srcdir@/idl @COMMENCE@ @@ -35,7 +53,7 @@ EXPORT_HEADERS = \ # Input_Impl.hxx \ # Libraries targets -LIB = libSUPERVEngine.la +LIB = libSupervisionEngine.la LIB_SRC = Value_Impl.cxx \ Port_Impl.cxx \ Link_Impl.cxx \ @@ -62,18 +80,9 @@ LIB_CLIENT_IDL = SALOME_ModuleCatalog.idl \ BIN_SRC = BIN_SERVER_IDL = -CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) \ - $(OGL_INCLUDES) $(OCC_INCLUDES) \ - -I${KERNEL_ROOT_DIR}/include/salome -CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 \ - -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS+= -lSalomeSuperVisionEditor -lSalomeSuperVisionExecutor -lSalomeSuperVisionBase \ - -lSalomeContainer -lSalomeNotification -lSalomeDS -lSalomeNS -lSalomeLifeCycleCORBA \ - -lOpUtil -lRegistry -lSalomeHDFPersist -lSalomeLoggerServer \ - $(QT_MT_LIBS) $(OGL_LIBS) $(HDF5_LIBS) \ - -L${KERNEL_ROOT_DIR}/lib/salome - -#LDFLAGS+= -lSalomeSuperVisionEditor -lSalomeSuperVisionExecutor -lSalomeSuperVisionBase -lSalomeContainer -lSalomeNotification -lSalomeNS -lSalomeLifeCycleCORBA -lOpUtil -lRegistry -lSalomeHDFPersist -lSalomeLoggerServer $(QT_MT_LIBS) $(OGL_LIBS) $(HDF5_LIBS) +CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) $(OCC_INCLUDES) +CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 +LDFLAGS+= -lSalomeSuperVisionEditor -lSalomeSuperVisionExecutor -lSalomeSuperVisionBase -lSalomeContainer -lSalomeNotification -lSalomeNS -lSalomeLifeCycleCORBA -lOpUtil -lRegistry -lTOOLSDS -lSalomeLoggerServer $(QT_MT_LIBS) @CONCLUDE@ diff --git a/src/Supervision/Port_Impl.cxx b/src/Supervision/Port_Impl.cxx index cd6b4dc..96d13d6 100644 --- a/src/Supervision/Port_Impl.cxx +++ b/src/Supervision/Port_Impl.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : Port_Impl.cxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : Port_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include diff --git a/src/Supervision/Port_Impl.hxx b/src/Supervision/Port_Impl.hxx index 8814a77..1177c14 100644 --- a/src/Supervision/Port_Impl.hxx +++ b/src/Supervision/Port_Impl.hxx @@ -1,11 +1,30 @@ -//============================================================================= -// File : Port_Impl.hxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA 2001 -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : Port_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _PORT_IMPL_HXX_ #define _PORT_IMPL_HXX_ diff --git a/src/Supervision/SNode_Impl.cxx b/src/Supervision/SNode_Impl.cxx index 6b9718c..b6d2dcd 100644 --- a/src/Supervision/SNode_Impl.cxx +++ b/src/Supervision/SNode_Impl.cxx @@ -1,12 +1,15 @@ -using namespace std; -//============================================================================= -// File : SNode_Impl.cxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SNode_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include diff --git a/src/Supervision/SNode_Impl.hxx b/src/Supervision/SNode_Impl.hxx index 1017995..00d59d2 100644 --- a/src/Supervision/SNode_Impl.hxx +++ b/src/Supervision/SNode_Impl.hxx @@ -1,11 +1,13 @@ -//============================================================================= -// File : SNode_Impl.hxx -// Created : 2003 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA 2003 -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SNode_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _SNODE_IMPL_HXX_ #define _SNODE_IMPL_HXX_ diff --git a/src/Supervision/SuperV.py b/src/Supervision/SuperV.py index a1028ee..7efe680 100644 --- a/src/Supervision/SuperV.py +++ b/src/Supervision/SuperV.py @@ -1,17 +1,27 @@ #! /usr/bin/env python +# +# SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +# +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# +# +# File : SuperV.py +# Module : SUPERV try : from salome import orb from salome import lcc from salome import naming_service from salome import CORBA - from salome import sg + import SALOME_ModuleCatalog except : import curses from LifeCycleCORBA import * from SALOME_NamingServicePy import * import SUPERV import SUPERV_idl + import SALOME_ModuleCatalog # try : # from libSuperVision_Swig import SuperV_Swig # print 'SuperV_Swig imported' @@ -30,11 +40,11 @@ from types import * # SuperVision.Swig = 1 # print 'SuperV_Swig created' #except : -# SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","SUPERV") +# SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision") # SuperVision.Swig = 0 # print 'Supervision Component loaded' -SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","SUPERV") +SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision") SuperVision.Swig = 0 modulecatalog = naming_service.Resolve("/Kernel/ModulCatalog") @@ -396,6 +406,8 @@ class CNode: return self.N.Y() def destroy( self ): self.N.destroy() + def CpuUsed( self ): + return self.N.CpuUsed() ########################################################## class FNode(CNode): diff --git a/src/Supervision/SuperV_CheckOfUndefined.cxx b/src/Supervision/SuperV_CheckOfUndefined.cxx index cb4a489..c9dc910 100755 --- a/src/Supervision/SuperV_CheckOfUndefined.cxx +++ b/src/Supervision/SuperV_CheckOfUndefined.cxx @@ -1,3 +1,29 @@ +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SuperV_CheckOfUndefined.cxx +// Module : SUPERV + using namespace std; #include #include @@ -16,6 +42,9 @@ using namespace std; #include "DataFlowEditor_DataFlow.hxx" #include "DataFlowEditor_DataFlow.lxx" +int _ArgC ; +char ** _ArgV ; + static PyMethodDef MethodPyVoidMethod[] = { { NULL, NULL } }; diff --git a/src/Supervision/SuperV_Impl.cxx b/src/Supervision/SuperV_Impl.cxx index c369099..6a4dee9 100644 --- a/src/Supervision/SuperV_Impl.cxx +++ b/src/Supervision/SuperV_Impl.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : SuperV_Impl.cxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// $Header$ -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SuperV_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header$ +using namespace std; #include #include #include @@ -131,6 +151,13 @@ SALOMEDS::TMPFile* SuperV_Impl::Save(SALOMEDS::SComponent_ptr theComponent, return aStreamFile._retn(); } +SALOMEDS::TMPFile* SuperV_Impl::SaveASCII(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile) { + SALOMEDS::TMPFile_var aStreamFile = Save(theComponent, theURL, isMultiFile); + return aStreamFile._retn(); +} + // void SuperV_Impl::Load(const char* IORSComponent, const char* aUrlOfFile) { CORBA::Boolean SuperV_Impl::Load(SALOMEDS::SComponent_ptr theComponent, const SALOMEDS::TMPFile& theStream, @@ -146,6 +173,13 @@ CORBA::Boolean SuperV_Impl::Load(SALOMEDS::SComponent_ptr theComponent, return true; } +CORBA::Boolean SuperV_Impl::LoadASCII(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile) { + return Load(theComponent, theStream, theURL, isMultiFile); +} + void SuperV_Impl::Close(SALOMEDS::SComponent_ptr theComponent) { // mpv 06.03.2003: bug SAL1508 - graphs will be destructed at the GUI-level at the supervision frame closing @@ -167,7 +201,8 @@ char* SuperV_Impl::ComponentDataType() { char* SuperV_Impl::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, const char* IORString, - CORBA::Boolean isMultiFile) { + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII) { MESSAGE("SuperV_Impl::IORToLocalPersistentID: IOR:"<SetValue((char*)theStream.NP_data()); - return SALOMEDS::SObject_var(theObject)._retn(); + int aLen = theStream.length(); + char* aVal = new char[aLen+1]; + aVal[aLen] = (char)0; + memcpy((void*)aVal, (void*)theStream.NP_data(), aLen); + anIOR->SetValue(aVal); + return aResultSO._retn(); } - if(CORBA::is_nil(theObject)) return aResultSO._retn(); - CORBA::String_var aTmpDir = strdup(SALOMEDS_Tool::GetTmpDir()); - SALOMEDS::ListOfFileNames_var aSeq = SALOMEDS_Tool::PutStreamToFiles(theStream, aTmpDir, false); - char* aFullName = new char[strlen(aTmpDir)+strlen(aSeq[0])+1]; - strcpy(aFullName, aTmpDir); - strcpy(aFullName+strlen(aTmpDir), aSeq[0]); - SUPERV::Graph_ptr aGraph = Graph(strdup(aFullName)); - delete(aFullName); - - SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir, aSeq.in(), true); + TCollection_AsciiString aTmpDir = SALOMEDS_Tool::GetTmpDir(); + SALOMEDS::ListOfFileNames_var aSeq = SALOMEDS_Tool::PutStreamToFiles(theStream, aTmpDir.ToCString(), false); + TCollection_AsciiString aFullName; + aFullName = aTmpDir+aSeq[0]; + SUPERV::Graph_var aGraph = Graph(aFullName.ToCString()); - if (isGraph) { - aResultSO = aBuilder->NewObject(theObject); - } else { - aResultSO = theObject; - } - - SALOMEDS::AttributeIOR_var anIOR = - SALOMEDS::AttributeIOR::_narrow(aBuilder->FindOrCreateAttribute(aResultSO, "AttributeIOR")); - anIOR->SetValue(aGraph->getIOR()); + SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.ToCString(), aSeq.in(), true); + + if (isGraph) { + aResultSO = aBuilder->NewObject(theObject); + } + + SALOMEDS::AttributeIOR_var anIOR = + SALOMEDS::AttributeIOR::_narrow(aBuilder->FindOrCreateAttribute(aResultSO, "AttributeIOR")); + anIOR->SetValue(CORBA::string_dup(aGraph->getIOR())); return aResultSO._retn(); } @@ -502,12 +540,13 @@ SUPERV::Graph_ptr SuperV_Impl::GraphE(const char * aGraphName ) { } SUPERV::Graph_ptr SuperV_Impl::getGraph(const char* ior) { - SUPERV::Graph_var iobject = (SUPERV::Graph_var)NULL; + SUPERV::Graph_var iobject = SUPERV::Graph::_nil(); try { CORBA::Object_ptr obj = _Orb->string_to_object(ior); iobject = SUPERV::Graph::_narrow(obj); } catch ( ... ) { - SUPERV::Graph_var iobject = (SUPERV::Graph_var)NULL; + return SUPERV::Graph::_nil(); + // SUPERV::Graph_var iobject = (SUPERV::Graph_var)NULL; }; return(SUPERV::Graph::_duplicate(iobject)); } diff --git a/src/Supervision/SuperV_Impl.hxx b/src/Supervision/SuperV_Impl.hxx index 1211ef7..74d6a42 100644 --- a/src/Supervision/SuperV_Impl.hxx +++ b/src/Supervision/SuperV_Impl.hxx @@ -1,11 +1,30 @@ -//============================================================================= -// File : SuperV_Impl.hxx -// Created : jeu jui 30 12:28:30 CEST 2001 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA 2001 -// $Header$ -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SuperV_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header$ #ifndef _SUPERV_IMPL_HXX_ #define _SUPERV_IMPL_HXX_ @@ -51,20 +70,29 @@ class SuperV_Impl : public POA_SUPERV::SuperG , SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent, const char* theURL, bool isMultiFile); + SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile); CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent, const SALOMEDS::TMPFile& theStream, const char* theURL, bool isMultiFile); + CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile); void Close(SALOMEDS::SComponent_ptr theComponent); char* ComponentDataType(); char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, const char* IORString, - CORBA::Boolean isMultiFile); + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII); char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, const char* aLocalPersistentID, - CORBA::Boolean isMultiFile) + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII) throw(SALOME::SALOME_Exception); char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, CORBA::Boolean isMultiFile); diff --git a/src/Supervision/Value_Impl.cxx b/src/Supervision/Value_Impl.cxx index 69b5215..bd87bcb 100644 --- a/src/Supervision/Value_Impl.cxx +++ b/src/Supervision/Value_Impl.cxx @@ -1,12 +1,32 @@ -using namespace std; -//============================================================================= -// File : Value_Impl.cxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : Value_Impl.cxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: +using namespace std; #include #include #include diff --git a/src/Supervision/Value_Impl.hxx b/src/Supervision/Value_Impl.hxx index 8c2bb29..dbe0c65 100644 --- a/src/Supervision/Value_Impl.hxx +++ b/src/Supervision/Value_Impl.hxx @@ -1,11 +1,30 @@ -//============================================================================= -// File : Value_Impl.hxx -// Created : Nov 2001 -// Author : Jean Rahuel -// Project : SALOME -// Copyright : CEA 2001 -// $Header: -//============================================================================= +// SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : Value_Impl.hxx +// Author : Jean Rahuel +// Module : SUPERV +// $Header: #ifndef _VALUE_IMPL_HXX_ #define _VALUE_IMPL_HXX_ diff --git a/src/Supervision/batchmode_SuperV.py b/src/Supervision/batchmode_SuperV.py index 56ebb40..8cb6e5e 100644 --- a/src/Supervision/batchmode_SuperV.py +++ b/src/Supervision/batchmode_SuperV.py @@ -1,4 +1,13 @@ #! /usr/bin/env python +# +# SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl +# +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# +# +# File : batchmode_SuperV.py +# Module : SUPERV try : from batchmode_salome import orb @@ -25,17 +34,16 @@ except : import re from types import * import SALOMEDS - #try : # SuperVision = SuperV_Swig( len(sys.argv) , sys.argv ) # SuperVision.Swig = 1 # print 'SuperV_Swig created' #except : -# SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","SUPERV") +# SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision") # SuperVision.Swig = 0 # print 'Supervision Component loaded' -SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","SUPERV") +SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision") SuperVision.Swig = 0 modulecatalog = naming_service.Resolve("/Kernel/ModulCatalog") -- 2.39.2