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 return my_strdup( _MoreName ) ; } ;
70 void PyMoreMethod( PyObject * MyPyMoreMethod ) {
71 _MyPyMoreMethod = MyPyMoreMethod ; } ;
73 PyObject * PyMoreMethod() {
74 return _MyPyMoreMethod ; } ;
76 void SetNextPythonFunction( const char * NextName ,
77 const SUPERV::ListOfStrings & aNextPythonFunction ) {
78 _NextName = my_strblkdup( NextName ) ;
79 cdebug << "GraphBase::LoopNode::SetNextPythonFunction NextName '" << NextName << "' --> '"
80 << _NextName << "'" << endl ;
81 _NextPythonFunction = new SUPERV::ListOfStrings( aNextPythonFunction ) ; } ;
83 SUPERV::ListOfStrings * NextPythonFunction() const {
84 SUPERV::ListOfStrings * aNextPythonFunction ;
85 aNextPythonFunction = new SUPERV::ListOfStrings( *_NextPythonFunction ) ;
86 return aNextPythonFunction ; } ;
89 return my_strdup( _NextName ) ; } ;
90 void PyNextMethod( PyObject * MyPyNextMethod ) {
91 _MyPyNextMethod = MyPyNextMethod ; } ;
93 PyObject * PyNextMethod() {
94 return _MyPyNextMethod ; } ;
96 // bool SaveXML(ostream &f , char *Tabs , int X , int Y ) ;
97 bool SaveXML(QDomDocument & Graph , QDomElement & info , int X , int Y ) ;
99 bool SavePY(ostream &f , const char * aGraphName , int X , int Y ) ;