From 08511b1f8b8a960573a076bd47e21fac8afe23b7 Mon Sep 17 00:00:00 2001 From: nri Date: Wed, 16 Jul 2003 09:23:16 +0000 Subject: [PATCH] NRI : Merge from V1_2. --- idl/Makefile.in | 23 +- idl/SUPERV.idl | 32 +- resources/Supervision_en.xml | 53 -- resources/Supervision_fr.xml | 47 -- 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 | 34 +- .../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 | 34 +- .../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/Makefile.in | 32 +- src/SUPERVGUI/Makefile.in | 3 +- 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 | 19 +- 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/SUPERV_icons.po | 31 +- src/SUPERVGUI/SUPERV_msg_en.po | 39 +- src/SUPERVGUI/SUPERV_msg_fr.po | 29 +- 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 | 34 +- 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 +- 139 files changed, 3580 insertions(+), 2348 deletions(-) delete mode 100755 resources/Supervision_en.xml delete mode 100755 resources/Supervision_fr.xml delete mode 100644 src/SUPERVGUI/SupervisionGUI_icons.po delete mode 100644 src/SUPERVGUI/SupervisionGUI_msg_en.po delete mode 100644 src/SUPERVGUI/SupervisionGUI_msg_fr.po diff --git a/idl/Makefile.in b/idl/Makefile.in index a8fd7ca..bf0306b 100644 --- a/idl/Makefile.in +++ b/idl/Makefile.in @@ -1,8 +1,27 @@ +# 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@ 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/resources/Supervision_en.xml b/resources/Supervision_en.xml deleted file mode 100755 index 0542605..0000000 --- a/resources/Supervision_en.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/Supervision_fr.xml b/resources/Supervision_fr.xml deleted file mode 100755 index cd45f74..0000000 --- a/resources/Supervision_fr.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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..ac1ebf3 100644 --- a/src/GraphBase/Makefile.in +++ b/src/GraphBase/Makefile.in @@ -1,13 +1,31 @@ -#============================================================================== -# 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=../.. srcdir=@srcdir@ 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..c28238e 100644 --- a/src/GraphEditor/Makefile.in +++ b/src/GraphEditor/Makefile.in @@ -1,13 +1,31 @@ -#============================================================================== -# 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=../.. srcdir=@srcdir@ 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/Makefile.in b/src/Makefile.in index 3e85fc2..cbd9e23 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,13 +1,29 @@ -#============================================================================== -# 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=.. srcdir=@srcdir@ diff --git a/src/SUPERVGUI/Makefile.in b/src/SUPERVGUI/Makefile.in index fe3d75b..3f9a354 100644 --- a/src/SUPERVGUI/Makefile.in +++ b/src/SUPERVGUI/Makefile.in @@ -27,7 +27,7 @@ # $Header: top_srcdir=@top_srcdir@ -top_builddir=../../.. +top_builddir=../.. srcdir=@srcdir@ VPATH=.:@srcdir@ @@ -63,6 +63,7 @@ LIB_SRC = SUPERVGUI.cxx \ SUPERVGUI_Port.cxx \ SUPERVGUI_BrowseNodeDlg.cxx \ SUPERVGUI_Link.cxx \ + SUPERVGUI_CtrlLink.cxx \ SUPERVGUI_Label.cxx LIB_MOC = SUPERVGUI.h \ diff --git a/src/SUPERVGUI/SUPERVGUI.cxx b/src/SUPERVGUI/SUPERVGUI.cxx index ecc765b..f4ce8b9 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 c09cb59..371fda1 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 11f5cbf..0449291 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 5c5a623..fa2a3c7 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(); public slots: void switchPorts(); 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 f202f59..da2e981 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 1f8c4cb..d4f83cb 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 83db0f5..bcec75c 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 @@ -45,6 +65,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 6ef0043..283cf0f 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 46b9db8..f104b5c 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 c60c355..948ef6b 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" diff --git a/src/SUPERVGUI/SUPERVGUI_Link.h b/src/SUPERVGUI/SUPERVGUI_Link.h index f9604ab..0704832 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 74595fb..31b3801 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) { @@ -951,6 +974,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 7d43978..b274fa8 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 2bb3fae..ba1a479 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) @@ -148,10 +173,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]=':'; @@ -231,6 +256,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 81434a0..27beac3 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 173b652..e1bcd5e 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 230e551..f9cb9e9 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/SUPERV_icons.po b/src/SUPERVGUI/SUPERV_icons.po index 3a7e789..a71f998 100644 --- a/src/SUPERVGUI/SUPERV_icons.po +++ b/src/SUPERVGUI/SUPERV_icons.po @@ -1,6 +1,29 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" -# would be translated to "Pub", not "Foo::Pub". +# 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" @@ -11,4 +34,4 @@ msgstr "" #: QAD_ObjectBrowser.cxx:140 msgid "ICON_OBJBROWSER_Supervision" -msgstr "Superv_tree_superv.png" \ No newline at end of file +msgstr "Superv_tree_superv.png" diff --git a/src/SUPERVGUI/SUPERV_msg_en.po b/src/SUPERVGUI/SUPERV_msg_en.po index 87feedc..00b51c3 100644 --- a/src/SUPERVGUI/SUPERV_msg_en.po +++ b/src/SUPERVGUI/SUPERV_msg_en.po @@ -1,6 +1,29 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" -# would be translated to "Pub", not "Foo::Pub". +# 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" @@ -185,6 +208,10 @@ msgstr "Choose a Data in Study" 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." @@ -408,6 +435,12 @@ 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:" diff --git a/src/SUPERVGUI/SUPERV_msg_fr.po b/src/SUPERVGUI/SUPERV_msg_fr.po index 9489845..f1c2519 100644 --- a/src/SUPERVGUI/SUPERV_msg_fr.po +++ b/src/SUPERVGUI/SUPERV_msg_fr.po @@ -1,6 +1,29 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" -# would be translated to "Pub", not "Foo::Pub". +# 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" diff --git a/src/SUPERVGUI/SupervisionGUI_icons.po b/src/SUPERVGUI/SupervisionGUI_icons.po deleted file mode 100644 index 9f0e10f..0000000 --- a/src/SUPERVGUI/SupervisionGUI_icons.po +++ /dev/null @@ -1,37 +0,0 @@ -# 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 deleted file mode 100644 index 00b51c3..0000000 --- a/src/SUPERVGUI/SupervisionGUI_msg_en.po +++ /dev/null @@ -1,611 +0,0 @@ -# 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 deleted file mode 100644 index f1c2519..0000000 --- a/src/SUPERVGUI/SupervisionGUI_msg_fr.po +++ /dev/null @@ -1,444 +0,0 @@ -# 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..39a1c4c 100755 --- a/src/Supervision/Makefile.in +++ b/src/Supervision/Makefile.in @@ -1,13 +1,31 @@ -#============================================================================== -# 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=../.. srcdir=@srcdir@ 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 92cd325..2c13d2e 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(); } @@ -510,12 +548,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 00b6f6b..e67a30d 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 a0100fc..397c9c3 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.30.2