// $Header:
using namespace std;
-#include <strstream>
-#include <iostream>
+//#include <sstream>
+//#include <iostream>
#include "DataFlowBase_InLineNode.hxx"
#include "DataFlowBase_LoopNode.hxx"
_InNode = NULL ;
_ThreadNo = pthread_self() ;
_Name = NULL ;
- cdebug << "GraphBase::Node::Node " << this
- << " _Name "
- << (void *) _Name << " " << _Name << " _Comment "
- << (void *) _Comment << " " << _Comment << " " << endl ;
+ cdebug << "GraphBase::Node::Node " << this << " " << endl ;
}
SALOME_NamingService* ptrNamingService ,
const char * aDataFlowName ,
int * Graph_prof_debug ,
- ostream * Graph_fdebug ) :
+ ofstream * Graph_fdebug ) :
GraphBase::PortsOfNode::PortsOfNode( aDataFlowName ) {
+ MESSAGE( "GraphBase::ComputingNode::ComputingNode( " << aDataFlowName << " Graph_fdebug " << Graph_fdebug ) ;
InitFields( _Kind ,
_FirstCreation ,
_LastModification ,
_ORB = CORBA::ORB::_duplicate( ORB ) ;
_NamingService = ptrNamingService ;
- _Graph_prof_debug = Graph_prof_debug ;
- _Graph_fdebug = Graph_fdebug ;
_Node = SUPERV::CNode::_nil() ;
_InNode = NULL ;
_ThreadNo = pthread_self() ;
- if ( aDataFlowName && strlen( aDataFlowName ) ) {
+ if ( aDataFlowName != NULLSTRING && strlen( aDataFlowName ) ) {
_Name = new char[ strlen( aDataFlowName )+1 ] ;
strcpy( _Name , aDataFlowName ) ;
}
- else
- _Name = NULL ;
+ else {
+ _Name = NULLSTRING ;
+ }
if ( Graph_prof_debug ) {
+// MESSAGE( "GraphBase::ComputingNode::ComputingNode --> SetDebug" ) ;
+// cout << "GraphBase::ComputingNode::ComputingNode --> SetDebug" << endl ;
+ _Graph_prof_debug = Graph_prof_debug ;
+ _Graph_fdebug = Graph_fdebug ;
SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
-// MESSAGE( "Invalid DataFlow Name." );
}
+// else {
+// cout << "GraphBase::ComputingNode::ComputingNode NO SetDebug" << endl ;
+// }
cdebug << "GraphBase::ComputingNode::ComputingNode " << this
<< "' _Name "
- << (void *) _Name << " '" << _Name << " _Comment "
- << (void *) _Comment << " " << _Comment << " " << _FirstCreation
+ << (void *) _Name << " '" << _Name << " " << _FirstCreation
<< " " << _LastModification << endl ;
}
const long X ,
const long Y ,
int * Graph_prof_debug ,
- ostream * Graph_fdebug ) :
+ ofstream * Graph_fdebug ) :
GraphBase::PortsOfNode::PortsOfNode() {
_ORB = CORBA::ORB::_duplicate( ORB ) ;
_NamingService = ptrNamingService ;
- _Graph_prof_debug = Graph_prof_debug ;
- _Graph_fdebug = Graph_fdebug ;
_Node = SUPERV::CNode::_nil() ;
_InNode = NULL ;
_ThreadNo = pthread_self() ;
_FirstCreation.Month = _LastModification.Month = Tm->tm_mon + 1;
_FirstCreation.Year = _LastModification.Year = Tm->tm_year + 1900;
- if ( NodeEditorRelease ) {
+ if ( NodeEditorRelease != NULLSTRING ) {
_EditorRelease = new char[ strlen( NodeEditorRelease ) + 1 ] ;
strcpy( _EditorRelease , NodeEditorRelease ) ;
}
strcpy( _EditorRelease , SuperVision_Version ) ;
}
- if ( NodeAuthor ) {
+ if ( NodeAuthor != NULLSTRING ) {
_Author = new char[ strlen( NodeAuthor ) + 1 ] ;
strcpy( _Author , NodeAuthor ) ;
}
- else
+ else {
_Author = NULLSTRING ;
+ }
- if ( NodeComment ) {
+ if ( NodeComment != NULLSTRING ) {
_Comment = new char[ strlen( NodeComment ) + 1 ] ;
strcpy( _Comment , NodeComment ) ;
}
- else
+ else {
_Comment = NULLSTRING ;
+ }
_SubGraphNumber = 0 ;
_HeadNode = false ;
_X = X ;
_Y = Y ;
- if ( Graph_prof_debug )
- SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
+// MESSAGE( "GraphBase::ComputingNode::ComputingNode --> SetDebug " << Graph_prof_debug << " Graph_fdebug "
+// << Graph_fdebug ) ;
+// cout << "GraphBase::ComputingNode::ComputingNode --> SetDebug " << Graph_prof_debug << " Graph_fdebug "
+// << Graph_fdebug << endl ;
+ _Graph_prof_debug = Graph_prof_debug ;
+ _Graph_fdebug = Graph_fdebug ;
+ SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
+// MESSAGE( "GraphBase::ComputingNode::ComputingNode SetDebug Done " << Graph_prof_debug << " Graph_fdebug "
+// << Graph_fdebug << " aService.ServiceName " << aService.ServiceName ) ;
+// cout << "GraphBase::ComputingNode::ComputingNode SetDebug Done " << Graph_prof_debug << " Graph_fdebug "
+// << Graph_fdebug << endl ;
+// cout << "GraphBase::ComputingNode::ComputingNode(" << aService.ServiceName << "," << aNodeName << ","
+// << akind << ")" << endl;
+ cdebug_in << "GraphBase::ComputingNode::ComputingNode(" << aService.ServiceName << "," << aNodeName << ","
+ << akind << ")" << endl;
+
- DefPortsOfNode( ORB , aService , NamePtr() , Kind() ,
- Graph_prof_debug , Graph_fdebug ) ;
+ DefPortsOfNode( ORB , aService , NamePtr() , Kind() , Graph_prof_debug , Graph_fdebug ) ;
- cdebug_in << "GraphBase::ComputingNode::ComputingNode(" << aService.ServiceName << ","
- << aNodeName << "," << akind
- << "," << NodeComment << ")" << endl;
-
cdebug << "GraphBase::ComputingNode::ComputingNode " << this
- << " _Name "
- << (void *) _Name << " '" << _Name << "' _Comment "
- << (void *) _Comment << " " << _Comment << " "
+ << " _Name " << (void *) _Name << " '" << _Name
<< " KindOfNode " << _Kind
<< " ServiceName " << ServiceName() << " In(" << ServiceInParameter().length()
<< ") Out(" << ServiceOutParameter().length() << ")" << endl ;
}
bool GraphBase::ComputingNode::Name( const char * aName) {
+ cdebug_in << "GraphBase::ComputingNode::Name " << _Name << endl;
if ( _Name ) {
cdebug << "GraphBase::ComputingNode::ReName " << _Name << " --> " << aName << endl ;
delete [] _Name ;
}
_Name = new char[strlen(aName)+1] ;
strcpy( _Name , aName ) ;
+ cdebug_out << "GraphBase::ComputingNode::Name " << _Name << endl;
return true ;
}
SUPERV::SDate GraphBase::ComputingNode::FirstCreation () const {
- cdebug << "GraphBase::ComputingNode::FirstCreation "
- << "' _Name " << _Name << " " << _FirstCreation << " "
- << _LastModification << endl ;
+// cdebug << "GraphBase::ComputingNode::FirstCreation "
+// << "' _Name " << _Name << " " << _FirstCreation << " "
+// << _LastModification << endl ;
return _FirstCreation;
}
}
bool GraphBase::ComputingNode::Author(const char * a) {
+ cdebug_in << "GraphBase::ComputingNode::Author " << _Author << endl;
if ( _Author && _Author != NULLSTRING )
delete _Author;
_Author = my_strdup(a);
+ cdebug_out << "GraphBase::ComputingNode::Author " << _Author << endl;
return true ;
}
bool GraphBase::ComputingNode::Comment(const char *c) {
- cdebug_in << "GraphBase::ComputingNode::Comment" << endl;
+ cdebug_in << "GraphBase::ComputingNode::Comment " << _Comment << endl;
if ( _Comment != NULLSTRING )
delete [] _Comment;
_Comment = my_strdup(c);
- cdebug_out << "GraphBase::ComputingNode::Comment" << endl;
+ cdebug_out << "GraphBase::ComputingNode::Comment " << _Comment << endl;
return true ;
}
QDomElement inParametertype = Graph.createElement("inParameter-type") ;
// mpv: Linux 8.0 compiler compatibility
// aField = Graph.createTextNode( (char *)ServiceInParameter()[i].Parametertype ) ;
- aField = Graph.createTextNode( strdup(ServiceInParameter()[i].Parametertype) ) ;
+ if ( strlen( ServiceInParameter()[i].Parametertype ) ) {
+ aField = Graph.createTextNode( strdup( ServiceInParameter()[i].Parametertype ) ) ;
+ }
+ else {
+ aField = Graph.createTextNode( "?" ) ;
+ }
inParameter.appendChild(inParametertype) ;
inParametertype.appendChild( aField ) ;
// f << Tabs << " <inParameter-name>"
QDomElement inParametername = Graph.createElement("inParameter-name") ;
// mpv: Linux 8.0 compiler compatibility
// aField = Graph.createTextNode( (char *) ServiceInParameter()[i].Parametername ) ;
- aField = Graph.createTextNode( strdup(ServiceInParameter()[i].Parametername) ) ;
+ if ( strlen( ServiceInParameter()[i].Parametername ) ) {
+ aField = Graph.createTextNode( strdup(ServiceInParameter()[i].Parametername) ) ;
+ }
+ else {
+ aField = Graph.createTextNode( "?" ) ;
+ }
inParameter.appendChild(inParametername) ;
inParametername.appendChild( aField ) ;
// f << Tabs << " </inParameter>" << endl ;
QDomElement outParametertype = Graph.createElement("outParameter-type") ;
// mpv: Linux 8.0 compiler compatibility
// aField = Graph.createTextNode( (char *) ServiceOutParameter()[i].Parametertype ) ;
- aField = Graph.createTextNode( strdup(ServiceOutParameter()[i].Parametertype) ) ;
+ if ( strlen( ServiceOutParameter()[i].Parametertype ) ) {
+ aField = Graph.createTextNode( strdup(ServiceOutParameter()[i].Parametertype) ) ;
+ }
+ else {
+ aField = Graph.createTextNode( "?" ) ;
+ }
outParameter.appendChild(outParametertype) ;
outParametertype.appendChild( aField ) ;
// f << Tabs << " <outParameter-name>"
QDomElement outParametername = Graph.createElement("outParameter-name") ;
// mpv: Linux 8.0 compiler compatibility
// aField = Graph.createTextNode( (char *) ServiceOutParameter()[i].Parametername ) ;
- aField = Graph.createTextNode( strdup(ServiceOutParameter()[i].Parametername) ) ;
+ if ( strlen( ServiceOutParameter()[i].Parametername ) ) {
+ aField = Graph.createTextNode( strdup(ServiceOutParameter()[i].Parametername) ) ;
+ }
+ else {
+ aField = Graph.createTextNode( "?" ) ;
+ }
outParameter.appendChild(outParametername) ;
outParametername.appendChild( aField ) ;
// f << Tabs << " </outParameter>" << endl ;
QDomElement PyFunction = Graph.createElement("PyFunction") ;
PyFunctionlist.appendChild( PyFunction ) ;
int j ;
- for ( j = 0 ; j < (*PythonFunctions[i]).length() ; j++ ) {
+ for ( j = 0 ; j < (int ) (*PythonFunctions[i]).length() ; j++ ) {
if ( j == 0 ) {
// if ( i == 0 ) {
// f << Tabs << " <FuncName>" << FuncNames[i].c_str()
// char * aCDATAChar = (char *) (*PythonFunctions[i])[j] ;
char * aCDATAChar = strdup ((*PythonFunctions[i])[j]) ;
int i ;
- for ( i = 0 ; i < strlen( aCDATAChar ) ; i++ ) {
+ for ( i = 0 ; i < (int ) strlen( aCDATAChar ) ; i++ ) {
if ( aCDATAChar[ i ] != ' ' ) {
break ;
}
}
- if ( i == strlen( aCDATAChar ) ) {
+ if ( i == (int ) strlen( aCDATAChar ) ) {
aCDATA = Graph.createCDATASection( "?" ) ;
}
else {
else if ( IsComputingNode() ) {
int i ;
f << Name() << "_ServiceinParameter = []" << endl ;
- for ( i = 0 ; i < ServiceInParameter().length() ; i++ ) {
+ for ( i = 0 ; i < (int ) ServiceInParameter().length() ; i++ ) {
f << Name() << "_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( '"
<< ServiceInParameter()[i].Parametertype << "' , '"
<< ServiceInParameter()[i].Parametername << "' ) )" << endl ;
}
f << Name() << "_ServiceoutParameter = []" << endl ;
- for ( i = 0 ; i < ServiceOutParameter().length() ; i++ ) {
+ for ( i = 0 ; i < (int ) ServiceOutParameter().length() ; i++ ) {
f << Name() << "_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( '"
<< ServiceOutParameter()[i].Parametertype << "' , '"
<< ServiceOutParameter()[i].Parametername << "' ) )" << endl ;
SUPERV::ListOfStrings aPyFunc ;
if ( PythonFunctions.size() ) {
aPyFunc = *PythonFunctions[0] ;
- for ( i = 0 ; i < aPyFunc.length() ; i++ ) {
+ for ( i = 0 ; i < (int ) aPyFunc.length() ; i++ ) {
f << "Py" << Name() << ".append( '" << aPyFunc[i] << "' )" << endl ;
}
}
SUPERV::ListOfStrings aPyMore = *PythonFunctions[1] ;
SUPERV::ListOfStrings aPyNext = *PythonFunctions[2] ;
f << "PyMore" << Name() << " = []" << endl ;
- for ( i = 0 ; i < aPyMore.length() ; i++ ) {
+ for ( i = 0 ; i < (int ) aPyMore.length() ; i++ ) {
f << "PyMore" << Name() << ".append( '" << aPyMore[i] << "' )" << endl ;
}
f << "PyNext" << Name() << " = []" << endl ;
- for ( i = 0 ; i < aPyNext.length() ; i++ ) {
+ for ( i = 0 ; i < (int ) aPyNext.length() ; i++ ) {
f << "PyNext" << Name() << ".append( '" << aPyNext[i] << "' )" << endl ;
}
f << Name() << "," << EndName << " = " << aGraphName << ".LNode( '"
<< aCoupledNode->YCoordinate() << " )" << endl ;
SUPERV::ListOfStrings aPyFunc = *aCoupledNode->PythonFunction() ;
f << "Py" << aCoupledNode->Name() << " = []" << endl ;
- for ( i = 0 ; i < aPyFunc.length() ; i++ ) {
+ for ( i = 0 ; i < (int ) aPyFunc.length() ; i++ ) {
f << "Py" << aCoupledNode->Name() << ".append( '" << aPyFunc[i] << "' )"
<< endl ;
}
}
delete [] EndName ;
}
+ }
+
+ f << Name() << ".SetName( '" << Name() << "' )" << endl ;
+ f << Name() << ".SetAuthor( '" << Author() << "' )" << endl ;
+ if ( IsFactoryNode() ) {
+ f << Name() << ".SetContainer( '" << Computer << "' )" << endl ;
+ }
+ f << Name() << ".SetComment( '" << Comment() << "' )" << endl ;
+ f << Name() << ".Coords( " << XCoordinate << " , " << YCoordinate << " )" << endl ;
+
+ if ( IsOneOfInLineNodes() ) {
+ int i ;
for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) {
const GraphBase::InPort * anInPort = GetNodeInPort(i) ;
if ( anInPort->IsInLine() ) {
}
}
- f << Name() << ".SetName( '" << Name() << "' )" << endl ;
- f << Name() << ".SetAuthor( '" << Author() << "' )" << endl ;
- if ( IsFactoryNode() ) {
- f << Name() << ".SetContainer( '" << Computer << "' )" << endl ;
- }
- f << Name() << ".SetComment( '" << Comment() << "' )" << endl ;
- f << Name() << ".Coords( " << XCoordinate << " , " << YCoordinate << " )" << endl ;
-
#if 0
if ( IsLoopNode() || IsSwitchNode() ) {
f << EndName << ".SetName( '" << CoupledNode
return true ;
}
-void GraphBase::ComputingNode::NodeInfo(ostrstream & s) const {
- int i ;
+void GraphBase::ComputingNode::NodeInfo(ostream & s) const {
s << *this ;
ListPorts( s , true ) ;
s << ends ;