1 // SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : DataFlowBase_LoopNode.hxx
8 // Author : Jean Rahuel, CEA
12 #ifndef _DATAFLOWBASE_LOOPNODE_HXX
13 #define _DATAFLOWBASE_LOOPNODE_HXX
15 #include "DataFlowBase_GOTONode.hxx"
19 class LoopNode : public GOTONode {
24 SUPERV::ListOfStrings * _MorePythonFunction ;
25 PyObject * _MyPyMoreMethod ;
27 SUPERV::ListOfStrings * _NextPythonFunction ;
28 PyObject * _MyPyNextMethod ;
33 LoopNode( CORBA::ORB_ptr ORB ,
34 SALOME_NamingService* ptrNamingService ,
35 const char * InitName ,
36 const SUPERV::ListOfStrings & aInitPythonFunction ,
37 const char * MoreName ,
38 const SUPERV::ListOfStrings & aMorePythonFunction ,
39 const char * NextName ,
40 const SUPERV::ListOfStrings & aNextPythonFunction ,
41 const char *NodeName ,
42 const SUPERV::KindOfNode akind ,
43 const SUPERV::SDate NodeFirstCreation ,
44 const SUPERV::SDate NodeLastModification ,
45 const char * NodeEditorRelease ,
46 const char * NodeAuthor ,
47 const char * NodeComment ,
48 const bool GeneratedName ,
51 int * Graph_prof_debug = NULL ,
52 ofstream * Graph_fdebug = NULL ) ;
55 void SetMorePythonFunction( const char * MoreName ,
56 const SUPERV::ListOfStrings & aMorePythonFunction ) {
57 _MoreName = my_strblkdup( MoreName ) ;
58 cdebug << "GraphBase::LoopNode::SetMorePythonFunction MoreName '" << MoreName << "' --> '"
59 << _MoreName << "'" << endl ;
60 _MorePythonFunction = new SUPERV::ListOfStrings( aMorePythonFunction ) ; } ;
62 SUPERV::ListOfStrings * MorePythonFunction() const {
63 SUPERV::ListOfStrings * aMorePythonFunction ;
64 aMorePythonFunction = new SUPERV::ListOfStrings( *_MorePythonFunction ) ;
65 return aMorePythonFunction ; } ;
68 //JR 17.02.2005 Memory Leak return my_strdup( _MoreName ) ; } ;
69 return _MoreName ; } ;
71 void PyMoreMethod( PyObject * MyPyMoreMethod ) {
72 _MyPyMoreMethod = MyPyMoreMethod ; } ;
74 PyObject * PyMoreMethod() {
75 return _MyPyMoreMethod ; } ;
77 void SetNextPythonFunction( const char * NextName ,
78 const SUPERV::ListOfStrings & aNextPythonFunction ) {
79 _NextName = my_strblkdup( NextName ) ;
80 cdebug << "GraphBase::LoopNode::SetNextPythonFunction NextName '" << NextName << "' --> '"
81 << _NextName << "'" << endl ;
82 _NextPythonFunction = new SUPERV::ListOfStrings( aNextPythonFunction ) ; } ;
84 SUPERV::ListOfStrings * NextPythonFunction() const {
85 SUPERV::ListOfStrings * aNextPythonFunction ;
86 aNextPythonFunction = new SUPERV::ListOfStrings( *_NextPythonFunction ) ;
87 return aNextPythonFunction ; } ;
90 //JR 17.02.2005 Memory Leak return my_strdup( _NextName ) ; } ;
91 return _NextName ; } ;
92 void PyNextMethod( PyObject * MyPyNextMethod ) {
93 _MyPyNextMethod = MyPyNextMethod ; } ;
95 PyObject * PyNextMethod() {
96 return _MyPyNextMethod ; } ;
98 // bool SaveXML(ostream &f , char *Tabs , int X , int Y ) ;
99 bool SaveXML(QDomDocument & Graph , QDomElement & info , int X , int Y ) ;
101 bool SavePY(ostream &f , const char * aGraphName , int X , int Y ) ;