// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
map< string , int > _MapOfGraphNames;
string GraphInstanceName( const char * aGraphName ) {
+ // mkr : PAL8004 -->
+ // For Macro nodes : names of subgraphs must be unique and differ from the main dataflow
+ // name (i.e. the dataflow with MacroLevel = 0).
+ // It is neccessary for reqursive call of LoadDataFlows(...) method for MacroNodes execution.
int GraphInstanceNumber = _MapOfGraphNames[ aGraphName ] ;
- if ( GraphInstanceNumber ) {
- _MapOfGraphNames[ aGraphName ] = GraphInstanceNumber + 1 ;
- }
- else {
- GraphInstanceNumber = 0 ;
- _MapOfGraphNames[ aGraphName ] = GraphInstanceNumber + 1 ;
- }
string theGraphInstanceName = string( aGraphName ) ;
if ( GraphInstanceNumber ) {
theGraphInstanceName += "_" ;
astr << GraphInstanceNumber ;
theGraphInstanceName += astr.str() ;
}
+ if ( theGraphInstanceName != string( aGraphName ) )
+ _MapOfGraphNames[ theGraphInstanceName ] = GraphInstanceNumber ;
+ _MapOfGraphNames[ aGraphName ] = GraphInstanceNumber + 1 ;
+ // mkr : PAL8004 <--
return theGraphInstanceName ;
}
aNode.theAuthor.c_str() , aNode.theContainer.c_str() ,
aNode.theComment.c_str() ,
aNode.theCoords.theX , aNode.theCoords.theY ) ;
+
+ // insert container into < ComponentName, Container > map for corresponding component
+ Graph()->InsertToMapOfComponentNameContainer( aNode.theComponentName.c_str(), aNode.theContainer.c_str() ) ; // mkr : PAL13947
+
string * aNodetheName = new string( aNode.theName ) ;
aMapOfNodes[ *aNodetheName ] = Graph()->GetGraphNodeIndex( anInNode->Name() ) ;
if ( anInNode->IsOneOfInLineNodes() || anInNode->IsMacroNode() ) {
const char* FromServiceParameterName ,
const char* ToNodeName ,
const char* ToServiceParameterName ,
- const int index , long &X , long &Y ) {
+ const int index , CORBA::Long &X , CORBA::Long &Y ) {
GraphBase::InPort * anInPort = Graph()->GetChangeInPort( ToNodeName ,
ToServiceParameterName ) ;
// cdebug << "GraphEditor::OutNode::GetLinkCoord " << ToNodeName << "( " << ToServiceParameterName
Graph()->ComputingNodes() ;
#endif
+ if ( !Graph()->ValidGOTO() ) { // mkr : PAL12575
+ cdebug << "Editor::OutNode::Valid This DataFlow have not valid GOTO(ValidGOTO)." << endl ;
+ RetVal = false ;
+ }
+
if ( RetVal ) {
_Valid = true ;
}
}
//JR 07.07.2005 PAL9342 : that code is now in Executable() method instead of Valid() method
+ bool IsValid = true;
int SubStreamGraphsNumber = 0 ;
if ( !Graph()->Sort( SubStreamGraphsNumber ) ) {
cdebug << "Editor::OutNode::Executable This DataFlow is not valid(Sort)." << endl ;
RetVal = false ;
+ //mkr : 28.09.2005 : if dataflow is not valid => it is not executable
+ IsValid = false ;
}
- if ( Graph()->IsDataStreamNode() ) {
+ if ( Graph()->IsDataStreamNode() )
StreamGraph()->SubStreamGraphsNumber( SubStreamGraphsNumber ) ;
- }
Graph()->InLineServices() ;
-
+
// if ( kLoopSwitch ) {
if ( !Graph()->ValidLoops() ) {
cdebug << "Editor::OutNode::Executable This DataFlow have not valid Loops(ValidLoops)." << endl ;
RetVal = false ;
+ //mkr : 28.09.2005 : if dataflow is not valid => it is not executable
+ IsValid = false ;
}
if ( !Graph()->ValidSwitchs() ) {
cdebug << "Editor::OutNode::Executable This DataFlow have not valid Switchs(ValidSwitchs)." << endl ;
RetVal = false ;
+ //mkr : 28.09.2005 : if dataflow is not valid => it is not executable
+ IsValid = false ;
}
// }
RetVal = false ;
}
+ //mkr : 28.09.2005 : if dataflow is not valid => it is not executable
+ if ( !IsValid ) _Executable = false ;
+
cdebug_out << "GraphEditor::OutNode::Executable _Executable " << _Executable << " RetVal " << RetVal
<< endl;
return RetVal ;
valuetype.appendChild( aField ) ;
switch (aLink.aLinkValue.type()->kind()) {
case CORBA::tk_string: {
- char* retstr ;
+ const char* retstr ;
aLink.aLinkValue >>= retstr;
// f << Tabs << " <value>" << retstr << "</value>" << endl ;
QDomElement value = Graph.createElement( "value" ) ;
break ;
}
case CORBA::tk_double: {
- double d;
+ CORBA::Double d;
aLink.aLinkValue >>= d;
// f << Tabs << " <value>" << d << "</value>" << endl ;
QDomElement value = Graph.createElement( "value" ) ;
break ;
}
case CORBA::tk_long: {
- long l;
+ CORBA::Long l;
aLink.aLinkValue >>= l;
// f << Tabs << " <value>" << l << "</value>" << endl ;
QDomElement value = Graph.createElement( "value" ) ;
aField = Graph.createTextNode( aKind ) ;
datavalue.appendChild( value ) ;
value.appendChild( aField ) ;
-// MESSAGE( "ToString( long ) " << l );
+// MESSAGE( "ToString( CORBA::Long ) " << l );
break ;
}
case CORBA::tk_objref: {
char* retstr ;
CORBA::Object_ptr obj ;
- aLink.aLinkValue >>= obj ;
+#if OMNIORB_VERSION >= 4
+ aLink.aLinkValue >>= (CORBA::Any::to_object)obj;
+#else
+ aLink.aLinkValue >>= obj;
+#endif
retstr = _Orb->object_to_string(obj );
// f << Tabs << " <value>" << retstr << "</value>" << endl ;
QDomElement value = Graph.createElement( "value" ) ;
<< ".Input( " ;
switch (aLink.aLinkValue.type()->kind()) {
case CORBA::tk_string: {
- char* retstr ;
+ const char* retstr ;
aLink.aLinkValue >>= retstr;
f << "'" << retstr << "'" ;
break ;
}
case CORBA::tk_double: {
- double d;
+ CORBA::Double d;
aLink.aLinkValue >>= d;
f << d ;
break ;
}
case CORBA::tk_long: {
- long l;
+ CORBA::Long l;
aLink.aLinkValue >>= l;
f << l ;
break ;
case CORBA::tk_objref: {
char* retstr ;
CORBA::Object_ptr obj ;
- aLink.aLinkValue >>= obj ;
+#if OMNIORB_VERSION >= 4
+ aLink.aLinkValue >>= (CORBA::Any::to_object)obj;
+#else
+ aLink.aLinkValue >>= obj;
+#endif
retstr = _Orb->object_to_string(obj );
f << "'" << retstr << "'" ;
break ;