2 //=============================================================================
3 // File : DataFlowBase_GOTONode.cxx
5 // Author : Jean Rahuel, CEA
8 //=============================================================================
13 #include "DataFlowBase_GOTONode.hxx"
15 GraphBase::GOTONode::GOTONode() :
16 GraphBase::InLineNode::InLineNode() {
19 cdebug << "GraphBase::GOTONode::GOTONode " << this
20 << " _Name " << (void *) Name() << " " << Name() << " _Comment "
21 << (void *) Comment() << " " << Comment() << " " << endl ;
25 GraphBase::GOTONode::GOTONode( CORBA::ORB_ptr ORB ,
26 SALOME_NamingService* ptrNamingService ,
27 const char *FuncName ,
28 const SUPERV::ListOfStrings & aPythonFunction ,
29 const char *NodeName ,
30 const SUPERV::KindOfNode akind ,
31 const SUPERV::SDate NodeFirstCreation ,
32 const SUPERV::SDate NodeLastModification ,
33 const char * NodeEditorRelease ,
34 const char * NodeAuthor ,
35 const char * NodeComment ,
36 const bool GeneratedName ,
39 int * Graph_prof_debug ,
40 ostream * Graph_fdebug ) :
41 GraphBase::InLineNode::InLineNode( ORB , ptrNamingService , FuncName , aPythonFunction ,
42 NodeName , akind , NodeFirstCreation ,
43 NodeLastModification , NodeEditorRelease ,
44 NodeAuthor , NodeComment , GeneratedName ,
45 X , Y , Graph_prof_debug , Graph_fdebug ) {
48 cdebug_in << "GraphBase::GOTONode::GOTONode " << this
49 << "' _Name " << (void *) Name() << " '" << Name() << " _Comment "
50 << (void *) Comment() << " " << Comment() << " "
51 << " KindOfNode " << Kind() << " FuncName " << FuncName
52 << " ServiceName " << ServiceName() << " In("
53 << ServiceInParameter().length()
54 << ") Out(" << ServiceOutParameter().length() << ")" << endl ;
56 cdebug_out << "GraphBase::GOTONode::GOTONode" << endl;
59 GraphBase::GOTONode::~GOTONode() {
60 cdebug << "GraphBase::GOTONode::~GOTONode " << this
61 << " _Name " << (void *) Name() << " " << Name() << " _Comment "
62 << (void *) Comment() << " " << Comment() << " " << endl ;
63 // if ( _ComponentName != NULLSTRING )
64 // delete [] _ComponentName ;
66 // delete [] _EditorRelease ;
67 // if ( _Author != NULLSTRING )
68 // delete [] _Author ;
69 // if ( _Computer != FACTORYSERVER )
70 // delete [] _Computer;
71 // if ( _Comment != NULLSTRING )
72 // delete [] _Comment;
75 //bool GraphBase::GOTONode::SaveXML( ostream &f , char *Tabs ,
76 bool GraphBase::GOTONode::SaveXML( QDomDocument & Graph , QDomElement & info ,
77 int XCoordinate , int YCoordinate ) const {
78 GraphBase::ListOfFuncName aFuncNames ;
79 GraphBase::ListOfPythonFunctions aPythonFunction ;
81 aFuncNames.resize( 1 ) ;
82 aFuncNames[0] = CORBA::string_dup( PyFuncName() ) ;
83 aPythonFunction.resize( 1 ) ;
84 aPythonFunction[0] = PythonFunction() ;
86 char * CoupledName = "" ;
87 if ( CoupledNode() ) {
88 CoupledName = CoupledNode()->Name() ;
90 // return GraphBase::ComputingNode::SaveXML( f , Tabs , "" , "" , "" ,
91 return GraphBase::ComputingNode::SaveXML( Graph , info , "" , "" , "" ,
93 aFuncNames , aPythonFunction ,
94 XCoordinate , YCoordinate ) ;
97 bool GraphBase::GOTONode::SavePY( ostream &f , const char * aGraphName ,
98 int XCoordinate , int YCoordinate ) const {
99 GraphBase::ListOfFuncName aFuncNames ;
100 GraphBase::ListOfPythonFunctions aPythonFunction ;
101 if ( PyFuncName() ) {
102 aFuncNames.resize( 1 ) ;
103 aFuncNames[0] = CORBA::string_dup( PyFuncName() ) ;
104 aPythonFunction.resize( 1 ) ;
105 aPythonFunction[0] = PythonFunction() ;
107 return GraphBase::ComputingNode::SavePY( f , aGraphName , "" , "" , "" ,
109 aFuncNames , aPythonFunction ,
110 XCoordinate , YCoordinate ) ;