1 // SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : DataFlowBase_LoopNode.hxx
23 // Author : Jean Rahuel, CEA
26 #ifndef _DATAFLOWBASE_LOOPNODE_HXX
27 #define _DATAFLOWBASE_LOOPNODE_HXX
29 #include "DataFlowBase_GOTONode.hxx"
33 class LoopNode : public GOTONode {
38 SUPERV::ListOfStrings * _MorePythonFunction ;
39 PyObject * _MyPyMoreMethod ;
41 SUPERV::ListOfStrings * _NextPythonFunction ;
42 PyObject * _MyPyNextMethod ;
47 LoopNode( CORBA::ORB_ptr ORB ,
48 SALOME_NamingService* ptrNamingService ,
49 const char * InitName ,
50 const SUPERV::ListOfStrings & aInitPythonFunction ,
51 const char * MoreName ,
52 const SUPERV::ListOfStrings & aMorePythonFunction ,
53 const char * NextName ,
54 const SUPERV::ListOfStrings & aNextPythonFunction ,
55 const char *NodeName ,
56 const SUPERV::KindOfNode akind ,
57 const SUPERV::SDate NodeFirstCreation ,
58 const SUPERV::SDate NodeLastModification ,
59 const char * NodeEditorRelease ,
60 const char * NodeAuthor ,
61 const char * NodeComment ,
62 const bool GeneratedName ,
65 int * Graph_prof_debug = NULL ,
66 ofstream * Graph_fdebug = NULL ) ;
69 void SetMorePythonFunction( const char * MoreName ,
70 const SUPERV::ListOfStrings & aMorePythonFunction ) {
71 _MoreName = my_strblkdup( MoreName ) ;
72 cdebug << "GraphBase::LoopNode::SetMorePythonFunction MoreName '" << MoreName << "' --> '"
73 << _MoreName << "'" << endl ;
74 _MorePythonFunction = new SUPERV::ListOfStrings( aMorePythonFunction ) ; } ;
76 SUPERV::ListOfStrings * MorePythonFunction() const {
77 SUPERV::ListOfStrings * aMorePythonFunction ;
78 aMorePythonFunction = new SUPERV::ListOfStrings( *_MorePythonFunction ) ;
79 return aMorePythonFunction ; } ;
82 //JR 17.02.2005 Memory Leak return my_strdup( _MoreName ) ; } ;
83 return _MoreName ; } ;
85 void PyMoreMethod( PyObject * MyPyMoreMethod ) {
86 _MyPyMoreMethod = MyPyMoreMethod ; } ;
88 PyObject * PyMoreMethod() {
89 return _MyPyMoreMethod ; } ;
91 void SetNextPythonFunction( const char * NextName ,
92 const SUPERV::ListOfStrings & aNextPythonFunction ) {
93 _NextName = my_strblkdup( NextName ) ;
94 cdebug << "GraphBase::LoopNode::SetNextPythonFunction NextName '" << NextName << "' --> '"
95 << _NextName << "'" << endl ;
96 _NextPythonFunction = new SUPERV::ListOfStrings( aNextPythonFunction ) ; } ;
98 SUPERV::ListOfStrings * NextPythonFunction() const {
99 SUPERV::ListOfStrings * aNextPythonFunction ;
100 aNextPythonFunction = new SUPERV::ListOfStrings( *_NextPythonFunction ) ;
101 return aNextPythonFunction ; } ;
103 char * PyNextName() {
104 //JR 17.02.2005 Memory Leak return my_strdup( _NextName ) ; } ;
105 return _NextName ; } ;
106 void PyNextMethod( PyObject * MyPyNextMethod ) {
107 _MyPyNextMethod = MyPyNextMethod ; } ;
109 PyObject * PyNextMethod() {
110 return _MyPyNextMethod ; } ;
112 // bool SaveXML(ostream &f , char *Tabs , int X , int Y ) ;
113 bool SaveXML(QDomDocument & Graph , QDomElement & info , int X , int Y ) ;
115 bool SavePY(ostream &f , const char * aGraphName , int X , int Y ) ;