Salome HOME
NRI : Merge from BRANCH_Superv_DataStream.
authornri <nri@opencascade.com>
Tue, 4 May 2004 14:16:16 +0000 (14:16 +0000)
committernri <nri@opencascade.com>
Tue, 4 May 2004 14:16:16 +0000 (14:16 +0000)
51 files changed:
src/GraphBase/DataFlowBase_Base.cxx
src/GraphBase/DataFlowBase_Base.hxx
src/GraphBase/DataFlowBase_ComputingNode.cxx
src/GraphBase/DataFlowBase_ComputingNode.hxx
src/GraphBase/DataFlowBase_DataNode.cxx
src/GraphBase/DataFlowBase_DataNode.hxx
src/GraphBase/DataFlowBase_DataPort.cxx
src/GraphBase/DataFlowBase_DataPort.hxx
src/GraphBase/DataFlowBase_Graph.cxx
src/GraphBase/DataFlowBase_Graph.hxx
src/GraphBase/DataFlowBase_InDataStreamPort.cxx [new file with mode: 0644]
src/GraphBase/DataFlowBase_InDataStreamPort.hxx [new file with mode: 0644]
src/GraphBase/DataFlowBase_InLineNode.cxx
src/GraphBase/DataFlowBase_InPort.cxx
src/GraphBase/DataFlowBase_InPort.hxx
src/GraphBase/DataFlowBase_OutDataStreamPort.cxx [new file with mode: 0644]
src/GraphBase/DataFlowBase_OutDataStreamPort.hxx [new file with mode: 0644]
src/GraphBase/DataFlowBase_OutPort.hxx
src/GraphBase/DataFlowBase_Port.cxx
src/GraphBase/DataFlowBase_Port.hxx
src/GraphBase/DataFlowBase_PortsOfNode.cxx
src/GraphBase/DataFlowBase_PortsOfNode.hxx
src/GraphBase/DataFlowBase_Service.cxx
src/GraphBase/DataFlowBase_Service.hxx
src/GraphBase/DataFlowBase_ServicesParameter.hxx
src/GraphBase/DataFlowBase_StreamGraph.cxx [new file with mode: 0644]
src/GraphBase/DataFlowBase_StreamGraph.hxx [new file with mode: 0644]
src/GraphBase/DataFlowBase_StreamNode.cxx [new file with mode: 0644]
src/GraphBase/DataFlowBase_StreamNode.hxx [new file with mode: 0644]
src/GraphBase/DataFlowBase_XmlHandler.cxx
src/GraphBase/DataFlowBase_XmlHandler.hxx
src/GraphBase/Makefile.in
src/GraphEditor/DataFlowEditor_DataFlow.cxx
src/GraphEditor/DataFlowEditor_DataFlow.hxx
src/GraphEditor/DataFlowEditor_DataFlow.lxx
src/GraphEditor/DataFlowEditor_InNode.cxx
src/GraphEditor/DataFlowEditor_InNode.hxx
src/GraphEditor/DataFlowEditor_OutNode.cxx
src/GraphEditor/DataFlowEditor_OutNode.hxx
src/GraphEditor/Makefile.in
src/GraphExecutor/DataFlowExecutor_DataFlow.cxx
src/GraphExecutor/DataFlowExecutor_DataFlow.hxx
src/GraphExecutor/DataFlowExecutor_DataFlow.lxx
src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx
src/GraphExecutor/DataFlowExecutor_InNode.cxx
src/GraphExecutor/DataFlowExecutor_InNode.hxx
src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx
src/GraphExecutor/DataFlowExecutor_OutNode.cxx
src/GraphExecutor/DataFlowExecutor_OutNode.hxx
src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx
src/GraphExecutor/Makefile.in

index 7853f57b6f1756221f3f6daeb81ef1c026dced30..f7ddcc9da6f44b883a113c8de9968ea57aafd105 100644 (file)
@@ -29,7 +29,7 @@
 using namespace std;
 #include "DataFlowBase_Base.hxx"
 
-char *SuperVision_Version = "1.05" ;
+char *SuperVision_Version = "2.0" ;
 
 char *NULLSTRING = "" ;
 
@@ -50,6 +50,12 @@ void GraphBase::Base::SetDebug( CORBA::ORB_ptr ORB ,
       _prof_debug = theprof_debug ;
       _fdebug = thefdebug ;
     }
+    else {
+      MESSAGE( "GraphBase::Base::SetDebug with theprof_debug == NULL" ) ;
+    }
+  }
+  else {
+    cdebug << "GraphBase::Base::SetDebug already done" << endl ;
   }
 //  cdebug_in << "GraphBase::Base::SetDebug" << endl ;
 //  cdebug << "GraphBase::Base::SetDebug" << endl ;
@@ -63,3 +69,167 @@ char * GraphBase::Base::ObjectToString( CORBA::Object_ptr obj ) const {
 CORBA::Object_ptr GraphBase::Base::StringToObject( char * obj ) const {
   return _Orb->string_to_object( obj );
 }
+
+string DataStreamTypeToString( const SALOME_ModuleCatalog::DataStreamType aDataStreamType ) {
+  string aIdlType ;
+  switch ( aDataStreamType ) {
+  case SALOME_ModuleCatalog::DATASTREAM_UNKNOWN : {
+    aIdlType = "Unknown" ;
+    break;
+  }
+  case SALOME_ModuleCatalog::DATASTREAM_INTEGER : {
+    aIdlType = "int" ;
+    break;
+  }
+  case SALOME_ModuleCatalog::DATASTREAM_FLOAT : {
+    aIdlType = "float" ;
+    break;
+  }
+  case SALOME_ModuleCatalog::DATASTREAM_DOUBLE : {
+    aIdlType = "double" ;
+    break;
+  }
+  case SALOME_ModuleCatalog::DATASTREAM_STRING : {
+    aIdlType = "string" ;
+    break;
+  }
+  case SALOME_ModuleCatalog::DATASTREAM_BOOLEAN : {
+    aIdlType = "bool" ;
+    break;
+  }
+  default: {
+    aIdlType = "Unknown" ;
+    break;
+  }
+  }
+  return aIdlType ;
+}
+
+SALOME_ModuleCatalog::DataStreamType StringToDataStreamType( const char * aIdlType ) {
+  SALOME_ModuleCatalog::DataStreamType aDataStreamType ;
+  if ( !strcmp( aIdlType ,  "Unknown" ) ) {
+    aDataStreamType = SALOME_ModuleCatalog::DATASTREAM_UNKNOWN ;
+  }
+  else if ( !strcmp( aIdlType ,  "int" ) ) {
+    aDataStreamType = SALOME_ModuleCatalog::DATASTREAM_INTEGER ;
+  }
+  else if ( !strcmp( aIdlType ,  "float" ) ) {
+    aDataStreamType = SALOME_ModuleCatalog::DATASTREAM_FLOAT ;
+  }
+  else if ( !strcmp( aIdlType ,  "double" ) ) {
+    aDataStreamType = SALOME_ModuleCatalog::DATASTREAM_DOUBLE ;
+  }
+  else if ( !strcmp( aIdlType ,  "string" ) ) {
+    aDataStreamType = SALOME_ModuleCatalog::DATASTREAM_STRING ;
+  }
+  else if ( !strcmp( aIdlType ,  "bool" ) ) {
+    aDataStreamType = SALOME_ModuleCatalog::DATASTREAM_BOOLEAN ;
+  }
+  else {
+    aDataStreamType = SALOME_ModuleCatalog::DATASTREAM_UNKNOWN ;
+  }
+  return aDataStreamType ;
+}
+
+string KindOfDataStreamTraceToString( SUPERV::KindOfDataStreamTrace aDataStreamTrace ) {
+  string aTrace ;
+  switch ( aDataStreamTrace ) {
+  case SUPERV::WithoutTrace :
+    aTrace = "SANS";
+    break;
+  case SUPERV::SummaryTrace :
+    aTrace = "SUCCINT";
+    break;
+  case SUPERV::DetailedTrace :
+    aTrace = "DETAILLE";
+    break;
+  default :
+    aTrace = "UndefinedTrace";
+    break;
+  }
+  return aTrace ;
+}
+
+string DataStreamDependencyToString( const SALOME_ModuleCatalog::DataStreamDependency aDataStreamDependency ) {
+  string aDependency ;
+  switch ( aDataStreamDependency ) {
+  case SALOME_ModuleCatalog::DATASTREAM_UNDEFINED :
+    aDependency = "U" ;
+    break;
+  case SALOME_ModuleCatalog::DATASTREAM_TEMPORAL :
+    aDependency = "T" ;
+    break;
+  case SALOME_ModuleCatalog::DATASTREAM_ITERATIVE :
+    aDependency = "I" ;
+    break;
+  default :
+    aDependency = "?" ;
+    break;
+  }
+
+  return aDependency;
+}
+
+string DataStreamToString( const SALOME_ModuleCatalog::DataStreamType aDataStreamType ) {
+  string aStreamType ;
+  switch ( aDataStreamType ) {
+  case SALOME_ModuleCatalog::DATASTREAM_UNKNOWN : {
+    aStreamType = "Unknown" ;
+    break;
+  }
+  case SALOME_ModuleCatalog::DATASTREAM_INTEGER : {
+    aStreamType = "ENTIER" ;
+    break;
+  }
+  case SALOME_ModuleCatalog::DATASTREAM_FLOAT : {
+    aStreamType = "REEL" ;
+    break;
+  }
+  case SALOME_ModuleCatalog::DATASTREAM_DOUBLE : {
+    aStreamType = "DOUBLE" ;
+    break;
+  }
+  case SALOME_ModuleCatalog::DATASTREAM_STRING : {
+    aStreamType = "CHAINE" ;
+    break;
+  }
+  case SALOME_ModuleCatalog::DATASTREAM_BOOLEAN : {
+    aStreamType = "LOGIQUE" ;
+    break;
+  }
+  default: {
+    aStreamType = "?" ;
+    break;
+  }
+  }
+  return aStreamType ;
+}
+
+ostream & operator<< (ostream & f ,const SALOME_ModuleCatalog::DataStreamType & s ) {
+  switch (s) {
+  case SALOME_ModuleCatalog::DATASTREAM_UNKNOWN :
+    f << "DATASTREAM_UNKNOWN";
+    break;
+  case SALOME_ModuleCatalog::DATASTREAM_INTEGER :
+    f << "DATASTREAM_INTEGER";
+    break;
+  case SALOME_ModuleCatalog::DATASTREAM_FLOAT :
+    f << "DATASTREAM_FLOAT";
+    break;
+  case SALOME_ModuleCatalog::DATASTREAM_DOUBLE :
+    f << "DATASTREAM_DOUBLE";
+    break;
+  case SALOME_ModuleCatalog::DATASTREAM_STRING :
+    f << "DATASTREAM_STRING";
+    break;
+  case SALOME_ModuleCatalog::DATASTREAM_BOOLEAN :
+    f << "DATASTREAM_BOOLEAN";
+    break;
+  default :
+    f << "DATASTREAM_UNKNOWN";
+    break;
+  }
+
+  return f;
+}
+
index 2d77bdd193a4677a2f904dc064bf14e94b4a5bec..905fd0125e29537cf892eb6ce853e360dc534a27 100644 (file)
@@ -81,6 +81,15 @@ inline char * my_strblkdup( const char * s ) {
   return t;
 }
 
+string DataStreamTypeToString( const SALOME_ModuleCatalog::DataStreamType aDataStreamType ) ;
+SALOME_ModuleCatalog::DataStreamType StringToDataStreamType( const char * aIdlType ) ;
+
+string KindOfDataStreamTraceToString( SUPERV::KindOfDataStreamTrace aDataStreamTrace ) ;
+
+string DataStreamDependencyToString( const SALOME_ModuleCatalog::DataStreamDependency aDataStreamDependency ) ;
+
+string DataStreamToString( const SALOME_ModuleCatalog::DataStreamType aDataStreamType ) ;
+
 enum StatusOfPort { NotConnected , PortConnected , PortAndDataConnected ,
                     DataConnected } ;
 
@@ -99,21 +108,36 @@ namespace GraphBase {
 
   typedef vector<const SUPERV::ListOfStrings *> ListOfPythonFunctions ;
 
-  struct NodeParameter {
-    SALOME_ModuleCatalog::ServicesParameter theInParameter ;
-    SALOME_ModuleCatalog::ServicesParameter theOutParameter ;
-  };
+  typedef vector<SALOME_ModuleCatalog::ServicesParameter> ListOfParameters;
+
+  struct InDataStreamParameter {
+     SALOME_ModuleCatalog::ServicesDataStreamParameter theDataStreamParameter ;
+     SUPERV::KindOfSchema                              theKindOfSchema ;
+     SUPERV::KindOfInterpolation                       theKindOfInterpolation ;
+     SUPERV::KindOfExtrapolation                       theKindOfExtrapolation ;
+   };
+  typedef vector<InDataStreamParameter> ListOfInDataStreamParameters;
 
-  typedef vector<NodeParameter> ListOfParameters;
+  struct OutDataStreamParameter {
+     SALOME_ModuleCatalog::ServicesDataStreamParameter theDataStreamParameter ;
+     long                                              theNumberOfValues ;
+   };
+  typedef vector<OutDataStreamParameter> ListOfOutDataStreamParameters;
 
   struct SNode {
     string                        theComponentName ;
     string                        theInterfaceName ;
     string                        theName ;
     SUPERV::KindOfNode            theKind ;
+    long                          theTimeout ;
+    SUPERV::KindOfDataStreamTrace theDataStreamTrace ;
+    double                        theDeltaTime ;
     string                        theCoupledNode ;
+//    int                           theDataStreamInArgsNumber ;
+//    int                           theDataStreamOutArgsNumber ;
     SALOME_ModuleCatalog::Service theService ;
-    ListOfParameters              theListOfParameters ;
+    ListOfInDataStreamParameters  theListOfInDataStreams ;
+    ListOfOutDataStreamParameters theListOfOutDataStreams ;
     ListOfFuncName                theListOfFuncName ;
     ListOfPythonFunctions         theListOfPythonFunctions ;
     SUPERV::SDate                 theFirstCreation ;
@@ -196,4 +220,6 @@ namespace GraphBase {
 
 } ;
 
+ostream & operator<< (ostream &,const SALOME_ModuleCatalog::DataStreamType &);
+
 #endif
index aab8ceaafb814d38e79b5981f0b480d2cf333c7b..dea0738a38a269d57cf49e50c1f55a2d97ff9b41 100644 (file)
@@ -4,7 +4,7 @@
 //
 //
 //
-//  File   : DataFlowBase_Node.cxx
+//  File   : DataFlowBase_ComputingNode.cxx
 //  Author : Jean Rahuel, CEA
 //  Module : SUPERV
 //  $Header:
@@ -13,25 +13,27 @@ using namespace std;
 //#include <sstream>
 //#include <iostream>
 
-#include "DataFlowBase_InLineNode.hxx"
-#include "DataFlowBase_LoopNode.hxx"
+#include "DataFlowBase_StreamGraph.hxx"
+//#include "DataFlowBase_LoopNode.hxx"
 
-static void InitFields( SUPERV::KindOfNode &_Kind ,
+static void InitFields( //SUPERV::KindOfNode &_Kind ,
                         SUPERV::SDate      &_FirstCreation ,
                         SUPERV::SDate      &_LastModification ,
                         char *             &_EditorRelease ,
                         char *             &_Author ,
                         char *             &_Comment ,
-                        bool               &_HeadNode ,
+                        //bool               &_HeadNode ,
                         bool               &_GeneratedName ,
+                        //int                &_DataStreamInPortsNumber ,
+                        //int                &_DataStreamOutPortsNumber ,
                         int                &_ConnectedInPortsNumber ,
-                        int                &_DecrConnectedInPortsNumber,
-                        int                &_LinkedNodesSize ,
-                        int                &_SubGraphNumber ) {
+                        int                &_DecrConnectedInPortsNumber ) {
+                        //int                &_LinkedNodesSize ,
+                        //int                &_SubGraphNumber ) {
   time_t T = time(NULL);
   struct tm * Tm = localtime(&T);
 
-  _Kind = SUPERV::DataFlowNode ;
+//  _Kind = SUPERV::DataFlowGraph ;
 
   _FirstCreation.Second = _LastModification.Second = Tm->tm_sec;
   _FirstCreation.Minute = _LastModification.Minute = Tm->tm_min;
@@ -47,36 +49,42 @@ static void InitFields( SUPERV::KindOfNode &_Kind ,
 //  strcpy( _Computer  , FACTORYSERVER ) ;
   _Comment = NULLSTRING ;
 
-  _SubGraphNumber = 0 ;
-  _HeadNode = false ;
+//  _SubGraphNumber = 0 ;
+//  _HeadNode = false ;
   _GeneratedName = false ;
 
+//  _DataStreamInPortsNumber = 0 ;
+//  _DataStreamOutPortsNumber = 0 ;
+
   _ConnectedInPortsNumber = 0 ;
   _DecrConnectedInPortsNumber = 0 ;
-  _LinkedNodesSize = 0 ;
-  _SubGraphNumber = 0 ;
+//  _LinkedNodesSize = 0 ;
+//  _SubGraphNumber = 0 ;
 }
 
 GraphBase::ComputingNode::ComputingNode() :
-  GraphBase::PortsOfNode::PortsOfNode() {
+//  GraphBase::PortsOfNode::PortsOfNode() {
+  GraphBase::StreamNode::StreamNode() {
 
-  InitFields( _Kind ,
+  InitFields( //_Kind ,
               _FirstCreation ,
               _LastModification ,
               _EditorRelease ,
               _Author ,
               _Comment ,
-              _HeadNode ,
+              //_HeadNode ,
               _GeneratedName ,
+              //_DataStreamInPortsNumber ,
+              //_DataStreamOutPortsNumber ,
               _ConnectedInPortsNumber ,
-              _DecrConnectedInPortsNumber ,
-              _LinkedNodesSize ,
-              _SubGraphNumber ) ;
+              _DecrConnectedInPortsNumber ) ;
+              //_LinkedNodesSize ,
+              //_SubGraphNumber ) ;
+  Kind( SUPERV::DataFlowGraph ) ;
   _NamingService = NULL ;
   _Node = SUPERV::CNode::_nil() ;
   _InNode = NULL ;
   _ThreadNo = pthread_self() ;
-  _Name = NULL ;
   cdebug << "GraphBase::Node::Node "  << this << " "  << endl ;
 
 }
@@ -86,35 +94,32 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB ,
                                          const char * aDataFlowName ,
                                          int * Graph_prof_debug ,
                                          ofstream * Graph_fdebug ) :
-  GraphBase::PortsOfNode::PortsOfNode( aDataFlowName ) {
+//  GraphBase::PortsOfNode::PortsOfNode( aDataFlowName ) {
+  GraphBase::StreamNode::StreamNode( aDataFlowName ) {
 
-  MESSAGE( "GraphBase::ComputingNode::ComputingNode( " << aDataFlowName << " Graph_fdebug " << Graph_fdebug ) ;
-  InitFields( _Kind ,
+//  MESSAGE( "GraphBase::ComputingNode::ComputingNode " << aDataFlowName << " Graph_prof_debug " << Graph_prof_debug ) ;
+  InitFields( //_Kind ,
               _FirstCreation ,
               _LastModification ,
               _EditorRelease ,
               _Author ,
               _Comment ,
-              _HeadNode ,
+              //_HeadNode ,
               _GeneratedName ,
+              //_DataStreamInPortsNumber ,
+              //_DataStreamOutPortsNumber ,
               _ConnectedInPortsNumber ,
-              _DecrConnectedInPortsNumber ,
-              _LinkedNodesSize ,
-              _SubGraphNumber ) ;
+              _DecrConnectedInPortsNumber ) ;
+              //_LinkedNodesSize ,
+              //_SubGraphNumber ) ;
 
+  Kind( SUPERV::DataFlowGraph ) ;
   _ORB = CORBA::ORB::_duplicate( ORB ) ;
   _NamingService = ptrNamingService ;
   _Node = SUPERV::CNode::_nil() ;
   _InNode = NULL ;
   _ThreadNo = pthread_self() ;
 
-  if ( aDataFlowName != NULLSTRING && strlen( aDataFlowName ) ) {
-    _Name = new char[ strlen( aDataFlowName )+1 ] ;
-    strcpy( _Name , aDataFlowName ) ;
-  }
-  else {
-    _Name = NULLSTRING ;
-  }
   if ( Graph_prof_debug ) {
 //    MESSAGE( "GraphBase::ComputingNode::ComputingNode --> SetDebug" ) ;
 //    cout << "GraphBase::ComputingNode::ComputingNode --> SetDebug" << endl ;
@@ -126,8 +131,7 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB ,
 //    cout << "GraphBase::ComputingNode::ComputingNode NO SetDebug" << endl ;
 //  }
   cdebug << "GraphBase::ComputingNode::ComputingNode "  << this 
-         << "' _Name "
-         << (void *) _Name << " '" << _Name << " "  << _FirstCreation
+         << " Name '" << Name() << "' "  << _FirstCreation
          << " "  << _LastModification << endl ;
 }
 
@@ -146,7 +150,8 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB ,
                                          const long   Y ,
                                          int * Graph_prof_debug ,
                                          ofstream * Graph_fdebug ) :
-  GraphBase::PortsOfNode::PortsOfNode() {
+//  GraphBase::PortsOfNode::PortsOfNode() {
+  GraphBase::StreamNode::StreamNode( NodeName ) {
 
   _ORB = CORBA::ORB::_duplicate( ORB ) ;
   _NamingService = ptrNamingService ;
@@ -154,7 +159,8 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB ,
   _InNode = NULL ;
   _ThreadNo = pthread_self() ;
 
-  _Kind = akind ;
+  Kind( akind ) ;
+//  _Kind = akind ;
 
   time_t T = time(NULL);
   struct tm * Tm = localtime(&T);
@@ -191,44 +197,38 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB ,
     _Comment = NULLSTRING ;
   }
 
-  _SubGraphNumber = 0 ;
-  _HeadNode = false ;
+//  _SubGraphNumber = 0 ;
+//  _HeadNode = false ;
   _GeneratedName = GeneratedName ;
 
-  const char *aNodeName = NodeName ;
-  _Name = new char[strlen(aNodeName)+1];
-  strcpy(_Name , aNodeName);
+//  const char *aNodeName = NodeName ;
+//  _Name = new char[strlen(aNodeName)+1];
+//  strcpy(_Name , aNodeName);
+
+//  _DataStreamInPortsNumber = 0 ;
+//  _DataStreamOutPortsNumber = 0 ;
 
   _ConnectedInPortsNumber = 0 ;
   _DecrConnectedInPortsNumber = 0 ;
-  _LinkedNodesSize = 0 ;
+//  _LinkedNodesSize = 0 ;
 
   _X = X ;
   _Y = Y ;
 
-//  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 ;
+//  MESSAGE( "GraphBase::ComputingNode::ComputingNode " << NodeName
+//           << " _Graph_prof_debug " << _Graph_prof_debug ) ;
   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 << ","
+  cdebug_in << "GraphBase::ComputingNode::ComputingNode(" << aService.ServiceName << "," << NodeName << ","
             << akind << ")" << endl;
   
 
   DefPortsOfNode( ORB , aService , NamePtr() , Kind() , Graph_prof_debug , Graph_fdebug ) ;
-
   cdebug << "GraphBase::ComputingNode::ComputingNode "  << this 
-         << " _Name " << (void *) _Name << " '" << _Name
-         << " KindOfNode " << _Kind
-         << " ServiceName " << ServiceName() << " In(" << ServiceInParameter().length()
+         << " Name '" << Name()
+         << "' KindOfNode " << Kind()
+         << " ServiceName '" << ServiceName() << "' In(" << ServiceInParameter().length()
          << ") Out(" << ServiceOutParameter().length() << ")" << endl ;
 
   cdebug_out << "GraphBase::ComputingNode::ComputingNode" << endl;
@@ -236,36 +236,25 @@ GraphBase::ComputingNode::ComputingNode( CORBA::ORB_ptr ORB ,
 
 GraphBase::ComputingNode::~ComputingNode() {
   cdebug << "GraphBase::ComputingNode::~ComputingNode "  << this 
-         << " _Name "
-         << (void *) _Name << " " << _Name << " _Comment "
+         << " Name() "<< Name() << " _Comment "
          << (void *) _Comment << " "  << _Comment << " "  << endl ;
-//  if ( _ComponentName != NULLSTRING )
-//    delete [] _ComponentName ;
-//  delete [] _Name ;
-//  delete [] _EditorRelease ;
-//  if ( _Author != NULLSTRING )
-//    delete [] _Author ;
-//  if ( _Computer != FACTORYSERVER )
-//    delete [] _Computer;
-//  if ( _Comment != NULLSTRING )
-//    delete [] _Comment;
 }
 
-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 ;
-}
+//->StreamNode bool GraphBase::ComputingNode::Name( const char * aName) {
+//->StreamNode   cdebug_in << "GraphBase::ComputingNode::Name " << _Name << endl;
+//->StreamNode   if ( _Name ) {
+//->StreamNode     cdebug << "GraphBase::ComputingNode::ReName "  << _Name << " --> " << aName << endl ;
+//->StreamNode     delete [] _Name ;
+//->StreamNode   }
+//->StreamNode   _Name = new char[strlen(aName)+1] ;
+//->StreamNode   strcpy( _Name , aName ) ;
+//->StreamNode   cdebug_out << "GraphBase::ComputingNode::Name " << _Name << endl;
+//->StreamNode   return true ;
+//->StreamNode }
 
 SUPERV::SDate GraphBase::ComputingNode::FirstCreation () const {
 //  cdebug << "GraphBase::ComputingNode::FirstCreation "
-//         << "' _Name " << _Name << " "  << _FirstCreation << " "  
+//         << " Name '" << Name() << "' "  << _FirstCreation << " "  
 //         << _LastModification << endl ;
   return _FirstCreation;
 }
@@ -274,11 +263,6 @@ SUPERV::SDate GraphBase::ComputingNode::LastModification () const {
   return _LastModification ;
 }
 
-bool GraphBase::ComputingNode::Kind(const SUPERV::KindOfNode aKind) {
-  _Kind = aKind ;
-  return true ;
-}
-
 void GraphBase::ComputingNode::FirstCreation(const SUPERV::SDate aDate ) {
   _FirstCreation = aDate ;
 }
@@ -378,6 +362,15 @@ GraphBase::SNode * GraphBase::ComputingNode::GetInfo() {
 //  Info->theInterfaceName = InterfaceName() ;
   Info->theName = Name() ;
   Info->theKind = Kind() ;
+  if ( IsDataStreamNode() ) {
+    long Timeout ;
+    SUPERV::KindOfDataStreamTrace DataStreamTrace ;
+    double DeltaTime ;
+    ((GraphBase::StreamGraph * ) this)->StreamParams( Timeout , DataStreamTrace , DeltaTime ) ;
+    Info->theTimeout = Timeout ;
+    Info->theDataStreamTrace = DataStreamTrace ;
+    Info->theDeltaTime = DeltaTime ;
+  }
   Info->theService = *GetService() ;
 //  Info->theListOfParameters = *GetListOfParameters() ;
   Info->theFirstCreation = FirstCreation() ;
@@ -392,90 +385,81 @@ GraphBase::SNode * GraphBase::ComputingNode::GetInfo() {
   return Info ;
 }
 
+void GraphBase::ComputingNode::DelInPort( const char * InputParameterName ) {
+  GraphBase::PortsOfNode::DelInPort( InputParameterName ) ;
+}
+void GraphBase::ComputingNode::DelOutPort( const char * OutputParameterName ) {
+  GraphBase::PortsOfNode::DelOutPort( OutputParameterName ) ;
+}
+
 GraphBase::InPort * GraphBase::ComputingNode::AddInPort( const char * InputParameterName ,
-                                                const char * InputParameterType ) {
+                                                         const char * InputParameterType ,
+                                                         const SUPERV::KindOfPort aKindOfPort ) {
+  cdebug << "AddInPort " << Name() << " ConnectedInPortsNumber " << ConnectedInPortsNumber() << endl ;
   return GraphBase::PortsOfNode::AddInPort( _ORB , NamePtr() ,
                                             Kind() ,
                                             InputParameterName ,
                                             InputParameterType ,
+                                            aKindOfPort ,
+//                                            DataStreamInPortsNumber() ,
                                             _Graph_prof_debug , _Graph_fdebug ) ;
 }
 GraphBase::OutPort * GraphBase::ComputingNode::AddOutPort( const char * OutputParameterName ,
-                                                  const char * OutputParameterType ) {
+                                                           const char * OutputParameterType ,
+                                                           const SUPERV::KindOfPort aKindOfPort ) {
+  cdebug << "AddOutPort " << Name() << " ConnectedInPortsNumber " << ConnectedInPortsNumber() << endl ;
   return GraphBase::PortsOfNode::AddOutPort( _ORB , NamePtr() ,
                                              Kind() ,
                                              OutputParameterName ,
                                              OutputParameterType ,
+                                             aKindOfPort ,
+//                                             DataStreamOutPortsNumber() ,
                                              _Graph_prof_debug , _Graph_fdebug ) ;
 }
 
-void GraphBase::ComputingNode::AddLink( GraphBase::ComputingNode * ToNode ) {
-  int index = GetLinkedNodeIndex( ToNode->Name() ) ;
-  if ( index < 0 ) {
-    cdebug << Name() << "->GraphBase::ComputingNode::AddLinkedNode( " << ToNode->Name()
-           << " ) new LinkedNode " << endl ;
-    _LinkedNodes.resize( _LinkedNodesSize+1 ) ;
-    _LinkedInPortsNumber.resize( _LinkedNodesSize+1 ) ;
-    _LinkedNodes[ _LinkedNodesSize ] = ToNode ;
-    _LinkedInPortsNumber[ _LinkedNodesSize ] = 1 ;
-    SetLinkedNodeIndex( ToNode->Name() , _LinkedNodesSize ) ;
-    index = _LinkedNodesSize ;
-    _LinkedNodesSize++ ;
-  }
-  else {
-    cdebug << Name() << "->GraphBase::ComputingNode::AddLinkedNode( " << ToNode->Name()
-           << " ) old LinkedNode " << _LinkedNodes[index ]->Name() << endl ;
-    _LinkedInPortsNumber[ index ] += 1 ;
-  }
-  cdebug << Name() << "->GraphBase::ComputingNode::AddLinkedNode( " << ToNode->Name()
-         << " ) LinkedNodesSize " << _LinkedNodesSize << " [ " << index
-         << " ] _LinkedInPortsNumber " << _LinkedInPortsNumber[ index ]
-         << " ConnectedInPortsNumber " << ToNode->ConnectedInPortsNumber()
-         << " + 1 Service " << ServiceName() << endl ;
-  ToNode->IncrConnectedInPortsNumber() ;
+void GraphBase::ComputingNode::DelInDataStreamPort( const char * InputParameterName ) {
+  GraphBase::PortsOfNode::DelInPort( InputParameterName ) ;
 }
-
-void GraphBase::ComputingNode::RemoveLink( GraphBase::ComputingNode * ToNode ) {
-  int index = GetLinkedNodeIndex( ToNode->Name() ) ;
-  if ( index >= 0 ) {
-    cdebug << "GraphBase::ComputingNode::RemoveLink( to " << ToNode->Name() << " from "
-           << Name() << " index : " << index << " ConnectedInPortsNumber "
-           << ToNode->ConnectedInPortsNumber() - 1 << " LinkedInPortsNumber "
-           << _LinkedInPortsNumber[ index ] << " - 1" << endl ;
-    ToNode->DecrConnectedInPortsNumber() ;
-    _LinkedInPortsNumber[ index ] -= 1 ;
-    if ( _LinkedInPortsNumber[ index ] == 0 ) {
-      _LinkedNodesSize-- ;
-      cdebug << "GraphBase::ComputingNode::RemoveLink new LinkedNodesSize "
-             << _LinkedNodesSize << " " << ToNode->Name() << " removed from "
-             << " linkednodes of " << Name() << endl ;
-      int i ;
-      for ( i = index ; i < _LinkedNodesSize ; i++ ) {
-        _LinkedNodes[ i ] = _LinkedNodes[ i+1 ] ;
-        _LinkedInPortsNumber[ i ] =  _LinkedInPortsNumber[ i+1 ] ;
-        SetLinkedNodeIndex( _LinkedNodes[ i ]->Name() , i ) ;
-      }
-      DelLinkedNodeIndex( ToNode->Name() ) ;
-      _LinkedNodes.resize( _LinkedNodesSize+1 ) ;
-      _LinkedInPortsNumber.resize( _LinkedNodesSize+1 ) ;
-    }
-  }
-  else {
-    cdebug << " Error index " << index << endl ;
-  }
+void GraphBase::ComputingNode::DelOutDataStreamPort( const char * OutputParameterName ) {
+  GraphBase::PortsOfNode::DelOutPort( OutputParameterName ) ;
 }
 
-void GraphBase::ComputingNode::ReNameLink( const char* OldNodeName ,
-                                  const char* NewNodeName ) {
-  cdebug_in << "GraphBase::ComputingNode::ReNameLink (" << OldNodeName << " , "
-            << NewNodeName << ")" << endl;
-  int index = GetLinkedNodeIndex( OldNodeName ) ;
-  if ( index >= 0 ) {
-    _MapOfLinkedNodes.erase( OldNodeName ) ;
-    SetLinkedNodeIndex( NewNodeName , index ) ;
+GraphBase::InDataStreamPort * GraphBase::ComputingNode::AddInDataStreamPort( const char * InputParameterName ,
+                                                                             const SALOME_ModuleCatalog::DataStreamType InputParameterType ,
+                                                                             const SALOME_ModuleCatalog::DataStreamDependency aDependency ,
+                                                                             const SUPERV::KindOfPort aKindOfPort ) {
+//  IncrDataStreamInPorts() ;
+  GraphBase::InDataStreamPort * aDataStreamPort ;
+  aDataStreamPort = (GraphBase::InDataStreamPort * ) GraphBase::PortsOfNode::AddInPort( _ORB , NamePtr() ,
+                                                                                        Kind() ,
+                                                                                        InputParameterName ,
+                                                                                        DataStreamTypeToString( InputParameterType ).c_str() ,
+                                                                                        aKindOfPort ,
+//                                                                                        DataStreamInPortsNumber() ,
+                                                                                        _Graph_prof_debug , _Graph_fdebug ) ;
+  aDataStreamPort->Dependency( aDependency ) ;
+  if ( aDependency == SALOME_ModuleCatalog::DATASTREAM_TEMPORAL ) {
+    aDataStreamPort->SetParams( SUPERV::TI , SUPERV::L1 , SUPERV::EXTRANULL ) ;
   }
-  cdebug_out << "GraphBase::ComputingNode::ReNameLink" << endl ;
+  return aDataStreamPort ;
 }
+GraphBase::OutDataStreamPort * GraphBase::ComputingNode::AddOutDataStreamPort( const char * OutputParameterName ,
+                                                                               const SALOME_ModuleCatalog::DataStreamType OutputParameterType ,
+                                                                               const SALOME_ModuleCatalog::DataStreamDependency aDependency ,
+                                                                               const SUPERV::KindOfPort aKindOfPort ) {
+//  IncrDataStreamOutPorts() ;
+  GraphBase::OutDataStreamPort * aDataStreamPort ;
+  aDataStreamPort = (GraphBase::OutDataStreamPort * ) GraphBase::PortsOfNode::AddOutPort( _ORB , NamePtr() ,
+                                                                                          Kind() ,
+                                                                                          OutputParameterName ,
+                                                                                          DataStreamTypeToString( OutputParameterType ).c_str() ,
+                                                                                          aKindOfPort ,
+//                                                                                          DataStreamOutPortsNumber() ,
+                                                                                          _Graph_prof_debug , _Graph_fdebug ) ;
+  aDataStreamPort->Dependency( aDependency ) ;
+  return aDataStreamPort ;
+}
+
 
 #include <sys/time.h>
 #include <sys/resource.h>
@@ -523,6 +507,7 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf
                                         const ListOfFuncName FuncNames ,
                                         const ListOfPythonFunctions PythonFunctions ,
                                         int XCoordinate , int YCoordinate ) const {
+  cdebug_in << "SaveXML Node " << Name() << endl ;
   QDomElement node = Graph.createElement( "node" ) ;
   info.appendChild( node ) ;
   QDomElement componentname = Graph.createElement( "component-name" ) ;
@@ -565,11 +550,44 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf
 //  f << Tabs << "<kind>" << (int ) Kind() << "</kind>" << endl ;
   QDomElement kind = Graph.createElement( "kind" ) ;
   QString aKind ;
-  aKind = aKind.setNum( Kind() ) ;
+  if ( IsDataFlowNode() || ( IsDataStreamNode() && HasDataStream() == 0 ) ) {
+    aKind = aKind.setNum( SUPERV::DataFlowGraph ) ;
+  }
+  else {
+    aKind = aKind.setNum( Kind() ) ;
+  }
   aField = Graph.createTextNode( aKind ) ;
   node.appendChild( kind ) ;
   kind.appendChild( aField ) ;
 
+  if ( IsDataStreamNode() ) {
+    long Timeout ;
+    SUPERV::KindOfDataStreamTrace DataStreamTrace ;
+    double DeltaTime ;
+    ((GraphBase::StreamGraph * ) this)->StreamParams( Timeout , DataStreamTrace , DeltaTime ) ;
+
+    QDomElement timeout = Graph.createElement("streamgraph-timeout") ;
+    QString aTimeout ;
+    aTimeout = aTimeout.setNum( Timeout ) ;
+    aField = Graph.createTextNode( aTimeout ) ;
+    node.appendChild( timeout ) ;
+    timeout.appendChild( aField ) ;
+
+    QDomElement datastreamtrace = Graph.createElement("streamgraph-datastreamtrace") ;
+    QString aDataStreamTrace ;
+    aDataStreamTrace = aDataStreamTrace.setNum( DataStreamTrace ) ;
+    aField = Graph.createTextNode( aDataStreamTrace ) ;
+    node.appendChild( datastreamtrace ) ;
+    datastreamtrace.appendChild( aField ) ;
+
+    QDomElement deltatime = Graph.createElement("streamgraph-deltatime") ;
+    QString aDeltaTime ;
+    aDeltaTime = aDeltaTime.setNum( DeltaTime ) ;
+    aField = Graph.createTextNode( aDeltaTime ) ;
+    node.appendChild( deltatime ) ;
+    deltatime.appendChild( aField ) ;
+  }
+
   QDomElement couplednode = Graph.createElement("coupled-node") ;
   if ( IsGOTONode() || IsLoopNode() || IsEndLoopNode() ||
        IsSwitchNode() || IsEndSwitchNode() ) {
@@ -599,117 +617,175 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf
   service.appendChild(servicename) ;
   servicename.appendChild( aField ) ;
 
-//  f << Tabs << "     <inParameter-list>" << endl ;
   QDomElement inParameterlist = Graph.createElement("inParameter-list") ;
   service.appendChild(inParameterlist) ;
   unsigned int i;
+  GraphBase::ComputingNode * aNode = (GraphBase::ComputingNode * ) this ;
   for ( i = 0 ; i < ServiceInParameter().length() ; i++ ) {
-//    f << Tabs << "           <inParameter>" << endl ;
-    QDomElement inParameter = Graph.createElement("inParameter") ;
-    inParameterlist.appendChild(inParameter) ;
-//    f << Tabs << "                   <inParameter-type>"
-//      << ServiceInParameter()[i].Parametertype << "</inParameter-type>"
-//      << endl ;
-    QDomElement inParametertype = Graph.createElement("inParameter-type") ;
-    // mpv: Linux 8.0 compiler compatibility
-//    aField = Graph.createTextNode( (char *)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>"
-//      << ServiceInParameter()[i].Parametername << "</inParameter-name>"
-//      << endl ;
-    QDomElement inParametername = Graph.createElement("inParameter-name") ;
-    // mpv: Linux 8.0 compiler compatibility
-//    aField = Graph.createTextNode( (char *) ServiceInParameter()[i].Parametername ) ;
-    if ( strlen( ServiceInParameter()[i].Parametername ) ) {
-      aField = Graph.createTextNode( strdup(ServiceInParameter()[i].Parametername) ) ;
-    }
-    else {
-      aField = Graph.createTextNode( "?" ) ;
+    const GraphBase::InPort * anInPort ;
+    anInPort = aNode->GetInPort( ServiceInParameter()[i].Parametername ) ;
+    if ( !anInPort->IsDataStream() ) {
+      cdebug << "SaveXML " << i << ". " << ServiceInParameter()[i].Parametername
+             << " InParameterPort " << anInPort->Kind() << endl ;
+      QDomElement inParameter = Graph.createElement("inParameter") ;
+      inParameterlist.appendChild(inParameter) ;
+      QDomElement inParametertype = Graph.createElement("inParameter-type") ;
+      if ( strlen( ServiceInParameter()[i].Parametertype ) ) {
+        aField = Graph.createTextNode( strdup( ServiceInParameter()[i].Parametertype ) ) ;
+      }
+      else {
+        aField = Graph.createTextNode( "?" ) ;
+      }
+      inParameter.appendChild(inParametertype) ;
+      inParametertype.appendChild( aField ) ;
+      QDomElement inParametername = Graph.createElement("inParameter-name") ;
+      if ( strlen( ServiceInParameter()[i].Parametername ) ) {
+        aField = Graph.createTextNode( strdup(ServiceInParameter()[i].Parametername) ) ;
+      }
+      else {
+        aField = Graph.createTextNode( "?" ) ;
+      }
+      inParameter.appendChild(inParametername) ;
+      inParametername.appendChild( aField ) ;
     }
-    inParameter.appendChild(inParametername) ;
-    inParametername.appendChild( aField ) ;
-//    f << Tabs << "           </inParameter>" << endl ;
   }
-//  f << Tabs << "     </inParameter-list>" << endl ;
-//  f << Tabs << "     <outParameter-list>" << endl ;
   QDomElement outParameterlist = Graph.createElement("outParameter-list") ;
   service.appendChild(outParameterlist) ;
   for ( i = 0 ; i < ServiceOutParameter().length() ; i++ ) {
-//    f << Tabs << "           <outParameter>" << endl ;
-    QDomElement outParameter = Graph.createElement("outParameter") ;
-    outParameterlist.appendChild(outParameter) ;
-//    f << Tabs << "                   <outParameter-type>"
-//      << ServiceOutParameter()[i].Parametertype << "</outParameter-type>"
-//      << endl ;
-    QDomElement outParametertype = Graph.createElement("outParameter-type") ;
-    // mpv: Linux 8.0 compiler compatibility
-//    aField = Graph.createTextNode( (char *) 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>"
-//      << ServiceOutParameter()[i].Parametername << "</outParameter-name>"
-//      << endl ;
-    QDomElement outParametername = Graph.createElement("outParameter-name") ;
-    // mpv: Linux 8.0 compiler compatibility
-//    aField = Graph.createTextNode( (char *) ServiceOutParameter()[i].Parametername ) ;
-    if ( strlen( ServiceOutParameter()[i].Parametername ) ) {
-      aField = Graph.createTextNode( strdup(ServiceOutParameter()[i].Parametername) ) ;
-    }
-    else {
-      aField = Graph.createTextNode( "?" ) ;
+    const GraphBase::OutPort * anOutPort ;
+    anOutPort = aNode->GetOutPort( ServiceOutParameter()[i].Parametername ) ;
+    if ( !anOutPort->IsDataStream() ) {
+      cdebug << "SaveXML " << i << ". " << ServiceOutParameter()[i].Parametername
+             << " OutParameterPort " << anOutPort->Kind() << endl ;
+      QDomElement outParameter = Graph.createElement("outParameter") ;
+      outParameterlist.appendChild(outParameter) ;
+      QDomElement outParametertype = Graph.createElement("outParameter-type") ;
+      if ( strlen( ServiceOutParameter()[i].Parametertype ) ) {
+        aField = Graph.createTextNode( strdup(ServiceOutParameter()[i].Parametertype) ) ;
+      }
+      else {
+        aField = Graph.createTextNode( "?" ) ;
+      }
+      outParameter.appendChild(outParametertype) ;
+      outParametertype.appendChild( aField ) ;
+      QDomElement outParametername = Graph.createElement("outParameter-name") ;
+      if ( strlen( ServiceOutParameter()[i].Parametername ) ) {
+        aField = Graph.createTextNode( strdup(ServiceOutParameter()[i].Parametername) ) ;
+      }
+      else {
+        aField = Graph.createTextNode( "?" ) ;
+      }
+      outParameter.appendChild(outParametername) ;
+      outParametername.appendChild( aField ) ;
     }
-    outParameter.appendChild(outParametername) ;
-    outParametername.appendChild( aField ) ;
-//    f << Tabs << "           </outParameter>" << endl ;
   }
-//  f << Tabs << "     </outParameter-list>" << endl ;
-//  f << Tabs << "</service>" << endl ;
 
-//  f << Tabs << "<Parameter-list>" << endl ;
-  QDomElement Parameterlist = Graph.createElement("Parameter-list") ;
-  node.appendChild( Parameterlist ) ;
-#if 0
-  if ( IsInLineNode() || IsGOTONode() ||
-       IsLoopNode() || IsEndLoopNode() ||
-       IsSwitchNode() || IsEndSwitchNode() ) {
-    unsigned int i;
-    for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) {
-      const InPort * anInPort = GetNodeInPort( i ) ;
-      if ( anInPort->IsBus() ) {
-        f << Tabs << " <inParameter>" << endl ;
-        f << Tabs << "         <inParameter-type>"
-          << anInPort->PortType() << "</inParameter-type>"
-          << endl ;
-        f << Tabs << "         <inParameter-name>"
-          << anInPort->PortName() << "</inParameter-name>"
-          << endl ;
-        f << Tabs << " </inParameter>" << endl ;
-        const OutPort * anOutPort = GetNodeOutPort( anInPort->PortIndex() ) ;
-        f << Tabs << " <outParameter>" << endl ;
-        f << Tabs << "         <outParameter-type>"
-          << anOutPort->PortType() << "</outParameter-type>"
-          << endl ;
-        f << Tabs << "         <outParameter-name>"
-          << anOutPort->PortName() << "</outParameter-name>"
-          << endl ;
-        f << Tabs << " </outParameter>" << endl ;
+  QDomElement DataStreamlist = Graph.createElement("DataStream-list") ;
+  node.appendChild( DataStreamlist ) ;
+  for ( i = 0 ; i < (unsigned int ) GetNodeInPortsSize() ; i++ ) {
+    const GraphBase::InPort * anInPort ;
+    anInPort = aNode->GetNodeInPort( i ) ;
+    if ( anInPort->IsDataStream() ) {
+      cdebug << "SaveXML " << i << " " << Name() << " " << anInPort->PortName() << " " << anInPort->PortType()
+             << " InDataStreamPort " << anInPort->Kind() << endl ;
+      QDomElement inParameter = Graph.createElement("inParameter") ;
+      DataStreamlist.appendChild(inParameter) ;
+      QDomElement inParametertype = Graph.createElement("inParameter-type") ;
+      QString aType ;
+      aType = aType.setNum( StringToDataStreamType( anInPort->PortType() ) ) ;
+      cdebug << "SaveXML " << anInPort->PortType() << " --> " << StringToDataStreamType( anInPort->PortType() )
+             << " " << aType << endl ;
+      aField = Graph.createTextNode( aType ) ;
+      inParameter.appendChild(inParametertype) ;
+      inParametertype.appendChild( aField ) ;
+      QDomElement inParametername = Graph.createElement("inParameter-name") ;
+      if ( strlen( anInPort->PortName() ) ) {
+        aField = Graph.createTextNode( strdup(anInPort->PortName()) ) ;
+      }
+      else {
+        aField = Graph.createTextNode( "?" ) ;
       }
+      inParameter.appendChild(inParametername) ;
+      inParametername.appendChild( aField ) ;
+      cdebug << "SaveXML " << anInPort->PortName() << endl ;
+      QDomElement inParameterdependency = Graph.createElement("inParameter-dependency") ;
+      QString aDependency ;
+      aDependency = aDependency.setNum( anInPort->Dependency() ) ;
+      aField = Graph.createTextNode( aDependency ) ;
+      inParameter.appendChild(inParameterdependency) ;
+      inParameterdependency.appendChild( aField ) ;
+      cdebug << "SaveXML Dependency " << anInPort->Dependency() << endl ;
+      SUPERV::KindOfSchema        aKindOfSchema ;
+      SUPERV::KindOfInterpolation aKindOfInterpolation ;
+      SUPERV::KindOfExtrapolation aKindOfExtrapolation ;
+      ((GraphBase::InDataStreamPort * ) anInPort)->Params( aKindOfSchema , aKindOfInterpolation , aKindOfExtrapolation ) ;
+      QDomElement inParameterKindOfSchema = Graph.createElement("inParameter-schema") ;
+      QString aSchema ;
+      aSchema = aSchema.setNum( aKindOfSchema ) ;
+      aField = Graph.createTextNode( aSchema ) ;
+      inParameter.appendChild(inParameterKindOfSchema) ;
+      inParameterKindOfSchema.appendChild( aField ) ;
+      cdebug << "SaveXML aKindOfSchema " << aKindOfSchema << endl ;
+      QDomElement inParameterKindOfInterpolation = Graph.createElement("inParameter-interpolation") ;
+      QString anInterpolation ;
+      anInterpolation = anInterpolation.setNum( aKindOfInterpolation ) ;
+      aField = Graph.createTextNode( anInterpolation ) ;
+      inParameter.appendChild(inParameterKindOfInterpolation) ;
+      inParameterKindOfInterpolation.appendChild( aField ) ;
+      cdebug << "SaveXML aKindOfInterpolation " << aKindOfInterpolation << endl ;
+      QDomElement inParameterKindOfExtrapolation = Graph.createElement("inParameter-extrapolation") ;
+      QString anExtrapolation ;
+      anExtrapolation = anExtrapolation.setNum( aKindOfExtrapolation ) ;
+      aField = Graph.createTextNode( anExtrapolation ) ;
+      inParameter.appendChild(inParameterKindOfExtrapolation) ;
+      inParameterKindOfExtrapolation.appendChild( aField ) ;
+      cdebug << "SaveXML aKindOfExtrapolation " << aKindOfExtrapolation << endl ;
+    }
+  }
+  for ( i = 0 ; i < (unsigned int ) GetNodeOutPortsSize() ; i++ ) {
+    const GraphBase::OutPort * anOutPort ;
+    anOutPort = aNode->GetNodeOutPort( i ) ;
+    if ( anOutPort->IsDataStream() ) {
+      cdebug << "SaveXML " << i << " " << Name() << " " << anOutPort->PortName() << " " << anOutPort->PortType()
+             << " OutDataStreamPort " << anOutPort->Kind() << endl ;
+      QDomElement outParameter = Graph.createElement("outParameter") ;
+      DataStreamlist.appendChild(outParameter) ;
+      QDomElement outParametertype = Graph.createElement("outParameter-type") ;
+      QString aType ;
+      aType = aType.setNum( StringToDataStreamType( anOutPort->PortType() ) ) ;
+      cdebug << "SaveXML " << anOutPort->PortType() << " --> " << StringToDataStreamType( anOutPort->PortType() )
+             << " " << aType << endl ;
+      aField = Graph.createTextNode( aType ) ;
+      outParameter.appendChild(outParametertype) ;
+      outParametertype.appendChild( aField ) ;
+      QDomElement outParametername = Graph.createElement("outParameter-name") ;
+      if ( strlen( anOutPort->PortName() ) ) {
+        aField = Graph.createTextNode( strdup(anOutPort->PortName() ) ) ;
+      }
+      else {
+        aField = Graph.createTextNode( "?" ) ;
+      }
+      outParameter.appendChild(outParametername) ;
+      outParametername.appendChild( aField ) ;
+      cdebug << "SaveXML " << anOutPort->PortName() << endl ;
+      QDomElement outParameterdependency = Graph.createElement("outParameter-dependency") ;
+      QString aDependency ;
+      aDependency = aDependency.setNum( anOutPort->Dependency() )  ;
+      aField = Graph.createTextNode( aDependency ) ;
+      outParameter.appendChild(outParameterdependency) ;
+      outParameterdependency.appendChild( aField ) ;
+      cdebug << "SaveXML Dependency " << anOutPort->Dependency() << endl ;
+      long aNumberOfValues ;
+      aNumberOfValues = ((GraphBase::OutDataStreamPort * ) anOutPort)->NumberOfValues() ;
+      QDomElement outParameterNumberOfValues = Graph.createElement("outParameter-values") ;
+      QString aValues ;
+      aValues = aValues.setNum( aNumberOfValues ) ;
+      aField = Graph.createTextNode( aValues ) ;
+      outParameter.appendChild(outParameterNumberOfValues) ;
+      outParameterNumberOfValues.appendChild( aField ) ;
+      cdebug << "SaveXML NumberOfValues " << ((GraphBase::OutDataStreamPort * ) anOutPort)->NumberOfValues() << endl ;
     }
   }
-#endif
 //  f << Tabs << "</Parameter-list>" << endl ;    
 
 //  f << Tabs << "<PyFunction-list>" << endl ;
@@ -828,6 +904,7 @@ bool GraphBase::ComputingNode::SaveXML( QDomDocument & Graph , QDomElement & inf
   aField = Graph.createTextNode( aYCoordinate ) ;
   node.appendChild( yposition ) ;
   yposition.appendChild( aField ) ;
+  cdebug_out << "SaveXML Node " << Name() << endl ;
   return true ;
 }
 
@@ -839,9 +916,18 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName ,
                                        const ListOfFuncName FuncNames ,
                                        const ListOfPythonFunctions PythonFunctions ,
                                        int XCoordinate , int YCoordinate ) const {
-  if ( IsDataFlowNode() ) {
+  if ( IsDataFlowNode() || ( IsDataStreamNode() && HasDataStream() == 0 ) ) {
     f << Name() << " = Graph( '" << Name() << "' )" << endl ;
   }
+  else if ( IsDataStreamNode() ) {
+    f << Name() << " = StreamGraph( '" << Name() << "' )" << endl ;
+    long Timeout ;
+    SUPERV::KindOfDataStreamTrace DataStreamTrace ;
+    double DeltaTime ;
+    ((GraphBase::StreamGraph * ) this)->StreamParams( Timeout , DataStreamTrace , DeltaTime ) ;
+    f << aGraphName << ".SetStreamParams( " << Timeout << " , SUPERV." << DataStreamTrace
+      << " , " << DeltaTime << " )" << endl ;
+  }
   else if ( IsComputingNode() ) {
     int i ;
     f << Name() << "_ServiceinParameter = []" << endl ;
@@ -856,9 +942,26 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName ,
         << ServiceOutParameter()[i].Parametertype << "' , '"
         << ServiceOutParameter()[i].Parametername << "' ) )" << endl ;
     }
+    f << Name() << "_ServiceinStreamParameter = []" << endl ;
+    for ( i = 0 ; i < (int ) ServiceInStreamParameter().length() ; i++ ) {
+      f << Name() << "_ServiceinStreamParameter.append( SALOME_ModuleCatalog.ServicesDataStreamParameter( SALOME_ModuleCatalog."
+        << ServiceInStreamParameter()[i].Parametertype << " , '"
+        << ServiceInStreamParameter()[i].Parametername << "' , SALOME_ModuleCatalog."
+        << ServiceInStreamParameter()[i].Parameterdependency << " ) )" << endl ;
+    }
+    f << Name() << "_ServiceoutStreamParameter = []" << endl ;
+    for ( i = 0 ; i < (int ) ServiceOutStreamParameter().length() ; i++ ) {
+      f << Name() << "_ServiceoutStreamParameter.append( SALOME_ModuleCatalog.ServicesDataStreamParameter( SALOME_ModuleCatalog."
+        << ServiceOutStreamParameter()[i].Parametertype << " , '"
+        << ServiceOutStreamParameter()[i].Parametername << "' , SALOME_ModuleCatalog."
+        << ServiceOutStreamParameter()[i].Parameterdependency << " ) )" << endl ;
+    }
     f << Name() << "_Service = SALOME_ModuleCatalog.Service( '" << ServiceName()
-      << "' , " << Name() << "_ServiceinParameter" << " , "
-      << Name() << "_ServiceoutParameter" << " , 0 )" << endl ;
+      << "' , " << Name() << "_ServiceinParameter"
+      << " , " << Name() << "_ServiceoutParameter"
+      << " , " << Name() << "_ServiceinStreamParameter"
+      << " , " << Name() << "_ServiceoutStreamParameter"
+      << " , 0 , 0 )" << endl ;
     f << Name() << " = " << aGraphName << ".CNode( " << Name() << "_Service" << " )"
       << endl ;
   }
@@ -867,6 +970,9 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName ,
       << "' , '" << InterfaceName << "' , '" << ServiceName() << "' )"
       << endl ;
   }
+  else if ( IsEndLoopNode() || IsEndSwitchNode() ) {
+// It is done with LoopNode or SwitchNode with CoupledNode()
+  }
   else {
     f << "Py" << Name() << " = []" << endl ;
     int i ;
@@ -898,6 +1004,7 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName ,
 //      strcat( EndName , Name() ) ;
       char * EndName = aCoupledNode->Name() ;
       if ( IsLoopNode() ) {
+        int i ;
         SUPERV::ListOfStrings aPyMore = *PythonFunctions[1] ;
         SUPERV::ListOfStrings aPyNext = *PythonFunctions[2] ;
         f << "PyMore" << Name() << " = []" << endl ;
@@ -924,7 +1031,96 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName ,
           f << "Py" << aCoupledNode->Name() << ".append( '" << aPyFunc[i] << "' )"
             << endl ;
         }
-        f << EndName << ".SetPyFunction( 'End" << FuncNames[0].c_str() << "' , Py" << aCoupledNode->Name() << " )" << endl ;
+        f << EndName << ".SetPyFunction( '" << aCoupledNode->PyFuncName() << "' , Py" << aCoupledNode->Name() << " )" << endl ;
+        for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) {
+          const GraphBase::InPort * anInPort = GetNodeInPort(i) ;
+          cdebug << "Node " << Name() << " InPort " << anInPort->PortName()
+                 << " " << anInPort->Kind() << endl ;
+          if ( anInPort->IsLoop() ) {
+            f << "I" << Name() << anInPort->PortName() << " = "
+              << Name() << ".GetInPort( '" << anInPort->PortName() << "' )" << endl ;
+         }
+          else if ( anInPort->IsInLine() ) {
+            f << "I" << Name() << anInPort->PortName() << " = "
+              << Name() << ".InPort( '" << anInPort->PortName() << "' , '"
+              << anInPort->PortType() << "' )" << endl ;
+          }
+          else if ( anInPort->IsDataStream() ) {
+            f << "I" << Name() << anInPort->PortName() << " = " << Name()
+              << ".InStreamPort( '" << anInPort->PortName()
+              << "' , SALOME_ModuleCatalog." << StringToDataStreamType( anInPort->PortType() )
+              << " , SALOME_ModuleCatalog." << anInPort->Dependency() << " )" << endl ;
+            SUPERV::KindOfSchema        aKindOfSchema ;
+            SUPERV::KindOfInterpolation aKindOfInterpolation ;
+            SUPERV::KindOfExtrapolation aKindOfExtrapolation ;
+            ((GraphBase::InDataStreamPort * ) anInPort)->Params( aKindOfSchema , aKindOfInterpolation , aKindOfExtrapolation ) ;
+            f << "I" << Name() << anInPort->PortName() << ".SetParams( SUPERV." << aKindOfSchema << " , SUPERV."
+              << aKindOfInterpolation << " , SUPERV." << aKindOfExtrapolation << " )" << endl ;
+         }
+          else if ( anInPort->IsGate() ) {
+            f << "I" << Name() << anInPort->PortName() << " = "
+              << Name() << ".GetInPort( '" << anInPort->PortName() << "' )" << endl ;
+         }
+        }
+        for ( i = 0 ; i < GetNodeOutPortsSize() ; i++ ) {
+          const GraphBase::OutPort * anOutPort = GetNodeOutPort(i) ;
+          cdebug << "Node " << Name() << " OutPort " << anOutPort->PortName()
+                 << " " << anOutPort->Kind() << endl ;
+          if ( anOutPort->IsInLine() || anOutPort->IsLoop() ) {
+            f << "O" << Name() << anOutPort->PortName() << " = "
+              << Name() << ".GetOutPort( '" << anOutPort->PortName() << "' )" << endl ;
+          }
+          else if ( anOutPort->IsDataStream() ) {
+            f << "O" << Name() << anOutPort->PortName() << " = " << Name()
+              << ".OutStreamPort( '" << anOutPort->PortName()
+              << "' , SALOME_ModuleCatalog." << StringToDataStreamType( anOutPort->PortType() )
+              << " , SALOME_ModuleCatalog." << anOutPort->Dependency() << " )" << endl ;
+            long aNumberOfValues ;
+            aNumberOfValues = ((GraphBase::OutDataStreamPort * ) anOutPort)->NumberOfValues() ;
+            f << "O" << Name() << anOutPort->PortName() << ".SetNumberOfValues( " << aNumberOfValues << " )"
+              << endl ;
+         }
+        }
+        for ( i = 0 ; i < aCoupledNode->GetNodeInPortsSize() ; i++ ) {
+          const GraphBase::InPort * anInPort = aCoupledNode->GetNodeInPort(i) ;
+          cdebug << "Node " << aCoupledNode->Name() << " InPort " << anInPort->PortName()
+                 << " " << anInPort->Kind() << endl ;
+          if ( anInPort->IsInLine() || anInPort->IsLoop() || anInPort->IsGate() ) {
+            f << "I" << EndName << anInPort->PortName() << " = " << EndName
+              << ".GetInPort( '" << anInPort->PortName() << "' )" << endl ;
+          }
+          else if ( anInPort->IsDataStream() ) {
+            f << "I" << EndName << anInPort->PortName() << " = " << EndName
+              << ".InStreamPort( '" << anInPort->PortName()
+              << "' , SALOME_ModuleCatalog." << StringToDataStreamType( anInPort->PortType() )
+              << " , SALOME_ModuleCatalog." << anInPort->Dependency() << " )" << endl ;
+            SUPERV::KindOfSchema        aKindOfSchema ;
+            SUPERV::KindOfInterpolation aKindOfInterpolation ;
+            SUPERV::KindOfExtrapolation aKindOfExtrapolation ;
+            ((GraphBase::InDataStreamPort * ) anInPort)->Params( aKindOfSchema , aKindOfInterpolation , aKindOfExtrapolation ) ;
+            f << "I" << EndName << anInPort->PortName() << ".SetParams( SUPERV." << aKindOfSchema << " , SUPERV."
+              << aKindOfInterpolation << " , SUPERV." << aKindOfExtrapolation << " )" << endl ;
+         }
+        }
+        for ( i = 0 ; i < aCoupledNode->GetNodeOutPortsSize() ; i++ ) {
+          const GraphBase::OutPort * anOutPort = aCoupledNode->GetNodeOutPort(i) ;
+          cdebug << "Node " << aCoupledNode->Name() << " OutPort " << anOutPort->PortName()
+                 << " " << anOutPort->Kind() << endl ;
+          if ( anOutPort->IsInLine() || anOutPort->IsLoop() || anOutPort->IsGate() ) {
+            f << "O" << EndName << anOutPort->PortName() << " = " << EndName
+              << ".GetOutPort( '" << anOutPort->PortName() << "' )" << endl ;
+          }
+          else if ( anOutPort->IsDataStream() ) {
+            f << "O" << EndName << anOutPort->PortName() << " = " << EndName
+              << ".OutStreamPort( '" << anOutPort->PortName()
+              << "' , SALOME_ModuleCatalog." << StringToDataStreamType( anOutPort->PortType() )
+              << " , SALOME_ModuleCatalog." << anOutPort->Dependency() << " )" << endl ;
+            long aNumberOfValues ;
+            aNumberOfValues = ((GraphBase::OutDataStreamPort * ) anOutPort)->NumberOfValues() ;
+            f << "O" << EndName << anOutPort->PortName() << ".SetNumberOfValues( " << aNumberOfValues << " )"
+              << endl ;
+         }
+        }
       }
       else if ( IsSwitchNode() ) {
         f << Name() << "," << EndName << " = " << aGraphName << ".SNode( '"
@@ -940,74 +1136,176 @@ bool GraphBase::ComputingNode::SavePY( ostream &f , const char * aGraphName ,
           f << "Py" << aCoupledNode->Name() << ".append( '" << aPyFunc[i] << "' )"
             << endl ;
         }
-        f << EndName << ".SetPyFunction( 'End" << FuncNames[0].c_str() << "' , Py" << aCoupledNode->Name() << " )" << endl ;
+        f << EndName << ".SetPyFunction( '" << aCoupledNode->PyFuncName() << "' , Py" << aCoupledNode->Name() << " )" << endl ;
         for ( i = 0 ; i < aCoupledNode->GetNodeInPortsSize() ; i++ ) {
           const GraphBase::InPort * anInPort = aCoupledNode->GetNodeInPort(i) ;
-          if ( anInPort->IsInLine() || anInPort->IsEndSwitch() ) {
-            f << EndName << ".InPort( '" << anInPort->PortName()
+          cdebug << "Node " << aCoupledNode->Name() << " InPort " << anInPort->PortName()
+                 << " " << anInPort->Kind() << endl ;
+//          if ( anInPort->IsGate() || anInPort->IsEndSwitch() ) {
+          if ( anInPort->IsGate() ) {
+            f << "I" << EndName << anInPort->PortName() << " = " << EndName
+              << ".GetInPort( '" << anInPort->PortName() << "' )" << endl ;
+          }
+          else if ( anInPort->IsInLine() || anInPort->IsEndSwitch() ) {
+            f << "I" << EndName << anInPort->PortName() << " = " << EndName
+              << ".InPort( '" << anInPort->PortName()
               << "' , '" << anInPort->PortType() << "' )" << endl ;
           }
+          else if ( anInPort->IsDataStream() ) {
+            f << "I" << EndName << anInPort->PortName() << " = " << EndName
+              << ".InStreamPort( '" << anInPort->PortName()
+              << "' , SALOME_ModuleCatalog." << StringToDataStreamType( anInPort->PortType() )
+              << " , SALOME_ModuleCatalog." << anInPort->Dependency() << " )" << endl ;
+            SUPERV::KindOfSchema        aKindOfSchema ;
+            SUPERV::KindOfInterpolation aKindOfInterpolation ;
+            SUPERV::KindOfExtrapolation aKindOfExtrapolation ;
+            ((GraphBase::InDataStreamPort * ) anInPort)->Params( aKindOfSchema , aKindOfInterpolation , aKindOfExtrapolation ) ;
+            f << "I" << EndName << anInPort->PortName() << ".SetParams( SUPERV." << aKindOfSchema << " , SUPERV."
+              << aKindOfInterpolation << " , SUPERV." << aKindOfExtrapolation << " )" << endl ;
+         }
         }
         for ( i = 0 ; i < aCoupledNode->GetNodeOutPortsSize() ; i++ ) {
           const GraphBase::OutPort * anOutPort = aCoupledNode->GetNodeOutPort(i) ;
-          if ( anOutPort->IsInLine() ) {
-            f << EndName << ".OutPort( '" << anOutPort->PortName()
+          cdebug << "Node " << aCoupledNode->Name() << " OutPort " << anOutPort->PortName()
+                 << " " << anOutPort->Kind() << endl ;
+//          if ( anOutPort->IsGate() || anOutPort->IsEndSwitch() ) {
+          if ( anOutPort->IsGate() ) {
+            f << "O" << EndName << anOutPort->PortName() << " = " << EndName
+              << ".GetOutPort( '" << anOutPort->PortName() << "' )" << endl ;
+          }
+          else if ( anOutPort->IsInLine() || anOutPort->IsSwitch() ) {
+            f << "O" << EndName << anOutPort->PortName() << " = " << EndName
+              << ".OutPort( '" << anOutPort->PortName()
               << "' , '" << anOutPort->PortType() << "' )" << endl ;
           }
+          else if ( anOutPort->IsDataStream() ) {
+            f << "O" << EndName << anOutPort->PortName() << " = " << EndName
+              << ".OutStreamPort( '" << anOutPort->PortName()
+              << "' , SALOME_ModuleCatalog." << StringToDataStreamType( anOutPort->PortType() )
+              << " , SALOME_ModuleCatalog." << anOutPort->Dependency() << " )" << endl ;
+            long aNumberOfValues ;
+            aNumberOfValues = ((GraphBase::OutDataStreamPort * ) anOutPort)->NumberOfValues() ;
+            f << "O" << EndName << anOutPort->PortName() << ".SetNumberOfValues( " << aNumberOfValues << " )"
+              << endl ;
+         }
         }
       }
       delete [] EndName ;
     }
   }
 
-  f << Name() << ".SetName( '" << Name() << "' )" << endl ;
-  f << Name() << ".SetAuthor( '" << Author() << "' )" << endl ;
-  if ( IsFactoryNode() ) {
-    f << Name() << ".SetContainer( '" << Computer << "' )" << endl ;
+  if ( IsEndLoopNode() || IsEndSwitchNode() ) {
+// It is done with LoopNode or SwitchNode with CoupledNode()
   }
-  f << Name() << ".SetComment( '" << Comment() << "' )" << endl ;
-  f << Name() << ".Coords( " << XCoordinate << " , " << YCoordinate << " )" << endl ;
+  else {
+    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() << ".InPort( '" << anInPort->PortName() << "' , '"
-          << anInPort->PortType() << "' )" << endl ;
+    if ( IsComputingNode() || IsFactoryNode() ) {
+      int i ;
+      for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) {
+        const GraphBase::InPort * anInPort = GetNodeInPort(i) ;
+        if ( !anInPort->IsDataStream() ) {
+          cdebug << "Node " << Name() << " InPort " << anInPort->PortName()
+                 << " " << anInPort->Kind() << endl ;
+          f << "I" << Name() << anInPort->PortName() << " = "
+            << Name() << ".GetInPort( '" << anInPort->PortName() << "' )" << endl ;
+       }
+      }
+      for ( i = 0 ; i < GetNodeOutPortsSize() ; i++ ) {
+        const GraphBase::OutPort * anOutPort = GetNodeOutPort(i) ;
+        if ( !anOutPort->IsDataStream() ) {
+          cdebug << "Node " << Name() << " OutPort " << anOutPort->PortName()
+                 << " " << anOutPort->Kind() << endl ;
+          f << "O" << Name() << anOutPort->PortName() << " = "
+            << Name() << ".GetOutPort( '" << anOutPort->PortName() << "' )" << endl ;
+       }
       }
     }
-    for ( i = 0 ; i < GetNodeOutPortsSize() ; i++ ) {
-      const GraphBase::OutPort * anOutPort = GetNodeOutPort(i) ;
-      if ( anOutPort->IsInLine() || anOutPort->IsSwitch() ) {
-        f << Name() << ".OutPort( '" << anOutPort->PortName()
-          << "' , '" << anOutPort->PortType() << "' )" << endl ;
+    else if ( IsOneOfInLineNodes() && !IsLoopNode() ) {
+      int i ;
+      for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) {
+        const GraphBase::InPort * anInPort = GetNodeInPort(i) ;
+        cdebug << "Node " << Name() << " InPort " << anInPort->PortName()
+               << " " << anInPort->Kind() << endl ;
+        if ( anInPort->IsInLine() || anInPort->IsEndSwitch() ) {
+          f << "I" << Name() << anInPort->PortName() << " = "
+            << Name() << ".InPort( '" << anInPort->PortName() << "' , '"
+            << anInPort->PortType() << "' )" << endl ;
+        }
+        else if ( anInPort->IsGate() ) {
+          f << "I" << Name() << anInPort->PortName() << " = "
+            << Name() << ".GetInPort( '" << anInPort->PortName()  << "' )" << endl ;
+        }
+      }
+      for ( i = 0 ; i < GetNodeOutPortsSize() ; i++ ) {
+        const GraphBase::OutPort * anOutPort = GetNodeOutPort(i) ;
+        cdebug << "Node " << Name() << " OutPort " << anOutPort->PortName()
+               << " " << anOutPort->Kind() << endl ;
+        if ( anOutPort->IsInLine() || anOutPort->IsSwitch() ) {
+          f << "O" << Name() << anOutPort->PortName() << " = "
+            << Name() << ".OutPort( '" << anOutPort->PortName()
+            << "' , '" << anOutPort->PortType() << "' )" << endl ;
+        }
+        else if ( anOutPort->IsGate() ) {
+          f << "O" << Name() << anOutPort->PortName() << " = "
+            << Name() << ".GetOutPort( '" << anOutPort->PortName() << "' )" << endl ;
+        }
       }
     }
-  }
-
-#if 0
-  if ( IsLoopNode() || IsSwitchNode() ) {
-    f << EndName << ".SetName( '" << CoupledNode
-      << "' )" << endl ;
-    f << EndName << ".SetAuthor( '" << CoupledNode->Author()
-      << "' )" << endl ;
-    f << EndName << ".SetComment( '" << CoupledNode->Comment()
-      << "' )" << endl ;
-    f << EndName << ".Coords( " << CoupledNode->XCoordinate() << " , "
-      << CoupledNode->YCoordinate() << " )" << endl ;
-    unsigned int i;
-    for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) {
-      const InPort * anInPort = GetNodeInPort( i ) ;
-      if ( anInPort->IsBus() ) {
-        const OutPort * anOutPort = GetNodeOutPort( anInPort->PortIndex() ) ;
-        f << Name() << ".BusPorts( '" << anInPort->PortName() << "' , '"
-          << anInPort->PortType() << "' , '" << anOutPort->PortName()
-          << "' , '" << anOutPort->PortType() << "' )" << endl ;
+    if ( !IsDataFlowNode() && !IsDataStreamNode() ) {
+      int i ;
+      for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) {
+        const GraphBase::InPort * anInPort = GetNodeInPort(i) ;
+        cdebug << "Node " << Name() << " InPort " << anInPort->PortName()
+               << " " << anInPort->Kind() << endl ;
+        if ( anInPort->IsDataStream() ) {
+          if ( IsOneOfInLineNodes() ) {
+            f << "I" << Name() << anInPort->PortName() << " = "
+              << Name() << ".InStreamPort( '" << anInPort->PortName() << "' , SALOME_ModuleCatalog."
+              << StringToDataStreamType( anInPort->PortType() ) << " , SALOME_ModuleCatalog."
+              << anInPort->Dependency() << " )" << endl ;
+         }
+          else {
+            f << "I" << Name() << anInPort->PortName() << " = "
+              << Name() << ".GetInStreamPort( '" << anInPort->PortName() << "' )" << endl ;
+         }
+          SUPERV::KindOfSchema        aKindOfSchema ;
+          SUPERV::KindOfInterpolation aKindOfInterpolation ;
+          SUPERV::KindOfExtrapolation aKindOfExtrapolation ;
+          ((GraphBase::InDataStreamPort * ) anInPort)->Params( aKindOfSchema , aKindOfInterpolation , aKindOfExtrapolation ) ;
+          f << "I" << Name() << anInPort->PortName() << ".SetParams( SUPERV." << aKindOfSchema << " , SUPERV."
+            << aKindOfInterpolation << " , SUPERV." << aKindOfExtrapolation << " )" << endl ;
+        }
+      }
+      for ( i = 0 ; i < GetNodeOutPortsSize() ; i++ ) {
+        const GraphBase::OutPort * anOutPort = GetNodeOutPort(i) ;
+        cdebug << "Node " << Name() << " OutPort " << anOutPort->PortName()
+               << " " << anOutPort->Kind() << endl ;
+        if ( anOutPort->IsDataStream() ) {
+          if ( IsOneOfInLineNodes() ) {
+            f << "O" << Name() << anOutPort->PortName() << " = "
+              << Name() << ".OutStreamPort( '" << anOutPort->PortName() << "' , SALOME_ModuleCatalog."
+              << StringToDataStreamType( anOutPort->PortType() ) << " , SALOME_ModuleCatalog."
+              << anOutPort->Dependency() << " )" << endl ;
+         }
+          else {
+            f << "O" << Name() << anOutPort->PortName() << " = "
+              << Name() << ".GetOutStreamPort( '" << anOutPort->PortName() << "' )" << endl ;
+         }
+          long aNumberOfValues ;
+          aNumberOfValues = ((GraphBase::OutDataStreamPort * ) anOutPort)->NumberOfValues() ;
+          f << "O" << Name() << anOutPort->PortName() << ".SetNumberOfValues( " << aNumberOfValues << " )" << endl ;
+        }
       }
     }
   }
-#endif
+
   return true ;
 }
 
@@ -1019,10 +1317,12 @@ void GraphBase::ComputingNode::NodeInfo(ostream & s) const {
 
 ostream & operator<< (ostream & f,const GraphBase::ComputingNode & G) {
 //  f << "ComponentName    " << G.ComponentName() << endl ;
-  if ( G.IsComputingNode() )
+  if ( G.IsComputingNode() ) {
     f << "NodeName         " << G.Name() << endl ;
-  else
+  }
+  else {
     f << "DataFlowName     " << G.Name() << endl ;
+  }
   f << "Kind             " << G.Kind() << endl ;
   f << "Service          " << *G.GetService() ;
   f << "FirstCreation    " << G.FirstCreation () << endl ;
@@ -1043,8 +1343,9 @@ void GraphBase::ComputingNode::ListLinks(ostream &f ) const {
     if ( fromPort->IsPortConnected() ) {
       int j ;
       for ( j = 0 ; j < fromPort->InPortsSize() ; j++ ) {
-        if ( j == 0 )
+        if ( j == 0 ) {
           f << "FromNode " << Name() << endl ;
+       }
         f << "         FromServiceParameterName "
           << fromPort->GetServicesParameter().Parametername ;
         const GraphBase::InPort* toPort = fromPort->InPorts( j ) ;
index 3774b2d5a01291d49f46bb745221d48be81b6bd0..3458fa8cb8133e1a9dce0fd528de0a1d21704e13 100644 (file)
@@ -9,57 +9,60 @@
 //  Module : SUPERV
 //  $Header:
 
-#ifndef _DATAFLOWBASE_NODE_HXX
-#define _DATAFLOWBASE_NODE_HXX
+#ifndef _DATAFLOWBASE_COMPUTINGNODE_HXX
+#define _DATAFLOWBASE_COMPUTINGNODE_HXX
 
 #include "SALOME_NamingService.hxx"
 
-#include "DataFlowBase_PortsOfNode.hxx"
+#include "DataFlowBase_StreamNode.hxx"
 
 namespace GraphBase {
 
   class InLineNode ;
 
-  class ComputingNode : public PortsOfNode {
+  class ComputingNode : public StreamNode {
 
     private:
     
       CORBA::ORB_ptr         _ORB ;
       SALOME_NamingService * _NamingService ;
-      int                  * _Graph_prof_debug ;
-      ofstream             * _Graph_fdebug ;
+//->StreamNode      int                  * _Graph_prof_debug ;
+//->StreamNode      ofstream             * _Graph_fdebug ;
       SUPERV::CNode_var      _Node ;
       void                 * _InNode ; // From GraphExecutor:: or GraphEditor::
       bool                   _ObjInterface ;
 
       pthread_t              _ThreadNo ;
 
-      char                 * _Name ;
-      SUPERV::KindOfNode     _Kind ;
+//->StreamNode      char                 * _Name ;
+//->StreamNode      SUPERV::KindOfNode     _Kind ;
       SUPERV::SDate          _FirstCreation ;
       SUPERV::SDate          _LastModification ;
       char                 * _EditorRelease ;
       char                 * _Author ;
       char                 * _Comment ;
 
-      bool                   _HeadNode ;
-      int                    _LevelNumber ;
-      int                    _SubGraphNumber ;
+//->StreamNode      bool                   _HeadNode ;
+//->StreamNode      int                    _LevelNumber ;
+//->StreamNode      int                    _SubGraphNumber ;
       bool                   _GeneratedName ;
 
+//->StreamNode      int                    _DataStreamInPortsNumber ;
+//->StreamNode      int                    _DataStreamOutPortsNumber ;
+
       int                    _ConnectedInPortsNumber ;
       int                    _DecrConnectedInPortsNumber ;
 
 // For generated NodeNames with ServiceName : number of Nodes using
 // the same ServiceName. It is not the same Service if it belongs to
 // a different Interface and/or a different Component ...
-      map< string , int > _MapOfServiceNames ;
+//->StreamNode      map< string , int > _MapOfServiceNames ;
 
 // Nodes with LinkedInPortsNumber InPort(s) linked to Outport(s) of this node :
-      map< string , int >      _MapOfLinkedNodes ;
-      int                      _LinkedNodesSize ;
-      vector<ComputingNode * > _LinkedNodes ;
-      vector<int >             _LinkedInPortsNumber ;
+//->StreamNode      map< string , int >      _MapOfLinkedNodes ;
+//->StreamNode      int                      _LinkedNodesSize ;
+//->StreamNode      vector<ComputingNode * > _LinkedNodes ;
+//->StreamNode      vector<int >             _LinkedInPortsNumber ;
 
     protected:
 
@@ -94,9 +97,37 @@ namespace GraphBase {
       SALOME_NamingService * NamingService() const {
              return _NamingService ; } ;
 
-      SUPERV::CNode_var ObjRef() const { return _Node ; } ;
+      SUPERV::CNode_var ObjRef() const {
+//                        char * _NodeName ;
+//                        cdebug << "ComputingNode::ObjRef() " << _Node << " " << Name()
+//                               << " " << endl ;
+//                        SUPERV::CNode_var _NodeObjRef = SUPERV::CNode::_narrow( _Node ) ;
+//                        if ( CORBA::is_nil( _NodeObjRef ) ) {
+//                          _NodeName = "NilRef" ;
+//                     }
+//                     else {
+//                          try {
+//                            _NodeName = _NodeObjRef->Name() ;
+//                       }
+//                          catch ( ... ) {
+//                            _NodeName = "Catch Error" ;
+//                       }
+//                     }
+//                        cdebug << _NodeName << " " << Name() << endl ;
+                        return _Node ; } ;
       void SetObjRef(SUPERV::CNode_var aNode) {
-                     _Node = aNode ; } ;
+//                        char * _NodeName ;
+//                        if ( CORBA::is_nil( _Node ) ) {
+//                          _NodeName = "NilRef" ;
+//                     }
+//                     else {
+//                          _NodeName = _Node->Name() ;
+//                     }
+//                        cdebug << "ComputingNode::SetObjRef( " << _Node << " "
+//                               << _NodeName << " ) " << Name() << " --> " ;
+                        _Node = aNode ;
+//                        cdebug << _Node << " " << _Node->Name() << " ) " << Name() << endl ;
+                        } ;
       void InNode( void * anInNode ) {
 //           cdebug << "GraphBase::ComputingNode::InNode " << Name() << endl ;
            _InNode = anInNode ; } ;
@@ -109,10 +140,8 @@ namespace GraphBase {
       pthread_t ThreadNo() { return _ThreadNo ; } ;
       void ThreadNo( pthread_t aThread ) { _ThreadNo = aThread ; } ;
 
-      char * Name() const { return my_strdup( _Name ) ; } ;
-      const char *const * NamePtr() const { return &_Name ; } ;
-      SUPERV::KindOfNode Kind() const {
-            return _Kind; } ;
+//->StreamNode      char * Name() const { return my_strdup( _Name ) ; } ;
+//->StreamNode      const char *const * NamePtr() const { return &_Name ; } ;
 //      const SALOME_ModuleCatalog::Service * Service() const ;
       SUPERV::SDate FirstCreation() const ;
       SUPERV::SDate LastModification() const ;
@@ -122,8 +151,7 @@ namespace GraphBase {
       int XCoordinate() const { return _X ; } ;
       int YCoordinate() const { return _Y ; } ;
 
-      bool Name( const char * aName ) ;
-      bool Kind( SUPERV::KindOfNode aKind) ;
+//->StreamNode      bool Name( const char * aName ) ;
 //      void Service( const SALOME_ModuleCatalog::Service aService ) ;
       void FirstCreation( const SUPERV::SDate aFirstCreation ) ;
       void LastModification( const SUPERV::SDate aLastModification ) ;
@@ -142,56 +170,52 @@ namespace GraphBase {
 
       GraphBase::SNode * GetInfo() ;
 
-      const bool IsComputingNode() const {
-            return (_Kind == SUPERV::ComputingNode ) ; } ;
-      const bool IsFactoryNode() const {
-            return (_Kind == SUPERV::FactoryNode ) ; } ;
-      const bool IsOneOfGOTONodes() const {
-            return (_Kind == SUPERV::LoopNode ||
-                    _Kind == SUPERV::EndLoopNode ||
-                    _Kind == SUPERV::SwitchNode ||
-                    _Kind == SUPERV::EndSwitchNode ||
-                    _Kind == SUPERV::GOTONode ) ; } ;
-      const bool IsOneOfInLineNodes() const {
-            return (_Kind == SUPERV::InLineNode || IsOneOfGOTONodes() ) ; } ;
-      const bool IsInLineNode() const {
-            return (_Kind == SUPERV::InLineNode ) ; } ;
-      const bool IsDataFlowNode() const {
-            return (_Kind == SUPERV::DataFlowNode ) ; } ;
-      const bool IsLoopNode() const {
-            return (_Kind == SUPERV::LoopNode ) ; } ;
-      const bool IsEndLoopNode() const {
-            return (_Kind == SUPERV::EndLoopNode ) ; } ;
-      const bool IsSwitchNode() const {
-            return (_Kind == SUPERV::SwitchNode ) ; } ;
-      const bool IsEndSwitchNode() const {
-            return (_Kind == SUPERV::EndSwitchNode ) ; } ;
-      const bool IsGOTONode() const {
-            return (_Kind == SUPERV::GOTONode ) ; } ;
-      void HeadNode( bool aHeadNode ) { _HeadNode = aHeadNode ; } ;
-      const bool IsHeadNode() const { return _HeadNode ; } ;
+//      void HeadNode( bool aHeadNode ) { _HeadNode = aHeadNode ; } ;
+//      const bool IsHeadNode() const { return _HeadNode ; } ;
 
       bool RemovePorts( const char* aNodeName ) ;
 
+      void DelInPort( const char * InputParameterName ) ;
+      void DelOutPort( const char * OutputParameterName ) ;
+
       InPort * AddInPort( const char * InputParameterName ,
-                          const char * InputParameterType ) ;
+                          const char * InputParameterType ,
+                          const SUPERV::KindOfPort aKindOfPort ) ;
       OutPort * AddOutPort( const char * OutputParameterName ,
-                            const char * OutputParameterType ) ;
+                            const char * OutputParameterType ,
+                            const SUPERV::KindOfPort aKindOfPort ) ;
+
+      void DelInDataStreamPort( const char * InputParameterName ) ;
+      void DelOutDataStreamPort( const char * OutputParameterName ) ;
+
+      InDataStreamPort * AddInDataStreamPort( const char * InputParameterName ,
+                                              const SALOME_ModuleCatalog::DataStreamType InputParameterType ,
+                                              const SALOME_ModuleCatalog::DataStreamDependency aDependency ,
+                                              const SUPERV::KindOfPort aKindOfPort ) ;
+      OutDataStreamPort * AddOutDataStreamPort( const char * OutputParameterName ,
+                                                const SALOME_ModuleCatalog::DataStreamType OutputParameterType ,
+                                                const SALOME_ModuleCatalog::DataStreamDependency aDependency ,
+                                                const SUPERV::KindOfPort aKindOfPort ) ;
+
+//      ComputingNode * LinkedNodes( int i ) const { return (GraphBase::ComputingNode *) GraphBase::StreamNode::LinkedNodes( i ) ; } ;
+
+      void AddLink( GraphBase::ComputingNode * ToNode ) {
+           GraphBase::StreamNode::AddLink( ToNode ) ;
+           cdebug << Name() << "->GraphBase::ComputingNode::AddLinkedNode( " << ToNode->Name()
+                  << ") ConnectedInPortsNumber " << ToNode->ConnectedInPortsNumber()
+                  << " + 1 Service " << ServiceName() << endl ;
+           ToNode->IncrConnectedInPortsNumber() ; } ;
+
+      void RemoveLink( GraphBase::ComputingNode * ToNode ) {
+           if ( GraphBase::StreamNode::RemoveLink( ToNode ) ) {
+             cdebug << "GraphBase::StreamNode::RemoveLink to " << ToNode->Name() << " from "
+                    << Name() << " ConnectedInPortsNumber "
+                    << ToNode->ConnectedInPortsNumber() - 1 << endl ;
+             ToNode->DecrConnectedInPortsNumber() ; } } ;
 
-      void AddLink( ComputingNode * aNode ) ;
-      void RemoveLink( ComputingNode * aNode ) ;
       void ReNameLink( const char* OldNodeName ,
-                       const char* NewNodeName ) ;
-
-      int GetServiceNameNumber( const char * name ) {
-          int num = _MapOfServiceNames[ name ] ;
-          if ( num == 0 ) {
-            _MapOfServiceNames[ name ] = 1 ;
-          }
-          else {
-            _MapOfServiceNames[ name ] = num + 1 ;
-         }
-          return _MapOfServiceNames[ name ] ; } ;
+                       const char* NewNodeName ) {
+           GraphBase::StreamNode::ReNameLink( OldNodeName , NewNodeName ) ; } ;
 
       void IncrConnectedInPortsNumber() {
            cdebug << "IncrConnectedInPortsNumber " << Name() << " -> "
@@ -216,37 +240,6 @@ namespace GraphBase {
           }
            return false ; } ;
 
-      int GetLinkedNodeIndex( const char * name ) {
-          int index = _MapOfLinkedNodes[ name ] -1 ;
-          if ( index >= 0 ) {
-            cdebug << "GetLinkedNodeIndex of " << name
-                   << " in _MapOfLinkedNodes : "
-                   << index << " Node " << hex << (void *) _LinkedNodes[ index ]
-                   << dec << " '" << _LinkedNodes[ index ]->Name() << "'"
-                   << endl ;
-         }
-          return index ; } ;
-      void SetLinkedNodeIndex( const char * name , const int index ) {
-          _MapOfLinkedNodes[ name ] = index +1 ;
-          cdebug << "SetLinkedNodeIndex of " << name << " in _MapOfLinkedNodes : "
-                 << index << " Node " << hex << (void *) _LinkedNodes[ index ]
-                 << dec << " '" << _LinkedNodes[ index ]->Name() << "'"
-                 << " _MapOfLinkedNodes " << _MapOfLinkedNodes[ name ] - 1
-                 << endl ;
-          } ;
-      void DelLinkedNodeIndex( const char * name ) {
-           _MapOfLinkedNodes.erase( name ) ; } ;
-      int LinkedNodesSize() const { return _LinkedNodesSize ; } ;
-      ComputingNode * LinkedNodes( int i ) const { return _LinkedNodes[ i ] ; } ;
-      const int LinkedInPortsNumber( int i ) const { return _LinkedInPortsNumber[ i ] ; } ;
-
-      int Level() { return _LevelNumber ; } ;
-      void Level( int LevelNumber ) {
-           _LevelNumber = LevelNumber ; } ;
-      int SubGraph() { return _SubGraphNumber ; } ;
-      void SubGraph( int SubGraphNumber ) {
-           _SubGraphNumber = SubGraphNumber ; } ;
-
 //      const GraphBase::ListOfParameters * GetListOfParameters() const ;
 
       const long CpuUsed() ;
index 96cf474f10918cf4c31245fee41829988ee917eb..8c4eecc4517861f0d833e787410b85e60513c4e7 100644 (file)
@@ -39,7 +39,8 @@ GraphBase::DataNode::DataNode( CORBA::ORB_ptr ORB ,
                                SALOME_NamingService* ptrNamingService ,
                                const char *DataFlowName ) :
            InLineNode( ORB , ptrNamingService , DataFlowName ) {
-  MESSAGE( "GraphBase::DataNode::DataNode" );
+//  MESSAGE( "GraphBase::DataNode::DataNode" );
+  cdebug << "GraphBase::DataNode::DataNode" << endl ;
   _Created = false ;
 }
 
@@ -66,11 +67,10 @@ GraphBase::DataNode::~DataNode() {
 //  MESSAGE( "GraphBase::DataNode::~DataNode" );
 }
 
-void GraphBase::DataNode::DataService(
-                       CORBA::ORB_ptr ORB ,
-                       SALOME_ModuleCatalog::Service aService ,
-                       int * Graph_prof_debug ,
-                       ofstream * Graph_fdebug ) {
+void GraphBase::DataNode::DataService( CORBA::ORB_ptr ORB ,
+                                       SALOME_ModuleCatalog::Service aService ,
+                                       int * Graph_prof_debug ,
+                                       ofstream * Graph_fdebug ) {
   cdebug << "GraphBase::DataNode::DataService : DataFlowPortsOfNode of "
          << aService.ServiceName << endl ;
   DefPortsOfNode( ORB , aService , NamePtr() , Kind() ,
@@ -85,8 +85,7 @@ void GraphBase::DataNode::DataService(
   _DataFlowDataPorts = new PortsOfNode() ;
   cdebug << "GraphBase::DataNode::DataService : Mirrored DataFlowPortsOfNode of "
          << aReversedService.ServiceName << endl ;
-  _DataFlowDataPorts->DefPortsOfNode( ORB , aReversedService , NamePtr() ,
-                                      Kind() ,
+  _DataFlowDataPorts->DefPortsOfNode( ORB , aReversedService , NamePtr() , Kind() ,
                                       Graph_prof_debug , Graph_fdebug ) ;
   _Created = true ;
 }
@@ -98,13 +97,16 @@ int GraphBase::DataNode::CheckDataServerNodes() const {
   int i , ierr = 0 ;
 
   for ( i = 0 ; i < _DataFlowDataPorts->GetNodeOutPortsSize() ; i++ ) {
-    if ( !_DataFlowDataPorts->GetNodeOutPort(i)->IsDataConnected() ) {
-      cdebug << "InPort " << _DataFlowDataPorts->GetNodeOutPort(i)->PortName()
+// Not a BUG : Reversed Service of the graph 
+    const GraphBase::OutPort * anOutPort = _DataFlowDataPorts->GetNodeOutPort(i) ;
+//    if ( !anOutPort->IsGate() && !anOutPort->IsDataStream() && !anOutPort->IsDataConnected() ) {
+    if ( !anOutPort->IsGate() && !anOutPort->IsDataConnected() ) {
+      cdebug << "InPort " << anOutPort->PortName() << " " << anOutPort->PortType()
              << " of DataFlow " << Name() << " has NO Data." << endl ;
       ierr++ ;
     }
     else {
-      cdebug << "InPort " << _DataFlowDataPorts->GetNodeOutPort(i)->PortName()
+      cdebug << "InPort " << anOutPort->PortName() << " " << anOutPort->PortType()
              << " of DataFlow " << Name()  << " has Data : "
 //           << _DataFlowDataPorts->GetNodeOutPort(i)->Value() << " kind "
 //           << _DataFlowDataPorts->GetNodeOutPort(i)->Kind()
index c2ceff037c27b894e518e449f1460e961715078c..a6a57b014c4bf6352a16101a689acf5d06872fcb 100644 (file)
@@ -37,9 +37,12 @@ namespace GraphBase {
 
     private:
 
-      GraphBase::PortsOfNode * _DataFlowDataPorts ;
       bool                     _Created ;
 
+    protected :
+
+      GraphBase::PortsOfNode * _DataFlowDataPorts ;
+
     public:
 
       DataNode() ;
index a623fdf157e34bbe2e5a127bfd18f927978a2d42..a4c366393db7adcb45b85430f0721668d5d0ea6a 100644 (file)
@@ -30,10 +30,18 @@ using namespace std;
 #include <stdio.h>
 #include "DataFlowBase_DataPort.hxx"
 
+GraphBase::DataPort::DataPort() :
+              Port() {
+  pthread_mutex_init( &_MutexWait , NULL ) ;
+  InitialValues( CORBA::Any() ) ;
+}
+
 GraphBase::DataPort::DataPort(
          const char *const * NodeName  ,
-         const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ) :
-              Port( NodeName , aserviceParameter ) {
+         const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
+         const SUPERV::KindOfPort aKind ,
+         const SALOME_ModuleCatalog::DataStreamDependency aDependency ) :
+              Port( NodeName , aserviceParameter , aKind , aDependency ) {
   pthread_mutex_init( &_MutexWait , NULL ) ;
   InitialValues( CORBA::Any() ) ;
 }
@@ -98,7 +106,8 @@ void GraphBase::DataPort::InitialValues(CORBA::Any aValue ) {
 }
 
 void GraphBase::DataPort::Value( const CORBA::Any & aDataValue ) {
-  Value( new CORBA::Any( aDataValue ) ) ;
+  CORBA::Any * aValue = new CORBA::Any( aDataValue ) ;
+  Value( aValue ) ;
 }
 
 void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) {
index 08ed859bb759bc4089aa5dddecfdafc15c914445..0dd2c297dfd83f2762dd49958babd4b1bdf12751 100644 (file)
@@ -35,38 +35,43 @@ namespace GraphBase {
 
   class DataPort : public Port {
 
-    CORBA::Any const *    _InitialValue ;
-    CORBA::Any const *    _theValue ;
-    CORBA::Any const * *  _Value ;
-    SUPERV::GraphState    _State ;
-    bool                  _Done ;
-    pthread_mutex_t       _MutexWait ;
+    private:
+
+      CORBA::Any const *    _InitialValue ;
+      CORBA::Any const *    _theValue ;
+      CORBA::Any const * *  _Value ;
+      SUPERV::GraphState    _State ;
+      bool                  _Done ;
+      pthread_mutex_t       _MutexWait ;
 
     public :
 
-    DataPort( const char *const * NodeName  ,
-              const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ) ;
-    virtual ~DataPort() ;
+      DataPort() ;
+      DataPort( const char *const * NodeName  ,
+                const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
+                const SUPERV::KindOfPort aKind = SUPERV::ServiceParameter ,
+                const SALOME_ModuleCatalog::DataStreamDependency aDependency = SALOME_ModuleCatalog::DATASTREAM_UNDEFINED ) ;
+      virtual ~DataPort() ;
 
-    void InitialValues(CORBA::Any aValue ) ;
-    void Value (const CORBA::Any & aValue ) ;
-    void Value( const CORBA::Any * aValue ) ;
-    void Value( const CORBA::Any ** aValue ) ;
-    CORBA::Any const * Value() const ;
-    bool BoolValue() const ;
-    const CORBA::Any ** ValuePtr() const ;
+      void InitialValues(CORBA::Any aValue ) ;
+      void Value (const CORBA::Any & aValue ) ;
+      void Value( const CORBA::Any * aValue ) ;
+      void Value( const CORBA::Any ** aValue ) ;
+      CORBA::Any const * Value() const ;
+      bool BoolValue() const ;
+      const CORBA::Any ** ValuePtr() const ;
 
-    void State( SUPERV::GraphState aState ) {
-         _State = aState ; } ;
-    SUPERV::GraphState State() { return _State ; } ;
+      void State( SUPERV::GraphState aState ) {
+           _State = aState ; } ;
+      SUPERV::GraphState State() { return _State ; } ;
 
-    void Done( bool aDone ) {
-//         cdebug << "ChgDone(.) " << NodeName() << " " << PortName() << " "
-//                << _Done << " -> " << aDone << endl ;
-         _Done = aDone ; } ;
-    const bool Done() const { return ( _Done ) ; } ;
+      void Done( bool aDone ) {
+//           cdebug << "ChgDone(.) " << NodeName() << " " << PortName() << " "
+//                  << _Done << " -> " << aDone << endl ;
+           _Done = aDone ; } ;
+      const bool Done() const { return ( _Done ) ; } ;
 
-    void StringValue(ostream & f) const ;
+      void StringValue(ostream & f) const ;
 
   } ;
 
index edf62183e8d4180a3e3b7dbe2e1c79c0ab029152..2319b70811272ba1d1697ab72a32c5e83bc65995 100644 (file)
@@ -27,7 +27,7 @@
 //  $Header:
 
 using namespace std;
-#include "DataFlowBase_Graph.hxx"
+#include "DataFlowBase_StreamGraph.hxx"
 
 #include "SALOME_LifeCycleCORBA.hxx"
 
@@ -40,11 +40,13 @@ GraphBase::Graph::Graph() :
 GraphBase::Graph::Graph( CORBA::ORB_ptr ORB ,
                          SALOME_NamingService* ptrNamingService ,
                          const char *DataFlowName ,
-                         const char * DebugFileName ) :
+                         int * Graph_prof_debug ,
+                         ofstream * Graph_fdebug ) :
+//                         const char * DebugFileName ) :
            DataNode( ORB ,ptrNamingService , DataFlowName ) {
-  Set_prof_debug( ORB , DebugFileName ) ;
-  cdebug << "GraphBase::Graph::Graph( " << DataFlowName << ")" << endl ;
   _Orb = CORBA::ORB::_duplicate( ORB ) ;
+  Set_prof_debug( Graph_prof_debug , Graph_fdebug ) ;
+  cdebug << "GraphBase::Graph::Graph( " << DataFlowName << ") GraphNodesSize() " << GraphNodesSize() << endl ;
   _GraphNodesSize = 0 ;
 }
 
@@ -61,16 +63,18 @@ GraphBase::Graph::Graph( CORBA::ORB_ptr ORB ,
                          const char * DataFlowAuthor ,
                          const char * DataFlowComputer ,
                          const char * DataFlowComment ,
-                         const char * DebugFileName ) :
+                         int * Graph_prof_debug ,
+                         ofstream * Graph_fdebug ) :
+//                         const char * DebugFileName ) :
            DataNode( ORB , ptrNamingService , DataFlowService ,
                      DataFlowName , DataFlowkind ,
                      DataFlowFirstCreation , DataFlowLastModification  ,
                      DataFlowEditorRelease , DataFlowAuthor , DataFlowComment ) {
   _Orb = CORBA::ORB::_duplicate( ORB ) ;
   _GraphNodesSize = 0 ;
-  Set_prof_debug( ORB , DebugFileName ) ;
+  Set_prof_debug( Graph_prof_debug , Graph_fdebug ) ;
   cdebug_in << "GraphBase::Graph::Graph" << endl ;
-  DataService( ORB , DataFlowService , Graph_prof_debug() , Graph_fdebug() ) ;
+  DataService( ORB , DataFlowService , Graph_prof_debug , Graph_fdebug ) ;
   cdebug_out << "GraphBase::Graph::Graph" << endl ;
 }
 
@@ -78,15 +82,11 @@ GraphBase::Graph::~Graph() {
   cdebug << "GraphBase::Graph::~Graph" << endl ;
 }
 
-void GraphBase::Graph::Set_prof_debug( CORBA::ORB_ptr ORB ,
-                                       const char * DebugFileName ) {
-  _Graph_prof_debug = 0 ;
-  if ( DebugFileName ) {
-    _Graph_fdebug = new ofstream( DebugFileName );
-    MESSAGE( endl << "Trace redirected to file " << DebugFileName << endl)
-    SetDebug( ORB , &_Graph_prof_debug , _Graph_fdebug ) ;
-  }
-  cdebug << "GraphBase::Graph::Set_prof_debug redirect Trace to file " << DebugFileName << endl ;
+void GraphBase::Graph::Set_prof_debug( int * Graph_prof_debug ,
+                                       ofstream * Graph_fdebug ) {
+  SetDebug( _Orb , Graph_prof_debug , Graph_fdebug ) ;
+  _Graph_prof_debug = Graph_prof_debug ;
+  _Graph_fdebug = Graph_fdebug ;
 }
 
 GraphBase::SNode * GraphBase::Graph::GetInfo() const {
@@ -95,6 +95,15 @@ GraphBase::SNode * GraphBase::Graph::GetInfo() const {
   Info->theInterfaceName = "" ;
   Info->theName = Name() ;
   Info->theKind = Kind() ;
+  if ( IsDataStreamNode() ) {
+    long Timeout ;
+    SUPERV::KindOfDataStreamTrace DataStreamTrace ;
+    double DeltaTime ;
+    ((GraphBase::StreamGraph * ) this)->StreamParams( Timeout , DataStreamTrace , DeltaTime ) ;
+    Info->theTimeout = Timeout ;
+    Info->theDataStreamTrace = DataStreamTrace ;
+    Info->theDeltaTime = DeltaTime ;
+  }
   Info->theService = *GetService() ;
   Info->theFirstCreation = FirstCreation() ;
   Info->theLastModification = LastModification() ;
@@ -115,6 +124,7 @@ GraphBase::ListOfNodes * GraphBase::Graph::GetNodes() const {
   GraphBase::ListOfNodes * _list_nodes = 
                                   new GraphBase::ListOfNodes;
 
+  cdebug_in << "GraphBase::Graph::GetNodes" << endl ;
   // All the nodes from _InNodes are taken
 //  vector< InNode *> Nodes = InNodes() ;
 
@@ -192,8 +202,100 @@ GraphBase::ListOfNodes * GraphBase::Graph::GetNodes() const {
         else {
           (*_list_nodes)[ind].theCoupledNode = CORBA::string_dup( "" ) ;
         }
+//        (*_list_nodes)[ind].theDataStreamInArgsNumber = aCNode->DataStreamInPortsNumber() ;
+//        (*_list_nodes)[ind].theDataStreamOutArgsNumber = aCNode->DataStreamOutPortsNumber() ;
+
+        (*_list_nodes)[ind].theListOfInDataStreams.resize( aCNode->DataStreamInPortsNumber() ) ;
+        cdebug << "GraphBase::Graph::GetNodes " << aCNode->Name() << " " << aCNode->DataStreamInPortsNumber() << " DataStreamInPortsNumber" << endl ;
+        int iostream ;
+        int streamind = 0 ;
+        for ( iostream = 0 ; iostream < aCNode->GetNodeInPortsSize() ; iostream++ ) {
+          const GraphBase::InPort * anInPort ;
+          anInPort = aCNode->GetNodeInPort( iostream ) ;
+          if ( anInPort->IsDataStream() ) {
+            cdebug << "GraphBase::Graph::GetNodes In" << iostream << " " << aCNode->Name() << " " << anInPort->NodeName() << " " << anInPort->PortName()
+                   << endl ;
+            (*_list_nodes)[ind].theListOfInDataStreams[streamind].theDataStreamParameter.Parametertype = StringToDataStreamType( anInPort->PortType() ) ;
+            (*_list_nodes)[ind].theListOfInDataStreams[streamind].theDataStreamParameter.Parametername = CORBA::string_dup( anInPort->PortName() ) ;
+            (*_list_nodes)[ind].theListOfInDataStreams[streamind].theDataStreamParameter.Parameterdependency = anInPort->Dependency() ;
+            SUPERV::KindOfSchema        aKindOfSchema ;
+            SUPERV::KindOfInterpolation aKindOfInterpolation ;
+            SUPERV::KindOfExtrapolation aKindOfExtrapolation ;
+            ((GraphBase::InDataStreamPort * ) anInPort)->Params( aKindOfSchema , aKindOfInterpolation , aKindOfExtrapolation ) ;
+            (*_list_nodes)[ind].theListOfInDataStreams[streamind].theKindOfSchema = aKindOfSchema ;
+            (*_list_nodes)[ind].theListOfInDataStreams[streamind].theKindOfInterpolation = aKindOfInterpolation ;
+            (*_list_nodes)[ind].theListOfInDataStreams[streamind].theKindOfExtrapolation = aKindOfExtrapolation ;
+            cdebug << "GraphBase::Graph::GetNodes " << aCNode->Name() << " " << anInPort->NodeName() << " " << anInPort->PortName() << " "
+                   <<  anInPort->Dependency() << " " << aKindOfSchema << " " << aKindOfInterpolation << " " << aKindOfExtrapolation << " list_nodes "
+                   << (*_list_nodes)[ind].theListOfInDataStreams[streamind].theDataStreamParameter.Parametername << " "
+                   << (*_list_nodes)[ind].theListOfInDataStreams[streamind].theDataStreamParameter.Parametertype << " "
+                   << (*_list_nodes)[ind].theListOfInDataStreams[streamind].theDataStreamParameter.Parameterdependency << " "
+                   << (*_list_nodes)[ind].theListOfInDataStreams[streamind].theKindOfSchema << " "
+                   << (*_list_nodes)[ind].theListOfInDataStreams[streamind].theKindOfInterpolation << " "
+                   << (*_list_nodes)[ind].theListOfInDataStreams[streamind].theKindOfExtrapolation << " " << endl ;
+            streamind += 1 ;
+         }
+          else {
+            cdebug << "GraphBase::Graph::GetNodes " << aCNode->Name() << " " << anInPort->NodeName() << " " << anInPort->PortName() << " "
+                   << anInPort->Kind() << " IsDataStream " << anInPort->IsDataStream() << endl ;
+         }
+       }
+
+        (*_list_nodes)[ind].theListOfOutDataStreams.resize( aCNode->DataStreamOutPortsNumber() ) ;
+        cdebug << "GraphBase::Graph::GetNodes " << aCNode->Name() << " " << aCNode->DataStreamOutPortsNumber() << " DataStreamOutPortsNumber" << endl ;
+        streamind = 0 ;
+        for ( iostream = 0 ; iostream < aCNode->GetNodeOutPortsSize() ; iostream++ ) {
+          const GraphBase::OutPort * anOutPort ;
+          anOutPort = aCNode->GetNodeOutPort( iostream ) ;
+          if ( anOutPort->IsDataStream() ) {
+            cdebug << "GraphBase::Graph::GetNodes Out" << iostream << " " << aCNode->Name() << " " << anOutPort->NodeName() << " " << anOutPort->PortName() << " "
+                   << endl ;
+            (*_list_nodes)[ind].theListOfOutDataStreams[streamind].theDataStreamParameter.Parametertype = StringToDataStreamType( anOutPort->PortType() ) ;
+            (*_list_nodes)[ind].theListOfOutDataStreams[streamind].theDataStreamParameter.Parametername = CORBA::string_dup( anOutPort->PortName() ) ;
+            (*_list_nodes)[ind].theListOfOutDataStreams[streamind].theDataStreamParameter.Parameterdependency = anOutPort->Dependency() ;
+            long aNumberOfValues = ((GraphBase::OutDataStreamPort * ) anOutPort)->NumberOfValues() ;
+            (*_list_nodes)[ind].theListOfOutDataStreams[streamind].theNumberOfValues = aNumberOfValues ;
+            cdebug << "GraphBase::Graph::GetNodes " << aCNode->Name() << " " << anOutPort->NodeName() << " " << anOutPort->PortName() << " "
+                   <<  anOutPort->Dependency() << " " << aNumberOfValues << " list_nodes "
+                   << (*_list_nodes)[ind].theListOfOutDataStreams[streamind].theDataStreamParameter.Parametername << " "
+                   << (*_list_nodes)[ind].theListOfOutDataStreams[streamind].theDataStreamParameter.Parametertype << " "
+                   << (*_list_nodes)[ind].theListOfOutDataStreams[streamind].theDataStreamParameter.Parameterdependency << " "
+                   << (*_list_nodes)[ind].theListOfOutDataStreams[streamind].theNumberOfValues << endl ;
+            streamind += 1 ;
+         }
+          else {
+            cdebug << "GraphBase::Graph::GetNodes " << aCNode->Name() << " " << anOutPort->NodeName() << " " << anOutPort->PortName() << " "
+                   << anOutPort->Kind() << " IsDataStream " << anOutPort->IsDataStream() << endl ;
+         }
+       }
+
         (*_list_nodes)[ind].theService = *aCNode->GetService();
-//        (*_list_nodes)[ind].theListOfParameters = *aCNode->GetListOfParameters() ;
+        cdebug << "GraphBase::Graph::GetNodes theService " << &(*_list_nodes)[ind].theService.ServiceName << endl ;
+        unsigned int i ;
+        for ( i = 0 ; i < (*_list_nodes)[ind].theService.ServiceinParameter.length() ; i++ ) {
+          cdebug << "     In" << i << " " << &(*_list_nodes)[ind].theService.ServiceinParameter[i].Parametername
+                 << " " << (*_list_nodes)[ind].theService.ServiceinParameter[i].Parametername
+                 << " " << &(*_list_nodes)[ind].theService.ServiceinParameter[i].Parametertype
+                 << " " << (*_list_nodes)[ind].theService.ServiceinParameter[i].Parametertype << endl ;
+       }
+        for ( i = 0 ; i < (*_list_nodes)[ind].theService.ServiceoutParameter.length() ; i++ ) {
+          cdebug << "     Out" << i << " " << &(*_list_nodes)[ind].theService.ServiceoutParameter[i].Parametername
+                 << " " << (*_list_nodes)[ind].theService.ServiceoutParameter[i].Parametername
+                 << " " << &(*_list_nodes)[ind].theService.ServiceoutParameter[i].Parametertype
+                 << " " << (*_list_nodes)[ind].theService.ServiceoutParameter[i].Parametertype << endl ;
+       }
+        for ( i = 0 ; i < (*_list_nodes)[ind].theService.ServiceinDataStreamParameter.length() ; i++ ) {
+          cdebug << "     InDataStream" << i << " " << &(*_list_nodes)[ind].theService.ServiceinDataStreamParameter[i].Parametername
+                 << " " << (*_list_nodes)[ind].theService.ServiceinDataStreamParameter[i].Parametername
+                 << " " << &(*_list_nodes)[ind].theService.ServiceinDataStreamParameter[i].Parametertype
+                 << " " << (*_list_nodes)[ind].theService.ServiceinDataStreamParameter[i].Parametertype << endl ;
+       }
+        for ( i = 0 ; i < (*_list_nodes)[ind].theService.ServiceoutDataStreamParameter.length() ; i++ ) {
+          cdebug << "     OutDataStream" << i << " " << &(*_list_nodes)[ind].theService.ServiceoutDataStreamParameter[i].Parametername
+                 << " " << (*_list_nodes)[ind].theService.ServiceoutDataStreamParameter[i].Parametername
+                 << " " << &(*_list_nodes)[ind].theService.ServiceoutDataStreamParameter[i].Parametertype
+                 << " " << (*_list_nodes)[ind].theService.ServiceoutDataStreamParameter[i].Parametertype << endl ;
+       }
         if ( aCNode->IsOneOfInLineNodes() ) {
           GraphBase::InLineNode * aINode = (GraphBase::InLineNode * ) aCNode ;
           GraphBase::LoopNode * aLNode = NULL ;
@@ -242,6 +344,7 @@ GraphBase::ListOfNodes * GraphBase::Graph::GetNodes() const {
       }
     }
   }
+  cdebug_out << "GraphBase::Graph::GetNodes" << endl ;
   return _list_nodes ;
 }
 
@@ -378,24 +481,35 @@ GraphBase::ListOfLinks * GraphBase::Graph::GetDatas() const {
 }
 
 bool GraphBase::Graph::AddNode( GraphBase::ComputingNode * aNode ) {
-  cdebug_in << "GraphBase::Graph::AddNode "  << (void *) aNode << " "
-            << aNode->Name() << " " << aNode->ServiceName() << endl;
+  cdebug_in << "GraphBase::Graph::AddNode "  << (void *) aNode << " " << aNode->Name() << " " << aNode->ServiceName() << endl;
   bool RetVal = false ;
   int index = GetGraphNodeIndex( aNode->Name() ) ;
   if ( index < 0 ) {
+    cdebug << "GraphBase::Graph::AddNode " << _GraphNodesSize << " nodes + 1" << endl ;
     _GraphNodes.resize( _GraphNodesSize+1 ) ;
     _GraphNodes[ _GraphNodesSize ] = aNode ;
     SetGraphNodeIndex( aNode->Name() , _GraphNodesSize ) ;
     _GraphNodesSize += 1 ;
+    if ( SetServiceOfMap( (GraphBase::Service * ) aNode ) ) {
+      cdebug << "Graph::AddNode SetServiceOfMap " << aNode->ServiceName() << " in MapOfServices" << endl ; 
+    }
+    else {
+      cdebug << "Graph::AddNode SetServiceOfMap " << aNode->ServiceName()
+             << " was already in MapOfServices" << endl ; 
+    }
+
     RetVal = true ;
-  }
-//  cout << "GraphBase::Graph::AddNode(" << aNode->ComponentName() << " , "
-//       << aNode->Name() << ")" << endl;
-  int i ;
-  cdebug << "GraphBase::Graph::AddNode Known nodes :" << endl ;
-  for ( i = 0 ; i < _GraphNodesSize ; i++ ) {
-    cdebug << i << ". " << GetGraphNode( i )->Name() << " "
-           << _MapOfGraphNodes[ GetGraphNode( i )->Name() ] - 1 << endl ;
+    int i ;
+    cdebug << "GraphBase::Graph::AddNode " << _GraphNodesSize << " Known nodes :" << endl ;
+    for ( i = 0 ; i < _GraphNodesSize ; i++ ) {
+      const GraphBase::ComputingNode * aKnownNode = GetGraphNode( i ) ;
+      if ( aKnownNode ) {
+        cdebug << i << ". " << aKnownNode->Name() << " " << _MapOfGraphNodes[ GetGraphNode( i )->Name() ] - 1 << endl ;
+      }
+      else {
+        cdebug << i << ". ERROR" << endl ;
+      }
+    }
   }
   cdebug_out << "GraphBase::Graph::AddNode " << _GraphNodesSize << " Nodes. "
              << aNode->ServiceName() << endl;
@@ -442,7 +556,12 @@ bool GraphBase::Graph::ReNameNode( const char* OldNodeName ,
           else {
             GraphBase::ComputingNode * FromNode = GetChangeGraphNode( anOutPort->NodeName() ) ;
             cdebug << " fromConnected " << FromNode->Name() << endl ;
-            FromNode->ReNameLink( OldNodeName , NewNodeName ) ;
+            if ( anInPort->IsDataStream() ) {
+              FromNode->ReNameStreamLink( OldNodeName , NewNodeName ) ;
+           }
+            else {
+              FromNode->ReNameLink( OldNodeName , NewNodeName ) ;
+           }
          }
           char* OldNodePortName = new char[ strlen( OldNodeName ) +
                                             strlen( aNode->GetChangeNodeInPort( i )->PortName() ) + 2 ] ;
@@ -506,7 +625,12 @@ bool GraphBase::Graph::RemoveNode( const char* aNodeName ) {
           else {
             GraphBase::ComputingNode * FromNode = GetChangeGraphNode( anOutPort->NodeName() ) ;
             cdebug << " fromConnected " << FromNode->Name() << endl ;
-            FromNode->RemoveLink( aNode ) ;
+            if ( anInPort->IsDataStream() ) {
+              FromNode->RemoveStreamLink( aNode ) ;
+           }
+            else {
+              FromNode->RemoveLink( aNode ) ;
+           }
          }
           RetVal = anOutPort->RemoveInPort( anInPort ) ;
           if ( !RetVal )
@@ -535,7 +659,12 @@ bool GraphBase::Graph::RemoveNode( const char* aNodeName ) {
           if ( !RetVal )
             break ;
           GraphBase::ComputingNode * ToNode = GetChangeGraphNode( anOutPort->InPorts( j )->NodeName() ) ;
-          aNode->RemoveLink( ToNode ) ;
+          if ( anOutPort->IsDataStream() ) {
+            aNode->RemoveStreamLink( ToNode ) ;
+         }
+          else {
+            aNode->RemoveLink( ToNode ) ;
+         }
           RetVal = anOutPort->RemoveInPort( anOutPort->ChangeInPorts( j ) ) ;
           if ( !RetVal )
             break ;
@@ -653,16 +782,27 @@ bool GraphBase::Graph::AddLink( GraphBase::ComputingNode *fromNode ,
     cdebug << "AddLink toPort not found." << endl ;
     return false ;
   }
+  if ( ( fromPort->IsDataStream() && !toPort->IsDataStream() ) ||
+       ( !fromPort->IsDataStream() && toPort->IsDataStream() ) ) {
+    cdebug << "AddLink fromPort/toPort Stream/Flow. ERROR" << endl ;
+    return false ;
+  }
+  if ( fromPort->IsDataStream() && fromPort->Dependency() == SALOME_ModuleCatalog::DATASTREAM_TEMPORAL &&
+       toPort->Dependency() == SALOME_ModuleCatalog::DATASTREAM_ITERATIVE ) {
+    cdebug << "AddLink fromPort/toPort Stream DATASTREAM_TEMPORAL --> DATASTREAM_ITERATIVE. ERROR" << endl ;
+    return false ;
+  }
 
   cdebug_in << "GraphBase::Graph::AddLink(" << fromNode->Name() << "("
             << fromPort->PortName() << ") ---> " << toNode->Name() << "("
             << toPort->PortName() << ") )" << endl;
-  if ( !fromNode->IsDataFlowNode() && !toNode->IsDataFlowNode() &&
+  if ( !fromNode->IsDataFlowNode() && !fromNode->IsDataStreamNode() &&
+       !toNode->IsDataFlowNode() && !toNode->IsDataStreamNode() &&
        toPort->GetOutPort() ) {
     if ( !strcmp( toPort->GetOutPort()->NodePortName() ,
                   fromPort->NodePortName() ) ) {
       cdebug << "Link already exists" << endl ;
-      cdebug_out << "GraphBase::Graph::AddLink" << endl;
+      cdebug_out << "GraphBase::Graph::AddLink 1" << endl;
       return true ;
     }
     else if ( toPort->IsDataConnected() ) {
@@ -715,7 +855,9 @@ bool GraphBase::Graph::AddLink( GraphBase::ComputingNode *fromNode ,
       cdebug_out << "GraphBase::Graph::AddLink" << endl;
       return false ;
     }
-    toPort->Kind( SUPERV::EndSwitchParameter ) ;
+    if ( !toPort->IsDataStream() ) {
+      toPort->Kind( SUPERV::EndSwitchParameter ) ;
+    }
   }
   else if ( !fromPort->AddInPort( toPort ) ) { // --> MapOfInports in the OutPort
     cdebug << "!fromPort->AddLink Error." << endl ;
@@ -723,7 +865,8 @@ bool GraphBase::Graph::AddLink( GraphBase::ComputingNode *fromNode ,
     return false ;
   }
 
-  if ( fromNode->IsDataFlowNode() && toPort->IsDataConnected() ) {
+  if ( ( fromNode->IsDataFlowNode() || fromNode->IsDataStreamNode() ) &&
+       toPort->IsDataConnected() ) {
     toPort->RemoveOutPort() ;
   }
 
@@ -761,23 +904,33 @@ bool GraphBase::Graph::AddLink( GraphBase::ComputingNode *fromNode ,
     }
     fromPort->PortStatus( PortConnected ); // GOTO - Loop
   }
-  else if ( fromNode->IsDataFlowNode() || toNode->IsDataFlowNode() ) {
+  else if ( fromNode->IsDataFlowNode() || fromNode->IsDataStreamNode() ||
+            toNode->IsDataFlowNode() || toNode->IsDataStreamNode() ) {
     cdebug << "AddLink IsDataFlowNode fromPort->PortStatus( DataConnected ) "
            << fromNode->Name() << " " << fromPort->PortName() << endl ;
     fromPort->PortStatus( DataConnected );
   }
   else {
     cdebug << "AddLink fromPort->PortStatus( PortConnected ) & fromNode->toNode "
-           << fromNode->Name() << " " << fromPort->PortName() << endl;
+           << fromNode->Name() << " " << fromPort->PortName() << " "
+           << fromPort->Kind() << " -> " << toNode->Name() << " " << " "
+           << toPort->PortName() << " " << toPort->Kind() << endl;
     fromPort->PortStatus( PortConnected );
-    fromNode->AddLink( toNode ) ;
+    if ( fromPort->IsDataStream() && toPort->IsDataStream() ) {
+      fromNode->AddStreamLink( toNode ) ;
+    }
+    else {
+      fromNode->AddLink( toNode ) ;
+    }
   }
   if ( fromNode->IsSwitchNode() ) {
-    if ( fromPort->IsInLine() && toPort->IsGate() && !toNode->IsEndSwitchNode() ) {
-      fromPort->Kind( SUPERV::SwitchParameter ) ;
-    }
-    else if ( !fromPort->IsGate() && !toPort->IsGate() ){
-      fromPort->Kind( SUPERV::InLineParameter ) ;
+    if ( !fromPort->IsDataStream() ) {
+      if ( fromPort->IsInLine() && toPort->IsGate() && !toNode->IsEndSwitchNode() ) {
+        fromPort->Kind( SUPERV::SwitchParameter ) ;
+      }
+      else if ( !fromPort->IsGate() && !toPort->IsGate() ){
+        fromPort->Kind( SUPERV::InLineParameter ) ;
+      }
     }
     if ( fromPort->IsGate() && !toNode->IsEndSwitchNode() ) {
       GraphBase::InLineNode * anEndSwitchNode ;
@@ -799,7 +952,7 @@ bool GraphBase::Graph::AddLink( GraphBase::ComputingNode *fromNode ,
     }
   }
 //  cdebug << fromNode->ServiceName() << " " << toNode->ServiceName() << endl ;
-  cdebug_out << "GraphBase::Graph::AddLink" << endl;
+  cdebug_out << "GraphBase::Graph::AddLink 1" << endl;
   return true ;
 }
 
@@ -822,33 +975,16 @@ bool GraphBase::Graph::RemoveLink( const char* FromNodeName ,
       GraphBase::ComputingNode * fromNode = GetChangeGraphNode( FromNodeName ) ;
       if ( RetVal ) {
         if ( fromNode ) {
-          fromNode->RemoveLink( toNode ) ;
+          if ( anInPort->IsDataStream() ) {
+            fromNode->RemoveStreamLink( toNode ) ;
+         }
+          else {
+            fromNode->RemoveLink( toNode ) ;
+         }
         }
         if ( fromNode->IsSwitchNode() && !anOutPort->IsGate() && !toNode->IsEndSwitchNode() ) {
           anOutPort->Kind( SUPERV::InLineParameter ) ;
         }
-#if 0
-        if ( fromNode->IsEndLoopNode() ) {
-          toNode = ((GraphBase::EndOfLoopNode * ) fromNode)->CoupledNode() ;
-          if ( toNode ) {
-            anInPort = toNode->GetChangeInPort( ToServiceParameterName ) ;
-            RetVal = AddLink( fromNode , anOutPort , toNode , anInPort ) ;
-         }
-          else {
-            RetVal = false ;
-         }
-       }
-        if ( toNode->IsLoopNode() ) {
-          fromNode = ((GraphBase::LoopNode * ) toNode)->CoupledNode() ;
-          if ( fromNode ) {
-            anOutPort = fromNode->GetChangeOutPort( FromServiceParameterName ) ;
-            RetVal = AddLink( fromNode , anOutPort , toNode , toNode->GetChangeInPort( ToServiceParameterName ) ) ;
-         }
-          else {
-            RetVal = false ;
-         }
-       }
-#endif
       }
     }
   }
@@ -1157,6 +1293,33 @@ bool GraphBase::Graph::AddOutputData(
   return RetVal ;
 }
 
+map< string , GraphBase::Service * > GraphBase::Graph::MapOfServiceNames() {
+                                           return _MapOfServiceNames ; }
+
+GraphBase::Service * GraphBase::Graph::GetServiceOfMap( char * name ) {
+  return _MapOfServiceNames[ name ] ;
+}
+
+bool GraphBase::Graph::SetServiceOfMap( GraphBase::Service * aService ) {
+  GraphBase::Service * theService = _MapOfServiceNames[ aService->ServiceName() ] ;
+  if ( theService ) {
+    cdebug << "SetServiceOfMap of " << aService->ServiceName()
+           << " already in MapOfServiceNames : erase" << endl ;
+    _MapOfServiceNames.erase( aService->ServiceName() ) ;
+  }
+  _MapOfServiceNames[ (char * ) aService->ServiceName() ] = aService ;
+  cdebug << "SetServiceOfMap of " << aService->ServiceName() << " done" << endl ;
+  return true ;
+}
+
+int GraphBase::Graph::GetServiceNameNumber( SALOME_ModuleCatalog::Service aService ) {
+  GraphBase::Service * theService = _MapOfServiceNames[ (char * ) aService.ServiceName ] ;
+  if ( theService == NULL ) {
+    return 1 ;
+  }
+  return theService->NewInstance() ;
+}
+
 bool GraphBase::Graph::CreateService() {
   cdebug_in << "GraphBase::Graph::CreateService" << endl;
   bool RetVal = true ;
@@ -1165,33 +1328,64 @@ bool GraphBase::Graph::CreateService() {
   GraphBase::ComputingNode * aToNode ;
   int dostore ;
   int innbr ;
+  int instreamnbr ;
   int outnbr ;
-  for ( dostore = 0 ; dostore <= 1 ; dostore++ ) {
+  int outstreamnbr ;
+  vector< SUPERV::KindOfPort > InPortsKind ;
+  vector< SALOME_ModuleCatalog::DataStreamDependency > InDataStreamDependency ;
+  vector< SUPERV::KindOfSchema > InKindOfSchema ;
+  vector< SUPERV::KindOfInterpolation > InKindOfInterpolation ;
+  vector< SUPERV::KindOfExtrapolation > InKindOfExtrapolation ;
+  vector< SUPERV::KindOfPort > OutPortsKind ;
+  vector< SALOME_ModuleCatalog::DataStreamDependency > OutDataStreamDependency ;
+  vector< long > OutNumberOfValues ;
+  for ( dostore = 0 ; dostore <= 2 ; dostore++ ) {
     if ( dostore == 1 ) {
       aService.ServiceName = Name() ;
       aService.ServiceinParameter.length( 0 ) ;
       aService.ServiceinParameter.length( innbr ) ;
       aService.ServiceoutParameter.length( 0 ) ;
       aService.ServiceoutParameter.length( outnbr ) ;
+      InPortsKind.resize( innbr ) ;
+      InDataStreamDependency.resize( innbr ) ;
+      InKindOfSchema.resize( innbr ) ;
+      InKindOfInterpolation.resize( innbr ) ;
+      InKindOfExtrapolation.resize( innbr ) ;
+      OutPortsKind.resize( outnbr ) ;
+      OutDataStreamDependency.resize( outnbr ) ;
+      OutNumberOfValues.resize( outnbr ) ;
+    }
+    else if ( dostore == 2 ) {
+      cdebug << "GraphBase::Graph::CreateService ->DataService innbr " << innbr << " instreamnbr " << instreamnbr << " outnbr " << outnbr
+             << " outstreamnbr " << outstreamnbr << endl ;
+      DataService( _Orb , aService , Graph_prof_debug() , Graph_fdebug() ) ;
+      aService.ServiceinParameter.length( innbr + instreamnbr ) ;
+      aService.ServiceoutParameter.length( outnbr + outstreamnbr ) ;
+      InPortsKind.resize( innbr + instreamnbr ) ;
+      InDataStreamDependency.resize( innbr + instreamnbr ) ;
+      InKindOfSchema.resize( innbr + instreamnbr ) ;
+      InKindOfInterpolation.resize( innbr + instreamnbr ) ;
+      InKindOfExtrapolation.resize( innbr + instreamnbr ) ;
+      OutPortsKind.resize( outnbr + outstreamnbr ) ;
+      OutDataStreamDependency.resize( outnbr + outstreamnbr ) ;
+      OutNumberOfValues.resize( outnbr + outstreamnbr ) ;
+    }
+    if ( dostore == 0 ) {
+      innbr = 0 ;
+      instreamnbr = 0 ;
+      outnbr = 0 ;
+      outstreamnbr = 0 ;
+    }
+    if ( dostore == 1 ) {
+      innbr = 0 ;
+      outnbr = 0 ;
     }
-    innbr = 0 ;
-    outnbr = 0 ;
     for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
       aToNode = GraphNodes( i ) ;
       for ( j = 0 ; j < aToNode->GetNodeInPortsSize() ; j++ ) {
         GraphBase::InPort *anInPort = aToNode->GetChangeNodeInPort(j) ;
-#if 0
-        if ( dostore == 0 &&
-             strcmp( anInPort->ServicesParameterType() , "string" ) &&
-             strcmp( anInPort->ServicesParameterType() , "long" ) &&
-             strcmp( anInPort->ServicesParameterType() , "double" ) &&
-             strcmp( anInPort->ServicesParameterType() , "objref" ) ) {
-          cdebug << "CreateService Node " << aToNode->Name() << ". Input port " << anInPort->PortName()
-                 << " has illegal type " << anInPort->ServicesParameterType() << endl ;
-          RetVal = false ;
-       }
-#endif
         bool isfromcouplednode = false ;
+        cdebug << "GraphBase::Graph::CreateService aToNode " << aToNode->Name() << " InPort" << j << endl ;
         if ( anInPort->IsConnected() && anInPort->GetOutPort() ) {
           GraphBase::ComputingNode * aFromNode = GetChangeGraphNode( anInPort->GetOutPort()->NodeName() ) ;
           if ( aFromNode->IsEndLoopNode() && ((GraphBase::EndOfLoopNode * ) aFromNode)->CoupledNode() == aToNode ) {
@@ -1207,14 +1401,30 @@ bool GraphBase::Graph::CreateService() {
               cdebug << "DataConnected from " <<  *(anInPort->GetOutPort() ) ;
            }
             cdebug << endl ;
-            innbr += 1 ;
+            if ( anInPort->IsDataStream() ) {
+              instreamnbr += 1 ;
+           }
+            else {
+              innbr += 1 ;
+           }
          }
-          else {
+          else if ( ( dostore == 1 && !anInPort->IsDataStream() ) ||
+                    ( dostore == 2 && anInPort->IsDataStream() ) ) {
             aService.ServiceinParameter[innbr].Parametertype = CORBA::string_dup( anInPort->PortType() ) ;
-            aService.ServiceinParameter[innbr++].Parametername = CORBA::string_dup( anInPort->NodePortName() ) ;
+            aService.ServiceinParameter[innbr].Parametername = CORBA::string_dup( anInPort->NodePortName() ) ;
+            InPortsKind[ innbr ] = anInPort->Kind() ;
+            InDataStreamDependency[ innbr ] = anInPort->Dependency() ;
+            if ( dostore == 2 && anInPort->IsDataStream() ) {
+              ((GraphBase::InDataStreamPort * ) anInPort)->Params( InKindOfSchema[ innbr ] ,
+                                                                   InKindOfInterpolation[ innbr ] ,
+                                                                   InKindOfExtrapolation[ innbr ] ) ;
+           }
+            cdebug << "In" << innbr << " " << aService.ServiceinParameter[ innbr ].Parametername << " "
+                   << anInPort->Kind() << endl ;
+            innbr += 1 ;
          }
         }
-        else {
+        else if ( dostore == 0 ) {
           cdebug << "CreateService " << aToNode->Name() << " Input port " << anInPort->PortName() ;
           if ( anInPort->IsConnected() ) {
             cdebug << " is connected " ;
@@ -1237,35 +1447,38 @@ bool GraphBase::Graph::CreateService() {
       GraphBase::ComputingNode * aFromNode = aToNode ;
       for ( j = 0 ; j < aFromNode->GetNodeOutPortsSize() ; j++ ) {
         GraphBase::OutPort *anOutPort = aFromNode->GetChangeNodeOutPort(j) ;
-        cdebug << "CreateService Node " << aFromNode->Name() << ". Output port[" << j << "] ";
-        if ( anOutPort ) {
-          cdebug << anOutPort->PortName() << " " << anOutPort->ServicesParameterType() << endl ;
-       }
-        else {
-          cdebug << " NULL" << endl ;
-       }
-#if 0
-        if ( dostore == 0 &&
-             strcmp( anOutPort->ServicesParameterType() , "string" ) &&
-             strcmp( anOutPort->ServicesParameterType() , "long" ) &&
-             strcmp( anOutPort->ServicesParameterType() , "double" ) &&
-             strcmp( anOutPort->ServicesParameterType() , "objref" ) ) {
-          cdebug << "CreateService Node " << aFromNode->Name() << ". Output port " << anOutPort->PortName()
-                 << " has illegal type " << anOutPort->ServicesParameterType() << endl ;
-          RetVal = false ;
-        }
-#endif
+//        cdebug << "CreateService Node " << aFromNode->Name() << ". Output port[" << j << "] ";
+//        if ( anOutPort ) {
+//          cdebug << anOutPort->PortName() << " " << anOutPort->ServicesParameterType() << endl ;
+//     }
+//        else {
+//          cdebug << " NULL" << endl ;
+//     }
         if ( !aFromNode->IsGOTONode() ) {
           if ( !anOutPort->IsGate() && 
                ( anOutPort->IsNotConnected() || anOutPort->IsDataConnected() ) ) {
             if ( dostore == 0 ) {
-              cdebug << "CreateService " << aFromNode->Name() << " Output port "
-                     << anOutPort->PortName() << endl ;
-              outnbr += 1 ;
+//              cdebug << "CreateService " << aFromNode->Name() << " Output port "
+//                     << anOutPort->PortName() << endl ;
+              if ( anOutPort->IsDataStream() ) {
+                outstreamnbr += 1 ;
+             }
+              else {
+                outnbr += 1 ;
+             }
            }
-            else {
+            else if ( ( dostore == 1 && !anOutPort->IsDataStream() ) ||
+                      ( dostore == 2 && anOutPort->IsDataStream() ) ) {
               aService.ServiceoutParameter[outnbr].Parametertype = CORBA::string_dup( anOutPort->PortType() ) ;
-              aService.ServiceoutParameter[outnbr++].Parametername = CORBA::string_dup( anOutPort->NodePortName() ) ;
+              aService.ServiceoutParameter[outnbr].Parametername = CORBA::string_dup( anOutPort->NodePortName() ) ;
+              OutPortsKind[ outnbr ] = anOutPort->Kind() ;
+              OutDataStreamDependency[ outnbr ] = anOutPort->Dependency() ;
+              if ( dostore == 2 && anOutPort->IsDataStream() ) {
+                OutNumberOfValues[ outnbr ] = ((GraphBase::OutDataStreamPort * ) anOutPort)->NumberOfValues() ;
+             }
+              cdebug << "Out" << outnbr << " " << aService.ServiceoutParameter[ outnbr ].Parametername << " "
+                     << anOutPort->Kind() << endl ;
+              outnbr += 1 ;
            }
          }
         }
@@ -1273,25 +1486,102 @@ bool GraphBase::Graph::CreateService() {
     }
   }
 
-//  MESSAGE( "DataFlowNode ServiceName " << aService.ServiceName );
-//  for ( i = 0 ; i < innbr ; i++ ) {
-//    cout << "aService.ServiceinParameter[" << i << "].Parametertype "
-//         << aService.ServiceinParameter[i].Parametertype << endl ;
-//    cout << "aService.ServiceinParameter[" << i << "].Parametername "
-//         << aService.ServiceinParameter[i].Parametername << endl ;
-//  }
-//  for ( i = 0 ; i < outnbr ; i++ ) {
-//    cout << "aService.ServiceoutParameter[" << i << "].Parametertype "
-//         << aService.ServiceoutParameter[i].Parametertype << endl ;
-//    cout << "aService.ServiceoutParameter[" << i << "].Parametername "
-//         << aService.ServiceoutParameter[i].Parametername << endl ;
-//  }
-
-  DataService( _Orb , aService , Graph_prof_debug() , Graph_fdebug() ) ;
-
+  MESSAGE( "DataFlowNode ServiceName " << aService.ServiceName );
+  for ( i = 0 ; i < innbr ; i++ ) {
+    cdebug << "aService.ServiceinParameter[" << i << "].Parametertype "
+         << aService.ServiceinParameter[i].Parametertype << " Parametername "
+         << aService.ServiceinParameter[i].Parametername << " " << InPortsKind[ i ] << endl ;
+    if ( InPortsKind[ i ] != SUPERV::DataStreamParameter ) {
+      cdebug << "NodeInPort[" << i << "] " << *GetChangeNodeInPort( i ) << endl ;
+    }
+  }
+  for ( i = 0 ; i < outnbr ; i++ ) {
+    cdebug << "aService.ServiceoutParameter[" << i << "].Parametertype "
+         << aService.ServiceoutParameter[i].Parametertype << " Parametername "
+         << aService.ServiceoutParameter[i].Parametername << " " << OutPortsKind[ i ] << endl ;
+    if ( OutPortsKind[ i ] != SUPERV::DataStreamParameter ) {
+      cdebug << "NodeOutPort[" << i << "] " << *GetChangeNodeOutPort( i ) << endl ;
+    }
+  }
+
+//  DataService( _Orb , aService , InPortsKind , OutPortsKind , Graph_prof_debug() , Graph_fdebug() ) ;
+  for ( i = 0 ; i < innbr ; i++ ) {
+    if ( InPortsKind[ i ] == SUPERV::DataStreamParameter ) {
+      GraphBase::InDataStreamPort * anInPort = AddInDataStreamPort( aService.ServiceinParameter[ i ].Parametername ,
+                                                                    StringToDataStreamType( aService.ServiceinParameter[ i ].Parametertype ) ,
+                                                                    InDataStreamDependency[ i ] ,
+                                                                    SUPERV::DataStreamParameter ) ;
+      anInPort->SetParams( InKindOfSchema[ i ] ,
+                           InKindOfInterpolation[ i ] ,
+                           InKindOfExtrapolation[ i ] ) ;
+// NOT A BUG : AddOutPort for an inport (Reversed service)
+      anInPort = (GraphBase::InDataStreamPort * ) _DataFlowDataPorts->AddOutPort( _Orb , NamePtr() ,
+                                                                                  Kind() ,
+                                                                                  aService.ServiceinParameter[ i ].Parametername ,
+                                                                                  aService.ServiceinParameter[ i ].Parametertype ,
+                                                                                  SUPERV::DataStreamParameter ,
+//                                                                                  _DataFlowDataPorts->DataStreamOutPortsNumber() ,
+                                                                                  _Graph_prof_debug , _Graph_fdebug ) ;
+      anInPort->Dependency( InDataStreamDependency[ i ] ) ;
+// Attention : revoir les reversed DataStreamPorts
+//      anInPort->SetParams( InKindOfSchema[ i ] ,
+//                           InKindOfInterpolation[ i ] ,
+//                           InKindOfExtrapolation[ i ] ) ;
+      cdebug << "InStreamPort " << GetChangeNodeInPort( i )->PortName() << " " << GetChangeNodeInPort( i )->Kind() << endl ;
+      cdebug << "ReversedInStreamPort " << _DataFlowDataPorts->GetChangeNodeOutPort( i )->PortName() << " " << _DataFlowDataPorts->GetChangeNodeOutPort( i )->Kind()
+             << endl ;
+    }
+    else {
+      GetChangeNodeInPort( i )->Kind( InPortsKind[ i ] ) ;
+      _DataFlowDataPorts->GetChangeNodeOutPort( i )->Kind( InPortsKind[ i ] ) ;
+      GetChangeNodeInPort( i )->Dependency( InDataStreamDependency[ i ] ) ;
+      _DataFlowDataPorts->GetChangeNodeOutPort( i )->Dependency( InDataStreamDependency[ i ] ) ;
+      cdebug << "InPort " << GetChangeNodeInPort( i )->PortName() << " " << GetChangeNodeInPort( i )->Kind() << endl ;
+      cdebug << "ReversedInPort " << _DataFlowDataPorts->GetChangeNodeOutPort( i )->PortName() << " " << _DataFlowDataPorts->GetChangeNodeOutPort( i )->Kind()
+             << endl ;
+    }
+  }
+  for ( i = 0 ; i < outnbr ; i++ ) {
+    if ( OutPortsKind[ i ] == SUPERV::DataStreamParameter ) {
+      GraphBase::OutDataStreamPort * anOutPort = AddOutDataStreamPort( aService.ServiceoutParameter[ i ].Parametername ,
+                                                                       StringToDataStreamType( aService.ServiceoutParameter[ i ].Parametertype ) ,
+                                                                       OutDataStreamDependency[ i ] ,
+                                                                       SUPERV::DataStreamParameter ) ;
+      anOutPort->NumberOfValues( OutNumberOfValues[ i ] ) ;
+// NOT A BUG : AddInPort for an outport (Reversed service)
+      anOutPort = (GraphBase::OutDataStreamPort * ) _DataFlowDataPorts->AddInPort( _Orb , NamePtr() ,
+                                                                                   Kind() ,
+                                                                                   aService.ServiceoutParameter[ i ].Parametername ,
+                                                                                   aService.ServiceoutParameter[ i ].Parametertype ,
+                                                                                   SUPERV::DataStreamParameter ,
+//                                                                                   _DataFlowDataPorts->DataStreamInPortsNumber() ,
+                                                                                   _Graph_prof_debug , _Graph_fdebug ) ;
+      anOutPort->Dependency( OutDataStreamDependency[ i ] ) ;
+// Attention : revoir les reversed DataStreamPorts
+//      anOutPort->NumberOfValues( OutNumberOfValues[ i ] ) ;
+      cdebug << "OutStreamPort " << GetChangeNodeOutPort( i )->PortName() << " " << GetChangeNodeOutPort( i )->Kind() << endl ;
+      cdebug << "ReversedOutStreamPort " << _DataFlowDataPorts->GetChangeNodeInPort( i )->PortName() << " " << _DataFlowDataPorts->GetChangeNodeInPort( i )->Kind()
+             << endl ;
+    }
+    else {
+      GetChangeNodeOutPort( i )->Kind( OutPortsKind[ i ] ) ;
+      _DataFlowDataPorts->GetChangeNodeInPort( i )->Kind( OutPortsKind[ i ] ) ;
+      GetChangeNodeOutPort( i )->Dependency( OutDataStreamDependency[ i ] ) ;
+      _DataFlowDataPorts->GetChangeNodeInPort( i )->Dependency( OutDataStreamDependency[ i ] ) ;
+      GetChangeNodeOutPort( i )->Dependency( OutDataStreamDependency[ i ] ) ;
+      _DataFlowDataPorts->GetChangeNodeInPort( i )->Dependency( OutDataStreamDependency[ i ] ) ;
+      cdebug << "OutPort " << GetChangeNodeOutPort( i )->PortName() << " " << GetChangeNodeOutPort( i )->Kind() << endl ;
+      cdebug << "ReversedOutPort " << _DataFlowDataPorts->GetChangeNodeInPort( i )->PortName() << " " << _DataFlowDataPorts->GetChangeNodeInPort( i )->Kind()
+             << endl ;
+    }
+  }
 // Restore input datas :
+  DataStreamInPortsNumber( 0 ) ;
+  DataStreamOutPortsNumber( 0 ) ;
   for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
     aToNode = GraphNodes( i ) ;
+    DataStreamInPortsNumber( DataStreamInPortsNumber() + aToNode->DataStreamInPortsNumber() ) ;
+    DataStreamOutPortsNumber( DataStreamOutPortsNumber() + aToNode->DataStreamOutPortsNumber() ) ;
     for ( j = 0 ; j < aToNode->GetNodeInPortsSize() ; j++ ) {
       GraphBase::InPort *anInPort = aToNode->GetChangeNodeInPort(j) ;
       if ( anInPort->IsDataConnected() ) {
@@ -1310,62 +1600,99 @@ bool GraphBase::Graph::InLineServices() {
   cdebug_in << "GraphBase::Graph::InLineServices" << endl;
 
   int i , j ;
+  ListPorts( *_Graph_fdebug , 0 ) ;
   GraphBase::InLineNode * aINode ;
   SALOME_ModuleCatalog::Service aService ;
   for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
     aINode = (GraphBase::InLineNode * ) GraphNodes( i ) ;
+//    if ( aINode->IsOneOfInLineNodes() || aINode->HasDataStream() ) {
     if ( aINode->IsOneOfInLineNodes() ) {
       cdebug << "GraphBase::Graph::InLineServices " << aINode->Name() << endl;
       aService.ServiceName = aINode->ServiceName() ;
       aService.ServiceinParameter.length( 0 ) ;
       aService.ServiceoutParameter.length( 0 ) ;
+      aINode->DataStreamInPortsNumber( 0 ) ;
+      aINode->DataStreamOutPortsNumber( 0 ) ;
       int InService = 0 ;
+      int InStreamService = 0 ;
       for ( j = 0 ; j < aINode->GetNodeInPortsSize() ; j++ ) {
-        if ( aINode->GetChangeNodeInPort(j)->IsGate() ||
-             aINode->GetChangeNodeInPort(j)->IsLoop() ) {
-//          cdebug << "GraphBase::Graph::InLineServices In" << j << " "
-//                 << aINode->GetChangeNodeInPort(j)->Kind() << " " 
-//                 << aINode->GetChangeNodeInPort(j)->PortType() << " " 
-//                 << aINode->GetChangeNodeInPort(j)->PortName() << " ignored "
-//                 << aINode->GetChangeNodeInPort(j)->IsGate() << " "
-//                 << aINode->GetChangeNodeInPort(j)->IsLoop() << endl;
+//        if ( aINode->GetChangeNodeInPort(j)->IsGate() || aINode->GetChangeNodeInPort(j)->IsLoop() || aINode->GetChangeNodeInPort(j)->IsDataStream() ) {
+        if ( aINode->GetChangeNodeInPort(j)->IsGate() || aINode->GetChangeNodeInPort(j)->IsLoop() ) {
+          cdebug << "GraphBase::Graph::InLineServices In" << j << " "
+                 << aINode->GetChangeNodeInPort(j)->Kind() << " " 
+                 << aINode->GetChangeNodeInPort(j)->PortType() << " " 
+                 << aINode->GetChangeNodeInPort(j)->PortName() << " ignored "
+                 << aINode->GetChangeNodeInPort(j)->IsGate() << " "
+                 << aINode->GetChangeNodeInPort(j)->IsLoop() << endl;
+       }
+        else if ( aINode->GetChangeNodeInPort(j)->IsDataStream() ) {
+          aService.ServiceinDataStreamParameter.length( InStreamService+1 ) ;
+          aService.ServiceinDataStreamParameter[InStreamService].Parametertype = StringToDataStreamType( aINode->GetChangeNodeInPort(j)->PortType() ) ;
+          aService.ServiceinDataStreamParameter[InStreamService].Parametername = CORBA::string_dup( aINode->GetChangeNodeInPort(j)->PortName() ) ;
+          aService.ServiceinDataStreamParameter[InStreamService++].Parameterdependency = aINode->GetChangeNodeInPort(j)->Dependency() ;
+          aINode->IncrDataStreamInPorts() ;
+          cdebug << "GraphBase::Graph::InLineServices In" << j << " "
+                 << aINode->GetChangeNodeInPort(j)->Kind() << " " 
+                 << aINode->GetChangeNodeInPort(j)->PortType() << " " 
+                 << aINode->GetChangeNodeInPort(j)->PortName() << " "
+                 << aINode->GetChangeNodeInPort(j)->IsGate() << " "
+                 << aINode->GetChangeNodeInPort(j)->IsLoop() << endl;
        }
         else {
           aService.ServiceinParameter.length( InService+1 ) ;
           aService.ServiceinParameter[InService].Parametertype = CORBA::string_dup( aINode->GetChangeNodeInPort(j)->PortType() ) ;
           aService.ServiceinParameter[InService++].Parametername = CORBA::string_dup( aINode->GetChangeNodeInPort(j)->PortName() ) ;
-//          cdebug << "GraphBase::Graph::InLineServices In" << j << " "
-//                 << aINode->GetChangeNodeInPort(j)->Kind() << " " 
-//                 << aINode->GetChangeNodeInPort(j)->PortType() << " " 
-//                 << aINode->GetChangeNodeInPort(j)->PortName() << " "
-//                 << aINode->GetChangeNodeInPort(j)->IsGate() << " "
-//                 << aINode->GetChangeNodeInPort(j)->IsLoop() << endl;
+          cdebug << "GraphBase::Graph::InLineServices In" << j << " "
+                 << aINode->GetChangeNodeInPort(j)->Kind() << " " 
+                 << aINode->GetChangeNodeInPort(j)->PortType() << " " 
+                 << aINode->GetChangeNodeInPort(j)->PortName() << " "
+                 << aINode->GetChangeNodeInPort(j)->IsGate() << " "
+                 << aINode->GetChangeNodeInPort(j)->IsLoop() << endl;
        }
       }
       int OutService = 0 ;
+      int OutStreamService = 0 ;
       for ( j = 0 ; j < aINode->GetNodeOutPortsSize() ; j++ ) {
-        if ( aINode->GetChangeNodeOutPort(j)->IsGate() ||
-             aINode->GetChangeNodeOutPort(j)->IsLoop() ) {
-//          cdebug << "GraphBase::Graph::InLineServices Out" << j << " "
-//                 << aINode->GetChangeNodeOutPort(j)->Kind() << " " 
-//                 << aINode->GetChangeNodeOutPort(j)->PortType() << " " 
-//                 << aINode->GetChangeNodeOutPort(j)->PortName() << " ignored "
-//                 << aINode->GetChangeNodeOutPort(j)->IsGate() << " "
-//                 << aINode->GetChangeNodeOutPort(j)->IsLoop() << endl;
+//        if ( aINode->GetChangeNodeOutPort(j)->IsGate() || aINode->GetChangeNodeOutPort(j)->IsLoop() || aINode->GetChangeNodeOutPort(j)->IsDataStream() ) {
+        if ( aINode->GetChangeNodeOutPort(j)->IsGate() || aINode->GetChangeNodeOutPort(j)->IsLoop() ) {
+          cdebug << "GraphBase::Graph::InLineServices Out" << j << " "
+                 << aINode->GetChangeNodeOutPort(j)->Kind() << " " 
+                 << aINode->GetChangeNodeOutPort(j)->PortType() << " " 
+                 << aINode->GetChangeNodeOutPort(j)->PortName() << " ignored "
+                 << aINode->GetChangeNodeOutPort(j)->IsGate() << " "
+                 << aINode->GetChangeNodeOutPort(j)->IsLoop() << endl;
+       }
+        else if ( aINode->GetChangeNodeOutPort(j)->IsDataStream() ) {
+          aService.ServiceoutDataStreamParameter.length( OutStreamService+1 ) ;
+          aService.ServiceoutDataStreamParameter[OutStreamService].Parametertype = StringToDataStreamType( aINode->GetChangeNodeOutPort(j)->PortType() ) ;
+          aService.ServiceoutDataStreamParameter[OutStreamService].Parametername = CORBA::string_dup( aINode->GetChangeNodeOutPort(j)->PortName() ) ;
+          aService.ServiceoutDataStreamParameter[OutStreamService++].Parameterdependency = aINode->GetChangeNodeOutPort(j)->Dependency() ;
+          aINode->IncrDataStreamOutPorts() ;
+          cdebug << "GraphBase::Graph::InLineServices Out" << j << " "
+                 << aINode->GetChangeNodeOutPort(j)->Kind() << " " 
+                 << aINode->GetChangeNodeOutPort(j)->PortType() << " " 
+                 << aINode->GetChangeNodeOutPort(j)->PortName() << " "
+                 << aINode->GetChangeNodeOutPort(j)->IsGate() << " "
+                 << aINode->GetChangeNodeOutPort(j)->IsLoop() << endl;
        }
         else {
           aService.ServiceoutParameter.length( OutService+1 ) ;
           aService.ServiceoutParameter[OutService].Parametertype = CORBA::string_dup( aINode->GetChangeNodeOutPort(j)->PortType() ) ;
           aService.ServiceoutParameter[OutService++].Parametername = CORBA::string_dup( aINode->GetChangeNodeOutPort(j)->PortName() ) ;
-//          cdebug << "GraphBase::Graph::InLineServices Out" << j << " "
-//                 << aINode->GetChangeNodeOutPort(j)->Kind() << " " 
-//                 << aINode->GetChangeNodeOutPort(j)->PortType() << " " 
-//                 << aINode->GetChangeNodeOutPort(j)->PortName()  << " "
-//                 << aINode->GetChangeNodeOutPort(j)->IsGate() << " "
-//                 << aINode->GetChangeNodeOutPort(j)->IsLoop() << endl;
+          cdebug << "GraphBase::Graph::InLineServices Out" << j << " "
+                 << aINode->GetChangeNodeOutPort(j)->Kind() << " " 
+                 << aINode->GetChangeNodeOutPort(j)->PortType() << " " 
+                 << aINode->GetChangeNodeOutPort(j)->PortName()  << " "
+                 << aINode->GetChangeNodeOutPort(j)->IsGate() << " "
+                 << aINode->GetChangeNodeOutPort(j)->IsLoop() << endl;
        }
       }
       aINode->SetService( aService ) ;
+      if ( SetServiceOfMap( (GraphBase::Service * ) aINode ) ) {
+        cdebug << "InLineServices SetServiceOfMap " << aINode->ServiceName() << " in MapOfServices"
+               << " InStreamPort(" << aINode->DataStreamInPortsNumber() 
+               << ") OutStreamPort(" << aINode->DataStreamOutPortsNumber() << ")" << endl ; 
+      }
 //      cdebug << "GraphBase::Graph::InLineServices" << *aINode->GetService() << endl;
     }
   }
@@ -1374,27 +1701,45 @@ bool GraphBase::Graph::InLineServices() {
   return true ;
 }
 
-bool GraphBase::Graph::Sort() {
+bool GraphBase::Graph::Sort( int & SubStreamGraphsNumber ) {
   int i ;
   int j ;
   int NotSortedNumber = GraphNodesSize() ;
   bool NewSorted ;
+  cdebug_in << "GraphBase::Graph::Sort" << endl;
   if ( NotSortedNumber ) {
     _LevelsNumber = 0 ;
     _ParallelExecutionNodes = false ;
     _Sorted.resize( GraphNodesSize() ) ;
     _CnxInPortsNumber.resize( GraphNodesSize() ) ;
     _DecrInPortsNumber.resize( GraphNodesSize() ) ;
-    if ( _NodesNumber.size() )
+    if ( _NodesNumber.size() ) {
       _NodesNumber.resize( 0 ) ;
       _SortedNodes.resize( 0 ) ;
+    }
           
+// This is a simulation of the computation of the graph :
+// The initial state of nodes is :
+// - Sorted = false : the node is not sorted
+// - CnxInPortsNumber = ConnectedInPortsNumber : the number of ports that wait for a value from a link
+// - DecrInPortsNumber = 0 : there is no value available.
+    cdebug << "GraphBase::Graph::Sort initial values :" << endl ;
+    for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
+      GraphBase::ComputingNode * aNode = GraphNodes( i ) ;
+      cdebug << aNode->Name() << " --> " << aNode->LinkedNodesSize() << " LinkedNodes :" << endl ;
+      for ( j = 0 ; j < aNode->LinkedNodesSize()  ; j++ ) {
+        cdebug << "              " << aNode->LinkedNodes( j )->Name() << endl ;
+      }
+    }
     for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
       _Sorted[ i ] = false ;
       _CnxInPortsNumber[ i ] = GraphNodes( i )->ConnectedInPortsNumber() ;
       _DecrInPortsNumber[ i ] = 0 ;
+      cdebug << "Sort Node [" << i << "] " << GraphNodes( i )->Name() << " initial count " << _CnxInPortsNumber[ i ] << endl ;
     }
     
+// Nodes are linked ONLY if Ports are NOT DataStream for topological sort of node
+// ==============================================================================
     while ( NotSortedNumber ) {
       NewSorted = false ;
       
@@ -1403,27 +1748,33 @@ bool GraphBase::Graph::Sort() {
                << GraphNodes( i )->Name() << " count "
                << _CnxInPortsNumber[ i ] << endl ;
         if ( !_Sorted[ i ] && _CnxInPortsNumber[ i ] == 0 ) {
-// All inputs of GraphNodes( i ) are available
+// All inputs of GraphNodes( i ) are available : "AllDataReady"
          if ( (int ) _NodesNumber.size() != _LevelsNumber+1 ) {
             _NodesNumber.resize( _LevelsNumber+1 ) ;
             _SortedNodes.resize( _LevelsNumber+1 ) ;
             _NodesNumber[ _LevelsNumber ] = -1 ;
          }
+// There is one more node at that level
          _NodesNumber[ _LevelsNumber ]++ ;
           (_SortedNodes[ _LevelsNumber ]).resize( _NodesNumber[ _LevelsNumber ]+1 ) ;
           (_SortedNodes[ _LevelsNumber ])[ _NodesNumber[ _LevelsNumber ] ] = GraphNodes( i ) ;
           _Sorted[ i ] = true ;
           NewSorted = true ;
+          NotSortedNumber -= 1 ;
           cdebug << GraphNodes( i )->Name() << " belongs to level "
                  << _LevelsNumber << "." << endl ;
+// GraphNodes( i ) has the state "AllDataReady". We simulate the end of its execution :
+// So we loop over all nodes that have a link from that node
+// And we increment the number of input ports of GraphNodes( i )->LinkedNodes( j ) that this
+// execution will give a value in DecrInPortsNumber : "SomeDataReady"
          for ( j = 0 ; j < GraphNodes( i )->LinkedNodesSize() ; j++ ) {
-// Outputs of GraphNodes( i ) will satisfy 
+// OutputPorts of GraphNodes( i ) will satisfy 
 //   GraphNodes( i )->LinkedInPortsNumber( j ) InPorts of
 //      GraphNodes( i )->LinkedNodes( j )
-           GraphBase::ComputingNode * aLinkedNode = GraphNodes( i )->LinkedNodes( j ) ;
+           GraphBase::StreamNode * aLinkedNode = GraphNodes( i )->LinkedNodes( j ) ;
             int aLinkedInPortsNumber = GraphNodes( i )->LinkedInPortsNumber( j ) ;
             cdebug << j << ". LinkedNode " << aLinkedNode->Name() ;
-            if ( !aLinkedNode->IsDataFlowNode() ) {
+            if ( !aLinkedNode->IsDataFlowNode() && !aLinkedNode->IsDataStreamNode() ) {
               cdebug << " _DecrInPortsNumber[ "
                      << GetGraphNodeIndex( aLinkedNode->Name() )
                      << " ] = "
@@ -1436,14 +1787,16 @@ bool GraphBase::Graph::Sort() {
          }
         }
       }
+// If no node was found, that FlowGraph is not valid : if we try to execute it, that FlowGraph
+// will wait for data(s) from node(s) not executed or not executing for ever
       if ( !NewSorted ) {
         cdebug << "Loop detected level " << _LevelsNumber << endl ;
        return false ; // Loop in the Graph
       }
       cdebug << "Bilan level " << _LevelsNumber << " : " << endl ;
       bool ChangeCount = false ;
+// We update now the number of InPorts with a link that are waiting for a value
       for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-//        if ( GraphNodes( i )->DecrIncrDecrConnectedInPortsNumber() ) {
         if ( _DecrInPortsNumber[ i ] ) {
           int prevcount = _CnxInPortsNumber[ i ] ;
           _CnxInPortsNumber[ i ] -= _DecrInPortsNumber[ i ]  ;
@@ -1453,15 +1806,21 @@ bool GraphBase::Graph::Sort() {
                  << " --> new count " << _CnxInPortsNumber[ i ] << endl ;
         }
       }
-      
-      if ( !ChangeCount )
-        break ;
-      _LevelsNumber += 1 ;
+// If there is no loop and if the number of InPorts with a link that are waiting for a value
+// does not change, the sort is finished. But there is also NotSortedNumber ...
+//      if ( !ChangeCount )
+//        break ;
+      if ( NotSortedNumber ) {
+        _LevelsNumber += 1 ;
+      }
     }
     _ThreadsMax = 0 ;
     int AllSortedNodes = 0 ;
     _HeadNodes = _SortedNodes[ 0 ] ;
     _HeadNodesSize = _SortedNodes[ 0 ].size() ;
+// QueueNodes was used in the past in order to know if the execution of a graph is finished
+// But because of loop nodes that was changed. So that part of code is a "clutter"
+// Now a graph has finished its execution when the number of executing threads is zero
     _QueueNodes = _SortedNodes[ _LevelsNumber ] ;
     _QueueNodesSize = _SortedNodes[ _LevelsNumber ].size() ;
     for ( i = 0 ; i < _QueueNodesSize ; i++ ) {
@@ -1473,10 +1832,12 @@ bool GraphBase::Graph::Sort() {
       _QueueNodes = _SortedNodes[ _LevelsNumber - 1 ] ;
       _QueueNodesSize = _SortedNodes[ _LevelsNumber - 1 ].size() ;
     }
+// Computation of the maximum number of threads == the maximum number of nodes of all levels
     for ( i = 0 ; i <= _LevelsNumber ; i++ ) {
       AllSortedNodes += _NodesNumber[ i ]+1 ;
-      if ( _NodesNumber[ i ] + 1 > _ThreadsMax )
+      if ( _NodesNumber[ i ] + 1 > _ThreadsMax ) {
         _ThreadsMax = _NodesNumber[ i ] + 1 ;
+      }
       cdebug << _NodesNumber[ i ]+1 << " Nodes of level " << i << " : "
              << (_SortedNodes[ i ])[ 0 ]->Name() << endl ;
       for ( j = 1 ; j <= _NodesNumber[ i ] ; j++ ) {
@@ -1500,24 +1861,45 @@ bool GraphBase::Graph::Sort() {
       (_SortedNodes[ 0 ])[ i ]->HeadNode( true ) ;
     }
 
-    for ( i = 0 ; i <= _NodesNumber[ 0 ] ; i++ ) {
-      (_SortedNodes[ 0 ])[ i ]->Level( 0 ) ;
-      (_SortedNodes[ 0 ])[ i ]->SubGraph( i + 1 ) ;
+// Give a subgraph/substreamgraph number > 0 to HeadNodes (level 0)
+// There is no substreamgraph for nodes without StreamPorts
+    for ( j = 0 ; j <= _NodesNumber[ 0 ] ; j++ ) {
+      (_SortedNodes[ 0 ])[ j ]->Level( 0 ) ;
+      (_SortedNodes[ 0 ])[ j ]->SortedIndex( j ) ;
+      (_SortedNodes[ 0 ])[ j ]->SubGraph( j + 1 ) ;
+      if ( (_SortedNodes[ 0 ])[ j ]->HasDataStream() ) {
+        (_SortedNodes[ 0 ])[ j ]->SubStreamGraph( j + 1 ) ;
+      }
+      else {
+        (_SortedNodes[ 0 ])[ j ]->SubStreamGraph( -1 ) ;
+      }
     }
 
+// Give a subgraph/substreamgraph number = 0 to all other nodes :
+// the SubGraph of that nodes is unknown
+// There is no substreamgraph for nodes without StreamPorts
     for ( i = 1 ; i <= _LevelsNumber ; i++ ) {
       for ( j = 0 ; j <= _NodesNumber[ i ] ; j++ ) {
         (_SortedNodes[ i ])[ j ]->Level( i ) ;
+        (_SortedNodes[ i ])[ j ]->SortedIndex( j ) ;
         (_SortedNodes[ i ])[ j ]->SubGraph( 0 ) ;
+        if ( (_SortedNodes[ i ])[ j ]->HasDataStream() ) {
+          (_SortedNodes[ i ])[ j ]->SubStreamGraph( 0 ) ;
+       }
+        else {
+          (_SortedNodes[ i ])[ j ]->SubStreamGraph( -1 ) ;
+       }
       }
     }
 
+// Computation of independent SubGraphs which have NO link between them
+    cdebug << endl << "Computation of SubGraphs" << endl ;
     bool Graphs = true ;
     while ( Graphs ) {
       for ( i = 0 ; i <= _LevelsNumber ; i++ ) {
         for ( j = 0 ; j <= _NodesNumber[ i ] ; j++ ) {
           GraphBase::ComputingNode * aNode = (_SortedNodes[ i ])[ j ] ;
-         cdebug << "Graph " << aNode->SubGraph() << " " << aNode->Name()
+         cdebug << "SubGraph " << aNode->SubGraph() << " " << aNode->Name()
                  << endl ;
           int k ;
           for ( k = 0 ; k < aNode->LinkedNodesSize() ; k++ ) {
@@ -1526,9 +1908,9 @@ bool GraphBase::Graph::Sort() {
                    aNode->LinkedNodes( k )->Level() == aNode->Level()+1 ) {
                aNode->SubGraph( aNode->LinkedNodes( k )->SubGraph() ) ;
                cdebug << "   Linked " << aNode->LinkedNodes( k )->Name()
-                       << " Graph(" << aNode->LinkedNodes( k )->SubGraph()
+                       << " SubGraph(" << aNode->LinkedNodes( k )->SubGraph()
                        << ") ==>" << endl ;
-                cdebug << "   Graph " << aNode->SubGraph() << " for "
+                cdebug << "   SubGraph " << aNode->SubGraph() << " for "
                        << aNode->Name() << " ==> again" << endl ;
                 int l ;
                 for ( l = 0 ; l < aNode->LinkedNodesSize() ; l++ ) {
@@ -1539,7 +1921,7 @@ bool GraphBase::Graph::Sort() {
              }
               else {
                 cdebug << "   Linked " << aNode->LinkedNodes( k )->Name()
-                       << " Graph(" << aNode->LinkedNodes( k )->SubGraph()
+                       << " SubGraph(" << aNode->LinkedNodes( k )->SubGraph()
                        << ") distance > 1 ignored" << endl ;
              }
            }
@@ -1555,24 +1937,25 @@ bool GraphBase::Graph::Sort() {
           break ;
       }
       if ( Graphs ) {
-        cdebug << endl << "Graphs result : " << endl ;
+        cdebug << endl << "SubGraphs result : " << endl ;
         break ;
       }
       cdebug << endl << "One more time" << endl ;
       Graphs = true ;
     }
-    _GraphsNumber = 0 ;
+// Make a sequential renumbering of SubGraphs :
+    _SubGraphsNumber = 0 ;
     int CurrGraphsNumber = 0;
     int k ;
     for ( k = 0 ; k <= _NodesNumber[ 0 ] ; k++ ) {
       if ( (_SortedNodes[ 0 ])[ k ]->SubGraph() > CurrGraphsNumber ) {
         CurrGraphsNumber = (_SortedNodes[ 0 ])[ k ]->SubGraph() ;
-        _GraphsNumber += 1 ;
+        _SubGraphsNumber += 1 ;
         for ( i = 0 ; i <= _LevelsNumber ; i++ ) {
           for ( j = 0 ; j <= _NodesNumber[ i ] ; j++ ) {
             if ( (_SortedNodes[ i ])[ j ]->SubGraph() == CurrGraphsNumber ) {
-              (_SortedNodes[ i ])[ j ]->SubGraph( _GraphsNumber ) ;
-              cdebug << "GraphsNumber " << _GraphsNumber << " " << " Level "
+              (_SortedNodes[ i ])[ j ]->SubGraph( _SubGraphsNumber ) ;
+              cdebug << "SubGraphsNumber " << _SubGraphsNumber << " " << " Level "
                      << i << " : " << (_SortedNodes[ i ])[ j ]->Name()
                      << endl ;
            }
@@ -1580,8 +1963,118 @@ bool GraphBase::Graph::Sort() {
        }
       }
     }
+
+    cdebug << endl << "Computation of SubStreamGraphs" << endl ;
+    for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
+      GraphBase::ComputingNode * aNode = GraphNodes( i ) ;
+      if ( aNode->SubStreamGraph() < 0 ) {
+       cdebug << "Graph " << aNode->SubStreamGraph() << " " << aNode->Name()
+               << " has NO streamport" << endl ;
+      }
+      else {
+        cdebug << aNode->Name() << " SubGraph " << aNode->SubGraph() << " --> "
+               << aNode->LinkedStreamNodesSize() << " LinkedStreamNodes :" << endl ;
+        for ( j = 0 ; j < aNode->LinkedStreamNodesSize()  ; j++ ) {
+          cdebug << "              " << aNode->LinkedStreamNodes( j )->Name() << endl ;
+       }
+      }
+    }
+
+// Computation of independent SubStreamGraphs which have NO StreamLink between them
+    SubStreamGraphsNumber = 0 ;
+    int ilevel ;
+    for ( ilevel = 0 ; ilevel <= _LevelsNumber ; ilevel++ ) {
+// Loop for _NodesNumber[ ilevel ] nodes of the level ilevel
+      int jnode ;
+      for ( jnode = 0 ; jnode <= _NodesNumber[ ilevel ] ; jnode++ ) {
+        GraphBase::ComputingNode * aNode = (_SortedNodes[ ilevel ])[ jnode ] ;
+        if ( aNode->SubStreamGraph() < 0 ) {
+         cdebug << "Graph " << aNode->SubStreamGraph() << " " << aNode->Name()
+                 << " has NO streamport" << endl ;
+       }
+        else {
+          int CurStreamGraphsNumber ;
+          if ( aNode->SubStreamGraph() > 0 ) {
+           cdebug << "SubStreamGraph " << aNode->SubStreamGraph() << " " << aNode->Name()
+                   << " has streamport LinkedStreamNodesSize already in a SubStreamGraph" << endl ;
+            CurStreamGraphsNumber = aNode->SubStreamGraph() ;
+         }
+          else {
+            CurStreamGraphsNumber = SubStreamGraphsNumber+1 ;
+         }
+          int RetVal = 0 ;
+          while ( RetVal != CurStreamGraphsNumber ) {
+            RetVal = CurStreamGraphsNumber ;
+            aNode->SetSubStreamGraph( CurStreamGraphsNumber , RetVal ) ;
+            if ( RetVal != CurStreamGraphsNumber ) {
+              for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
+                GraphBase::ComputingNode * aNode = GraphNodes( i ) ;
+                if ( aNode->SubStreamGraph() == CurStreamGraphsNumber ) {
+                  aNode->SubStreamGraph( RetVal ) ;
+               }
+             }
+              CurStreamGraphsNumber = RetVal ;
+              RetVal = 0 ;
+           }
+            if ( CurStreamGraphsNumber > SubStreamGraphsNumber ) {
+              SubStreamGraphsNumber = CurStreamGraphsNumber ;
+           }
+         }
+       }
+      }
+    }
+// Make a sequential renumbering of SubGraphs :
+    cdebug << endl << "Last SubStreamGraphsNumber : " << SubStreamGraphsNumber << endl ;
+    int CurrStreamGraphsNumber = 0 ;
+    int count = 0 ;
+    for ( CurrStreamGraphsNumber = 0 ; CurrStreamGraphsNumber <= SubStreamGraphsNumber ; CurrStreamGraphsNumber++ ) {
+      bool SearchCurrStreamGraphsNumber = true ;
+      for ( k = 0 ; k <= _LevelsNumber && SearchCurrStreamGraphsNumber ; k++ ) {
+        int l ;
+        for ( l = 0 ; l <= _NodesNumber[ k ] && SearchCurrStreamGraphsNumber ; l++ ) {
+          if ( (_SortedNodes[ k ])[ l ]->SubStreamGraph() == CurrStreamGraphsNumber ) {
+            SearchCurrStreamGraphsNumber = false ;
+            count = count + 1 ;
+            if ( CurrStreamGraphsNumber != count ) {
+              cdebug << "CurrStreamGraphsNumber " << CurrStreamGraphsNumber << " count " << count
+                     << " Level " << k << " n " << l << endl ;
+              for ( i = k ; i <= _LevelsNumber ; i++ ) {
+                for ( j = 0 ; j <= _NodesNumber[ i ] ; j++ ) {
+                  if ( (_SortedNodes[ i ])[ j ]->SubStreamGraph() == CurrStreamGraphsNumber ) {
+                    (_SortedNodes[ i ])[ j ]->SubStreamGraph( count ) ;
+                    cdebug << "SubStreamGraphsNumber " << CurrStreamGraphsNumber << " --> " << count << " "
+                           << " Level " << i << " : " << (_SortedNodes[ i ])[ j ]->Name() << endl ;
+                 }
+                  else if ( (_SortedNodes[ i ])[ j ]->SubStreamGraph() > 0 ) {
+                    cdebug << "SubStreamGraphsNumber " << (_SortedNodes[ i ])[ j ]->SubStreamGraph()
+                           << " != " << CurrStreamGraphsNumber << " Level " << i << " : "
+                           << (_SortedNodes[ i ])[ j ]->Name() << endl ;
+                 }
+               }
+             }
+           }
+          }
+       }
+      }
+    }
+    SubStreamGraphsNumber = count ;
+    cdebug << endl << "SubStreamGraphs result : " << SubStreamGraphsNumber << " SubStreamGraphs" << endl ;
+//    int CurrStreamGraphsNumber ;
+//    for ( CurrStreamGraphsNumber = 1 ; CurrStreamGraphsNumber <= SubStreamGraphsNumber  ; CurrStreamGraphsNumber++ ) {
+//      for ( ilevel = 0 ; ilevel <= _LevelsNumber ; ilevel++ ) {
+//        for ( k = 0 ; k <= _NodesNumber[ ilevel ] ; k++ ) {
+//          if ( (_SortedNodes[ ilevel ])[ k ]->SubStreamGraph() == CurrStreamGraphsNumber ) {
+//            cdebug << "SubStreamGraphsNumber " << CurrStreamGraphsNumber << " : "
+//                   << (_SortedNodes[ ilevel ])[ k ]->Name() << endl ;
+//       }
+//     }
+//      }
+//    }
   }
 
+  ListPorts( *_Graph_fdebug , 0 ) ;
+
+  cdebug_out << "GraphBase::Graph::Sort" << endl;
   return true ;
 }
 
@@ -1669,7 +2162,7 @@ bool GraphBase::Graph::LinkLoopNodes(bool & NewLink ) {
       }
       for ( j = 0 ; j < aLoopNode->CoupledNode()->GetNodeInPortsSize() ; j++ ) {
         GraphBase::InPort *anInPort = aLoopNode->CoupledNode()->GetChangeNodeInPort( j ) ;
-        if ( !anInPort->IsConnected() ) {
+        if ( !anInPort->IsConnected() && !anInPort->IsGate() ) {
           if ( !AddLink( aLoopNode , aLoopNode->GetChangeNodeOutPort( j ) ,
                          aLoopNode->CoupledNode() , anInPort ) ) {
             cdebug << "GraphBase::Graph::CreateService AddLink ERROR " << aLoopNode->Name() << "( "
@@ -1739,7 +2232,7 @@ bool GraphBase::Graph::DataServerNodes() const {
       aNode = GraphNodes( i ) ;
 //  while ( aNode != aComputingNodesList.end() ) {
       if ( aNode->IsFactoryNode() ) {
-      GraphBase::FactoryNode * FaNode = (GraphBase::FactoryNode * ) aNode ;
+        GraphBase::FactoryNode * FaNode = (GraphBase::FactoryNode * ) aNode ;
         if ( !strlen( FaNode->Computer() ) ) {
           cdebug << "ComputerName missing for node " << FaNode->Name() ;
           if ( !strlen( FaNode->Computer() ) ) {
@@ -1754,7 +2247,12 @@ bool GraphBase::Graph::DataServerNodes() const {
 // For Outputs of the DataFlow :
       for ( j = 0 ; j < aNode->GetNodeOutPortsSize() ; j++ ) {
         if ( !aNode->GetNodeOutPort(j)->IsConnected() ) {
-          aNode->AddLink( (GraphBase::ComputingNode *) this ) ;
+          if ( aNode->GetNodeOutPort(j)->IsDataStream() ) {
+            aNode->AddStreamLink( (GraphBase::ComputingNode *) this ) ;
+         }
+          else {
+            aNode->AddLink( (GraphBase::ComputingNode *) this ) ;
+         }
         }
       }
     }
index 9b585d4c1c5d4c5fc882ad7802653a21dcd47cc5..ebb7354323b01d60405fc80eedb2f283b0c23efe 100644 (file)
@@ -44,23 +44,22 @@ namespace GraphBase {
 
     private:
 
-      int                 _Graph_prof_debug;
-      ofstream          * _Graph_fdebug;
+//      int                 _Graph_prof_debug;
+//      ofstream          * _Graph_fdebug;
       CORBA::ORB_ptr      _Orb ;
       SUPERV::Graph_var   _Graph ;
       Graph_Impl        * _GraphImpl ;
 
-// Map of InNodes of the OutNode
+// Map of Nodes of the Graph
       map< string , int >      _MapOfGraphNodes ;
       long                     _GraphNodesSize ;
       vector<bool >            _Sorted ;
       vector<ComputingNode *>  _GraphNodes ;
 
 // _SortedNodes[ _LevelsNumber ] : topological sort from 0 to _LevelsNumber
-// _SortedNodes[ _level ][ _NodesNumber[ _level ] ] : _NodesNumber[ _level ] Nodes
+// _SortedNodes[ _level ][ _NodesNumber[ _level ] ] : _NodesNumber[ _level ] Nodes in the level
       int                              _LevelsNumber ;
       int                              _ThreadsMax ;
-      int                              _GraphsNumber ;
       vector<int >                     _NodesNumber ;
       vector<vector<ComputingNode *> > _SortedNodes ;
 
@@ -73,6 +72,24 @@ namespace GraphBase {
       vector<ComputingNode *>  _QueueNodes ;
       bool                     _ParallelExecutionNodes ;
 
+// For generated NodeNames with ServiceName : number of Nodes using
+// the same ServiceName. It is not the same Service if it belongs to
+// a different Interface and/or a different Component ...
+      map< string , GraphBase::Service * > _MapOfServiceNames ;
+
+// Total number of SubGraphs
+      int                              _SubGraphsNumber ;
+// _SubGraphs[ SubGraphNumero ] [ NodeNumero ]
+// SubGraphNumero : [ 0 , _SubGraphsSize [ ; NodeNumero : [ 0 , _SubGraphs[ SubGraphNumero ].size() [
+      int                              _SubGraphsSize ;
+      vector<vector<ComputingNode *> > _SubGraphs ;
+
+// _SubStreamGraphs[ SubStreamGraphNumero ] [ NodeNumero ]
+// SubStreamGraphNumero : [ 0 , _SubStreamGraphsSize [
+// NodeNumero : [ 0 , _SubStreamGraphs[ SubStreamGraphNumero ].size() [
+//      int                              _SubStreamGraphsSize ;
+//      vector<vector<ComputingNode *> > _SubStreamGraphs ;
+
       bool AddLink( GraphBase::ComputingNode *fromNode ,
                     GraphBase::OutPort *fromPort ,
                     GraphBase::ComputingNode *toNode ,
@@ -84,7 +101,9 @@ namespace GraphBase {
       Graph( CORBA::ORB_ptr ORB ,
              SALOME_NamingService* ptrNamingService ,
              const char *DataFlowName ,
-             const char * DebugFileName ) ;
+             int * Graph_prof_debug ,
+             ofstream * Graph_fdebug ) ;
+//             const char * DebugFileName ) ;
       Graph( CORBA::ORB_ptr ORB ,
              SALOME_NamingService* ptrNamingService ,
              const SALOME_ModuleCatalog::Service& DataFlowService ,
@@ -98,16 +117,18 @@ namespace GraphBase {
              const char * DataFlowAuthor ,
              const char * DataFlowComputer ,
              const char * DataFlowComment ,
-             const char * DebugFileName ) ;
+             int * Graph_prof_debug ,
+             ofstream * Graph_fdebug ) ;
+//             const char * DebugFileName ) ;
       virtual ~Graph() ;
 
-      void Set_prof_debug( CORBA::ORB_ptr ORB ,
-                           const char * DebugFileName ) ;
+//      void Set_prof_debug( CORBA::ORB_ptr ORB ,
+//                           const char * DebugFileName ) ;
+      void Set_prof_debug( int * Graph_prof_debug ,
+                           ofstream * Graph_fdebug ) ;
       int * Graph_prof_debug() {
-//            MESSAGE( "Graph_prof_debug _Graph_prof_debug " << &_Graph_prof_debug << " _Graph_fdebug "
-//                     << _Graph_fdebug ) ;
-            return &_Graph_prof_debug ; } ;
-      ofstream * Graph_fdebug() { return _Graph_fdebug ; } ;
+            return _prof_debug ; } ;
+      ofstream * Graph_fdebug() { return _fdebug ; } ;
 
       SUPERV::Graph_var ObjRef() const { return _Graph ; } ;
       void SetObjRef( SUPERV::Graph_var aGraph ) {
@@ -134,6 +155,7 @@ namespace GraphBase {
            } ;
       void DelGraphNodeIndex( const char *name ) {
            _MapOfGraphNodes.erase( name ) ; } ;
+
       const GraphBase::ComputingNode * GetGraphNode( const int index ) const {
             const ComputingNode * aNode = GetChangeGraphNode( index ) ;
             return aNode ; } ;
@@ -171,25 +193,41 @@ namespace GraphBase {
       ComputingNode * QueueNodes( int i ) const {
             return _QueueNodes[ i ] ; } ;
 
-      const GraphBase::InPort *GetInPort( const char* ToNodeName ,
-                                          const char* ToServiceParameterName ) {
+      const GraphBase::InPort * GetInPort( const char * ToServiceParameterName ) {
+                                return GetInPort( ToServiceParameterName ) ; } ;
+      GraphBase::InPort * GetChangeInPort( const char * ToServiceParameterName ) {
+                          return GetChangeInPort( ToServiceParameterName ) ; } ;
+      const GraphBase::OutPort * GetOutPort( const char * FromServiceParameterName ) {
+                                 return GetOutPort( FromServiceParameterName ) ; } ;
+      GraphBase::OutPort * GetChangeOutPort( const char * FromServiceParameterName ) {
+                           return GetChangeOutPort( FromServiceParameterName ); } ;
+
+      const GraphBase::InPort * GetInPort( const char * ToNodeName ,
+                                          const char * ToServiceParameterName ) {
             ComputingNode * aNode = GetChangeGraphNode( ToNodeName ) ;
             if ( aNode ) {
               return aNode->GetInPort(ToServiceParameterName);
            }
             else
               return NULL ; } ;
-      GraphBase::InPort *GetChangeInPort( const char* ToNodeName ,
-                                          const char* ToServiceParameterName ) {
+      GraphBase::InPort * GetChangeInPort( const char * ToNodeName ,
+                                          const char * ToServiceParameterName ) {
             ComputingNode * aNode = GetChangeGraphNode( ToNodeName ) ;
             if ( aNode ) {
-              return aNode->GetChangeInPort(ToServiceParameterName);
+              return aNode->GetChangeInPort( ToServiceParameterName ) ;
+           }
+            else
+              return NULL ; } ;
+      const GraphBase::OutPort * GetOutPort( const char * FromNodeName ,
+                                    const char * FromServiceParameterName ) {
+            ComputingNode * aNode = GetChangeGraphNode( FromNodeName ) ;
+            if ( aNode ) {
+              return aNode->GetOutPort( FromServiceParameterName ) ;
            }
             else
               return NULL ; } ;
-      GraphBase::OutPort *GetChangeOutPort(
-                                      const char* FromNodeName ,
-                                      const char* FromServiceParameterName ) {
+      GraphBase::OutPort * GetChangeOutPort( const char * FromNodeName ,
+                                            const char * FromServiceParameterName ) {
             ComputingNode * aNode = GetChangeGraphNode( FromNodeName ) ;
             if ( aNode ) {
               return aNode->GetChangeOutPort( FromServiceParameterName );
@@ -220,7 +258,6 @@ namespace GraphBase {
       GraphBase::ListOfLinks * GetLinks(bool AllLinks = false ) const ;
       GraphBase::ListOfGraphs * GetGraphs() const ;
       GraphBase::ListOfLinks * GetDatas() const ;
-//      SALOME_ModuleCatalog::Service * GetService() const ;
 
       bool AddNode( ComputingNode * aNode ) ;
       bool RemoveNode( const char* NodeName ) ;
@@ -265,18 +302,25 @@ namespace GraphBase {
       bool CreateService() ;
       bool InLineServices() ;
 
-      bool Sort() ;
+      bool Sort( int & SubStreamGraphsNumber ) ;
       bool ComputingNodes() const ;
       bool LinkLoopNodes(bool & NewLink ) ;
       bool DataServerNodes() const ;
   
       long LevelMax() {
            return _LevelsNumber + 1 ; } ;
+
+      map< string , GraphBase::Service * > MapOfServiceNames() ;
+      GraphBase::Service * GetServiceOfMap( char * name ) ;
+      bool SetServiceOfMap( GraphBase::Service * aService ) ;
+      int GetServiceNameNumber( SALOME_ModuleCatalog::Service aService ) ;
+
       SUPERV::ListOfStrings * LevelNodes(long aLevel ) ;
       long ThreadsMax() {
            return _ThreadsMax ; } ;
-      long GraphsNumber() {
-           return _GraphsNumber ; } ;
+
+      long SubGraphsNumber() {
+           return _SubGraphsNumber ; } ;
 
       int NodesNumber(const int aLevel ) {
           return _NodesNumber[ aLevel ] ; } ;
diff --git a/src/GraphBase/DataFlowBase_InDataStreamPort.cxx b/src/GraphBase/DataFlowBase_InDataStreamPort.cxx
new file mode 100644 (file)
index 0000000..84049ff
--- /dev/null
@@ -0,0 +1,140 @@
+//  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
+//
+//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//
+//
+//
+//  File   : DataFlowBase_InDataStreamPort.cxx
+//  Author : Jean Rahuel
+//  Module : SUPERV
+//  $Header:
+
+using namespace std;
+
+#include "DataFlowBase_InDataStreamPort.hxx"
+
+GraphBase::InDataStreamPort::InDataStreamPort() :
+  GraphBase::InPort::InPort() {
+  _KindOfSchema = SUPERV::SCHENULL ;
+  _KindOfInterpolation = SUPERV::INTERNULL ;
+  _KindOfExtrapolation = SUPERV::EXTRANULL ;
+  cdebug << "GraphBase::InDataStreamPort::InDataStreamPort " << this << " "  << PortName() << " " << _KindOfSchema << " " << _KindOfInterpolation
+         << " " << _KindOfExtrapolation << endl ;
+}
+
+GraphBase::InDataStreamPort::InDataStreamPort( 
+           const char *const * NodeName ,
+           const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
+           const SALOME_ModuleCatalog::DataStreamDependency aDependency ,
+           const SUPERV::KindOfSchema aKindOfSchema ,
+           const SUPERV::KindOfInterpolation aKindOfInterpolation ,
+           const SUPERV::KindOfExtrapolation aKindOfExtrapolation ) :
+  InPort( NodeName , aserviceParameter , SUPERV::DataStreamParameter , aDependency ) {
+  if ( aDependency == SALOME_ModuleCatalog::DATASTREAM_TEMPORAL ) {
+    _KindOfSchema = aKindOfSchema ;
+    _KindOfInterpolation = aKindOfInterpolation ;
+    _KindOfExtrapolation = aKindOfExtrapolation ;
+  }
+  else {
+    _KindOfSchema = SUPERV::SCHENULL ;
+    _KindOfInterpolation = SUPERV::INTERNULL ;
+    _KindOfExtrapolation = SUPERV::EXTRANULL ;
+  }
+  cdebug << "GraphBase::InDataStreamPort::InDataStreamPort " << this << " " << PortName() << " " << _KindOfSchema << " " << _KindOfInterpolation
+         << " " << _KindOfExtrapolation << endl ;
+}
+
+GraphBase::InDataStreamPort::~InDataStreamPort() {
+  cdebug << "GraphBase::InDataStreamPort::~InDataStreamPort " << this << endl ;
+}
+
+bool GraphBase::InDataStreamPort::SetParams( const SUPERV::KindOfSchema aKindOfSchema ,
+                                             const SUPERV::KindOfInterpolation aKindOfInterpolation ,
+                                             const SUPERV::KindOfExtrapolation aKindOfExtrapolation ) {
+  bool RetVal = true ;
+  if ( Dependency() == SALOME_ModuleCatalog::DATASTREAM_TEMPORAL ) {
+    _KindOfSchema = aKindOfSchema ;
+    _KindOfInterpolation = aKindOfInterpolation ;
+    _KindOfExtrapolation = aKindOfExtrapolation ;
+  }
+  else {
+    _KindOfSchema = SUPERV::SCHENULL ;
+    _KindOfInterpolation = SUPERV::INTERNULL ;
+    _KindOfExtrapolation = SUPERV::EXTRANULL ;
+    RetVal = false ;
+  }
+  cdebug << "GraphBase::InDataStreamPort::SetParams RetVal " << RetVal << " " << PortName() << " " << _KindOfSchema << " "
+         << _KindOfInterpolation << " " << _KindOfExtrapolation << endl ;
+  return RetVal ;
+}
+
+void GraphBase::InDataStreamPort::Params( SUPERV::KindOfSchema & aKindOfSchema ,
+                                          SUPERV::KindOfInterpolation & aKindOfInterpolation ,
+                                          SUPERV::KindOfExtrapolation & aKindOfExtrapolation ) const {
+  aKindOfSchema = _KindOfSchema ;
+  aKindOfInterpolation = _KindOfInterpolation ;
+  aKindOfExtrapolation = _KindOfExtrapolation ;
+  cdebug << "GraphBase::InDataStreamPort::Params " << PortName() << " " << _KindOfSchema << " " << _KindOfInterpolation << " "
+         << _KindOfExtrapolation << endl ;
+}
+
+ostream & operator<< (ostream & f ,const SUPERV::KindOfSchema & s ) {
+  switch (s) {
+  case SUPERV::SCHENULL :
+    f << "SCHENULL";
+    break;
+  case SUPERV::TI :
+    f << "TI";
+    break;
+  case SUPERV::TF :
+    f << "TF";
+    break;
+  case SUPERV::DELTA :
+    f << "DELTA";
+    break;
+  default :
+    f << "UndefinedKindOfSchema";
+    break;
+  }
+
+  return f;
+}
+
+ostream & operator<< (ostream & f ,const SUPERV::KindOfInterpolation & s ) {
+  switch (s) {
+  case SUPERV::INTERNULL :
+    f << "INTERNULL";
+    break;
+  case SUPERV::L0 :
+    f << "L0";
+    break;
+  case SUPERV::L1 :
+    f << "L1";
+    break;
+  default :
+    f << "UndefinedKindOfInterpolation";
+    break;
+  }
+
+  return f;
+}
+
+ostream & operator<< (ostream & f ,const SUPERV::KindOfExtrapolation & s ) {
+  switch (s) {
+  case SUPERV::EXTRANULL :
+    f << "EXTRANULL";
+    break;
+  case SUPERV::E0 :
+    f << "E0";
+    break;
+  case SUPERV::E1 :
+    f << "E1";
+    break;
+  default :
+    f << "UndefinedKindOfExtrapolation";
+    break;
+  }
+
+  return f;
+}
+
diff --git a/src/GraphBase/DataFlowBase_InDataStreamPort.hxx b/src/GraphBase/DataFlowBase_InDataStreamPort.hxx
new file mode 100644 (file)
index 0000000..54ecdde
--- /dev/null
@@ -0,0 +1,65 @@
+//  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
+//
+//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//
+//
+//
+//  File   : DataFlowBase_InDataStreamPort.hxx
+//  Author : Jean Rahuel
+//  Module : SUPERV
+//  $Header:
+
+#ifndef _DATAFLOWBASE_INDATASTREAMPORT_HXX
+#define _DATAFLOWBASE_INDATASTREAMPORT_HXX
+
+#include "DataFlowBase_OutPort.hxx"
+
+namespace GraphBase {
+
+  class InDataStreamPort : public InPort {
+
+    private:
+
+// if TimeDependency :
+      SUPERV::KindOfSchema        _KindOfSchema ;
+      SUPERV::KindOfInterpolation _KindOfInterpolation ;
+      SUPERV::KindOfExtrapolation _KindOfExtrapolation ;
+
+    protected:
+
+    public:
+
+      InDataStreamPort() ;
+
+      InDataStreamPort( const char *const * NodeName  ,
+                        const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
+                        const SALOME_ModuleCatalog::DataStreamDependency aDependency = SALOME_ModuleCatalog::DATASTREAM_UNDEFINED ,
+                        const SUPERV::KindOfSchema aKindOfSchema = SUPERV::SCHENULL ,
+                        const SUPERV::KindOfInterpolation aKindOfInterpolation = SUPERV::INTERNULL ,
+                        const SUPERV::KindOfExtrapolation aKindOfExtrapolation = SUPERV::EXTRANULL ) ;
+
+      virtual ~InDataStreamPort() ;
+
+      bool SetParams( const SUPERV::KindOfSchema aKindOfSchema ,
+                      const SUPERV::KindOfInterpolation aKindOfInterpolation ,
+                      const SUPERV::KindOfExtrapolation aKindOfExtrapolation ) ;
+
+      void Params( SUPERV::KindOfSchema & aKindOfSchema ,
+                   SUPERV::KindOfInterpolation & aKindOfInterpolation ,
+                   SUPERV::KindOfExtrapolation & aKindOfExtrapolation ) const ;
+
+  };
+  
+};
+
+ostream & operator<< (ostream &,const SUPERV::KindOfSchema &);
+
+ostream & operator<< (ostream &,const SUPERV::KindOfInterpolation &);
+
+ostream & operator<< (ostream &,const SUPERV::KindOfExtrapolation &);
+
+#endif
+
+
+
+
index 315e6ed44ebd33863bef4d20e4ea85e9ac278d76..d602ecfb781c35bb06a1bbcd15fd4cd9edcdfdc0 100644 (file)
@@ -31,7 +31,7 @@ GraphBase::InLineNode::InLineNode( CORBA::ORB_ptr ORB ,
   cdebug << "GraphBase::InLineNode::Node "  << this 
          << "' _Name "
          << (void *) Name() << " '" << Name() << " _Comment "
-         << (void *) Comment() << " "  << Comment() << " "  << endl ;
+         << (void *) Comment() << " "  << Comment() << endl ;
 }
 
 GraphBase::InLineNode::InLineNode( CORBA::ORB_ptr ORB ,
index 27ec51733352889b6e162aacdda8cd242dce65fa..3089f3887281a5581c81c49a93c359d258f91625 100644 (file)
@@ -32,14 +32,22 @@ using namespace std;
 
 char ** _PortStateName ;
 
+GraphBase::InPort::InPort() :
+           Port() {
+  _State = SUPERV::UndefinedState ;
+  _OutPort = NULL ;
+  _InitialOutPort = NULL ;
+}
+
 GraphBase::InPort::InPort(
             const char *const * Name  ,
             const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
-            const SUPERV::KindOfPort aKind) :
-          Port( Name , aserviceParameter ) {
+            const SUPERV::KindOfPort aKind ,
+            const SALOME_ModuleCatalog::DataStreamDependency aDependency ) :
+          Port( Name , aserviceParameter , aKind , aDependency ) {
+  _State = SUPERV::UndefinedState ;
   _OutPort = NULL ;
   _InitialOutPort = NULL ;
-  Kind( aKind ) ;
 }
 
 //GraphBase::InPort::~InPort() {
@@ -66,6 +74,8 @@ ostream & operator<< (ostream &f ,const GraphBase::InPort &P) {
     << "type : " << P.PortType() << ", " ;
   f << "from "
     << P.NodeName() << ", ";
+  f << "kind "
+    << P.Kind() << ", ";
 
   return f;
 }
index 6aa2f797fcdd1ee5d90abf68010dbed87b74fc21..51224a345e966ad6d18bd0966b7e0d3ea0adeed8 100644 (file)
@@ -37,21 +37,19 @@ namespace GraphBase {
 
   class InPort : public Port {
 
-    SUPERV::GraphState   _State ;
-    OutPort *            _OutPort ;
-    OutPort *            _InitialOutPort ;
+    private:
+
+      SUPERV::GraphState   _State ;
+      OutPort *            _OutPort ;
+      OutPort *            _InitialOutPort ;
 
     public:   
 
-      InPort() {
-//           cout << "InPort()" << endl ;
-           _State = SUPERV::UndefinedState ;
-           _OutPort = NULL ;
-           _InitialOutPort = NULL ;
-      } ;
+      InPort() ;
       InPort( const char *const * NodeName  ,
               const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
-              const SUPERV::KindOfPort aKind = SUPERV::ServiceParameter ) ;
+              const SUPERV::KindOfPort aKind = SUPERV::ServiceParameter ,
+              const SALOME_ModuleCatalog::DataStreamDependency aDependency = SALOME_ModuleCatalog::DATASTREAM_UNDEFINED ) ;
       virtual ~InPort() {
          cdebug << "GraphBase::InPort::~InPort " << PortName() << endl ; } ;
       virtual void destroy() {
diff --git a/src/GraphBase/DataFlowBase_OutDataStreamPort.cxx b/src/GraphBase/DataFlowBase_OutDataStreamPort.cxx
new file mode 100644 (file)
index 0000000..15187ae
--- /dev/null
@@ -0,0 +1,35 @@
+//  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
+//
+//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//
+//
+//
+//  File   : DataFlowBase_OutDataStreamPort.cxx
+//  Author : Jean Rahuel
+//  Module : SUPERV
+//  $Header:
+
+using namespace std;
+
+#include "DataFlowBase_OutDataStreamPort.hxx"
+
+GraphBase::OutDataStreamPort::OutDataStreamPort() :
+  OutPort() {
+  _NumberOfValues = 0 ;
+  cdebug << "GraphBase::OutDataStreamPort::OutDataStreamPort " << this << " "  << endl ;
+}
+
+GraphBase::OutDataStreamPort::OutDataStreamPort(
+           const char *const * NodeName ,
+           const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
+           const SALOME_ModuleCatalog::DataStreamDependency aDependency ,
+           const long aNumberOfValues ) :
+  OutPort( NodeName , aserviceParameter , SUPERV::DataStreamParameter , aDependency ) {
+  _NumberOfValues = aNumberOfValues ;
+  cdebug << "GraphBase::OutDataStreamPort::OutDataStreamPort " << this << " "  << endl ;
+}
+
+GraphBase::OutDataStreamPort::~OutDataStreamPort() {
+  cdebug << "GraphBase::OutDataStreamPort::~OutDataStreamPort " << this << endl ;
+}
+
diff --git a/src/GraphBase/DataFlowBase_OutDataStreamPort.hxx b/src/GraphBase/DataFlowBase_OutDataStreamPort.hxx
new file mode 100644 (file)
index 0000000..83010d5
--- /dev/null
@@ -0,0 +1,50 @@
+//  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
+//
+//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//
+//
+//
+//  File   : DataFlowBase_OutDataStreamPort.hxx
+//  Author : Jean Rahuel
+//  Module : SUPERV
+//  $Header:
+
+#ifndef _DATAFLOWBASE_OUTDATASTREAMPORT_HXX
+#define _DATAFLOWBASE_OUTDATASTREAMPORT_HXX
+
+#include "DataFlowBase_OutPort.hxx"
+
+namespace GraphBase {
+
+  class OutDataStreamPort : public OutPort {
+
+    private:
+    
+      long                     _NumberOfValues ; // Values Keeped in links ("Niveau")
+
+    protected:
+
+    public:
+
+      OutDataStreamPort() ;
+      OutDataStreamPort( const char *const * NodeName  ,
+                         const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
+                         const SALOME_ModuleCatalog::DataStreamDependency aDependency = SALOME_ModuleCatalog::DATASTREAM_UNDEFINED ,
+                         const long aNumberOfValues = 0 ) ;
+
+      virtual ~OutDataStreamPort() ;
+
+      void NumberOfValues( const long aNumberOfValues ) {
+           _NumberOfValues = aNumberOfValues ; } ;
+      long NumberOfValues() const {
+           return _NumberOfValues ; } ;
+
+  };
+  
+};
+
+#endif
+
+
+
+
index 92253d497c48eda6197ed22faf645734c7f0d1f8..a6363d0fa4d21cc618e23e6b18b33dc874690573 100644 (file)
@@ -48,13 +48,15 @@ namespace GraphBase {
 
     public:   
 
+      OutPort() {
+      };
       OutPort( const char *const * NodeName  ,
                const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
-               const SUPERV::KindOfPort aKind = SUPERV::ServiceParameter ) :
-               DataPort( NodeName , aserviceParameter ) {
+               const SUPERV::KindOfPort aKind = SUPERV::ServiceParameter ,
+               const SALOME_ModuleCatalog::DataStreamDependency aDependency = SALOME_ModuleCatalog::DATASTREAM_UNDEFINED ) :
+               DataPort( NodeName , aserviceParameter , aKind , aDependency) {
                _Connected = NotConnected ;
-               _InPortsSize = 0 ;
-               Kind( aKind ) ; } ;
+               _InPortsSize = 0 ; } ;
       virtual ~OutPort() {
          cdebug << "GraphBase::OutPort::~OutPort " << PortName() << endl ; } ;
       virtual void destroy() {
index 14a89f54232cb49f538d9f56a6826dc2cce01422..83ae0293252d7887d17c311d410d2d3434c3f4a0 100644 (file)
@@ -192,6 +192,9 @@ ostream & operator<< (ostream & f ,const SUPERV::KindOfPort & s ) {
   case SUPERV::GOTOParameter :
     f << "GOTOParameter";
     break;
+  case SUPERV::DataStreamParameter :
+    f << "DataStreamParameter";
+    break;
   default :
     f << "UnknownKindOfPort";
     break;
@@ -200,3 +203,22 @@ ostream & operator<< (ostream & f ,const SUPERV::KindOfPort & s ) {
   return f;
 }
 
+ostream & operator<< (ostream & f ,const SALOME_ModuleCatalog::DataStreamDependency & s ) {
+  switch (s) {
+  case SALOME_ModuleCatalog::DATASTREAM_UNDEFINED :
+    f << "DATASTREAM_UNDEFINED";
+    break;
+  case SALOME_ModuleCatalog::DATASTREAM_TEMPORAL :
+    f << "DATASTREAM_TEMPORAL";
+    break;
+  case SALOME_ModuleCatalog::DATASTREAM_ITERATIVE :
+    f << "DATASTREAM_ITERATIVE";
+    break;
+  default :
+    f << "DATASTREAM_?";
+    break;
+  }
+
+  return f;
+}
+
index ddee288874e49c16567ab990e82a0d6fe387e15a..c944750a1f7c66a779c10b90398252f2839fdaac 100644 (file)
@@ -38,96 +38,108 @@ namespace GraphBase {
 
   class Port : public ServicesParameter {
 
-    const char *const * _NodeName ;
-    SUPERV::Port_var    _Port ;
-    SUPERV::KindOfPort  _KindOfPort ;
+    private:
 
-    vector<long > _X ;    
-    vector<long > _Y ;    
+      const char *const * _NodeName ;
+      SUPERV::Port_var    _Port ;
+      SUPERV::KindOfPort  _KindOfPort ;
+
+      vector<long > _X ;    
+      vector<long > _Y ;    
+
+      SALOME_ModuleCatalog::DataStreamDependency _Dependency ; // Time or Iteration only for DataStreamPorts
 
     public:   
 
-    Port() {
-//         cout << "Port()" << endl ;
-         _NodeName = NULL ;
-         _Port = SUPERV::Port::_nil() ;
-         _KindOfPort = SUPERV::UndefinedParameter ;
-    } ;
-    Port( const char *const * NodeName ,
-          const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
-          const SUPERV::KindOfPort aKindOfPort = SUPERV::ServiceParameter ) :
-          ServicesParameter( aserviceParameter ) {
-          _NodeName = NodeName ;
-          _Port = SUPERV::Port::_nil() ;
-          _KindOfPort = aKindOfPort ;
-       } ;
-    virtual ~Port() {
+      Port() {
+           _NodeName = NULL ;
+           _Port = SUPERV::Port::_nil() ;
+           _KindOfPort = SUPERV::UndefinedParameter ;
+           _Dependency  = SALOME_ModuleCatalog::DATASTREAM_UNDEFINED ; } ;
+      Port( const char *const * NodeName ,
+            const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
+            const SUPERV::KindOfPort aKindOfPort = SUPERV::ServiceParameter ,
+            const SALOME_ModuleCatalog::DataStreamDependency aDependency = SALOME_ModuleCatalog::DATASTREAM_UNDEFINED ) :
+            ServicesParameter( aserviceParameter ) {
+            _NodeName = NodeName ;
+            _Port = SUPERV::Port::_nil() ;
+            _KindOfPort = aKindOfPort ;
+            if ( IsDataStream() ) {
+              _Dependency = aDependency ;
+           }
+            else {
+              _Dependency = SALOME_ModuleCatalog::DATASTREAM_UNDEFINED ;
+           } } ;
+      virtual ~Port() {
          cdebug << "~Port" << endl ; } ;
 
-    SUPERV::Port_var ObjRef() const { return _Port ; } ;
-    void ObjRef(SUPERV::Port_var aPort) {
-                _Port = aPort ; } ;
-
-    const char * NodeName() const { return *_NodeName ; } ;
-    const char * NodePortName() const {
-//          cout << "NodePortName " << hex << (void *) _NodeName << " "
-//               << dec << _NodeName << endl ;
-          char * _NodePortName = new char [ strlen( *_NodeName ) +
-                                 strlen( ServicesParameterName() ) + 3 ] ;
-          strcpy( _NodePortName , *_NodeName ) ;
-          strcat( _NodePortName , "\\" ) ;
-          strcat( _NodePortName , ServicesParameterName() ) ;
-//          strcat( _NodePortName , "\\" ) ;
-          return _NodePortName ; } ;          
-
-    const char * PortName() const {
-          if ( this == NULL )
-            return NULLSTRING ;
-          return ServicesParameterName() ; } ;
-    const char * PortType() const { return ServicesParameterType() ; } ;
-
-    void Kind( SUPERV::KindOfPort aKindOfPort ) {
-         if ( _KindOfPort == SUPERV::GateParameter && aKindOfPort == SUPERV::InLineParameter ) {
-           cdebug << "GraphBase::Port::Kind " << _KindOfPort << " --> " << aKindOfPort
-                  << endl ;
-        }
-         _KindOfPort = aKindOfPort ; } ;
-    const SUPERV::KindOfPort Kind() const { return _KindOfPort ; } ;
-    bool IsParam() const {
-         return _KindOfPort == SUPERV::ServiceParameter ; } ;
-    bool IsGate() const {
-         return _KindOfPort == SUPERV::GateParameter ||
-                _KindOfPort == SUPERV::GOTOParameter ; } ;
-    bool IsInLine() const {
-         return _KindOfPort == SUPERV::InLineParameter ; } ;
-    bool IsLoop() const {
-         return _KindOfPort == SUPERV::LoopParameter ; } ;
-    bool IsSwitch() const {
-         return _KindOfPort == SUPERV::SwitchParameter ; } ;
-    bool IsEndSwitch() const {
-         return _KindOfPort == SUPERV::EndSwitchParameter ; } ;
-    bool IsGOTO() const {
-         return _KindOfPort == SUPERV::GOTOParameter ; } ;
-//    bool IsBus() const { return ( ( _KindOfPort == SUPERV::InLineParameter ) ||
-//                                  ( _PortIndex != -1 ) ) ; } ;
-
-//    void PortIndex( const int anIndex ) {
-//         _PortIndex = anIndex ; } ;
-//    const int PortIndex() const {
-//          return _PortIndex ; } ;
-
-
-    bool AddCoord( const int nxy , const int *x , const int *y ) ;
-    bool AddCoord( const int index , const int x , const int y ) ;
-    bool ChangeCoord( const int index ,
-                      const int x ,
-                      const int y ) ;
-    bool RemoveCoord( const int index ) ;
-    bool RemoveCoords() ;
-    int GetCoord() const ;
-    bool GetCoord( int *x , int *y ) const ;
-    const GraphBase::ListOfCoords * Coords() const ;
-    bool GetCoord( const int index , long &x , long &y ) const ;
+      SUPERV::Port_var ObjRef() const { return _Port ; } ;
+      void ObjRef(SUPERV::Port_var aPort) {
+                  _Port = aPort ; } ;
+
+      const char * NodeName() const { return *_NodeName ; } ;
+      const char * NodePortName() const {
+//            cout << "NodePortName " << hex << (void *) _NodeName << " "
+//                 << dec << _NodeName << endl ;
+            char * _NodePortName = new char [ strlen( *_NodeName ) +
+                                   strlen( ServicesParameterName() ) + 3 ] ;
+            strcpy( _NodePortName , *_NodeName ) ;
+            strcat( _NodePortName , "\\" ) ;
+            strcat( _NodePortName , ServicesParameterName() ) ;
+            return _NodePortName ; } ;          
+
+      const char * PortName() const {
+            if ( this == NULL )
+              return NULLSTRING ;
+            return ServicesParameterName() ; } ;
+      const char * PortType() const { return ServicesParameterType() ; } ;
+
+      void Kind( SUPERV::KindOfPort aKindOfPort ) {
+           if ( _KindOfPort == SUPERV::GateParameter && aKindOfPort == SUPERV::InLineParameter ) {
+             cdebug << "GraphBase::Port::Kind " << _KindOfPort << " --> " << aKindOfPort
+                    << endl ;
+          }
+           _KindOfPort = aKindOfPort ; } ;
+      const SUPERV::KindOfPort Kind() const {
+            return _KindOfPort ; } ;
+      bool IsParam() const {
+           return _KindOfPort == SUPERV::ServiceParameter ; } ;
+      bool IsGate() const {
+           return _KindOfPort == SUPERV::GateParameter ||
+                  _KindOfPort == SUPERV::GOTOParameter ; } ;
+      bool IsInLine() const {
+           return _KindOfPort == SUPERV::InLineParameter ; } ;
+      bool IsLoop() const {
+           return _KindOfPort == SUPERV::LoopParameter ; } ;
+      bool IsSwitch() const {
+           return _KindOfPort == SUPERV::SwitchParameter ; } ;
+      bool IsEndSwitch() const {
+           return _KindOfPort == SUPERV::EndSwitchParameter ; } ;
+      bool IsGOTO() const {
+           return _KindOfPort == SUPERV::GOTOParameter ; } ;
+      bool IsDataStream() const {
+           return _KindOfPort == SUPERV::DataStreamParameter ; } ;
+
+      const SALOME_ModuleCatalog::DataStreamDependency Dependency() const {
+                                     return _Dependency ; } ;
+      bool Dependency( SALOME_ModuleCatalog::DataStreamDependency aDependency ) {
+           if ( IsDataStream() ) {
+             _Dependency = aDependency ;
+             return true ;
+          }
+           return false ; } ;
+
+      bool AddCoord( const int nxy , const int *x , const int *y ) ;
+      bool AddCoord( const int index , const int x , const int y ) ;
+      bool ChangeCoord( const int index ,
+                        const int x ,
+                        const int y ) ;
+      bool RemoveCoord( const int index ) ;
+      bool RemoveCoords() ;
+      int GetCoord() const ;
+      bool GetCoord( int *x , int *y ) const ;
+      const GraphBase::ListOfCoords * Coords() const ;
+      bool GetCoord( const int index , long &x , long &y ) const ;
 
   } ;
 
@@ -135,4 +147,6 @@ namespace GraphBase {
 
 ostream & operator<< (ostream &,const SUPERV::KindOfPort &);
 
+ostream & operator<< (ostream &,const SALOME_ModuleCatalog::DataStreamDependency &);
+
 #endif
index da89abd630f548a37dece445954927ad044c7f95..73a084be4bb88d77c40df2fdab4db2fdffdfaeca 100644 (file)
@@ -36,6 +36,8 @@ GraphBase::PortsOfNode::PortsOfNode() :
 //  cdebug << "GraphBase::PortsOfNode::PortsOfNode "  << this << endl ;
   _NodeInPortsSize = 0 ;
   _NodeOutPortsSize = 0 ;
+  _DataStreamInPortsNumber = 0 ;
+  _DataStreamOutPortsNumber = 0 ;
 }
 
 GraphBase::PortsOfNode::PortsOfNode( const char *DataFlowName ) :
@@ -45,6 +47,8 @@ GraphBase::PortsOfNode::PortsOfNode( const char *DataFlowName ) :
 //  cdebug << "GraphBase::PortsOfNode::PortsOfNode "  << this << endl ;
   _NodeInPortsSize = 0 ;
   _NodeOutPortsSize = 0 ;
+  _DataStreamInPortsNumber = 0 ;
+  _DataStreamOutPortsNumber = 0 ;
 }
 
 GraphBase::PortsOfNode::~PortsOfNode() {
@@ -67,21 +71,26 @@ void GraphBase::PortsOfNode::DefPortsOfNode(
                            int * Graph_prof_debug ,
                            ofstream * Graph_fdebug ) {
   int i ;
-  cdebug_in << "DefPortsOfNode : " << *NodeName << endl ;
-  const bool DataFlowOrComputing = (aKind == SUPERV::DataFlowNode) ||
+  SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
+//  MESSAGE( "DefPortsOfNode " << NodeName << " Graph_prof_debug  "
+//           << Graph_prof_debug << " _prof_debug " << _prof_debug ) ;
+  cdebug_in << "DefPortsOfNode : " << *NodeName << " ServiceName " << aService.ServiceName << endl ;
+  const bool DataFlowOrComputing = (aKind == SUPERV::DataFlowGraph) ||
                                    (aKind == SUPERV::ComputingNode) ||
                                    (aKind == SUPERV::FactoryNode) ;
 // WithInLoop : InitLoop or DoLoop
   const bool WithInLoop = (aKind == SUPERV::LoopNode) || (aKind == SUPERV::EndLoopNode) ;
 // WithInGate : InGate or Default
-  const bool WithInGate = (aKind == SUPERV::ComputingNode) || (aKind == SUPERV::FactoryNode) ||
-                          (aKind == SUPERV::InLineNode) || (aKind == SUPERV::LoopNode) ||
-                          (aKind == SUPERV::SwitchNode) || (aKind == SUPERV::EndSwitchNode) ||
-                          (aKind == SUPERV::GOTONode) ;
+  const bool WithInGate = (aKind == SUPERV::DataFlowGraph) || (aKind == SUPERV::DataStreamGraph) ||
+                          (aKind == SUPERV::ComputingNode) || (aKind == SUPERV::FactoryNode) ||
+                          (aKind == SUPERV::InLineNode) || (aKind == SUPERV::GOTONode) ||
+                          (aKind == SUPERV::LoopNode) || (aKind == SUPERV::EndLoopNode) ||
+                          (aKind == SUPERV::SwitchNode) || (aKind == SUPERV::EndSwitchNode) ;
 // WithOutGate : OutGate or Default
-  const bool WithOutGate = (aKind == SUPERV::ComputingNode) || (aKind == SUPERV::FactoryNode) ||
-                           (aKind == SUPERV::InLineNode) || (aKind == SUPERV::SwitchNode) ||
-                           (aKind == SUPERV::GOTONode) ;
+  const bool WithOutGate = (aKind == SUPERV::DataFlowGraph) || (aKind == SUPERV::DataStreamGraph) ||
+                           (aKind == SUPERV::ComputingNode) || (aKind == SUPERV::FactoryNode) ||
+                           (aKind == SUPERV::InLineNode) || (aKind == SUPERV::GOTONode) ||
+                           (aKind == SUPERV::SwitchNode) || (aKind == SUPERV::EndSwitchNode) ;
   SUPERV::KindOfPort aPortKind = SUPERV::ServiceParameter ;
   if ( aKind == SUPERV::InLineNode ) {
     aPortKind = SUPERV::InLineParameter ;
@@ -145,7 +154,7 @@ void GraphBase::PortsOfNode::DefPortsOfNode(
     const char *aParametername = _aParametername.c_str() ;
     if ( _MapOfNodeInPorts[ aParametername ] ) {
       if ( !DataFlowOrComputing &&
-           !strcmp( aParametername , "InGate" ) ) {
+           !strcmp( aParametername , "Gate" ) ) {
       }
       else {
         cdebug << "Error, Parametername duplicated : " << aParametername
@@ -169,7 +178,7 @@ void GraphBase::PortsOfNode::DefPortsOfNode(
     SALOME_ModuleCatalog::ServicesParameter anInGateParameter ;
     _NodeInPortsSize = _NodeInPortsSize + 1 ;
     iVec += 1 ;
-    char *aParametername = "InGate" ;
+    char *aParametername = "Gate" ;
     if ( aKind == SUPERV::EndSwitchNode ) {
       aParametername = "Default" ;
     }
@@ -216,7 +225,7 @@ void GraphBase::PortsOfNode::DefPortsOfNode(
     const char *aParametername = _aParametername.c_str() ;
     if ( _MapOfNodeOutPorts[ aParametername ] ) {
       if ( !DataFlowOrComputing &&
-           !strcmp( aParametername , "OutGate" ) ) {
+           !strcmp( aParametername , "Gate" ) ) {
       }
       else {
         cdebug << "Error, Parametername duplicated : " << aParametername
@@ -224,9 +233,9 @@ void GraphBase::PortsOfNode::DefPortsOfNode(
       }
     }
     else {
-      _MapOfNodeOutPorts[ aParametername ] = i+1 ;
       cdebug << "DefPortsOfNode : " << "_MapOfNodeOutPorts[ " << aParametername
              << " ] = " << i+1 << endl ;
+      _MapOfNodeOutPorts[ aParametername ] = i+1 ;
       const SALOME_ModuleCatalog::ServicesParameter aServiceParameter = aService.ServiceoutParameter[i-iVec] ;
       _NodeOutPorts[i] = new GraphBase::OutPort( NodeName , aServiceParameter ,
                                                  aPortKind );
@@ -240,7 +249,7 @@ void GraphBase::PortsOfNode::DefPortsOfNode(
     SALOME_ModuleCatalog::ServicesParameter anOutGateParameter ;
     _NodeOutPortsSize = _NodeOutPortsSize + 1 ;
     iVec += 1 ;
-    char *aParametername = "OutGate" ;
+    char *aParametername = "Gate" ;
     if ( aKind == SUPERV::SwitchNode ) {
       aParametername = "Default" ;
     }
@@ -261,116 +270,172 @@ void GraphBase::PortsOfNode::DefPortsOfNode(
 
 GraphBase::InPort * GraphBase::PortsOfNode::AddInPort( CORBA::ORB_ptr ORB ,
                                                        const char *const * NodeName ,
-                                                       const SUPERV::KindOfNode aKind ,
+                                                       const SUPERV::KindOfNode aKindOfNode ,
                                                        const char * InputParameterName ,
                                                        const char * InputParameterType ,
+                                                       SUPERV::KindOfPort aKindOfPort ,
+//                                                       const int DataStreamInPortsNumber ,
                                                        int * Graph_prof_debug ,
                                                        ofstream * Graph_fdebug ) {
-  cdebug_in << "DefPortsOfNode::AddInPort : " << *NodeName << " " << aKind << " "
-            << InputParameterName << " " << InputParameterType << endl ;
+//  MESSAGE( "DefPortsOfNode " << *NodeName << " Graph_prof_debug "
+//           << Graph_prof_debug << " _prof_debug " << _prof_debug ) ;
+  cdebug_in << "PortsOfNode::AddInPort : " << *NodeName << " " << aKindOfNode << " InputParameterName " << InputParameterName << " InputParameterType "
+            << InputParameterType << " aKindOfPort " << aKindOfPort << " DataStreamInPortsNumber " << DataStreamInPortsNumber() << " _NodeInPortsSize "
+            << _NodeInPortsSize << endl ;
   GraphBase::InPort * anInPort = NULL ;
-  if ( aKind == SUPERV::InLineNode || aKind == SUPERV::LoopNode ||
-       aKind == SUPERV::EndLoopNode || aKind == SUPERV::SwitchNode ||
-       aKind == SUPERV::EndSwitchNode || aKind == SUPERV::GOTONode ) {
-    SUPERV::KindOfPort aPortKind = SUPERV::InLineParameter ;
-    if ( aKind == SUPERV::EndSwitchNode ) {
-      aPortKind = SUPERV::EndSwitchParameter ;
-    }
-    anInPort = GetChangeInPort( InputParameterName ) ;
-    if ( anInPort == NULL ) {
-      _NodeInPortsSize = _NodeInPortsSize + 1 ;
-      _NodeInPorts.resize(_NodeInPortsSize);
-      SALOME_ModuleCatalog::ServicesParameter aServiceParameter ;
-      aServiceParameter.Parametername = InputParameterName ;
-      aServiceParameter.Parametertype = InputParameterType ;
-      SUPERV::KindOfPort aPortKind = SUPERV::ServiceParameter ;
-      if ( aKind != SUPERV::EndLoopNode ) {
-        _NodeInPorts[ _NodeInPortsSize-1 ] = _NodeInPorts[ _NodeInPortsSize-2 ] ; // Gate - Default
-        _MapOfNodeInPorts.erase( _NodeInPorts[ _NodeInPortsSize-1 ]->PortName() ) ;
-        _MapOfNodeInPorts[ _NodeInPorts[ _NodeInPortsSize-1 ]->PortName() ] =  _NodeInPortsSize-1 + 1 ;
-        _MapOfNodeInPorts[ InputParameterName ] = _NodeInPortsSize-2 + 1 ;
-        _NodeInPorts[_NodeInPortsSize-2] = new GraphBase::InPort( NodeName ,
-                                                                  aServiceParameter ,
-                                                                  aPortKind ) ;
-        _NodeInPorts[_NodeInPortsSize-2]->Kind( SUPERV::InLineParameter ) ;
-//        MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << InputParameterName << " --> SetDebug" ) ;
-        _NodeInPorts[_NodeInPortsSize-2]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
-        anInPort = _NodeInPorts[_NodeInPortsSize-2] ;
-        cdebug << "NodeInPorts[ " << _NodeInPortsSize-2 << " ]" << endl ;
+  int index = 0 ;
+  anInPort = GetChangeInPort( InputParameterName ) ;
+  if ( anInPort == NULL ) {
+    _NodeInPortsSize = _NodeInPortsSize + 1 ;
+    _NodeInPorts.resize(_NodeInPortsSize);
+    SALOME_ModuleCatalog::ServicesParameter aServiceParameter ;
+    aServiceParameter.Parametername = CORBA::string_dup( InputParameterName ) ;
+    aServiceParameter.Parametertype = CORBA::string_dup( InputParameterType ) ;
+    if ( aKindOfPort == SUPERV::DataStreamParameter ) {
+      index = _NodeInPortsSize-2 ;
+      IncrDataStreamInPorts() ;
+    }
+    else {
+      index = _NodeInPortsSize-2 - DataStreamInPortsNumber() ;
+    }
+//    if ( aKindOfNode != SUPERV::EndLoopNode ) {
+    int i ;
+    for ( i = _NodeInPortsSize - 2 ; i >= index ; i-- ) {
+      _NodeInPorts[ i + 1 ] = _NodeInPorts[ i ] ; // Gate - Default
+      _MapOfNodeInPorts.erase( _NodeInPorts[ i + 1 ]->PortName() ) ;
+      _MapOfNodeInPorts[ _NodeInPorts[ i + 1 ]->PortName() ] =  i + 2 ;
+    }
+      _MapOfNodeInPorts[ InputParameterName ] = index + 1 ;
+      if ( aKindOfPort == SUPERV::DataStreamParameter ) {
+        _NodeInPorts[index] = new GraphBase::InDataStreamPort( NodeName ,
+                                                               aServiceParameter ) ;
       }
       else {
-        _MapOfNodeInPorts[ InputParameterName ] = _NodeInPortsSize-1 + 1 ;
-        _NodeInPorts[_NodeInPortsSize-1] = new GraphBase::InPort( NodeName ,
-                                                                  aServiceParameter ,
-                                                                  aPortKind ) ;
-        _NodeInPorts[_NodeInPortsSize-1]->Kind( SUPERV::InLineParameter ) ;
-//        MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << InputParameterName << " --> SetDebug" ) ;
-        _NodeInPorts[_NodeInPortsSize-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
-        anInPort = _NodeInPorts[_NodeInPortsSize-1] ;
-        cdebug << "NodeInPorts[ " << _NodeInPortsSize-1 << " ]" << endl ;
+        _NodeInPorts[index] = new GraphBase::InPort( NodeName ,
+                                                     aServiceParameter ,
+                                                     aKindOfPort ) ;
       }
+      _NodeInPorts[index]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
+      anInPort = _NodeInPorts[index] ;
+      cdebug << "NodeInPorts[ " << index << " ]" << endl ;
     }
-    else {
-      cdebug << "InPort already exists" << endl ;
+//    else { // EndLoopNode
+//      _MapOfNodeInPorts[ InputParameterName ] = _NodeInPortsSize-1 + 1 ;
+//      _NodeInPorts[_NodeInPortsSize-1] = new GraphBase::InPort( NodeName ,
+//                                                                aServiceParameter ,//
+//                                                                aKindOfPort ) ;
+//      MESSAGE( "GraphBase::PortsOfNode::AddInPort " << InputParameterName << " --> SetDebug" ) ;
+//      _NodeInPorts[_NodeInPortsSize-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
+//      anInPort = _NodeInPorts[_NodeInPortsSize-1] ;
+//      cdebug << "NodeInPorts[ " << _NodeInPortsSize-1 << " ]" << endl ;
+//    }
+//  }
+  else {
+    cdebug << "GraphBase::PortsOfNode::AddInPort InPort already exists" << endl ;
+    anInPort->Kind( aKindOfPort ) ;
+  }
+  cdebug << "GraphBase::PortsOfNode::AddInPort index " << index << " _NodeInPortsSize " << _NodeInPortsSize  << endl ;
+  int i ;
+  for ( i = 0 ; i < _NodeInPortsSize ; i++ ) {
+    cdebug << *NodeName << " _NodeInPorts[ " << i << " ] = " << _NodeInPorts[ i ]->PortName()
+           << " _MapOfNodeInPorts[ " << _NodeInPorts[ i ]->PortName() << " ] = "
+           << _MapOfNodeInPorts[ _NodeInPorts[ i ]->PortName() ] - 1 << " "
+           << _NodeInPorts[ i ]->Kind() << " Dependency " << _NodeInPorts[ i ]->Dependency() ;
+    if ( _NodeInPorts[ i ]->IsDataStream() ) {
+       SUPERV::KindOfSchema aKindOfSchema ;
+       SUPERV::KindOfInterpolation aKindOfInterpolation ;
+       SUPERV::KindOfExtrapolation aKindOfExtrapolation ;
+       ((GraphBase::InDataStreamPort * ) _NodeInPorts[ i ])->Params( aKindOfSchema , aKindOfInterpolation , aKindOfExtrapolation ) ;
+       cdebug << " " << aKindOfSchema << " " << aKindOfInterpolation << " " << aKindOfExtrapolation ;
     }
+    cdebug << endl ;
   }
-  cdebug_out << "DefPortsOfNode::AddInPort _NodeInPortsSize " << _NodeInPortsSize
+  cdebug_out << "GraphBase::PortsOfNode::AddInPort _NodeInPortsSize " << _NodeInPortsSize
              << " " << anInPort->Kind() << endl ;
   return anInPort ;
 }
 
 GraphBase::OutPort * GraphBase::PortsOfNode::AddOutPort( CORBA::ORB_ptr ORB ,
                                                          const char * const * NodeName ,
-                                                         const SUPERV::KindOfNode aKind ,
+                                                         const SUPERV::KindOfNode aKindOfNode ,
                                                          const char * OutputParameterName ,
                                                          const char * OutputParameterType ,
+                                                         SUPERV::KindOfPort aKindOfPort ,
+//                                                         const int DataStreamOutPortsNumber ,
                                                          int * Graph_prof_debug ,
                                                          ofstream * Graph_fdebug ) {
-  cdebug_in << "DefPortsOfNode::AddOutPort : " << *NodeName << " " << aKind << " "
-            << OutputParameterName << " " << OutputParameterType << endl ;
+  cdebug_in << "GraphBase::PortsOfNode::AddOutPort : " << *NodeName << " " << aKindOfNode << " OutputParameterName " << OutputParameterName
+            << " OutputParameterType " << OutputParameterType << " aKindOfPort " << aKindOfPort << " DataStreamOutPortsNumber " << DataStreamOutPortsNumber()
+            << " _NodeOutPortsSize " << _NodeOutPortsSize << endl ;
   GraphBase::OutPort * anOutPort = NULL ;
-  if ( aKind == SUPERV::InLineNode || aKind == SUPERV::LoopNode ||
-       aKind == SUPERV::EndLoopNode || aKind == SUPERV::SwitchNode ||
-       aKind == SUPERV::EndSwitchNode || aKind == SUPERV::GOTONode ) {
-    SUPERV::KindOfPort aPortKind = SUPERV::InLineParameter ;
-    anOutPort = GetChangeOutPort( OutputParameterName ) ;
-    if ( anOutPort == NULL ) {
-      _NodeOutPortsSize = _NodeOutPortsSize + 1 ;
-      _NodeOutPorts.resize(_NodeOutPortsSize);
-      SALOME_ModuleCatalog::ServicesParameter aServiceParameter ;
-      aServiceParameter.Parametername = OutputParameterName ;
-      aServiceParameter.Parametertype = OutputParameterType ;
-      if ( aKind == SUPERV::SwitchNode ) {
-        _NodeOutPorts[ _NodeOutPortsSize-1 ] = _NodeOutPorts[ _NodeOutPortsSize-2 ] ; // Default
-        _MapOfNodeOutPorts.erase( _NodeOutPorts[ _NodeOutPortsSize-1 ]->PortName() ) ;
-        _MapOfNodeOutPorts[ _NodeOutPorts[ _NodeOutPortsSize-1 ]->PortName() ] =  _NodeOutPortsSize-1 + 1 ;
-        _MapOfNodeOutPorts[ OutputParameterName ] = _NodeOutPortsSize - 1 ;
-        _NodeOutPorts[_NodeOutPortsSize-2] = new GraphBase::OutPort( NodeName ,
-                                                                     aServiceParameter ,
-                                                                     aPortKind );
-        _NodeOutPorts[_NodeOutPortsSize-2]->Kind( SUPERV::InLineParameter ) ;
-//      MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << OutputParameterName << " --> SetDebug" ) ;
-        _NodeOutPorts[_NodeOutPortsSize-2]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
-        anOutPort = _NodeOutPorts[_NodeOutPortsSize-2] ;
-        cdebug << "NodeInPorts[ " << _NodeInPortsSize-2 << " ]" << endl ;
-      }
-      else {
-        _MapOfNodeOutPorts[ OutputParameterName ] = _NodeOutPortsSize ;
-        _NodeOutPorts[_NodeOutPortsSize-1] = new GraphBase::OutPort( NodeName ,
-                                                                     aServiceParameter ,
-                                                                     aPortKind );
-        _NodeOutPorts[_NodeOutPortsSize-1]->Kind( SUPERV::InLineParameter ) ;
-//      MESSAGE( "GraphBase::PortsOfNode::DefPortsOfNode " << OutputParameterName << " --> SetDebug" ) ;
-        _NodeOutPorts[_NodeOutPortsSize-1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
-        anOutPort = _NodeOutPorts[_NodeOutPortsSize-1] ;
-        cdebug << "NodeInPorts[ " << _NodeInPortsSize-1 << " ]" << endl ;
-      }
+  int index = 0 ;
+  anOutPort = GetChangeOutPort( OutputParameterName ) ;
+  if ( anOutPort == NULL ) {
+    _NodeOutPortsSize = _NodeOutPortsSize + 1 ;
+    _NodeOutPorts.resize(_NodeOutPortsSize);
+    SALOME_ModuleCatalog::ServicesParameter aServiceParameter ;
+    aServiceParameter.Parametername = CORBA::string_dup( OutputParameterName ) ;
+    aServiceParameter.Parametertype = CORBA::string_dup( OutputParameterType ) ;
+    if ( aKindOfPort == SUPERV::DataStreamParameter ) {
+      index = _NodeOutPortsSize-2 ;
+      IncrDataStreamOutPorts() ;
+    }
+    else {
+      index = _NodeOutPortsSize-2 - DataStreamOutPortsNumber() ;
+    }
+    if ( aKindOfNode == SUPERV::LoopNode || aKindOfNode == SUPERV::EndLoopNode ) {
+      index += 1 ;
+    }
+//    if ( aKindOfNode != SUPERV::LoopNode && aKindOfNode != SUPERV::EndLoopNode ) {
+    int i ;
+     for ( i = _NodeOutPortsSize - 2 ; i >= index ; i-- ) {
+      _NodeOutPorts[ i + 1 ] = _NodeOutPorts[ i ] ; // Gate - Default
+      _MapOfNodeOutPorts.erase( _NodeOutPorts[ i + 1 ]->PortName() ) ;
+      _MapOfNodeOutPorts[ _NodeOutPorts[ i + 1 ]->PortName() ] =  i + 2 ;
+    }
+    _MapOfNodeOutPorts[ OutputParameterName ] = index + 1 ;
+    if ( aKindOfPort == SUPERV::DataStreamParameter ) {
+      _NodeOutPorts[index] = new GraphBase::OutDataStreamPort( NodeName ,
+                                                               aServiceParameter ) ;
     }
     else {
-      cdebug << "OutPort already exists" << endl ;
+      _NodeOutPorts[index] = new GraphBase::OutPort( NodeName ,
+                                                     aServiceParameter ,
+                                                     aKindOfPort );
     }
+//    MESSAGE( "GraphBase::PortsOfNode::AddOutPort " << OutputParameterName << " --> SetDebug" ) ;
+    _NodeOutPorts[index]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
+    anOutPort = _NodeOutPorts[index] ;
+    cdebug << "NodeOutPorts[ " << index << " ]" << endl ;
+  }
+//    else { // LoopNode || EndLoopNode
+//      _MapOfNodeOutPorts[ OutputParameterName ] = index + 2 ;
+//      _NodeOutPorts[index + 1] = new GraphBase::OutPort( NodeName ,
+//                                                         aServiceParameter ,
+//                                                         aKindOfPort );
+//    MESSAGE( "GraphBase::PortsOfNode::AddOutPort " << OutputParameterName << " --> SetDebug" ) ;
+//      _NodeOutPorts[index + 1]->SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ;
+//      anOutPort = _NodeOutPorts[index + 1] ;
+//      cdebug << "NodeOutPorts[ " << index + 1 << " ]" << endl ;
+//    }
+//  }
+  else {
+    cdebug << "GraphBase::PortsOfNode::AddOutPort OutPort already exists" << endl ;
+    anOutPort->Kind( aKindOfPort ) ;
   }
-  cdebug_out << "DefPortsOfNode::AddOutPort _NodeOutPortsSize "
+  cdebug << "GraphBase::PortsOfNode::AddOutPort index " << index << " _NodeOutPortsSize " << _NodeOutPortsSize  << endl ;
+  int i ;
+  for ( i = 0 ; i < _NodeOutPortsSize ; i++ ) {
+    cdebug << *NodeName << " _NodeOutPorts[ " << i << " ] = " << _NodeOutPorts[ i ]->PortName()
+           << " _MapOfNodeOutPorts[ " << _NodeOutPorts[ i ]->PortName() << " ] = "
+           << _MapOfNodeOutPorts[ _NodeOutPorts[ i ]->PortName() ] - 1 << " "
+           << _NodeOutPorts[ i ]->Kind() << " Dependency " << _NodeOutPorts[ i ]->Dependency() ;
+    if ( _NodeOutPorts[ i ]->IsDataStream() ) {
+       cdebug << " NumberOfValues " << ((GraphBase::OutDataStreamPort * ) _NodeOutPorts[ i ])->NumberOfValues() ;
+    }
+    cdebug << endl ;
+  }
+  cdebug_out << "GraphBase::PortsOfNode::AddOutPort _NodeOutPortsSize "
              << _NodeOutPortsSize << " " << anOutPort->Kind() << endl ;
   return anOutPort ;
 }
@@ -382,6 +447,9 @@ void GraphBase::PortsOfNode::DelInPort( const char * InputParameterName ) {
     cdebug << "DefPortsOfNode::DelInPort : _NodeInPorts[" << index << "] "
            << _NodeInPorts[ index ]->PortName() << " "
            << _NodeInPorts[ index ]->NodeName() << endl ;
+    if ( _NodeInPorts[ index ]->IsDataStream() ) {
+      DecrDataStreamInPorts() ;
+    }
     _MapOfNodeInPorts.erase( InputParameterName ) ;
     _NodeInPorts[ index ]->destroy() ;
     int i ;
@@ -411,6 +479,9 @@ void GraphBase::PortsOfNode::DelOutPort( const char * OutputParameterName ) {
     cdebug << "DefPortsOfNode::DelOutPort : _NodeOutPorts[" << index << "] "
            << _NodeOutPorts[ index ]->PortName() << " "
            << _NodeOutPorts[ index ]->NodeName() << endl ;
+    if ( _NodeOutPorts[ index ]->IsDataStream() ) {
+      DecrDataStreamOutPorts() ;
+    }
     _MapOfNodeOutPorts.erase( OutputParameterName ) ;
     _NodeOutPorts[ index ]->destroy() ;
     int i ;
@@ -454,38 +525,85 @@ const GraphBase::OutPort *GraphBase::PortsOfNode::GetOutPort( const char *name)
 }
 
 GraphBase::InPort *GraphBase::PortsOfNode::GetChangeInPort( const char * name) {
-//  cdebug_in << "GraphBase::PortsOfNode::GetChangePort " << name <<" " << way
-//            << endl;
+//  cdebug_in << "GraphBase::PortsOfNode::GetChangeInPort " << name << endl;
 
   GraphBase::InPort * pP = NULL;
   if ( !_MapOfNodeInPorts.empty() ) {
-    int i = _MapOfNodeInPorts[ name ] ;
-//    cout << "GraphBase::PortsOfNode::GetChangeInPort _MapOfNodeInPorts[ "
-//         << name << " ] : " << i-1 << " " << _NodeInPorts[ i-1 ]->NodeName()
-//         << endl ;
-    if ( i > 0 )
+    int i = 0 ;
+    if ( !strcmp( name , "InGate" ) ) {
+      i = _MapOfNodeInPorts[ "Gate" ] ;
+    }
+    else {
+      i = _MapOfNodeInPorts[ name ] ;
+    }
+    if ( i > 0 ) {
+//      cdebug << "GraphBase::PortsOfNode::GetChangeInPort _MapOfNodeInPorts[ "
+//             << name << " ] : " << i-1 << " " << _NodeInPorts[ i-1 ]->NodeName()
+//             << endl ;
       pP = _NodeInPorts[ i-1 ] ;
+    }
   }
+//  if ( pP == NULL ) {
+//    int i ;
+//    for ( i = 0 ; i < _NodeInPortsSize ; i++ ) {
+//      cdebug << " _NodeInPorts[ " << i << " ] = " << _NodeInPorts[ i ]->PortName()
+//             << " _MapOfNodeInPorts[ " << _NodeInPorts[ i ]->PortName() << " ] = "
+//             << _MapOfNodeInPorts[ _NodeInPorts[ i ]->PortName() ] - 1 << " "
+//             << _NodeInPorts[ i ]->Kind() << " Dependency " << _NodeInPorts[ i ]->Dependency() ;
+//      if ( _NodeInPorts[ i ]->IsDataStream() ) {
+//         SUPERV::KindOfSchema aKindOfSchema ;
+//         SUPERV::KindOfInterpolation aKindOfInterpolation ;
+//         SUPERV::KindOfExtrapolation aKindOfExtrapolation ;
+//         ((GraphBase::InDataStreamPort * ) _NodeInPorts[ i ])->Params( aKindOfSchema , aKindOfInterpolation , aKindOfExtrapolation ) ;
+//         cdebug << " " << aKindOfSchema << " " << aKindOfInterpolation << " " << aKindOfExtrapolation ;
+//      }
+//      if ( !strcmp( _NodeInPorts[ i ]->PortName() , name ) ) {
+//        cdebug << " ERROR" ;
+//      }
+//      cdebug << endl ;
+//    }
+//  }
 //  cdebug_out << "GraphBase::PortsOfNode::GetChangeInPort " << endl;
 
   return pP;
 }
 
 GraphBase::OutPort *GraphBase::PortsOfNode::GetChangeOutPort( const char * name ) {
-//  cdebug_in << "GraphBase::PortsOfNode::GetChangePort " << name <<" " << way
-//            << endl;
+//  cdebug_in << "GraphBase::PortsOfNode::GetChangeOutPort " << name << endl;
 
   GraphBase::OutPort * pP = NULL;
   if ( !_MapOfNodeOutPorts.empty() ) {
-    int i = _MapOfNodeOutPorts[ name ] ;
-//    cout << "GraphBase::PortsOfNode::GetChangeOutPort _MapOfNodeOutPorts[ "
-//         << name << " ] : " << i-1 << " " << _NodeOutPorts[ i-1 ]->NodeName()
-//         << endl ;
-    if ( i > 0 )
+    int i = 0 ;
+    if ( !strcmp( name , "OutGate" ) ) {
+      i = _MapOfNodeOutPorts[ "Gate" ] ;
+    }
+    else {
+      i = _MapOfNodeOutPorts[ name ] ;
+    }
+    if ( i > 0 ) {
+//      cdebug << "GraphBase::PortsOfNode::GetChangeOutPort _MapOfNodeOutPorts[ "
+//             << name << " ] : " << i-1 << " " << _NodeOutPorts[ i-1 ]->NodeName() << endl ;
       pP = _NodeOutPorts[ i-1 ] ;
+    }
   }
 //  cdebug_out << "GraphBase::PortsOfNode::GetChangeOutPort " << endl;
 
+//  if ( pP == NULL ) {
+//    int i ;
+//    for ( i = 0 ; i < _NodeOutPortsSize ; i++ ) {
+//      cdebug << " _NodeOutPorts[ " << i << " ] = " << _NodeOutPorts[ i ]->PortName()
+//             << " _MapOfNodeOutPorts[ " << _NodeOutPorts[ i ]->PortName() << " ] = "
+//             << _MapOfNodeOutPorts[ _NodeOutPorts[ i ]->PortName() ] - 1 << " "
+//             << _NodeOutPorts[ i ]->Kind() << " Dependency " << _NodeOutPorts[ i ]->Dependency() ;
+//      if ( _NodeOutPorts[ i ]->IsDataStream() ) {
+//         cdebug << " NumberOfValues " << ((GraphBase::OutDataStreamPort * ) _NodeOutPorts[ i ])->NumberOfValues() ;
+//      }
+//      if ( !strcmp( _NodeOutPorts[ i ]->PortName() , name ) ) {
+//        cdebug << " ERROR" ;
+//      }
+//      cdebug << endl ;
+//    }
+//  }
   return pP;
 }
 
@@ -580,8 +698,11 @@ ostream & operator<< (ostream & f ,const SUPERV::KindOfNode & s ) {
   case SUPERV::InLineNode :
     f << "InLineNode";
     break;
-  case SUPERV::DataFlowNode :
-    f << "DataFlowNode";
+  case SUPERV::DataFlowGraph :
+    f << "DataFlowGraph";
+    break;
+  case SUPERV::DataStreamGraph :
+    f << "DataStreamGraph";
     break;
   case SUPERV::LoopNode :
     f << "LoopNode";
index 395c81a2d50e71610bf85cd550d69b0ffb9a7563..de75d7c3755f1f750692e4a77a9a6d8aece1e4a1 100644 (file)
@@ -31,8 +31,8 @@
 
 #include "DataFlowBase_Service.hxx"
 
-#include "DataFlowBase_InPort.hxx"
-#include "DataFlowBase_OutPort.hxx"
+#include "DataFlowBase_InDataStreamPort.hxx"
+#include "DataFlowBase_OutDataStreamPort.hxx"
 
 namespace GraphBase {
 
@@ -49,6 +49,9 @@ namespace GraphBase {
       int _NodeOutPortsSize ;
       vector<OutPort *> _NodeOutPorts;
 
+      int                    _DataStreamInPortsNumber ;
+      int                    _DataStreamOutPortsNumber ;
+
     public:
 
       PortsOfNode() ;
@@ -59,10 +62,6 @@ namespace GraphBase {
                            const SALOME_ModuleCatalog::Service& NodeService ,
                            const char *const * NodeName ,
                            const SUPERV::KindOfNode aKind ,
-//                           const bool DataFlowOrComputing ,
-//                           const bool WithGateArg ,
-//                           const bool WithInGate ,
-//                           const bool WithOutGate ,
                            int * Graph_prof_debug ,
                            ofstream * Graph_fdebug ) ;
 
@@ -71,6 +70,8 @@ namespace GraphBase {
                           const SUPERV::KindOfNode aKind ,
                           const char * InputParameterName ,
                           const char * InputParameterType ,
+                          SUPERV::KindOfPort aKindOfPort ,
+//                          const int DataStreamInPortsNumber ,
                           int * Graph_prof_debug ,
                           ofstream * Graph_fdebug ) ;
       OutPort * AddOutPort( CORBA::ORB_ptr ORB ,
@@ -78,13 +79,46 @@ namespace GraphBase {
                             const SUPERV::KindOfNode aKind ,
                             const char * OutputParameterName ,
                             const char * InputParameterType ,
+                            SUPERV::KindOfPort aKindOfPort ,
+//                            const int DataStreamOutPortsNumber ,
                             int * Graph_prof_debug ,
                             ofstream * Graph_fdebug ) ;
-//      void InOutPort( InPort * InputPort , OutPort * OutputPort ) ;
 
       void DelInPort( const char * InputParameterName ) ;
       void DelOutPort( const char * OutputParameterName ) ;
 
+      int IncrDataStreamInPorts() {
+        _DataStreamInPortsNumber++ ;
+       return _DataStreamInPortsNumber ;
+      } ;
+      int DecrDataStreamInPorts() {
+        _DataStreamInPortsNumber-- ;
+       return _DataStreamInPortsNumber ;
+      } ;
+      int IncrDataStreamOutPorts() {
+        _DataStreamOutPortsNumber++ ;
+       return _DataStreamOutPortsNumber ;
+      } ;
+      int DecrDataStreamOutPorts() {
+        _DataStreamOutPortsNumber-- ;
+       return _DataStreamOutPortsNumber ;
+      } ;
+      int DataStreamInPortsNumber() {
+       return _DataStreamInPortsNumber ;
+      } ;
+      int DataStreamOutPortsNumber() {
+       return _DataStreamOutPortsNumber ;
+      } ;
+      void DataStreamInPortsNumber( int aDataStreamInPortsNumber ) {
+       _DataStreamInPortsNumber = aDataStreamInPortsNumber ;
+      } ;
+      void DataStreamOutPortsNumber(int aDataStreamOutPortsNumber ) {
+       _DataStreamOutPortsNumber = aDataStreamOutPortsNumber ;
+      } ;
+      int HasDataStream() const {
+       return _DataStreamInPortsNumber + _DataStreamOutPortsNumber ;
+      } ;
+
       const int GetNodeInPortsSize() const { return _NodeInPortsSize ; } ;
       const InPort * GetNodeInLoop() const {
                    return _NodeInPorts[0] ; } ;
@@ -117,7 +151,6 @@ namespace GraphBase {
       InPort * GetChangeInPort( const char *name ) ;
       OutPort * GetChangeOutPort( const char *name ) ;
 
-//      void ListPorts( ostream & , const bool klink = true ) const ;
       void ListPorts( ostream & , const bool klink = true ) const ;
   };
   
index 857188ce0e9e5d3b93d253f021724d655ae18aa7..9bc5788c8f5a88af31779ba04b3a3dcc6f1f8c46 100644 (file)
@@ -30,6 +30,7 @@ using namespace std;
 #include "DataFlowBase_Service.hxx"
 
 void GraphBase::Service::SetService( const SALOME_ModuleCatalog::Service aService ) {
+  
   _Service.ServiceName = CORBA::string_dup( aService.ServiceName ) ;
   _Service.ServiceinParameter.length( aService.ServiceinParameter.length() ) ;
   _Service.ServiceoutParameter.length( aService.ServiceoutParameter.length() ) ;
@@ -42,6 +43,19 @@ void GraphBase::Service::SetService( const SALOME_ModuleCatalog::Service aServic
     _Service.ServiceoutParameter[ i ].Parametertype = CORBA::string_dup( aService.ServiceoutParameter[ i ].Parametertype ) ;
     _Service.ServiceoutParameter[ i ].Parametername = CORBA::string_dup( aService.ServiceoutParameter[ i ].Parametername ) ;
   }
+
+  _Service.ServiceinDataStreamParameter.length( aService.ServiceinDataStreamParameter.length() ) ;
+  _Service.ServiceoutDataStreamParameter.length( aService.ServiceoutDataStreamParameter.length() ) ;
+  for ( i = 0 ; i < (int ) _Service.ServiceinDataStreamParameter.length() ; i++ ) {
+    _Service.ServiceinDataStreamParameter[ i ].Parametertype = aService.ServiceinDataStreamParameter[ i ].Parametertype ;
+    _Service.ServiceinDataStreamParameter[ i ].Parametername = CORBA::string_dup( aService.ServiceinDataStreamParameter[ i ].Parametername ) ;
+    _Service.ServiceinDataStreamParameter[ i ].Parameterdependency = aService.ServiceinDataStreamParameter[ i ].Parameterdependency ;
+  }
+  for ( i = 0 ; i < (int ) _Service.ServiceoutDataStreamParameter.length() ; i++ ) {
+    _Service.ServiceoutDataStreamParameter[ i ].Parametertype = aService.ServiceoutDataStreamParameter[ i ].Parametertype ;
+    _Service.ServiceoutDataStreamParameter[ i ].Parametername = CORBA::string_dup( aService.ServiceoutDataStreamParameter[ i ].Parametername ) ;
+    _Service.ServiceoutDataStreamParameter[ i ].Parameterdependency = aService.ServiceoutDataStreamParameter[ i ].Parameterdependency ;
+  }
   cdebug << "GraphBase::Service::SetService : " << _Service << endl ;
   _Instance = 0 ;
 }
@@ -65,6 +79,24 @@ ostream & operator<< (ostream & f ,const SALOME_ModuleCatalog::Service & s ) {
     f << ". " << s.ServiceoutParameter[i].Parametername
       << ". " << s.ServiceoutParameter[i].Parametertype << endl ;
   }
+  for ( i = 0 ; i < (int ) s.ServiceinDataStreamParameter.length() ; i++ ) {
+    if ( i == 0 )
+      f << "                 InStreamparameters  " << i ;
+    else
+      f << "                                     " << i ;
+    f << ". " << s.ServiceinDataStreamParameter[i].Parametername
+      << ". " << s.ServiceinDataStreamParameter[i].Parametertype
+      << ". " << s.ServiceinDataStreamParameter[i].Parameterdependency << endl ;
+  }
+  for ( i = 0 ; i < (int ) s.ServiceoutDataStreamParameter.length() ; i++ ) {
+    if ( i == 0 )
+      f << "                 OutStreamparameters " << i ;
+    else
+      f << "                                     " << i ;
+    f << ". " << s.ServiceoutDataStreamParameter[i].Parametername
+      << ". " << s.ServiceoutDataStreamParameter[i].Parametertype
+      << ". " << s.ServiceoutDataStreamParameter[i].Parameterdependency << endl ;
+  }
   return f;
 }
 
index e6b7b057b55911b59014658b55d6186855522581..0c4f57aa89afb626be95112a88ee89f758fdbcd5 100644 (file)
@@ -37,48 +37,51 @@ namespace GraphBase {
 
   class Service : public Base {
 
-    SALOME_ModuleCatalog::Service _Service ;
-    int                           _Instance ;
+    private:
+
+      SALOME_ModuleCatalog::Service _Service ;
+      int                           _Instance ;
 
     public:   
 
-    Service( const SALOME_ModuleCatalog::Service aService ) {
+      Service( const SALOME_ModuleCatalog::Service aService ) {
              SetService( aService ) ;
 //             MESSAGE( "GraphBase::Service::Service : " << _Service ) ;
 //             cout << "GraphBase::Service::Service : " << _Service << endl ;
              cdebug << "GraphBase::Service::Service : " << _Service << endl ;
              } ;
-    Service( const char * aServiceName ) {
-             _Service.ServiceName = CORBA::string_dup( aServiceName ) ;
-             cdebug << "GraphBase::Service::Service : " << _Service << endl ;
-             _Instance = 0 ; } ;
-    virtual ~Service() {
-             cdebug << "GraphBase::Service::~Service" << endl ;
-             } ;
-
-    void SetService( const SALOME_ModuleCatalog::Service aService ) ;
+      Service( const char * aServiceName ) {
+               _Service.ServiceName = CORBA::string_dup( aServiceName ) ;
+               cdebug << "GraphBase::Service::Service : " << _Service << endl ;
+               _Instance = 0 ; } ;
+      virtual ~Service() {
+              cdebug << "GraphBase::Service::~Service" << endl ; } ;
 
-    const SALOME_ModuleCatalog::Service * GetService() const {
-          cdebug << "GraphBase::Service::GetService : " << _Service << endl ;
-          return &_Service ; } ;
-    const char * ServiceName() const {
-//          cdebug << "ServiceName " << hex << (void *) _Service.ServiceName
-//                 << dec << " = " << _Service.ServiceName << endl ;
-          return _Service.ServiceName ; } ;
-    const SALOME_ModuleCatalog::ListOfServicesParameter ServiceInParameter() const {
-          return _Service.ServiceinParameter ; } ;
-    const SALOME_ModuleCatalog::ListOfServicesParameter ServiceOutParameter() const {
-          return _Service.ServiceoutParameter ; } ;
+      void SetService( const SALOME_ModuleCatalog::Service aService ) ;
 
-    const int Instances() const { return _Instance ; } ;
-    int NewInstance() { _Instance += 1 ;
-                        return _Instance ; } ;
-    void Instance( int AddInst = 1 ) { if ( AddInst == 1 )
-                                         _Instance += 1 ;
-                                       else
-                                         _Instance = AddInst ; } ;
+      const SALOME_ModuleCatalog::Service * GetService() const {
+            cdebug << "GraphBase::Service::GetService : " << _Service << endl ;
+            return &_Service ; } ;
+      const char * ServiceName() const {
+//            cdebug << "ServiceName " << hex << (void *) _Service.ServiceName
+//                   << dec << " = " << _Service.ServiceName << endl ;
+            return _Service.ServiceName ; } ;
+      const SALOME_ModuleCatalog::ListOfServicesParameter ServiceInParameter() const {
+            return _Service.ServiceinParameter ; } ;
+      const SALOME_ModuleCatalog::ListOfServicesParameter ServiceOutParameter() const {
+            return _Service.ServiceoutParameter ; } ;
+      const SALOME_ModuleCatalog::ListOfServicesDataStreamParameter ServiceInStreamParameter() const {
+            return _Service.ServiceinDataStreamParameter ; } ;
+      const SALOME_ModuleCatalog::ListOfServicesDataStreamParameter ServiceOutStreamParameter() const {
+            return _Service.ServiceoutDataStreamParameter ; } ;
 
-  } ;
+      const int Instances() const { return _Instance ; } ;
+      int NewInstance() { _Instance += 1 ;
+                          return _Instance ; } ;
+      void Instance( int Inst = 1 ) { if ( Inst == 1 )
+                                        _Instance += 1 ;
+                                      else
+                                        _Instance = Inst ; } ; } ;
 
 } ;
 
index 786cab9714bb2443efdb2dadabf218f780a3f6af..a14b68a5088771d5564015a63bdab66f82d47d8f 100644 (file)
@@ -33,26 +33,29 @@ namespace GraphBase {
 
   class ServicesParameter : public Base {
 
-    SALOME_ModuleCatalog::ServicesParameter _ServicesParameter ;
+    private:
+
+      SALOME_ModuleCatalog::ServicesParameter _ServicesParameter ;
 
     public:   
 
-    ServicesParameter() {
+      ServicesParameter() {
          //cout << "ServicesParameter()" << endl ;
          _ServicesParameter.Parametername = (char *) NULL ;
          _ServicesParameter.Parametertype = (char *) NULL ;
     } ;
-    ServicesParameter( const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ) {
-          _ServicesParameter = aserviceParameter ; } ;
-    virtual ~ServicesParameter() {
+      ServicesParameter( const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ) {
+          _ServicesParameter.Parametertype = CORBA::string_dup( aserviceParameter.Parametertype ) ;
+          _ServicesParameter.Parametername = CORBA::string_dup( aserviceParameter.Parametername ) ; } ;
+      virtual ~ServicesParameter() {
 //            cout << "ServicesParameter::~ServicesParameter()" << endl ;
     } ;
-    const SALOME_ModuleCatalog::ServicesParameter & GetServicesParameter() const {
-           return _ServicesParameter ; } ;
-    const char * ServicesParameterName() const {
-          return _ServicesParameter.Parametername ; } ;
-    const char * ServicesParameterType() const {
-          return _ServicesParameter.Parametertype ; } ;
+      const SALOME_ModuleCatalog::ServicesParameter & GetServicesParameter() const {
+            return _ServicesParameter ; } ;
+      const char * ServicesParameterName() const {
+            return _ServicesParameter.Parametername ; } ;
+      const char * ServicesParameterType() const {
+            return _ServicesParameter.Parametertype ; } ;
 
   } ;
 
diff --git a/src/GraphBase/DataFlowBase_StreamGraph.cxx b/src/GraphBase/DataFlowBase_StreamGraph.cxx
new file mode 100644 (file)
index 0000000..e509444
--- /dev/null
@@ -0,0 +1,229 @@
+//  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  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 
+//
+//
+//
+//  File   : DataFlowBase_StreamGraph.cxx
+//  Author : Jean Rahuel
+//  Module : SUPERV
+//  $Header:
+
+using namespace std;
+#include "DataFlowBase_StreamGraph.hxx"
+
+#include "SALOME_LifeCycleCORBA.hxx"
+
+GraphBase::StreamGraph::StreamGraph() :
+           Graph() {
+  cdebug << "GraphBase::StreamGraph::StreamGraph" << endl ;
+}
+
+GraphBase::StreamGraph::StreamGraph( CORBA::ORB_ptr ORB ,
+                                     SALOME_NamingService* ptrNamingService ,
+                                     const char *DataFlowName ,
+                                     int * Graph_prof_debug ,
+                                     ofstream * Graph_fdebug ) :
+//                                             const char * DebugFileName ) :
+//           Graph( ORB ,ptrNamingService , DataFlowName , DebugFileName ) {
+           Graph( ORB ,ptrNamingService , DataFlowName , Graph_prof_debug , Graph_fdebug ) {
+  _Timeout = 300 ;
+  _DataStreamTrace = SUPERV::WithoutTrace ;
+  _DeltaTime = 0 ;
+  Kind( SUPERV::DataStreamGraph ) ;
+  cdebug << "GraphBase::StreamGraph::StreamGraph" << endl ;
+}
+
+GraphBase::StreamGraph::StreamGraph( CORBA::ORB_ptr ORB ,
+                       SALOME_NamingService* ptrNamingService ,
+                       const SALOME_ModuleCatalog::Service& DataFlowService ,
+                       const char *DataFlowComponentName ,
+                       const char *DataFlowInterfaceName ,
+                       const char *DataFlowName ,
+                       const SUPERV::KindOfNode DataFlowkind ,
+                       const SUPERV::SDate DataFlowFirstCreation ,
+                       const SUPERV::SDate DataFlowLastModification ,
+                       const char * DataFlowEditorRelease ,
+                       const char * DataFlowAuthor ,
+                       const char * DataFlowComputer ,
+                       const char * DataFlowComment ,
+                       int * Graph_prof_debug ,
+                       ofstream * Graph_fdebug ) :
+//                       const char * DebugFileName ) :
+           Graph( ORB ,ptrNamingService , DataFlowService , DataFlowComponentName ,
+                  DataFlowInterfaceName , DataFlowName , DataFlowkind ,
+                  DataFlowFirstCreation , DataFlowLastModification  ,
+                  DataFlowEditorRelease , DataFlowAuthor , DataFlowComputer ,
+                  DataFlowComment , Graph_prof_debug , Graph_fdebug ) {
+//                  DataFlowComment , DebugFileName ) {
+  _Timeout = 300 ;
+  _DataStreamTrace = SUPERV::WithoutTrace ;
+  _DeltaTime = 0 ;
+  cdebug << "GraphBase::StreamGraph::StreamGraph" << endl ;
+}
+
+GraphBase::StreamGraph::~StreamGraph() {
+  cdebug << "GraphBase::StreamGraph::~StreamGraph" << endl ;
+}
+
+bool GraphBase::StreamGraph::SetStreamParams( const long Timeout ,
+                                              const SUPERV::KindOfDataStreamTrace DataStreamTrace ,
+                                              const double  DeltaTime ) {
+  _Timeout = Timeout ;
+  _DataStreamTrace = DataStreamTrace ;
+  _DeltaTime = DeltaTime ;
+  cdebug << "GraphBase::StreamGraph:::SetStreamGraph _Timeout " << _Timeout << " _DataStreamTrace " << _DataStreamTrace << " _DeltaTime " << _DeltaTime
+         << endl ;
+  return true ;
+}
+
+void GraphBase::StreamGraph::StreamParams( long & Timeout ,
+                                           SUPERV::KindOfDataStreamTrace & DataStreamTrace ,
+                                           double & DeltaTime ) const {
+  Timeout = _Timeout ;
+  DataStreamTrace = _DataStreamTrace ;
+  DeltaTime = _DeltaTime ;
+  cdebug << "GraphBase::StreamGraph:::StreamGraph _Timeout " << _Timeout << " _DataStreamTrace " << _DataStreamTrace << " _DeltaTime " << _DeltaTime
+         << endl ;
+}
+
+bool GraphBase::StreamGraph::CreateStreamTopology( const char * aDirectory ) {
+  cdebug_in << "GraphBase::StreamGraph::CreateStreamTopology()" << endl;
+  int istream ;
+  for ( istream = 1 ; istream <= SubStreamGraphsNumber() ; istream++ ) {
+    ostringstream astr ;
+    astr << istream << ends ;
+    string filename = string( Name() ) + string( "_" ) + astr.str().c_str() ;
+    string fullfilename = aDirectory + filename + ".cpl" ;
+    ofstream f( fullfilename.c_str() ) ;
+    f << "DEBUT        " << filename << endl ;
+    f << "     TIMEOUT " << _Timeout << endl ;
+    f << "     TRACE   " << KindOfDataStreamTraceToString( _DataStreamTrace ) << endl ;
+    f << "     DELTA_T " << _DeltaTime << endl ;
+    f << endl ;
+    f << endl ;
+    f << "# Liste des codes" << endl ;
+    f << endl ;
+    map< string , GraphBase::Service * > aMapOfServiceNames = MapOfServiceNames() ;
+    map< string , GraphBase::Service * >::iterator aMapOfServiceNamesIterator ;
+    for ( aMapOfServiceNamesIterator = aMapOfServiceNames.begin() ;
+          aMapOfServiceNamesIterator != aMapOfServiceNames.end() ; aMapOfServiceNamesIterator++ ) {
+      GraphBase::Service * aService = aMapOfServiceNamesIterator->second ;
+      int n ;
+      for ( n = 0 ; n < GraphNodesSize() ; n++ ) {
+        if ( GetGraphNode( n )->HasDataStream() && GetChangeGraphNode( n )->SubStreamGraph() == istream ) {
+          if ( !strcmp( aService->ServiceName() , GetGraphNode( n )->ServiceName() ) ) {
+            f << "     CODE    " << aService->ServiceName() << endl ;
+            unsigned int j ;
+            cdebug << "CreateStreamTopology " << aService->ServiceName() << " InStreamParameter("
+                   << aService->ServiceInStreamParameter().length() << ") OutStreamParameter("
+                   << aService->ServiceOutStreamParameter().length() << ")" << endl ;
+            cdebug << aService->GetService() << endl ;
+            for ( j = 0 ; j < aService->ServiceInStreamParameter().length() ; j++ ) {
+              f << "           " << aService->ServiceInStreamParameter()[ j ].Parametername << "       "
+                << DataStreamDependencyToString( aService->ServiceInStreamParameter()[ j ].Parameterdependency ) << "  IN      "
+                << DataStreamToString( aService->ServiceInStreamParameter()[ j ].Parametertype ) << endl ;
+            }
+            for ( j = 0 ; j < aService->ServiceOutStreamParameter().length() ; j++ ) {
+              f << "           " << aService->ServiceOutStreamParameter()[ j ].Parametername << "      "
+                << DataStreamDependencyToString( aService->ServiceOutStreamParameter()[ j ].Parameterdependency ) << " OUT     "
+                << DataStreamToString( aService->ServiceOutStreamParameter()[ j ].Parametertype ) << endl ;
+            }
+            f << "     FIN     #" << aService->ServiceName() << endl ;
+            f << endl ;
+            f << endl ;
+            break ;
+          }
+       }
+      }
+    }
+    f << endl ;
+    f << endl ;
+    f << "# Liste des instances" << endl ;
+    int j ;
+    for ( j = 0 ; j < GraphNodesSize() ; j++ ) {
+      if ( GetGraphNode( j )->HasDataStream() && GetChangeGraphNode( j )->SubStreamGraph() == istream ) {
+        f << endl ;
+        f << " INSTANCE        " << GetGraphNode( j )->Name() << endl ;
+        f << "         CODE    " << GetGraphNode( j )->ServiceName() << endl ;
+        f << " FIN" << endl ;
+      }
+    }
+    f << endl ;
+    f << endl ;
+    f << endl ;
+    f << endl ;
+    f << endl ;
+    f << "# Liste des liens" << endl ;
+    f << endl ;
+    f << "     LIEN" << endl ;
+    for ( j = 0 ; j < GraphNodesSize() ; j++ ) {
+      if ( GetGraphNode( j )->HasDataStream() && GetChangeGraphNode( j )->SubStreamGraph() == istream ) {
+        int k ;
+        for ( k = 0 ; k < GetGraphNode( j )->GetNodeOutPortsSize() ; k++ ) {
+          if ( GetGraphNode( j )->GetNodeOutPort( k )->IsDataStream() ) {
+            long aNumberOfValues = ((GraphBase::OutDataStreamPort *) GetGraphNode( j )->GetNodeOutPort( k ))->NumberOfValues() ;
+            int n ;
+            for ( n = 0 ; n < GetGraphNode( j )->GetNodeOutPort( k )->InPortsSize() ; n++ ) {
+              SUPERV::KindOfSchema aKindOfSchema ;
+              SUPERV::KindOfInterpolation aKindOfInterpolation ;
+              SUPERV::KindOfExtrapolation aKindOfExtrapolation ;
+              ((GraphBase::InDataStreamPort *) GetGraphNode( j )->GetNodeOutPort( k )->InPorts( n ))->Params( aKindOfSchema , aKindOfInterpolation , aKindOfExtrapolation ) ;
+              f << "           " << GetGraphNode( j )->Name() << "."
+                << GetGraphNode( j )->GetNodeOutPort( k )->PortName()
+                << "   " << aNumberOfValues
+                << "           =>      "
+                << GetGraphNode( j )->GetNodeOutPort( k )->InPorts( n )->NodeName() << "."
+                << GetGraphNode( j )->GetNodeOutPort( k )->InPorts( n )->PortName()
+                << "   " << aKindOfSchema << " " << aKindOfInterpolation << "  " << aKindOfExtrapolation
+                << " ;" << endl ;
+           }
+         }
+        }
+      }
+    }
+    f << "     FIN" << endl ;
+    f << endl ;
+    f << "FIN" << endl ;
+  }
+  cdebug_out << "GraphBase::StreamGraph::CreateStreamTopology()" << endl;
+  return true ;
+}
+
+ostream & operator<< (ostream & f ,const SUPERV::KindOfDataStreamTrace & s ) {
+  switch (s) {
+  case SUPERV::WithoutTrace :
+    f << "WithoutTrace";
+    break;
+  case SUPERV::SummaryTrace :
+    f << "SummaryTrace";
+    break;
+  case SUPERV::DetailedTrace :
+    f << "DetailedTrace";
+    break;
+  default :
+    f << "UndefinedKindOfDataStreamTrace";
+    break;
+  }
+
+  return f;
+}
+
+
diff --git a/src/GraphBase/DataFlowBase_StreamGraph.hxx b/src/GraphBase/DataFlowBase_StreamGraph.hxx
new file mode 100644 (file)
index 0000000..55d65b9
--- /dev/null
@@ -0,0 +1,82 @@
+//  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
+//
+//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//
+//
+//
+//  File   : DataFlowBase_StreamGraph.hxx
+//  Author : Jean Rahuel
+//  Module : SUPERV
+//  $Header:
+
+#ifndef _DATAFLOWBASE_STREAMGRAPH_HXX
+#define _DATAFLOWBASE_STREAMGRAPH_HXX
+
+#include "DataFlowBase_Graph.hxx"
+
+namespace GraphBase {
+
+  class StreamGraph : public Graph {
+
+    private:
+    
+// Configuration :
+// The name is the name of the graph
+      long                          _Timeout ;
+      SUPERV::KindOfDataStreamTrace _DataStreamTrace ;
+      double                        _DeltaTime ;
+
+// Total number of SubStreamGraphs
+      int                           _SubStreamGraphsNumber ;
+
+    protected:
+
+    public:
+
+      StreamGraph() ;
+
+      StreamGraph( CORBA::ORB_ptr ORB ,
+                   SALOME_NamingService* ptrNamingService ,
+                   const char * DataFlowName ,
+                   int * Graph_prof_debug ,
+                   ofstream * Graph_fdebug ) ;
+
+      StreamGraph( CORBA::ORB_ptr ORB ,
+                   SALOME_NamingService * ptrNamingService ,
+                   const SALOME_ModuleCatalog::Service & DataFlowService ,
+                   const char * DataFlowComponentName ,
+                   const char * DataFlowInterfaceName ,
+                   const char * DataFlowName ,
+                   const SUPERV::KindOfNode DataFlowkind ,
+                   const SUPERV::SDate DataFlowFirstCreation ,
+                   const SUPERV::SDate DataFlowLastModification ,
+                   const char * DataFlowEditorRelease ,
+                   const char * DataFlowAuthor ,
+                   const char * DataFlowComputer ,
+                   const char * DataFlowComment ,
+                   int * Graph_prof_debug ,
+                   ofstream * Graph_fdebug ) ;
+
+      ~StreamGraph() ;
+
+      bool SetStreamParams( const long Timeout ,
+                            const SUPERV::KindOfDataStreamTrace DataStreamTrace ,
+                            const double  DeltaTime ) ;
+      void StreamParams( long & Timeout ,
+                         SUPERV::KindOfDataStreamTrace & DataStreamTrace ,
+                         double & DeltaTime ) const ;
+
+      bool CreateStreamTopology( const char * aDirectory ) ;
+
+      void SubStreamGraphsNumber( int SubStreamGraphsNumber ) {
+           _SubStreamGraphsNumber = SubStreamGraphsNumber ; } ;
+      long SubStreamGraphsNumber() const {
+           return _SubStreamGraphsNumber ; } ;
+
+  };
+
+};
+
+ostream & operator<< (ostream &,const SUPERV::KindOfDataStreamTrace &);
+
+#endif
diff --git a/src/GraphBase/DataFlowBase_StreamNode.cxx b/src/GraphBase/DataFlowBase_StreamNode.cxx
new file mode 100644 (file)
index 0000000..04d3176
--- /dev/null
@@ -0,0 +1,230 @@
+//  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
+//
+//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//
+//
+//
+//  File   : DataFlowBase_StreamNode.cxx
+//  Author : Jean Rahuel
+//  Module : SUPERV
+//  $Header:
+
+using namespace std;
+
+#include "DataFlowBase_StreamNode.hxx"
+
+GraphBase::StreamNode::StreamNode() :
+  GraphBase::PortsOfNode::PortsOfNode() {
+  _Name = NULL ;
+  _LinkedNodesSize = 0 ;
+  _LinkedStreamNodesSize = 0 ;
+  _HeadNode = false ;
+  _SubGraphNumber = 0 ;
+  _SubStreamGraphNumber = 0 ;
+  cdebug << "GraphBase::StreamNode::StreamNode " << this << " "  << endl ;
+}
+
+GraphBase::StreamNode::StreamNode( const char * NodeName ) :
+  GraphBase::PortsOfNode::PortsOfNode( NodeName ) {
+  if ( NodeName != NULLSTRING && strlen( NodeName ) ) {
+    _Name = new char[ strlen( NodeName )+1 ] ;
+    strcpy( _Name , NodeName ) ;
+  }
+  else {
+    _Name = NULLSTRING ;
+  }
+  _LinkedNodesSize = 0 ;
+  _LinkedStreamNodesSize = 0 ;
+  _HeadNode = false ;
+  _SubGraphNumber = 0 ;
+  _SubStreamGraphNumber = 0 ;
+  cdebug << "GraphBase::StreamNode::StreamNode " << NodeName << " "
+         << this << " "  << endl ;
+}
+
+GraphBase::StreamNode::~StreamNode() {
+  cdebug << "GraphBase::StreamNode::~StreamNode " << this << endl ;
+}
+
+bool GraphBase::StreamNode::Name( const char * aName) {
+  cdebug_in << "GraphBase::StreamNode::Name " << _Name << endl;
+  if ( _Name ) {
+    cdebug << "GraphBase::StreamNode::ReName "  << _Name << " --> " << aName << endl ;
+    delete [] _Name ;
+  }
+  _Name = new char[strlen(aName)+1] ;
+  strcpy( _Name , aName ) ;
+  cdebug_out << "GraphBase::StreamNode::Name " << _Name << endl;
+  return true ;
+}
+
+void GraphBase::StreamNode::SetSubStreamGraph( int SubStreamGraphsNumber , int & RetVal ) {
+  int jnode ;
+  cdebug_in << Name() << " GraphBase::StreamNode::SetSubStreamGraph Level "<< Level() << " SortedIndex "
+            << SortedIndex() << " SubStreamGraphsNumber " << SubStreamGraphsNumber << " RetVal " << RetVal
+            << endl ;
+  if ( SubStreamGraph() == 0 || SubStreamGraph() == SubStreamGraphsNumber ) {
+    SubStreamGraph( SubStreamGraphsNumber ) ;
+    cdebug << Name() << " SubStreamGraph " << SubStreamGraph() << " SetSubStreamGraph LinkedStreamNodesSize "
+           << LinkedStreamNodesSize() << endl ;
+    for ( jnode = 0 ; jnode < LinkedStreamNodesSize() ; jnode++ ) {
+      if ( LinkedStreamNodes( jnode )->Level() > Level() ||
+           ( LinkedStreamNodes( jnode )->Level() == Level() &&
+             LinkedStreamNodes( jnode )->SortedIndex() > SortedIndex() ) ) {
+        LinkedStreamNodes( jnode )->SetSubStreamGraph( SubStreamGraphsNumber , RetVal ) ;
+        if ( RetVal != SubStreamGraphsNumber ) {
+          break ;
+       }
+      }
+      else if ( LinkedStreamNodes( jnode )->SubStreamGraph() == 0 ) {
+        LinkedStreamNodes( jnode )->SubStreamGraph( SubStreamGraphsNumber ) ;
+        cdebug << LinkedStreamNodes( jnode )->Name() << " SubStreamGraph "
+               << LinkedStreamNodes( jnode )->SubStreamGraph() << endl ;
+      }
+      else if ( LinkedStreamNodes( jnode )->SubStreamGraph() != SubStreamGraphsNumber ) {
+        cdebug << LinkedStreamNodes( jnode )->Name() << " SubStreamGraph "
+               << LinkedStreamNodes( jnode )->SubStreamGraph() << " != " << SubStreamGraphsNumber << endl ;
+        RetVal = LinkedStreamNodes( jnode )->SubStreamGraph() ;
+        break ;
+      }
+    }
+  }
+  else {
+    cdebug << Name() << " SubStreamGraph " << SubStreamGraph() << " != " << SubStreamGraphsNumber << endl ;
+    RetVal = SubStreamGraph() ;
+  }
+
+  cdebug_out << Name() << "->GraphBase::StreamNode::SetSubStreamGraph RetVal " << RetVal << endl ;
+  return ;
+}
+
+void GraphBase::StreamNode::AddLink( GraphBase::StreamNode * ToNode ) {
+  int index = GetLinkedNodeIndex( ToNode->Name() ) ;
+  if ( index < 0 ) {
+    cdebug << Name() << "->GraphBase::StreamNode::AddLinkedNode( " << ToNode->Name()
+           << " ) new LinkedNode " << endl ;
+    _LinkedNodes.resize( _LinkedNodesSize+1 ) ;
+    _LinkedInPortsNumber.resize( _LinkedNodesSize+1 ) ;
+    _LinkedNodes[ _LinkedNodesSize ] = ToNode ;
+    _LinkedInPortsNumber[ _LinkedNodesSize ] = 1 ;
+    SetLinkedNodeIndex( ToNode->Name() , _LinkedNodesSize ) ;
+    index = _LinkedNodesSize ;
+    _LinkedNodesSize++ ;
+  }
+  else {
+    cdebug << Name() << "->GraphBase::StreamNode::AddLinkedNode( " << ToNode->Name()
+           << " ) old LinkedNode " << _LinkedNodes[index ]->Name() << endl ;
+    _LinkedInPortsNumber[ index ] += 1 ;
+  }
+  cdebug << Name() << "->GraphBase::StreamNode::AddLinkedNode( " << ToNode->Name()
+         << " ) LinkedNodesSize " << _LinkedNodesSize << " [ " << index
+         << " ] _LinkedInPortsNumber " << _LinkedInPortsNumber[ index ] << endl ;
+}
+
+bool GraphBase::StreamNode::RemoveLink( GraphBase::StreamNode * ToNode ) {
+  int index = GetLinkedNodeIndex( ToNode->Name() ) ;
+  if ( index >= 0 ) {
+    cdebug << "GraphBase::StreamNode::RemoveLink( to " << ToNode->Name() << " from "
+           << Name() << " index : " << index << " LinkedInPortsNumber "
+           << _LinkedInPortsNumber[ index ] << " - 1" << endl ;
+    _LinkedInPortsNumber[ index ] -= 1 ;
+    if ( _LinkedInPortsNumber[ index ] == 0 ) {
+      _LinkedNodesSize-- ;
+      cdebug << "GraphBase::StreamNode::RemoveLink new LinkedNodesSize "
+             << _LinkedNodesSize << " " << ToNode->Name() << " removed from "
+             << " linkednodes of " << Name() << endl ;
+      int i ;
+      for ( i = index ; i < _LinkedNodesSize ; i++ ) {
+        _LinkedNodes[ i ] = _LinkedNodes[ i+1 ] ;
+        _LinkedInPortsNumber[ i ] =  _LinkedInPortsNumber[ i+1 ] ;
+        SetLinkedNodeIndex( _LinkedNodes[ i ]->Name() , i ) ;
+      }
+      DelLinkedNodeIndex( ToNode->Name() ) ;
+      _LinkedNodes.resize( _LinkedNodesSize+1 ) ;
+      _LinkedInPortsNumber.resize( _LinkedNodesSize+1 ) ;
+    }
+  }
+  else {
+    cdebug << " Error index " << index << endl ;
+  }
+  return (index >= 0 ) ;
+}
+
+void GraphBase::StreamNode::ReNameLink( const char* OldNodeName ,
+                                           const char* NewNodeName ) {
+  cdebug_in << "GraphBase::StreamNode::ReNameLink (" << OldNodeName << " , "
+            << NewNodeName << ")" << endl;
+  int index = GetLinkedNodeIndex( OldNodeName ) ;
+  if ( index >= 0 ) {
+//    _MapOfLinkedNodes.erase( OldNodeName ) ;
+    DelLinkedNodeIndex( OldNodeName ) ;
+    SetLinkedNodeIndex( NewNodeName , index ) ;
+  }
+  cdebug_out << "GraphBase::StreamNode::ReNameLink" << endl ;
+}
+
+void GraphBase::StreamNode::AddStreamLink( GraphBase::StreamNode * ToNode ) {
+  int index = GetLinkedStreamNodeIndex( ToNode->Name() ) ;
+  if ( index < 0 ) {
+    cdebug_in << Name() << "->GraphBase::StreamNode::AddStreamLink( " << ToNode->Name()
+              << " ) new LinkedNode " << endl ;
+    _LinkedStreamNodes.resize( _LinkedStreamNodesSize+1 ) ;
+    _LinkedInStreamPortsNumber.resize( _LinkedStreamNodesSize+1 ) ;
+    _LinkedStreamNodes[ _LinkedStreamNodesSize ] = ToNode ;
+    _LinkedInStreamPortsNumber[ _LinkedStreamNodesSize ] = 1 ;
+    SetLinkedStreamNodeIndex( ToNode->Name() , _LinkedStreamNodesSize ) ;
+    index = _LinkedStreamNodesSize ;
+    _LinkedStreamNodesSize++ ;
+  }
+  else {
+    cdebug_in << Name() << "->GraphBase::StreamNode::AddStreamLink( " << ToNode->Name()
+              << " ) old LinkedNode " << _LinkedStreamNodes[index ]->Name() << endl ;
+    _LinkedInStreamPortsNumber[ index ] += 1 ;
+  }
+  cdebug_out << Name() << "->GraphBase::StreamNode::AddStreamLinkedNode( " << ToNode->Name()
+             << " ) LinkedStreamNodesSize " << _LinkedStreamNodesSize << " [ " << index
+             << " ] _LinkedInStreamPortsNumber " << _LinkedInStreamPortsNumber[ index ] << endl ;
+}
+
+bool GraphBase::StreamNode::RemoveStreamLink( GraphBase::StreamNode * ToNode ) {
+  int index = GetLinkedStreamNodeIndex( ToNode->Name() ) ;
+  if ( index >= 0 ) {
+    cdebug << "GraphBase::StreamNode::RemoveStreamLink( to " << ToNode->Name() << " from "
+           << Name() << " index : " << index << " LinkedInStreamPortsNumber "
+           << _LinkedInStreamPortsNumber[ index ] << " - 1" << endl ;
+    _LinkedInStreamPortsNumber[ index ] -= 1 ;
+    if ( _LinkedInStreamPortsNumber[ index ] == 0 ) {
+      _LinkedStreamNodesSize-- ;
+      cdebug << "GraphBase::StreamNode::RemoveStreamLink new LinkedNodesSize "
+             << _LinkedStreamNodesSize << " " << ToNode->Name() << " removed from "
+             << " linkednodes of " << Name() << endl ;
+      int i ;
+      for ( i = index ; i < _LinkedStreamNodesSize ; i++ ) {
+        _LinkedStreamNodes[ i ] = _LinkedStreamNodes[ i+1 ] ;
+        _LinkedInStreamPortsNumber[ i ] =  _LinkedInStreamPortsNumber[ i+1 ] ;
+        SetLinkedStreamNodeIndex( _LinkedStreamNodes[ i ]->Name() , i ) ;
+      }
+      DelLinkedStreamNodeIndex( ToNode->Name() ) ;
+      _LinkedStreamNodes.resize( _LinkedStreamNodesSize+1 ) ;
+      _LinkedInStreamPortsNumber.resize( _LinkedStreamNodesSize+1 ) ;
+    }
+  }
+  else {
+    cdebug << " Error index " << index << endl ;
+  }
+  return (index >= 0 ) ;
+}
+
+void GraphBase::StreamNode::ReNameStreamLink( const char* OldNodeName ,
+                                              const char* NewNodeName ) {
+  cdebug_in << "GraphBase::StreamNode::ReNameStreamLink (" << OldNodeName << " , "
+            << NewNodeName << ")" << endl;
+  int index = GetLinkedStreamNodeIndex( OldNodeName ) ;
+  if ( index >= 0 ) {
+//    _MapOfLinkedNodes.erase( OldNodeName ) ;
+    DelLinkedStreamNodeIndex( OldNodeName ) ;
+    SetLinkedStreamNodeIndex( NewNodeName , index ) ;
+  }
+  cdebug_out << "GraphBase::StreamNode::ReNameStreamLink" << endl ;
+}
+
diff --git a/src/GraphBase/DataFlowBase_StreamNode.hxx b/src/GraphBase/DataFlowBase_StreamNode.hxx
new file mode 100644 (file)
index 0000000..3a7b5b2
--- /dev/null
@@ -0,0 +1,190 @@
+//  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
+//
+//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//
+//
+//
+//  File   : DataFlowBase_StreamNode.hxx
+//  Author : Jean Rahuel
+//  Module : SUPERV
+//  $Header:
+
+#ifndef _DATAFLOWBASE_STREAMNODE_HXX
+#define _DATAFLOWBASE_STREAMNODE_HXX
+
+#include "DataFlowBase_PortsOfNode.hxx"
+
+namespace GraphBase {
+
+  class StreamNode : public PortsOfNode {
+
+    private:
+    
+      char                 * _Name ;
+      SUPERV::KindOfNode     _Kind ;
+
+// Nodes with LinkedInPortsNumber InPort(s) linked to Outport(s) of this node :
+      map< string , int >   _MapOfLinkedNodes ;
+      int                   _LinkedNodesSize ;
+      vector<StreamNode * > _LinkedNodes ;
+      vector<int >          _LinkedInPortsNumber ;
+
+// Nodes with InStreamPort(s) linked to OutStreamport(s) of this node :
+// NodeName <--> index of that linked node in _LinkedNodes
+      map< string , int >   _MapOfLinkedStreamNodes ;
+      int                   _LinkedStreamNodesSize ;
+      vector<StreamNode * > _LinkedStreamNodes ;
+      vector<int >          _LinkedInStreamPortsNumber ;
+
+      bool                  _HeadNode ;
+      int                   _LevelNumber ;
+      int                   _SortedIndex ;
+
+      int                   _SubGraphNumber ;
+      int                   _SubStreamGraphNumber ;
+
+    protected:
+
+      int                  * _Graph_prof_debug ;
+      ofstream             * _Graph_fdebug ;
+
+      StreamNode() ;
+
+      StreamNode( const char * NodeName ) ;
+
+      StreamNode( int * Graph_prof_debug ,
+                  ofstream * Graph_fdebug ) ;
+
+      virtual ~StreamNode() ;
+
+    public:
+
+      char * Name() const { return my_strdup( _Name ) ; } ;
+      const char *const * NamePtr() const { return &_Name ; } ;
+      bool Name( const char * aName ) ;
+
+      SUPERV::KindOfNode Kind() const {
+            return _Kind; } ;
+      bool Kind( SUPERV::KindOfNode aKind) {
+        _Kind = aKind ;
+        return true ; } ;
+      const bool IsComputingNode() const {
+            return (Kind() == SUPERV::ComputingNode ) ; } ;
+      const bool IsFactoryNode() const {
+            return (Kind() == SUPERV::FactoryNode ) ; } ;
+      const bool IsOneOfGOTONodes() const {
+            return (Kind() == SUPERV::LoopNode ||
+                    Kind() == SUPERV::EndLoopNode ||
+                    Kind() == SUPERV::SwitchNode ||
+                    Kind() == SUPERV::EndSwitchNode ||
+                    Kind() == SUPERV::GOTONode ) ; } ;
+      const bool IsOneOfInLineNodes() const {
+            return (Kind() == SUPERV::InLineNode || IsOneOfGOTONodes() ) ; } ;
+      const bool IsInLineNode() const {
+            return (Kind() == SUPERV::InLineNode ) ; } ;
+      const bool IsDataFlowNode() const {
+            return (Kind() == SUPERV::DataFlowGraph ) ; } ;
+      const bool IsDataStreamNode() const {
+            return (Kind() == SUPERV::DataStreamGraph ) ; } ;
+      const bool IsLoopNode() const {
+            return (Kind() == SUPERV::LoopNode ) ; } ;
+      const bool IsEndLoopNode() const {
+            return (Kind() == SUPERV::EndLoopNode ) ; } ;
+      const bool IsSwitchNode() const {
+            return (Kind() == SUPERV::SwitchNode ) ; } ;
+      const bool IsEndSwitchNode() const {
+            return (Kind() == SUPERV::EndSwitchNode ) ; } ;
+      const bool IsGOTONode() const {
+            return (Kind() == SUPERV::GOTONode ) ; } ;
+
+      int GetLinkedNodeIndex( const char * name ) {
+          int index = _MapOfLinkedNodes[ name ] -1 ;
+          if ( index >= 0 ) {
+            cdebug << "GetLinkedNodeIndex of " << name
+                   << " in _MapOfLinkedNodes : "
+                   << index << " Node " << hex << (void *) _LinkedNodes[ index ]
+                   << dec << " '" << _LinkedNodes[ index ]->Name() << "'"
+                   << endl ;
+         }
+          return index ; } ;
+      void SetLinkedNodeIndex( const char * name , const int index ) {
+          _MapOfLinkedNodes[ name ] = index +1 ;
+          cdebug << "SetLinkedNodeIndex of " << name << " in _MapOfLinkedNodes : "
+                 << index << " Node " << hex << (void *) _LinkedNodes[ index ]
+                 << dec << " '" << _LinkedNodes[ index ]->Name() << "'"
+                 << " _MapOfLinkedNodes " << _MapOfLinkedNodes[ name ] - 1
+                 << endl ;
+          } ;
+      void DelLinkedNodeIndex( const char * name ) {
+           _MapOfLinkedNodes.erase( name ) ; } ;
+
+      int LinkedNodesSize() const { return _LinkedNodesSize ; } ;
+
+      const int LinkedInPortsNumber( int i ) const { return _LinkedInPortsNumber[ i ] ; } ;
+
+      StreamNode * LinkedNodes( int i ) const { return _LinkedNodes[ i ] ; } ;
+
+      int GetLinkedStreamNodeIndex( const char * name ) {
+          int index = _MapOfLinkedStreamNodes[ name ] -1 ;
+          if ( index >= 0 ) {
+            cdebug << "GetLinkedStreamNodeIndex of " << name
+                   << " in _MapOfLinkedStreamNodes : "
+                   << index << " Node " << hex << (void *) _LinkedStreamNodes[ index ]
+                   << dec << " '" << _LinkedStreamNodes[ index ]->Name() << "'"
+                   << endl ;
+         }
+          return index ; } ;
+      void SetLinkedStreamNodeIndex( const char * name , const int index ) {
+          _MapOfLinkedStreamNodes[ name ] = index +1 ;
+          cdebug << "SetLinkedStreamNodeIndex of " << name << " in _MapOfLinkedStreamNodes : "
+                 << index << " Node " << hex << (void *) _LinkedStreamNodes[ index ]
+                 << dec << " '" << _LinkedStreamNodes[ index ]->Name() << "'"
+                 << " _MapOfLinkedStreamNodes " << _MapOfLinkedStreamNodes[ name ] - 1
+                 << endl ;
+          } ;
+      void DelLinkedStreamNodeIndex( const char * name ) {
+           _MapOfLinkedStreamNodes.erase( name ) ; } ;
+
+      int LinkedStreamNodesSize() const { return _LinkedStreamNodesSize ; } ;
+
+      const int LinkedInStreamPortsNumber( int i ) const { return _LinkedInStreamPortsNumber[ i ] ; } ;
+
+      StreamNode * LinkedStreamNodes( int i ) const { return _LinkedStreamNodes[ i ] ; } ;
+
+      void HeadNode( bool aHeadNode ) { _HeadNode = aHeadNode ; } ;
+      const bool IsHeadNode() const { return _HeadNode ; } ;
+
+      int Level() { return _LevelNumber ; } ;
+      void Level( int LevelNumber ) {
+           _LevelNumber = LevelNumber ; } ;
+
+      void SortedIndex( int aSortedIndex ) {
+           _SortedIndex = aSortedIndex ; } ;
+      int SortedIndex() const {
+           return _SortedIndex ; } ;
+
+      void SetSubStreamGraph( int SubStreamGraphsNumber , int & RetVal ) ;
+
+      int SubGraph() { return _SubGraphNumber ; } ;
+      void SubGraph( int SubGraphNumber ) {
+           _SubGraphNumber = SubGraphNumber ; } ;
+
+      int SubStreamGraph() { return _SubStreamGraphNumber ; } ;
+      void SubStreamGraph( int SubStreamGraphNumber ) {
+           _SubStreamGraphNumber = SubStreamGraphNumber ; } ;
+
+      void AddLink( StreamNode * aNode ) ;
+      bool RemoveLink( StreamNode * aNode ) ;
+      void ReNameLink( const char* OldNodeName ,
+                       const char* NewNodeName ) ;
+
+      void AddStreamLink( StreamNode * aNode ) ;
+      bool RemoveStreamLink( StreamNode * aNode ) ;
+      void ReNameStreamLink( const char* OldNodeName ,
+                             const char* NewNodeName ) ;
+
+  };
+  
+};
+
+#endif
index 3a6f82dbe719717a9d5848f9ea1d45219b9a2914..01a298c07dad0bf5185dd450277fb5fd9f0eb6c2 100644 (file)
@@ -115,7 +115,7 @@ bool GraphBase::XmlHandler::endElement( const QString&,
     depth -= 1 ;
 
 #if TRACE
-  MESSAGE( " ==========endElement step[" << depth << "]="
+  MESSAGE( " ====================endElement step[" << depth << "]="
            << step[depth] << " qName " << qName << " fieldvalue '"
            << fieldvalue[depth] << "'")
 #endif
@@ -186,7 +186,8 @@ bool GraphBase::XmlHandler::endElement( const QString&,
             step[3] = 0 ;
             aNode.theService.ServiceinParameter.length( 0 ) ;
             aNode.theService.ServiceoutParameter.length( 0 ) ;
-            aNode.theListOfParameters.resize( 0 ) ;
+            aNode.theListOfInDataStreams.resize( 0 ) ;
+            aNode.theListOfOutDataStreams.resize( 0 ) ;
             aNode.theListOfFuncName.resize( 0 ) ;
             aNode.theListOfPythonFunctions.resize( 0 ) ;
             break ;
@@ -299,12 +300,45 @@ bool GraphBase::XmlHandler::endElement( const QString&,
 // kind ok
             sscanf( fieldvalue[depth].c_str() ,"%d" , (int * ) &aNode.theKind ) ;
             fieldvalue[depth] = NULLSTRING ;
+            if ( aNode.theKind != SUPERV::DataStreamGraph ) {
+              step[depth]++ ;
+              step[4] = 0 ;
+           }
+            break ;
+          }
+          else if ( qName == "streamgraph-timeout" ) {
+            if ( fieldvalue[depth] == NULLSTRING )
+              return returnfalse( this , "depth3-3" , qName ) ;
+            sscanf( fieldvalue[depth].c_str() ,"%d" , (int * ) &aNode.theTimeout ) ;
+            fieldvalue[depth] = NULLSTRING ;
+//              step[depth]++ ;
+//              step[4] = 0 ;
+            break ;
+          }
+          else if ( qName == "streamgraph-datastreamtrace" ) {
+            if ( fieldvalue[depth] == NULLSTRING )
+              return returnfalse( this , "depth3-3" , qName ) ;
+            sscanf( fieldvalue[depth].c_str() ,"%d" , (int * ) &aNode.theDataStreamTrace ) ;
+            fieldvalue[depth] = NULLSTRING ;
+//              step[depth]++ ;
+//              step[4] = 0 ;
+            break ;
+          }
+          else if ( qName == "streamgraph-deltatime" ) {
+            if ( fieldvalue[depth] == NULLSTRING )
+              return returnfalse( this , "depth3-3" , qName ) ;
+            sscanf( fieldvalue[depth].c_str() ,"%lf" , (int * ) &aNode.theDeltaTime ) ;
+            fieldvalue[depth] = NULLSTRING ;
             step[depth]++ ;
             step[4] = 0 ;
+            break ;
           }
-          else
-            return returnfalse( this , "depth3-3" , qName ) ;
-          break ;
+          else {
+            step[depth]++ ;
+            step[4] = 0 ;
+         }
+//            return returnfalse( this , "depth3-3" , qName ) ;
+//          break ;
         case 4 :
           if ( qName == "coupled-node" ) {
             if ( fieldvalue[depth] == NULLSTRING )
@@ -335,7 +369,7 @@ bool GraphBase::XmlHandler::endElement( const QString&,
             return returnfalse( this , "depth3-5" , qName ) ;
           break ;
         case 6 :
-          if ( qName == "Parameter-list" ) {
+          if ( qName == "DataStream-list" || qName == "Parameter-list" ) {
             if ( fieldvalue[depth] != NULLSTRING )
               return returnfalse( this , "depth3-6" , qName ) ;
             fieldvalue[depth] = NULLSTRING ;
@@ -772,21 +806,23 @@ bool GraphBase::XmlHandler::endElement( const QString&,
           if ( qName == "inParameter" ) {
             if ( fieldvalue[depth] != NULLSTRING )
               return returnfalse( this , "depth4-6" , qName ) ;
-            int size = aNode.theListOfParameters.size() ;
-            aNode.theListOfParameters.resize( size+1 ) ;
-            aNode.theListOfParameters[size].theInParameter = aParameter ;
-            step[depth]++ ;
+            int size = aNode.theListOfInDataStreams.size() ;
+            aNode.theListOfInDataStreams.resize( size+1 ) ;
+            aNode.theListOfInDataStreams[ size ] = anInDataStreamParameter ;
+            break ;
 // One more aParameter input
           }
           else
-            return returnfalse( this , "depth4-6" , qName ) ;
-          break ;
+            step[depth]++ ;
+//            return returnfalse( this , "depth4-6" , qName ) ;
+//          break ;
         case 7 :
           if ( qName == "outParameter" ) {
             if ( fieldvalue[depth] != NULLSTRING )
               return returnfalse( this , "depth4-7" , qName ) ;
-            int size = aNode.theListOfParameters.size() ;
-            aNode.theListOfParameters[size-1].theOutParameter = aParameter ;
+            int size = aNode.theListOfOutDataStreams.size() ;
+            aNode.theListOfOutDataStreams.resize( size+1 ) ;
+            aNode.theListOfOutDataStreams[ size ] = anOutDataStreamParameter ;
 // One more aParameter output
             step[4] = 6 ;
             step[5] = 4 ;
@@ -868,46 +904,103 @@ bool GraphBase::XmlHandler::endElement( const QString&,
           if ( qName == "inParameter-type" ) {
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth5-4" , qName ) ;
-            if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) {
-              aParameter.Parametertype = fieldvalue[depth].c_str() ;
-           }
-            else {
-              aParameter.Parametertype = "" ;
-           }
+            sscanf( fieldvalue[depth].c_str() , "%d" , (int * ) &anInDataStreamParameter.theDataStreamParameter.Parametertype ) ;
             fieldvalue[depth] = NULLSTRING ;
             step[depth]++ ;
+#if TRACE
+            cout << "InDataStreamParameter.inParameter-type " << anInDataStreamParameter.theDataStreamParameter.Parametertype << " step[" << depth << "]" << step[depth] << endl ;
+#endif
+            break ;
           }
           else
-            return returnfalse( this , "depth5-4" , qName ) ;
-          break ;
+            step[depth] = 6 ;
+//            return returnfalse( this , "depth5-4" , qName ) ;
+//          break ;
         case 5 :
           if ( qName == "inParameter-name" ) {
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth5-5" , qName ) ;
             if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) {
-              aParameter.Parametername = fieldvalue[depth].c_str() ;
+              anInDataStreamParameter.theDataStreamParameter.Parametername = fieldvalue[depth].c_str() ;
            }
             else {
-              aParameter.Parametername = "" ;
+              anInDataStreamParameter.theDataStreamParameter.Parametername = "" ;
            }
             fieldvalue[depth] = NULLSTRING ;
-            step[depth]++ ;
+#if TRACE
+            cout << "InDataStreamParameter.inParameter-name " << anInDataStreamParameter.theDataStreamParameter.Parametername << " step[" << depth << "]" << step[depth] << endl ;
+#endif
+//            step[depth]++ ;
+//            step[depth] = 4 ;
+            break ;
           }
-          else
-            return returnfalse( this , "depth5-5" , qName ) ;
-          break ;
+          else if ( qName == "inParameter-dependency" ) {
+            if ( fieldvalue[depth] == NULLSTRING )
+              return returnfalse( this , "depth5-5" , qName ) ;
+            sscanf( fieldvalue[depth].c_str() , "%d" , (int * ) &anInDataStreamParameter.theDataStreamParameter.Parameterdependency ) ;
+            fieldvalue[depth] = NULLSTRING ;
+#if TRACE
+            cout << "InDataStreamParameter.inParameter-dependency " << anInDataStreamParameter.theDataStreamParameter.Parameterdependency << " step[" << depth << "]"
+                 << step[depth] << endl ;
+#endif
+//            step[depth]++ ;
+//            step[depth] = 4 ;
+            break ;
+          }
+          else if ( qName == "inParameter-schema" ) {
+            if ( fieldvalue[depth] == NULLSTRING )
+              return returnfalse( this , "depth5-5" , qName ) ;
+            sscanf( fieldvalue[depth].c_str() , "%d" , (int * ) &anInDataStreamParameter.theKindOfSchema ) ;
+            fieldvalue[depth] = NULLSTRING ;
+#if TRACE
+            cout << "InDataStreamParameter.inParameter-schema " << anInDataStreamParameter.theKindOfSchema << " step[" << depth << "]"
+                 << step[depth] << endl ;
+#endif
+//            step[depth]++ ;
+//            step[depth] = 4 ;
+            break ;
+          }
+          else if ( qName == "inParameter-interpolation" ) {
+            if ( fieldvalue[depth] == NULLSTRING )
+              return returnfalse( this , "depth5-5" , qName ) ;
+            sscanf( fieldvalue[depth].c_str() , "%d" , (int * ) &anInDataStreamParameter.theKindOfInterpolation ) ;
+            fieldvalue[depth] = NULLSTRING ;
+#if TRACE
+            cout << "InDataStreamParameter.inParameter-interpolation " << anInDataStreamParameter.theKindOfInterpolation << " step[" << depth << "]"
+                 << step[depth] << endl ;
+#endif
+//            step[depth]++ ;
+//            step[depth] = 4 ;
+            break ;
+          }
+          else if ( qName == "inParameter-extrapolation" ) {
+            if ( fieldvalue[depth] == NULLSTRING )
+              return returnfalse( this , "depth5-5" , qName ) ;
+            sscanf( fieldvalue[depth].c_str() , "%d" , (int * ) &anInDataStreamParameter.theKindOfExtrapolation ) ;
+            fieldvalue[depth] = NULLSTRING ;
+//            step[depth]++ ;
+            step[depth] = 4 ;
+#if TRACE
+            cout << "InDataStreamParameter.inParameter-extrapolation " << anInDataStreamParameter.theKindOfExtrapolation << " step[" << depth << "]"
+                 << step[depth] << endl ;
+#endif
+            break ;
+          }
+//          else
+//            return returnfalse( this , "depth5-5" , qName ) ;
+//          break ;
         case 6 :
           if ( qName == "outParameter-type" ) {
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth5-6" , qName ) ;
-            if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) {
-              aParameter.Parametertype = fieldvalue[depth].c_str() ;
-           }
-            else {
-              aParameter.Parametertype = "" ;
-           }
+            sscanf( fieldvalue[depth].c_str() , "%d" , (int * ) &anOutDataStreamParameter.theDataStreamParameter.Parametertype ) ;
             fieldvalue[depth] = NULLSTRING ;
-            step[depth]++ ;
+//            step[depth]++ ;
+            step[depth] = 7 ;
+#if TRACE
+            cout << "OutDataStreamParameter.outParameter-type " << anOutDataStreamParameter.theDataStreamParameter.Parametertype << " step[" << depth << "]"
+                 << step[depth] << endl ;
+#endif
           }
           else
             return returnfalse( this , "depth5-6" , qName ) ;
@@ -917,13 +1010,42 @@ bool GraphBase::XmlHandler::endElement( const QString&,
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth5-7" , qName ) ;
             if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) {
-              aParameter.Parametername = fieldvalue[depth].c_str() ;
+              anOutDataStreamParameter.theDataStreamParameter.Parametername = fieldvalue[depth].c_str() ;
            }
             else {
-              aParameter.Parametername = "" ;
+              anOutDataStreamParameter.theDataStreamParameter.Parametername = "" ;
            }
             fieldvalue[depth] = NULLSTRING ;
-            step[depth]++ ;
+#if TRACE
+            cout << "OutDataStreamParameter.outParameter-name " << anOutDataStreamParameter.theDataStreamParameter.Parametername << " step[" << depth << "]"
+                 << step[depth] << endl ;
+#endif
+//            step[depth]++ ;
+//            step[depth] = 6 ;
+          }
+          else if ( qName == "outParameter-dependency" ) {
+            if ( fieldvalue[depth] == NULLSTRING )
+              return returnfalse( this , "depth5-7" , qName ) ;
+            sscanf( fieldvalue[depth].c_str() , "%d" , (int * ) &anOutDataStreamParameter.theDataStreamParameter.Parameterdependency ) ;
+            fieldvalue[depth] = NULLSTRING ;
+#if TRACE
+            cout << "OutDataStreamParameter.outParameter-dependency " << anOutDataStreamParameter.theDataStreamParameter.Parameterdependency << " step[" << depth << "]"
+                 << step[depth] << endl ;
+#endif
+//            step[depth]++ ;
+//            step[depth] = 6 ;
+          }
+          else if ( qName == "outParameter-values" ) {
+            if ( fieldvalue[depth] == NULLSTRING )
+              return returnfalse( this , "depth5-7" , qName ) ;
+            sscanf( fieldvalue[depth].c_str() , "%d" , (int * ) &anOutDataStreamParameter.theNumberOfValues ) ;
+            fieldvalue[depth] = NULLSTRING ;
+//            step[depth]++ ;
+            step[depth] = 6 ;
+#if TRACE
+            cout << "OutDataStreamParameter.outParameter-values " << anOutDataStreamParameter.theNumberOfValues << " step[" << depth << "]"
+                 << step[depth] << endl ;
+#endif
           }
           else
             return returnfalse( this , "depth5-7" , qName ) ;
@@ -1042,6 +1164,9 @@ bool GraphBase::XmlHandler::endElement( const QString&,
     }
   }
 
+#if TRACE
+  cout << "return from endElement " << qName << " step[" << depth << "]" << step[depth] << endl ;
+#endif
   return TRUE;
 }
 
index 9d00b725ace7e49edd15511023ca3ebe3db4859b..5bfcdb983edb17660b66bd9979f263763bd2b6f4 100755 (executable)
@@ -54,6 +54,9 @@ namespace GraphBase {
     bool constructor ;
     GraphBase::SNode aNode ;
     SALOME_ModuleCatalog::ServicesParameter aParameter ;
+    GraphBase::InDataStreamParameter anInDataStreamParameter ;
+    GraphBase::OutDataStreamParameter anOutDataStreamParameter ;
+//    SALOME_ModuleCatalog::ServicesDataStreamParameter aDataStreamParameter ;
     SUPERV::ListOfStrings aPythonFunction ;
     GraphBase::SLink aLink ;
 //    SALOME_SuperVisionBase::ServicesParameterValue aLinkValue ;
index 17aec826f96f1732028256044045f72efb73b7ac..ba027982782ecb6b3341e42b1e8a75e0d59581b1 100644 (file)
@@ -40,9 +40,12 @@ EXPORT_HEADERS = \
                DataFlowBase_Port.hxx \
                DataFlowBase_DataPort.hxx \
                DataFlowBase_InPort.hxx \
+               DataFlowBase_InDataStreamPort.hxx \
                DataFlowBase_OutPort.hxx \
+               DataFlowBase_OutDataStreamPort.hxx \
                DataFlowBase_Service.hxx \
                DataFlowBase_PortsOfNode.hxx \
+               DataFlowBase_StreamNode.hxx \
                DataFlowBase_ComputingNode.hxx \
                DataFlowBase_FactoryNode.hxx \
                DataFlowBase_InLineNode.hxx \
@@ -53,6 +56,7 @@ EXPORT_HEADERS = \
                DataFlowBase_EndOfSwitchNode.hxx \
                DataFlowBase_DataNode.hxx \
                DataFlowBase_XmlHandler.hxx \
+               DataFlowBase_StreamGraph.hxx \
                DataFlowBase_Graph.hxx
 
 # Libraries targets
@@ -62,9 +66,12 @@ LIB_SRC = \
        DataFlowBase_Port.cxx \
        DataFlowBase_DataPort.cxx \
        DataFlowBase_InPort.cxx \
+       DataFlowBase_InDataStreamPort.cxx \
        DataFlowBase_OutPort.cxx \
+       DataFlowBase_OutDataStreamPort.cxx \
        DataFlowBase_Service.cxx \
        DataFlowBase_PortsOfNode.cxx \
+       DataFlowBase_StreamNode.cxx \
        DataFlowBase_ComputingNode.cxx \
        DataFlowBase_FactoryNode.cxx \
        DataFlowBase_InLineNode.cxx \
@@ -76,6 +83,7 @@ LIB_SRC = \
        DataFlowBase_DataNode.cxx \
        DataFlowBase_XmlHandler.cxx \
        DataFlowBase_LoadXml.cxx \
+       DataFlowBase_StreamGraph.cxx \
        DataFlowBase_Graph.cxx 
 
 LIB_CLIENT_IDL = Logger.idl \
@@ -92,12 +100,11 @@ BIN_SERVER_IDL =
 
 CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) \
        -I${KERNEL_ROOT_DIR}/include/salome
-#CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42
 CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \
        -I${KERNEL_ROOT_DIR}/include/salome
 LDFLAGS= -L../../lib/salome $(CORBA_LIBS) -lSalomeNS -lSalomeLifeCycleCORBA -lOpUtil -lSALOMELocalTrace \
        -lc $(PYTHON_LIBS) $(QT_MT_LIBS) $(OGL_LIBS) \
        -L${KERNEL_ROOT_DIR}/lib/salome
-#LDFLAGS= -L../../../lib $(CORBA_LIBS) -lomniORB4 -lomniDynamic4 -lomnithread -lCOS4 -lCOSDynamic4 -lSalomeNS -lSalomeLifeCycleCORBA -lOpUtil -lSalomeLoggerServer -lc $(QT_MT_LIBS)
+//LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS)
 
 @CONCLUDE@
index 73654b3268e01be71723a2ced1bf871a633cbfe4..a02e77d1b392e54269b3e8b8ef8f4074c7acc9ff 100644 (file)
@@ -46,8 +46,9 @@ GraphEditor::DataFlow::DataFlow() :
 GraphEditor::DataFlow::DataFlow( CORBA::ORB_ptr ORB,
                                  SALOME_NamingService* ptrNamingService ,
                                  const char *DataFlowName ,
-                                 const char * DebugFileName ) :
-  OutNode( ORB, ptrNamingService , DataFlowName , DebugFileName ) {
+                                 const char * DebugFileName ,
+                                 const SUPERV::KindOfNode aKindOfNode ) :
+  OutNode( ORB, ptrNamingService , DataFlowName , DebugFileName , aKindOfNode ) {
 //  cout << "GraphEditor::DataFlow::DataFlow(" ;
   cdebug_in << "GraphEditor::DataFlow::DataFlow(" ;
   if ( DataFlowName ) {
index 23e65b19ea39db4305c73a026b83e7e7890c8479..c405e0bc3fdd849120166ae0f81f24a8613e1c2b 100644 (file)
@@ -49,7 +49,8 @@ namespace GraphEditor {
       DataFlow();
       DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService * ptrNamingService ,
                 const char * DataFlowName ,
-                const char * DebugFileName );
+                const char * DebugFileName ,
+                const SUPERV::KindOfNode aKindOfNode );
       DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService * ptrNamingService ,
                 const SALOME_ModuleCatalog::Service& DataFlowService ,
                 const char * DataFlowComponentName ,
@@ -223,7 +224,8 @@ namespace GraphEditor {
       long LevelMax() ;
       SUPERV::ListOfStrings * LevelNodes(long aLevel ) ;
       long ThreadsMax() ;
-      long GraphsNumber() ;
+      long SubGraphsNumber() ;
+      long SubStreamGraphsNumber() ;
 
       void Executor(GraphExecutor::DataFlow * DataFlowExecutor ) ;
       GraphExecutor::DataFlow * GraphEditor::DataFlow::Executor() const ;
index 1a783e87227fbb88ab3ee199888cbaaa919318af..699c7a1ef4bb78bcfd19ee45adaa76469ddc3e34 100644 (file)
@@ -44,14 +44,14 @@ inline char * GraphEditor::DataFlow::DataFlowInfo() {
 inline char * GraphEditor::DataFlow::DataNodeInfo() {
   ostringstream s;
   IsValid() ;
-  GraphBase::DataNode::DataNodeInfo( s ) ;
+  Graph()->DataNodeInfo( s ) ;
   return CORBA::string_dup( s.str().c_str() );
 }
 
 inline char * GraphEditor::DataFlow::NodeInfo( const char * aNodeName ) {
   ostringstream s;
-  if ( GetGraphNode( aNodeName ) )
-    GetGraphNode( aNodeName )->NodeInfo( s ) ;
+  if ( Graph()->GetGraphNode( aNodeName ) )
+    Graph()->GetGraphNode( aNodeName )->NodeInfo( s ) ;
   else
     s << aNodeName << " not found" << ends ;
   return CORBA::string_dup( s.str().c_str() );
@@ -93,29 +93,29 @@ inline GraphBase::SGraph * GraphEditor::DataFlow::GetDataFlow() {
 
 //    void DateModification() ;
 
-inline GraphBase::SNode * GraphEditor::DataFlow::GetInfo() const {
-   return GraphEditor::OutNode::GetInfo() ; 
-} ;
+//inline GraphBase::SNode * GraphEditor::DataFlow::GetInfo() const {
+//   return GraphEditor::OutNode::GetInfo() ; 
+//} ;
 
 inline GraphBase::ListOfNodes * GraphEditor::DataFlow::GetNodes() const {
-   return GraphEditor::OutNode::GetNodes() ; 
+   return Graph()->GetNodes() ; 
 } ;
 
 inline GraphBase::ListOfLinks * GraphEditor::DataFlow::GetLinks() const {
-   return GraphEditor::OutNode::GetLinks() ; 
+   return Graph()->GetLinks() ; 
 } ;
 
 inline GraphBase::ListOfGraphs * GraphEditor::DataFlow::GetGraphs() const {
-   return GraphEditor::OutNode::GetGraphs() ; 
+   return Graph()->GetGraphs() ; 
 } ;
 
 inline GraphBase::ListOfLinks * GraphEditor::DataFlow::GetDatas() const {
-   return GraphEditor::OutNode::GetDatas() ; 
+   return Graph()->GetDatas() ; 
 } ;
 
 inline const SALOME_ModuleCatalog::Service * GraphEditor::DataFlow::GetService() {
    IsValid() ;
-   return GraphEditor::OutNode::GetService() ; 
+   return Graph()->GetService() ; 
 } ;
 
 inline GraphEditor::InNode * GraphEditor::DataFlow::AddNode(
@@ -188,8 +188,8 @@ inline bool GraphEditor::DataFlow::ReNameNode( const char* OldNodeName ,
 
 inline const SALOME_ModuleCatalog::Service * GraphEditor::DataFlow::NodeService(
                                              const char * aNodeName ) {
-  if ( GetGraphNode( aNodeName ) ) {
-    return GetGraphNode( aNodeName )->GetService() ;
+  if ( Graph()->GetGraphNode( aNodeName ) ) {
+    return Graph()->GetGraphNode( aNodeName )->GetService() ;
   }
   return NULL ;
 }
@@ -242,16 +242,22 @@ inline bool GraphEditor::DataFlow::AddLink( const char* FromNodeName ,
                                            const char* ToNodeName ,
                                             const char* ToServiceParameterName ,
                                            const CORBA::Any aValue ) {
-  if ( _ReadOnly ) {
-    return false ;
+  if ( !_ReadOnly ) {
+    GraphEditor::InNode * aFromNode = GetNode( FromNodeName ) ;
+    if ( aFromNode ) {
+      GraphBase::OutPort * anOutPort = aFromNode->GetChangeOutPort( FromServiceParameterName ) ;
+      if ( anOutPort ) {
+        CORBA::Any const * theValue = anOutPort->Value() ; // Keep the type !
+        _EditedAfterExecution = true ;
+        return GraphEditor::OutNode::AddLink( FromNodeName ,
+                                              FromServiceParameterName ,
+                                              ToNodeName ,
+                                              ToServiceParameterName ,
+                                              *theValue ) ;
+      }
+    }
   }
-  CORBA::Any const * theValue = GetNode( FromNodeName )->GetOutPort( FromServiceParameterName )->Value() ; // Keep the type !
-  _EditedAfterExecution = true ;
-  return GraphEditor::OutNode::AddLink( FromNodeName ,
-                                        FromServiceParameterName ,
-                                        ToNodeName ,
-                                        ToServiceParameterName ,
-                                        *theValue ) ; 
+  return false ;
 } ;
 
 inline bool GraphEditor::DataFlow::GetLink(const char* ToNodeName ,
@@ -266,8 +272,7 @@ inline bool GraphEditor::DataFlow::GetLink(const char* ToNodeName ,
 inline GraphBase::SLink * GraphEditor::DataFlow::GetLink(
                                  GraphBase::ComputingNode * aNode ,
                                 const char* ToServiceParameterName ) {
-  return GraphBase::Graph::GetLink( aNode ,
-                                    aNode->GetChangeInPort( ToServiceParameterName ) ) ;
+  return Graph()->GetLink( aNode , aNode->GetChangeInPort( ToServiceParameterName ) ) ;
 }
 
 inline bool GraphEditor::DataFlow::AddLinkCoord(
@@ -410,8 +415,7 @@ inline bool GraphEditor::DataFlow::AddInputData( const char* ToNodeName ,
   if ( !IsValid() ) {
     return false ;
   }
-  return GraphBase::Graph::AddInputData( ToNodeName , ToParameterName ,
-                                         aValue ) ; 
+  return Graph()->AddInputData( ToNodeName , ToParameterName , aValue ) ; 
 } ;
 
 inline bool GraphEditor::DataFlow::AddInputSharedData(const char* ToNodeName1 ,
@@ -481,28 +485,35 @@ inline long GraphEditor::DataFlow::LevelMax() {
   if ( !IsValid() ) {
     return 0 ;
   }
-  return GraphBase::Graph::LevelMax() ;
+  return Graph()->LevelMax() ;
 }
 
 inline SUPERV::ListOfStrings * GraphEditor::DataFlow::LevelNodes(long aLevel ) {
   if ( !IsValid() ) {
     return ((SUPERV::ListOfStrings * ) NULL ) ;
   }
-  return GraphBase::Graph::LevelNodes( aLevel ) ;
+  return Graph()->LevelNodes( aLevel ) ;
 }
 
 inline long GraphEditor::DataFlow::ThreadsMax() {
   if ( !IsValid() ) {
     return 0 ;
   }
-  return GraphBase::Graph::ThreadsMax() ;
+  return Graph()->ThreadsMax() ;
+}
+
+inline long GraphEditor::DataFlow::SubGraphsNumber() {
+  if ( !IsValid() ) {
+    return 0 ;
+  }
+  return Graph()->SubGraphsNumber() ;
 }
 
-inline long GraphEditor::DataFlow::GraphsNumber() {
+inline long GraphEditor::DataFlow::SubStreamGraphsNumber() {
   if ( !IsValid() ) {
     return 0 ;
   }
-  return GraphBase::Graph::GraphsNumber() ;
+  return StreamGraph()->SubStreamGraphsNumber() ;
 }
 
 inline void GraphEditor::DataFlow::Executor(
index 28044aa31d82309b31a733fcf901f54c5159f76a..4dee936cb4674da58023b1bca9babddb5147ce91 100644 (file)
@@ -191,8 +191,11 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB,
     _InLineNode = (GraphBase::InLineNode *) _ComputingNode ;
     break ;
   }
-  case SUPERV::DataFlowNode : {
-    cdebug << "GraphEditor::InNode::InNode ERROR SUPERV::DataFlowNode : " << NodeName << endl ;
+  case SUPERV::DataFlowGraph : {
+    cdebug << "GraphEditor::InNode::InNode ERROR SUPERV::DataFlowGraph : " << NodeName << endl ;
+  }
+  case SUPERV::DataStreamGraph : {
+    cdebug << "GraphEditor::InNode::InNode ERROR SUPERV::DataStreamGraph : " << NodeName << endl ;
   }
   case SUPERV::UnknownNode : {
     cdebug << "GraphEditor::InNode::InNode ERROR SUPERV::UnknownNode : " << NodeName << endl ;
index c94afc48bf00d144886214c2ab67e31ceddb334c..935254445f76ca09c9cebfe8f0a40bd33d9c636f 100644 (file)
@@ -92,6 +92,8 @@ namespace GraphEditor {
                  return _ComputingNode->IsOneOfGOTONodes() ; } ;
       const bool IsDataFlowNode() const {
                  return _ComputingNode->IsDataFlowNode() ; } ;
+      const bool IsDataStreamNode() const {
+                 return _ComputingNode->IsDataStreamNode() ; } ;
       const bool IsGOTONode() const {
                  return _ComputingNode->IsGOTONode() ; } ;
       const bool IsLoopNode() const {
@@ -183,18 +185,28 @@ namespace GraphEditor {
                          return _ComputingNode->GetInfo() ; } ;
 
       GraphBase::InPort * AddInPort( const char * InputParameterName ,
-                                     const char * InputParameterType ) {
-                          return _InLineNode->AddInPort( InputParameterName ,
-                                                            InputParameterType ) ; } ;
+                                     const char * InputParameterType ,
+                                     const SUPERV::KindOfPort aKindOfPort ) {
+                          return _ComputingNode->AddInPort( InputParameterName ,
+                                                            InputParameterType ,
+                                                            aKindOfPort ) ; } ;
       GraphBase::OutPort * AddOutPort( const char * OutputParameterName ,
-                                       const char * OutputParameterType ) {
-                           return _InLineNode->AddOutPort( OutputParameterName ,
-                                                              OutputParameterType ) ; } ;
+                                       const char * OutputParameterType ,
+                                       const SUPERV::KindOfPort aKindOfPort ) {
+                           return _ComputingNode->AddOutPort( OutputParameterName ,
+                                                              OutputParameterType ,
+                                                              aKindOfPort ) ; } ;
+      int IncrDataStreamInPorts() {
+        return _ComputingNode->IncrDataStreamInPorts() ;
+      } ;
+      int IncrDataStreamOutPorts() {
+        return _ComputingNode->IncrDataStreamOutPorts() ;
+      } ;
 
       void DelInPort( const char * InputParameterName ) {
-           _InLineNode->DelInPort( InputParameterName ) ; } ;
+           _ComputingNode->DelInPort( InputParameterName ) ; } ;
       void DelOutPort( const char * OutputParameterName ) {
-           _InLineNode->DelOutPort( OutputParameterName ) ; } ;
+           _ComputingNode->DelOutPort( OutputParameterName ) ; } ;
 
       bool IsLinked(const char * ToServiceParameterName ) {
            return _ComputingNode->IsLinked( ToServiceParameterName ) ; } ;
@@ -258,6 +270,8 @@ namespace GraphEditor {
 
       int SubGraph() {
           return _ComputingNode->SubGraph() ; } ;
+      int SubStreamGraph() {
+          return _ComputingNode->SubStreamGraph() ; } ;
 
       char * ComponentName() const {
              return _FactoryNode->ComponentName() ; } ;
index cd7876c0a84ae17328c6d2fbc2be163ee8181abf..d9a3a4c55ff4730a07bbbff3529c77c9089f0fce 100644 (file)
@@ -33,8 +33,8 @@ using namespace std;
 
 // Implementation de la classe GraphEditor::Graph
 
-GraphEditor::OutNode::OutNode() :
-             Graph() {
+GraphEditor::OutNode::OutNode() {
+//             Graph() {
   cdebug_in << "GraphEditor::OutNode::OutNode()" << endl;
 
   _Imported = false ;
@@ -47,14 +47,28 @@ GraphEditor::OutNode::OutNode() :
 GraphEditor::OutNode::OutNode( CORBA::ORB_ptr ORB ,
                                SALOME_NamingService * ptrNamingService ,
                                const char * DataFlowName ,
-                               const char * DebugFileName ) :
-             Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) {
+                               const char * DebugFileName ,
+                               const SUPERV::KindOfNode aKindOfNode ) {
+//             Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) {
+  Set_prof_debug( ORB , DebugFileName ) ;
   cdebug_in << "GraphEditor::OutNode::OutNode(" ;
   if ( DataFlowName ) {
     cdebug << DataFlowName ;
   }
   cdebug << ")" << endl;
 
+  if ( aKindOfNode == SUPERV::DataFlowGraph ) {
+    _StreamGraph = NULL ;
+//    _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ;
+    _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName ,
+                                   _prof_debug , _fdebug ) ;
+  }
+  else if ( aKindOfNode == SUPERV::DataStreamGraph ) {
+//    _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ;;
+    _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName ,
+                                               _prof_debug , _fdebug ) ;
+    _Graph = _StreamGraph ;
+  }
   _Orb = CORBA::ORB::_duplicate( ORB ) ;
   _Imported = false ;
   _Valid = false ;
@@ -77,13 +91,34 @@ GraphEditor::OutNode::OutNode(
                      const char * DataFlowAuthor ,
                      const char * DataFlowComputer ,
                      const char * DataFlowComment ,
-                     const char * DebugFileName ) :
-             Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
-                    DataFlowInterfaceName , DataFlowName , DataFlowkind ,
-                    DataFlowFirstCreation , DataFlowLastModification  ,
-                    DataFlowEditorRelease , DataFlowAuthor ,
-                    DataFlowComputer , DataFlowComment , DebugFileName ) {
-
+                     const char * DebugFileName ) {
+//             Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
+//                    DataFlowInterfaceName , DataFlowName , DataFlowkind ,
+//                    DataFlowFirstCreation , DataFlowLastModification  ,
+//                    DataFlowEditorRelease , DataFlowAuthor ,
+//                    DataFlowComputer , DataFlowComment , DebugFileName ) {
+  Set_prof_debug( ORB , DebugFileName ) ;
+
+  if ( DataFlowkind == SUPERV::DataFlowGraph ) {
+    _StreamGraph = NULL ;
+    _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
+                                   DataFlowInterfaceName , DataFlowName , DataFlowkind ,
+                                   DataFlowFirstCreation , DataFlowLastModification  ,
+                                   DataFlowEditorRelease , DataFlowAuthor ,
+                                   DataFlowComputer , DataFlowComment ,
+                                   _prof_debug , _fdebug ) ;
+//                                   DataFlowComputer , DataFlowComment , DebugFileName ) ;
+  }
+  else if ( DataFlowkind == SUPERV::DataStreamGraph ) {
+    _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
+                                               DataFlowInterfaceName , DataFlowName , DataFlowkind ,
+                                               DataFlowFirstCreation , DataFlowLastModification  ,
+                                               DataFlowEditorRelease , DataFlowAuthor ,
+                                               DataFlowComputer , DataFlowComment ,
+                                               _prof_debug , _fdebug ) ;
+//                    DataFlowComputer , DataFlowComment , DebugFileName ) ;
+    _Graph = _StreamGraph ;
+  }
   _Orb = CORBA::ORB::_duplicate( ORB ) ;
   _Imported = false ;
   _Valid = false ;
@@ -97,28 +132,45 @@ GraphEditor::OutNode::~OutNode() {
 //  delete _GT ;
 }
 
+void GraphEditor::OutNode::Set_prof_debug( CORBA::ORB_ptr ORB ,
+                                           const char * DebugFileName ) {
+  _Graph_prof_debug = 0 ;
+  _prof_debug = 0 ;
+  if ( DebugFileName ) {
+    _fdebug = new ofstream( DebugFileName );
+    SetDebug( ORB , &_Graph_prof_debug , _fdebug ) ;
+    MESSAGE( endl << "Trace redirected to file " << DebugFileName << endl)
+  }
+}
+
 bool GraphEditor::OutNode::LoadDataFlow( const GraphBase::SGraph *aDataFlow ) {
   bool RetVal = false ;
   cdebug_in << "GraphEditor::OutNode::LoadDataFlow() " << aDataFlow->Info.theName.c_str()
-            << endl;
+            << " GraphNodesSize " << Graph()->GraphNodesSize() << endl;
   if ( !_Imported ) {
     RetVal = LoadInfo( aDataFlow->Info ) ;
     _Imported = true ;
   }
-  else {
+  else if ( aDataFlow->Info.theKind == Graph()->Kind() ) {
     RetVal = true ;
   }
+  cdebug << "GraphEditor::OutNode::LoadDataFlow() _Imported " << _Imported << " RetVal " << RetVal << endl;
 
   map< string , int > aMapOfNodes ;
-  if ( RetVal )
+  if ( RetVal ) {
+    cdebug << "GraphEditor::OutNode::LoadDataFlow() LoadNodes GraphNodesSize " << Graph()->GraphNodesSize() << endl;
     RetVal = LoadNodes( aMapOfNodes , aDataFlow->Nodes ) ;
-  if ( RetVal )
+  }
+  if ( RetVal ) {
+    cdebug << "GraphEditor::OutNode::LoadDataFlow() LoadLinks GraphNodesSize " << Graph()->GraphNodesSize() << endl;
     RetVal = LoadLinks( aMapOfNodes , aDataFlow->Links ) ;
+  }
   if ( RetVal ) {
     Valid() ;
+    cdebug << "GraphEditor::OutNode::LoadDataFlow() LoadDatas GraphNodesSize " << Graph()->GraphNodesSize() << endl;
     RetVal = LoadDatas( aMapOfNodes , aDataFlow->Datas ) ;
   }
-  cdebug_out << "GraphEditor::OutNode::LoadDataFlow" << endl;
+  cdebug_out << "GraphEditor::OutNode::LoadDataFlow done GraphNodesSize " << Graph()->GraphNodesSize() << endl;
   return RetVal ;
 }
 
@@ -130,7 +182,7 @@ bool GraphEditor::OutNode::LoadXml( const char* myFileName ) {
     _Imported = true ;
     RetVal = true ;
   }
-  else if ( GraphBase::Graph::LoadXml( _Orb , myFileName , aDataFlow ) ) {
+  else if ( Graph()->LoadXml( _Orb , myFileName , aDataFlow ) ) {
     cdebug_in << "GraphEditor::OutNode::LoadXml() " << endl;
     RetVal = LoadDataFlow( &aDataFlow ) ;
     cdebug_out << "GraphEditor::OutNode::LoadXml " << RetVal << endl;
@@ -139,43 +191,84 @@ bool GraphEditor::OutNode::LoadXml( const char* myFileName ) {
 } 
 
 bool GraphEditor::OutNode::LoadInfo(const GraphBase::SNode &aDataFlowInfo ) {
+  bool RetVal = false ;
   cdebug_in << "GraphEditor::OutNode::LoadInfo " << aDataFlowInfo.theName.c_str()
             << endl ;
 //  MESSAGE( "GraphEditor::OutNode::LoadDataFlow" );
 //  ComponentName( aDataFlowInfo.theComponentName.c_str() ) ;
 //  InterfaceName( aDataFlowInfo.theInterfaceName.c_str() ) ;
-  Name( aDataFlowInfo.theName.c_str() ) ;
-  Kind( aDataFlowInfo.theKind ) ;
-  Service( aDataFlowInfo.theService ) ;
-  FirstCreation( aDataFlowInfo.theFirstCreation ) ;
-  LastModification( aDataFlowInfo.theLastModification ) ;
-  EditorRelease( aDataFlowInfo.theEditorRelease.c_str() ) ;
-  Author( aDataFlowInfo.theAuthor.c_str()  ) ;
-//  Computer( aDataFlowInfo.theContainer.c_str() ) ;
-  Comment( aDataFlowInfo.theComment.c_str() ) ;
+  if ( Graph()->IsDataStreamNode() || aDataFlowInfo.theKind == SUPERV::DataFlowGraph ) {
+    Graph()->Name( aDataFlowInfo.theName.c_str() ) ;
+//    Graph()->Kind( aDataFlowInfo.theKind ) ;
+    cdebug << "GraphEditor::OutNode::LoadInfo aDataFlowInfo.Kind " << aDataFlowInfo.theKind
+           << " Kind() " << Graph()->Kind() << endl ;
+    if ( Graph()->IsDataStreamNode() ) {
+      Graph()->Kind( SUPERV::DataStreamGraph ) ;
+      StreamGraph()->SetStreamParams( aDataFlowInfo.theTimeout , aDataFlowInfo.theDataStreamTrace , aDataFlowInfo.theDeltaTime ) ;
+    }
+    else {
+      Graph()->Kind( SUPERV::DataFlowGraph ) ;
+    }
+    Graph()->SetService( aDataFlowInfo.theService ) ;
+    Graph()->FirstCreation( aDataFlowInfo.theFirstCreation ) ;
+    Graph()->LastModification( aDataFlowInfo.theLastModification ) ;
+    Graph()->EditorRelease( aDataFlowInfo.theEditorRelease.c_str() ) ;
+    Graph()->Author( aDataFlowInfo.theAuthor.c_str()  ) ;
+//    Graph()->Computer( aDataFlowInfo.theContainer.c_str() ) ;
+    Graph()->Comment( aDataFlowInfo.theComment.c_str() ) ;
 // Not in OutNode/DataFlow but in InNode/DataFlow_in_an_other_DataFlow
-//  Coordinates( aDataFlowInfo.theX , aDataFlowInfo.theY ) ;
-  cdebug_out << "GraphEditor::OutNode::LoadInfo" << endl ;
-  return true ;
+//    Graph()->Coordinates( aDataFlowInfo.theX , aDataFlowInfo.theY ) ;
+    RetVal = true ;
+  }
+  else {
+    Graph()->Kind( aDataFlowInfo.theKind ) ;
+    cdebug << "GraphEditor::OutNode::LoadInfo aDataFlowInfo.Kind " << aDataFlowInfo.theKind
+           << " != IsDataStreamNode() " << Graph()->IsDataStreamNode() << endl ;
+  }
+  cdebug_out << "GraphEditor::OutNode::LoadInfo " << RetVal << endl ;
+  return RetVal ;
 }
 
 bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes ,
                                      const GraphBase::ListOfNodes &aListOfNodes ) {
   GraphEditor::InNode * anInNode ;
-  cdebug_in << "GraphEditor::OutNode::LoadNodes" << endl ;
+  cdebug_in << "GraphEditor::OutNode::LoadNodes " << endl ;
   int i ;
   for ( i = 0 ; i < (int ) aListOfNodes.size() ; i++ ) {
     GraphBase::SNode aNode = aListOfNodes[ i ] ;
     const char * aNodeName = aNode.theName.c_str() ;
+    cout << "GraphEditor::OutNode::LoadNodes " << aNodeName << " "
+         << aNode.theListOfInDataStreams.size() << " InDataStreams "
+         << aNode.theListOfOutDataStreams.size() << " OutDataStreams "
+         << " _prof_debug " << _prof_debug << endl ;
+    cdebug << "GraphEditor::OutNode::LoadNodes " << aNodeName << " "
+           << aNode.theListOfInDataStreams.size() << " InDataStreams "
+           << aNode.theListOfOutDataStreams.size() << " OutDataStreams "
+           << endl ;
     if ( aNode.theListOfFuncName.size() == 0 ) {
       aNode.theListOfFuncName.resize( 1 ) ;
       aNode.theListOfFuncName[ 0 ] = "" ;
       aNode.theListOfPythonFunctions.resize( 1 ) ;
       aNode.theListOfPythonFunctions[ 0 ] = new SUPERV::ListOfStrings() ;
     }
-    if ( GetGraphNode( aNode.theName.c_str() ) ) {
+    if ( Graph()->GetGraphNode( aNode.theName.c_str() ) ) {
       aNodeName = NULL ;
     }
+
+    aNode.theService.ServiceinDataStreamParameter.length( aNode.theListOfInDataStreams.size() ) ;
+    aNode.theService.ServiceoutDataStreamParameter.length( aNode.theListOfOutDataStreams.size() ) ;
+    unsigned int j ;
+    for ( j = 0 ; j < aNode.theListOfInDataStreams.size() ; j++ ) {
+      aNode.theService.ServiceinDataStreamParameter[ j ].Parametername = aNode.theListOfInDataStreams[ j ].theDataStreamParameter.Parametername ,
+      aNode.theService.ServiceinDataStreamParameter[ j ].Parametertype = aNode.theListOfInDataStreams[ j ].theDataStreamParameter.Parametertype ,
+      aNode.theService.ServiceinDataStreamParameter[ j ].Parameterdependency = aNode.theListOfInDataStreams[ j ].theDataStreamParameter.Parameterdependency ;
+    }
+    for ( j = 0 ; j < aNode.theListOfOutDataStreams.size() ; j++ ) {
+      aNode.theService.ServiceoutDataStreamParameter[ j ].Parametername = aNode.theListOfOutDataStreams[ j ].theDataStreamParameter.Parametername ,
+      aNode.theService.ServiceoutDataStreamParameter[ j ].Parametertype = aNode.theListOfOutDataStreams[ j ].theDataStreamParameter.Parametertype ,
+      aNode.theService.ServiceoutDataStreamParameter[ j ].Parameterdependency = aNode.theListOfOutDataStreams[ j ].theDataStreamParameter.Parameterdependency ;
+    }
+
     anInNode = AddNode( aNode.theService ,
                         aNode.theListOfFuncName ,
                         aNode.theListOfPythonFunctions ,
@@ -188,12 +281,12 @@ bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes ,
                         aNode.theComment.c_str() ,
                         aNode.theCoords.theX , aNode.theCoords.theY ) ;
     string * aNodetheName = new string( aNode.theName ) ;
-    aMapOfNodes[ *aNodetheName ] = GetGraphNodeIndex( anInNode->Name() ) ;
+    aMapOfNodes[ *aNodetheName ] = Graph()->GetGraphNodeIndex( anInNode->Name() ) ;
     if ( anInNode->IsOneOfInLineNodes() ) {
       anInNode->GraphEditor::InNode::InLineNode()->DefPortsOfNode(
                 _Orb , aNode.theService , anInNode->NamePtr() ,
                 anInNode->Kind() ,
-                  Graph_prof_debug() , Graph_fdebug() ) ;
+                _prof_debug , _fdebug ) ;
       GraphBase::InLineNode * aINode = anInNode->InLineNode() ;
       GraphBase::LoopNode * aLNode = NULL ;
       if ( aINode->IsLoopNode() ) {
@@ -211,6 +304,35 @@ bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes ,
                                    *aNode.theListOfPythonFunctions[ 0 ] ) ;
       }
     }
+
+    for ( j = 0 ; j < aNode.theListOfInDataStreams.size() ; j++ ) {
+      GraphBase::InPort * anInPort ;
+      if ( anInNode->IsOneOfInLineNodes() ) {
+        anInPort = anInNode->ComputingNode()->AddInDataStreamPort( aNode.theListOfInDataStreams[ j ].theDataStreamParameter.Parametername ,
+                                                                   aNode.theListOfInDataStreams[ j ].theDataStreamParameter.Parametertype ,
+                                                                   aNode.theListOfInDataStreams[ j ].theDataStreamParameter.Parameterdependency ,
+                                                                   SUPERV::DataStreamParameter ) ;
+      }
+      else {
+        anInPort = anInNode->ComputingNode()->GetChangeInPort( aNode.theListOfInDataStreams[ j ].theDataStreamParameter.Parametername ) ;
+      }
+      ((GraphBase::InDataStreamPort * ) anInPort)->SetParams( aNode.theListOfInDataStreams[ j ].theKindOfSchema ,
+                                                              aNode.theListOfInDataStreams[ j ].theKindOfInterpolation ,
+                                                              aNode.theListOfInDataStreams[ j ].theKindOfExtrapolation ) ;
+    }
+    for ( j = 0 ; j < aNode.theListOfOutDataStreams.size() ; j++ ) {
+      GraphBase::OutPort * anOutPort ;
+      if ( anInNode->IsOneOfInLineNodes() ) {
+        anOutPort = anInNode->ComputingNode()->AddOutDataStreamPort( aNode.theListOfOutDataStreams[ j ].theDataStreamParameter.Parametername ,
+                                                                     aNode.theListOfOutDataStreams[ j ].theDataStreamParameter.Parametertype ,
+                                                                     aNode.theListOfOutDataStreams[ j ].theDataStreamParameter.Parameterdependency ,
+                                                                     SUPERV::DataStreamParameter ) ;
+      }
+      else {
+        anOutPort = anInNode->ComputingNode()->GetChangeOutPort( aNode.theListOfOutDataStreams[ j ].theDataStreamParameter.Parametername ) ;
+      }
+      ((GraphBase::OutDataStreamPort * ) anOutPort)->NumberOfValues( aNode.theListOfOutDataStreams[ j ].theNumberOfValues ) ;
+    }
     delete aNodetheName ;
     if ( !anInNode ) {
       return false ;
@@ -220,11 +342,11 @@ bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes ,
     GraphBase::SNode aNode = aListOfNodes[ i ] ;
     cdebug << "GraphEditor::OutNode::LoadNodes " << aNode.theName.c_str() << " Coupled to "
            << aNode.theCoupledNode.c_str() << endl ;
-    anInNode = (GraphEditor::InNode * ) GetChangeGraphNode( aNode.theName.c_str() )->GetInNode() ;
+    anInNode = (GraphEditor::InNode * ) Graph()->GetChangeGraphNode( aNode.theName.c_str() )->GetInNode() ;
     if ( anInNode->IsOneOfGOTONodes() && strlen( aNode.theCoupledNode.c_str() ) ) {
       GraphBase::GOTONode * aCoupledNode ;
-      aCoupledNode = (GraphBase::GOTONode * ) GetGraphNode( aNode.theName.c_str() ) ;
-      aCoupledNode->CoupledNode( (GraphBase::GOTONode * ) GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ) ; 
+      aCoupledNode = (GraphBase::GOTONode * ) Graph()->GetGraphNode( aNode.theName.c_str() ) ;
+      aCoupledNode->CoupledNode( (GraphBase::GOTONode * ) Graph()->GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ) ; 
     }
   }
   cdebug_out << "GraphEditor::OutNode::LoadNodes" << endl ;
@@ -244,14 +366,16 @@ bool GraphEditor::OutNode::LoadLinks(map< string , int > & aMapOfNodes ,
     cdebug << "LoadLinks " << aLinkFromNodeName->c_str() << "( "
            << aLink.FromServiceParameterName.c_str() << " ) --> "
            << aLinkToNodeName->c_str() << "( "
-           << aLink.FromServiceParameterName.c_str() << " )" << endl ;
-    if ( GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ) &&
-         GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] ) ) {
-      RetVal = AddLink( GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() ,
-                        aLink.FromServiceParameterName.c_str() ,
-                        GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() ,
-                        aLink.ToServiceParameterName.c_str() ,
-                        *((GraphBase::ComputingNode *) GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ))->GetOutPort( aLink.FromServiceParameterName.c_str() )->Value() ) ;
+           << aLink.ToServiceParameterName.c_str() << " )" << endl ;
+    if ( Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ) &&
+         Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] ) ) {
+      GraphBase::ComputingNode * aFromNode = (GraphBase::ComputingNode * ) Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ) ;
+      const GraphBase::OutPort * anOutPort = aFromNode->GetOutPort( aLink.FromServiceParameterName.c_str() ) ;
+      RetVal = AddLink( Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() ,
+                                 aLink.FromServiceParameterName.c_str() ,
+                                 Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() ,
+                                 aLink.ToServiceParameterName.c_str() ,
+                                 *anOutPort->Value() ) ;
     }
     else {
       RetVal = false ;
@@ -261,13 +385,13 @@ bool GraphEditor::OutNode::LoadLinks(map< string , int > & aMapOfNodes ,
       break ;
     else {
       for ( j = 0 ; j < (int ) aLink.aListOfCoords.size() ; j++ ) {
-        RetVal = AddLinkCoord( GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() ,
-                               aLink.FromServiceParameterName.c_str() ,
-                               GetGraphNode( aMapOfNodes[ aLink.ToNodeName.c_str() ] )->Name() ,
-                               aLink.ToServiceParameterName.c_str() ,
-                               j + 1 ,
-                               aLink.aListOfCoords[j].theX ,
-                               aLink.aListOfCoords[j].theY ) ;
+        RetVal = AddLinkCoord( Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() ,
+                                        aLink.FromServiceParameterName.c_str() ,
+                                        Graph()->GetGraphNode( aMapOfNodes[ aLink.ToNodeName.c_str() ] )->Name() ,
+                                        aLink.ToServiceParameterName.c_str() ,
+                                       j + 1 ,
+                                       aLink.aListOfCoords[j].theX ,
+                                       aLink.aListOfCoords[j].theY ) ;
         if ( !RetVal )
           break ;
       }
@@ -287,10 +411,10 @@ bool GraphEditor::OutNode::LoadDatas(map< string , int > & aMapOfNodes ,
   int i ;
   for ( i = 0 ; i < (int ) aListOfDatas.size() ; i++ ) {
     GraphBase::SLink aLink = aListOfDatas[ i ] ;
-    if ( !strcmp( aLink.FromNodeName.c_str() , Name() ) ) {
+    if ( !strcmp( aLink.FromNodeName.c_str() , Graph()->Name() ) ) {
       cdebug << "GraphEditor::OutNode::LoadDatas Warning "
              << aLink.FromNodeName.c_str()
-             << " and " << aLink.ToNodeName.c_str() << " differents from " << Name()
+             << " and " << aLink.ToNodeName.c_str() << " differents from " << Graph()->Name()
              << endl ;
     }
     string * aLinkFromNodeName = new string( aLink.FromNodeName.c_str() ) ;
@@ -299,9 +423,9 @@ bool GraphEditor::OutNode::LoadDatas(map< string , int > & aMapOfNodes ,
 //           << aMapOfNodes[ aLinkFromNodeName->c_str() ] << endl ;
 //      cout << "          " << aLink.ToNodeName.c_str() << " "
 //           << aMapOfNodes[ aLinkToNodeName->c_str() ] << endl ;
-    RetVal = GraphBase::Graph::AddInputData( GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() ,
-                                             aLink.ToServiceParameterName.c_str() ,
-                                             aLink.aLinkValue ) ;
+    RetVal = Graph()->AddInputData( Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() ,
+                                    aLink.ToServiceParameterName.c_str() ,
+                                    aLink.aLinkValue ) ;
     delete aLinkFromNodeName ;
     delete aLinkToNodeName ;
     if ( !RetVal )
@@ -341,10 +465,18 @@ bool GraphEditor::OutNode::SavePy( const char* filename ) {
 
 GraphBase::SGraph * GraphEditor::OutNode::GetDataFlow() {
   GraphBase::SGraph * aDataFlow = new GraphBase::SGraph;
-  aDataFlow->Info = *GetInfo() ;
-  aDataFlow->Nodes = *GetNodes() ;
-  aDataFlow->Links = *GetLinks( true ) ;
-  aDataFlow->Datas = *GetDatas() ;
+  if ( Graph()->IsDataFlowNode() ) {
+    aDataFlow->Info = *Graph()->GetInfo() ;
+    aDataFlow->Nodes = *Graph()->GetNodes() ;
+    aDataFlow->Links = *Graph()->GetLinks( true ) ;
+    aDataFlow->Datas = *Graph()->GetDatas() ;
+  }
+  else {
+    aDataFlow->Info = *StreamGraph()->GetInfo() ;
+    aDataFlow->Nodes = *StreamGraph()->GetNodes() ;
+    aDataFlow->Links = *StreamGraph()->GetLinks( true ) ;
+    aDataFlow->Datas = *StreamGraph()->GetDatas() ;
+  }
   return aDataFlow ;
 }
 
@@ -359,21 +491,21 @@ void GraphEditor::OutNode::DateModification() {
   aLastModificationDate.Day    = Tm->tm_mday;
   aLastModificationDate.Month  = Tm->tm_mon + 1;
   aLastModificationDate.Year   = Tm->tm_year + 1900;
-  LastModification( aLastModificationDate ) ;
+  Graph()->LastModification( aLastModificationDate ) ;
 }
 
 void GraphEditor::OutNode::Coordinates( const char* NodeName ,
                                         const int X ,
                                         const int Y ) {
-  ((GraphEditor::InNode * ) GetChangeGraphNode( NodeName ))->Coordinates( X , Y ) ;
+  ((GraphEditor::InNode * ) Graph()->GetChangeGraphNode( NodeName ))->Coordinates( X , Y ) ;
 }
 
 const int GraphEditor::OutNode::XCoordinate( const char* NodeName ) {
-  return ((GraphEditor::InNode * ) GetChangeGraphNode( NodeName ))->XCoordinate() ;
+  return ((GraphEditor::InNode * ) Graph()->GetChangeGraphNode( NodeName ))->XCoordinate() ;
 }
 
 const int GraphEditor::OutNode::YCoordinate( const char* NodeName ) {
-  return ((GraphEditor::InNode * ) GetChangeGraphNode( NodeName ))->YCoordinate() ;
+  return ((GraphEditor::InNode * ) Graph()->GetChangeGraphNode( NodeName ))->YCoordinate() ;
 }
 
 GraphEditor::InNode * GraphEditor::OutNode::AddNode(
@@ -394,17 +526,18 @@ GraphEditor::InNode * GraphEditor::OutNode::AddNode(
                       const int NodeY ) {
   cdebug_in << "GraphEditor::OutNode::AddNode( " ;
   if ( NodeComponentName != NULLSTRING && strlen( NodeComponentName ) ) {
-    cdebug << NodeComponentName << " , " ;
+    cdebug << "Component('" << NodeComponentName << "') , Node('" ;
   }
   else {
     cdebug << "NodeComponentName[NULL] )" << endl;
   }
   if ( theNodeName != NULLSTRING && strlen( theNodeName ) ) {
-    cdebug << theNodeName << " )" << endl;
+    cdebug << theNodeName << "' )" ;
   }
   else {
-    cdebug << "NodeName[NULL] )" << endl;
+    cdebug << "NodeName[NULL]' )" ;
   }
+  cdebug << " " << NodeKindOfNode << endl ;
   char * RetVal = NULLSTRING ;
   GraphEditor::InNode *Nd = NULL ;
   char * aNodeName = NULL ;
@@ -443,13 +576,13 @@ GraphEditor::InNode * GraphEditor::OutNode::AddNode(
   if ( theNodeName == NULLSTRING || strlen( theNodeName ) == 0 ) {
     aNodeName = new char[ strlen( NodeService.ServiceName )+1 ] ;
     strcpy( aNodeName , NodeService.ServiceName ) ;
-    if ( GetGraphNode( NodeService.ServiceName ) ) {
+    if ( Graph()->GetGraphNode( NodeService.ServiceName ) ) {
       GeneratedName = true ;
-      while ( GetGraphNode( aNodeName ) ) {
+      while ( Graph()->GetGraphNode( aNodeName ) ) {
         if ( aNodeName ) {
           delete [] aNodeName ;
        }
-        int num = GetServiceNameNumber( NodeService.ServiceName ) ;
+        int num = Graph()->GetServiceNameNumber( NodeService ) ;
         ostringstream astr ;
         astr << num << ends ;
         const char * n_instance = astr.str().c_str() ;
@@ -463,13 +596,13 @@ GraphEditor::InNode * GraphEditor::OutNode::AddNode(
     }
   }
   else {
-    if ( GetGraphNode( theNodeName ) == NULL ) {
+    if ( Graph()->GetGraphNode( theNodeName ) == NULL ) {
       aNodeName = new char[ strlen( theNodeName )+1 ] ;
       strcpy( aNodeName , theNodeName ) ;
     }
   }
   if ( aNodeName != NULLSTRING ) {
-    Nd = new GraphEditor::InNode( _Orb , NamingService() ,
+    Nd = new GraphEditor::InNode( _Orb , Graph()->NamingService() ,
                                   aFuncName , aPythonFunction , NodeService ,
                                   NodeComponentName , NodeInterfaceName ,
                                   aNodeName , NodeKindOfNode ,
@@ -477,10 +610,31 @@ GraphEditor::InNode * GraphEditor::OutNode::AddNode(
                                   NodeEditorRelease , NodeAuthor ,
                                   NodeComputer , NodeComment , GeneratedName ,
                                   NodeX , NodeY ,
-                                  Graph_prof_debug() , Graph_fdebug() ) ;
+                                  _prof_debug , _fdebug ) ;
 //    MESSAGE( "GraphEditor::OutNode::AddNode " << hex << (void *) Nd << dec );
 //    if ( GraphBase::Graph::AddNode( Nd ) ) {
-    if ( GraphBase::Graph::AddNode( Nd->ComputingNode() ) ) {
+
+    if ( Graph()->IsDataStreamNode() && ( Nd->IsComputingNode() || Nd->IsFactoryNode() ) ) {
+      unsigned int i ;
+      for ( i = 0 ; i < NodeService.ServiceinDataStreamParameter.length() ; i++ ) {
+        GraphBase::InDataStreamPort * aDataStreamPort ;
+        aDataStreamPort = Nd->ComputingNode()->AddInDataStreamPort(
+                                         my_strdup( NodeService.ServiceinDataStreamParameter[i].Parametername ) ,
+                                         NodeService.ServiceinDataStreamParameter[i].Parametertype ,
+                                         NodeService.ServiceinDataStreamParameter[i].Parameterdependency ,
+                                        SUPERV::DataStreamParameter ) ;
+      }
+      for ( i = 0 ; i < NodeService.ServiceoutDataStreamParameter.length() ; i++ ) {
+        GraphBase::OutDataStreamPort * aDataStreamPort ;
+        aDataStreamPort = Nd->ComputingNode()->AddOutDataStreamPort(
+                                         my_strdup( NodeService.ServiceoutDataStreamParameter[i].Parametername ) ,
+                                         NodeService.ServiceoutDataStreamParameter[i].Parametertype ,
+                                         NodeService.ServiceoutDataStreamParameter[i].Parameterdependency ,
+                                        SUPERV::DataStreamParameter ) ;
+      }
+    }
+
+    if ( Graph()->AddNode( Nd->ComputingNode() ) ) {
       DateModification() ;
       RetVal = Nd->Name() ;
     }
@@ -489,7 +643,7 @@ GraphEditor::InNode * GraphEditor::OutNode::AddNode(
     }
   }
   else {
-    cdebug << "NodeName is NULL or already exists." << endl ;
+    cdebug << "ERROR NodeName is NULL or already exists." << endl ;
   }
 //  delete [] aNodeName ;
   cdebug_out << "GraphEditor::OutNode::AddNode" << endl;
@@ -504,15 +658,15 @@ bool GraphEditor::OutNode::AddLinkCoord( const char* FromNodeName ,
                                          const int nXY ,
                                          const int* X ,
                                          const int* Y ) {
-  GraphBase::InPort * anInPort = GraphBase::Graph::GetChangeInPort( ToNodeName ,
-                                                                    ToServiceParameterName ) ;
+  GraphBase::InPort * anInPort = Graph()->GetChangeInPort( ToNodeName ,
+                                                           ToServiceParameterName ) ;
 //  cdebug << "GraphEditor::OutNode::AddLinkCoord " << ToNodeName << "( " << ToServiceParameterName
 //         << " ) " << anInPort << " IsEndSwitch " << anInPort->IsEndSwitch() << endl ;
   if ( anInPort ) {
     if ( anInPort->IsEndSwitch() ) {
 //      cdebug << "GraphEditor::OutNode::AddLinkCoord " << FromNodeName << "( " << FromServiceParameterName
 //             << " )" << endl ;
-      return GraphBase::Graph::GetChangeOutPort( FromNodeName , FromServiceParameterName )->AddCoord( nXY , X , Y ) ;
+      return Graph()->GetChangeOutPort( FromNodeName , FromServiceParameterName )->AddCoord( nXY , X , Y ) ;
     }
     else {
       return anInPort->AddCoord( nXY , X , Y ) ;
@@ -528,15 +682,15 @@ bool GraphEditor::OutNode::AddLinkCoord( const char* FromNodeName ,
                                          const int index ,
                                          const int X ,
                                          const int Y ) {
-  GraphBase::InPort * anInPort = GraphBase::Graph::GetChangeInPort( ToNodeName ,
-                                                                    ToServiceParameterName ) ;
+  GraphBase::InPort * anInPort = Graph()->GetChangeInPort( ToNodeName ,
+                                                           ToServiceParameterName ) ;
 //  cdebug << "GraphEditor::OutNode::AddLinkCoord " << ToNodeName << "( " << ToServiceParameterName
 //         << " ) " << anInPort << " IsEndSwitch " << anInPort->IsEndSwitch() << endl ;
   if ( anInPort ) {
     if ( anInPort->IsEndSwitch() ) {
 //      cdebug << "GraphEditor::OutNode::AddLinkCoord " << FromNodeName << "( " << FromServiceParameterName
 //             << " )" << endl ;
-      return GraphBase::Graph::GetChangeOutPort( FromNodeName , FromServiceParameterName )->AddCoord( index , X , Y ) ;
+      return Graph()->GetChangeOutPort( FromNodeName , FromServiceParameterName )->AddCoord( index , X , Y ) ;
     }
     else {
       return anInPort->AddCoord( index , X , Y ) ;
@@ -552,15 +706,15 @@ bool GraphEditor::OutNode::ChangeLinkCoord( const char* FromNodeName ,
                                             const int index ,
                                             const int X ,
                                             const int Y ) {
-  GraphBase::InPort * anInPort = GraphBase::Graph::GetChangeInPort( ToNodeName ,
-                                               ToServiceParameterName ) ;
+  GraphBase::InPort * anInPort = Graph()->GetChangeInPort( ToNodeName ,
+                                                           ToServiceParameterName ) ;
 //  cdebug << "GraphEditor::OutNode::ChangeLinkCoord " << ToNodeName << "( " << ToServiceParameterName
 //         << " ) " << anInPort << " IsEndSwitch " << anInPort->IsEndSwitch() << endl ;
   if ( anInPort ) {
     if ( anInPort->IsEndSwitch() ) {
 //      cdebug << "GraphEditor::OutNode::ChangeLinkCoord " << FromNodeName << "( " << FromServiceParameterName
 //             << " )" << endl ;
-      return GraphBase::Graph::GetChangeOutPort( FromNodeName , FromServiceParameterName )->ChangeCoord( index , X , Y ) ;
+      return Graph()->GetChangeOutPort( FromNodeName , FromServiceParameterName )->ChangeCoord( index , X , Y ) ;
     }
     else {
       return anInPort->ChangeCoord( index , X , Y ) ;
@@ -574,15 +728,15 @@ bool GraphEditor::OutNode::RemoveLinkCoord( const char* FromNodeName ,
                                             const char* ToNodeName ,
                                             const char* ToServiceParameterName ,
                                             const int index ) {
-  GraphBase::InPort * anInPort = GraphBase::Graph::GetChangeInPort( ToNodeName ,
-                                                                    ToServiceParameterName ) ;
+  GraphBase::InPort * anInPort = Graph()->GetChangeInPort( ToNodeName ,
+                                                           ToServiceParameterName ) ;
 //  cdebug << "GraphEditor::OutNode::RemoveLinkCoord " << ToNodeName << "( " << ToServiceParameterName
 //         << " ) " << anInPort << " IsEndSwitch " << anInPort->IsEndSwitch() << endl ;
   if ( anInPort ) {
     if ( anInPort->IsEndSwitch() ) {
 //      cdebug << "GraphEditor::OutNode::RemoveLinkCoord " << FromNodeName << "( " << FromServiceParameterName
 //             << " )" << endl ;
-      return GraphBase::Graph::GetChangeOutPort( FromNodeName , FromServiceParameterName )->RemoveCoord( index ) ;
+      return Graph()->GetChangeOutPort( FromNodeName , FromServiceParameterName )->RemoveCoord( index ) ;
     }
     else {
       return anInPort->RemoveCoord( index ) ;
@@ -595,14 +749,14 @@ int GraphEditor::OutNode::GetLinkCoordSize( const char* FromNodeName ,
                                             const char* FromServiceParameterName ,
                                             const char* ToNodeName ,
                                             const char* ToServiceParameterName ) {
-  const GraphBase::InPort * anInPort = GraphBase::Graph::GetInPort( ToNodeName , ToServiceParameterName ) ;
+  const GraphBase::InPort * anInPort = Graph()->GetInPort( ToNodeName , ToServiceParameterName ) ;
 //  cdebug << "GraphEditor::OutNode::GetLinkCoordSize " << ToNodeName << "( " << ToServiceParameterName
 //         << " ) " << anInPort << " IsEndSwitch " << anInPort->IsEndSwitch() << endl ;
   if ( anInPort ) {
     if ( anInPort->IsEndSwitch() ) {
 //      cdebug << "GraphEditor::OutNode::GetLinkCoordSize " << FromNodeName << "( " << FromServiceParameterName
 //             << " )" << endl ;
-      return GraphBase::Graph::GetChangeOutPort( FromNodeName , FromServiceParameterName )->GetCoord() ;
+      return Graph()->GetChangeOutPort( FromNodeName , FromServiceParameterName )->GetCoord() ;
     }
     else {
       return anInPort->GetCoord() ;
@@ -616,14 +770,14 @@ bool GraphEditor::OutNode::GetLinkCoord( const char* FromNodeName ,
                                          const char* ToNodeName ,
                                          const char* ToServiceParameterName ,
                                          int *X , int *Y ) {
-  const GraphBase::InPort * anInPort = GraphBase::Graph::GetInPort( ToNodeName , ToServiceParameterName ) ;
+  const GraphBase::InPort * anInPort = Graph()->GetInPort( ToNodeName , ToServiceParameterName ) ;
 //  cdebug << "GraphEditor::OutNode::GetLinkCoord " << ToNodeName << "( " << ToServiceParameterName
 //         << " ) " << anInPort << " IsEndSwitch " << anInPort->IsEndSwitch() << endl ;
   if ( anInPort ) {
     if ( anInPort->IsEndSwitch() ) {
 //      cdebug << "GraphEditor::OutNode::GetLinkCoord " << FromNodeName << "( " << FromServiceParameterName
 //             << " )" << endl ;
-      return GraphBase::Graph::GetChangeOutPort( FromNodeName , FromServiceParameterName )->GetCoord( X , Y ) ;
+      return Graph()->GetChangeOutPort( FromNodeName , FromServiceParameterName )->GetCoord( X , Y ) ;
     }
     else {
       return anInPort->GetCoord( X , Y ) ;
@@ -637,15 +791,15 @@ bool GraphEditor::OutNode::GetLinkCoord( const char* FromNodeName ,
                                          const char* ToNodeName ,
                                          const char* ToServiceParameterName ,
                                          const int index , long &X , long &Y ) {
-  GraphBase::InPort * anInPort = GraphBase::Graph::GetChangeInPort( ToNodeName ,
-                                                                    ToServiceParameterName ) ;
+  GraphBase::InPort * anInPort = Graph()->GetChangeInPort( ToNodeName ,
+                                                           ToServiceParameterName ) ;
 //  cdebug << "GraphEditor::OutNode::GetLinkCoord " << ToNodeName << "( " << ToServiceParameterName
 //         << " ) " << anInPort << " IsEndSwitch " << anInPort->IsEndSwitch() << endl ;
   if ( anInPort ) {
     if ( anInPort->IsEndSwitch() ) {
 //      cdebug << "GraphEditor::OutNode::GetLinkCoord " << FromNodeName << "( " << FromServiceParameterName
 //             << " )" << endl ;
-      return GraphBase::Graph::GetChangeOutPort( FromNodeName , FromServiceParameterName )->GetCoord( index , X , Y ) ;
+      return Graph()->GetChangeOutPort( FromNodeName , FromServiceParameterName )->GetCoord( index , X , Y ) ;
     }
     else {
       return anInPort->GetCoord( index , X , Y ) ;
@@ -659,7 +813,7 @@ bool GraphEditor::OutNode::AddInputData( const char* ToNodeName1 ,
                                          const char* ToNodeName2 ,
                                          const char* ToParameterName2 ) {
   cdebug_in << "GraphEditor::OutNode::AddInputData" << endl;
-  bool RetVal = GraphBase::Graph::AddInputData( ToNodeName1 ,
+  bool RetVal = Graph()->AddInputData( ToNodeName1 ,
                                                 ToParameterName1 ,
                                                 ToNodeName2 ,
                                                 ToParameterName2 ) ;
@@ -675,19 +829,22 @@ bool GraphEditor::OutNode::Valid() {
   cdebug_in << "GraphEditor::OutNode::Valid" << endl;
   _Executable = false ;
 
-  CreateService() ;
+  Graph()->CreateService() ;
   
-  if ( !Sort() ) {
+  int SubStreamGraphsNumber = 0 ;
+  if ( !Graph()->Sort( SubStreamGraphsNumber ) ) {
     cdebug << "This DataFlow is not valid." << endl ;
     return false ;
   }
-  
+  if ( Graph()->IsDataStreamNode() ) {
+    StreamGraph()->SubStreamGraphsNumber( SubStreamGraphsNumber ) ;
+  }
   
 //  CreateService() ;
 
-  InLineServices() ;
+  Graph()->InLineServices() ;
 
-  ComputingNodes() ;
+  Graph()->ComputingNodes() ;
 
   _Valid = true ;
 
@@ -698,7 +855,7 @@ bool GraphEditor::OutNode::Valid() {
 bool GraphEditor::OutNode::Executable() {
   cdebug_in << "GraphEditor::OutNode::Executable" << endl;
   bool NewLink ;
-  if ( LinkLoopNodes( NewLink ) ) {
+  if ( Graph()->LinkLoopNodes( NewLink ) ) {
     if ( NewLink ) {
       _Valid = false ;
     }
@@ -713,13 +870,17 @@ bool GraphEditor::OutNode::Executable() {
   if ( !IsValid() ) {
     return false ;
   }
-  if ( DataServerNodes() )
+  if ( Graph()->DataServerNodes() )
     _Executable = true ;
   else {
     cdebug << "This DataFlow is not executable." << endl ;
     _Executable = false ;
   }
 
+  if ( _Executable && Graph()->IsDataStreamNode() ) {
+    StreamGraph()->CreateStreamTopology( "/tmp/" ) ;
+  }
+
   cdebug_out << "GraphEditor::OutNode::Executable" << endl;
   return _Executable ;
 }
@@ -729,7 +890,7 @@ const CORBA::Any *GraphEditor::OutNode::GetInData(
                               const char * ToParameterName ) {
 //  cdebug_in << "GraphEditor::OutNode::GetInData " << ToNodeName
 //            << " " << ToParameterName << endl ;
-  const CORBA::Any * retdata = PortInData( ToNodeName , ToParameterName ) ;
+  const CORBA::Any * retdata = Graph()->PortInData( ToNodeName , ToParameterName ) ;
 //  cdebug_out << "GraphEditor::OutNode::GetInData" << endl ;
   return retdata ;
 }
@@ -739,7 +900,7 @@ const CORBA::Any *GraphEditor::OutNode::GetOutData(
                               const char * FromParameterName ) {
 //  cdebug_in << "GraphEditor::OutNode::GetOutData " << FromNodeName
 //            << " " << FromParameterName << endl ;
-  const CORBA::Any * retdata = PortOutData( FromNodeName , FromParameterName ) ;
+  const CORBA::Any * retdata = Graph()->PortOutData( FromNodeName , FromParameterName ) ;
 //  cdebug_out << "GraphEditor::OutNode::GetOutData" << endl ;
   return retdata ;
 }
@@ -748,6 +909,9 @@ const CORBA::Any *GraphEditor::OutNode::GetOutData(
 bool GraphEditor::OutNode::LinkSaveXML( QDomDocument & Graph , QDomElement & link ,
                                         GraphBase::SLink aLink ,
                                         bool wdata ) const {
+  cdebug_in << "GraphEditor::OutNode::LinkSaveXML " << aLink.FromNodeName
+            << "(" << aLink.FromServiceParameterName << ") --> "
+            << aLink.ToNodeName << "(" << aLink.ToServiceParameterName << ")" << endl ;
   QDomElement fromnodename = Graph.createElement( "fromnode-name" ) ;
   QDomText aField ;
   if ( strlen( aLink.FromNodeName.c_str() ) ) {
@@ -892,30 +1056,47 @@ bool GraphEditor::OutNode::LinkSaveXML( QDomDocument & Graph , QDomElement & lin
 //    f << Tabs << "   </coord>" << endl ;
   }
 //  f << Tabs << "</coord-list>" << endl ;
+  cdebug_out << "GraphEditor::OutNode::LinkSaveXML " << aLink.FromNodeName
+             << "(" << aLink.FromServiceParameterName << ") --> "
+             << aLink.ToNodeName << "(" << aLink.ToServiceParameterName << ")"
+             << endl ;
   return true ;
 }
 
 bool GraphEditor::OutNode::LinkSavePY( ostream &f , const char * aGraphName ,
                                        GraphBase::SLink aLink ,
-                                       bool intervar , bool wdata ) const {
+                                       bool fromparam , bool toparam ,
+                                       bool wdata ) const {
   if ( !wdata ) {
-    if ( intervar ) {
-      f << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str()
-        << " = "
-        << aLink.FromNodeName.c_str() << ".Port( '"
-        << aLink.FromServiceParameterName.c_str()
-        << "' )" << endl ;
+//    if ( intervar ) {
+//      f << "O" << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str()
+//        << " = "
+//        << aLink.FromNodeName.c_str() << ".GetOutPort( '"
+//        << aLink.FromServiceParameterName.c_str()
+//        << "' )" << endl ;
+//    }
+    f << "L" << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str()
+      << aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() ;
+    if ( ((GraphBase::Graph *) Graph())->GetChangeGraphNode( aLink.FromNodeName.c_str() )->GetChangeOutPort( aLink.FromServiceParameterName.c_str() )->IsDataStream() ) {
+      f << " = " << aGraphName << ".StreamLink( " ;
+    }
+    else {
+      f << " = " << aGraphName << ".Link( " ;
     }
-    f << aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str()
-      << " = " << aGraphName << ".Link( " << aLink.FromNodeName.c_str()
-      << aLink.FromServiceParameterName.c_str() << " , "
-      << aLink.ToNodeName.c_str() << ".Port( '"
-      << aLink.ToServiceParameterName.c_str() << "' ) )" << endl ;
+//    if ( !fromparam ) {
+      f << "O" ;
+//    }
+    f << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str() << " , " ;
+//    if ( !toparam ) {
+      f << "I" ;
+//    }
+    f << aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() << " )" << endl ;
   }
   else {
-    f << aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str()
-      << " = " << aLink.ToNodeName.c_str() << ".Input( '"
-      << aLink.ToServiceParameterName.c_str() << "' , " ;
+    f << "I"<< aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str()
+//      << " = " << aLink.ToNodeName.c_str() << ".Input( '"
+//      << aLink.ToServiceParameterName.c_str() << "' , " ;
+      << ".Input( " ;
     switch (aLink.aLinkValue.type()->kind()) {
       case CORBA::tk_string: {
         char* retstr ;
@@ -949,12 +1130,12 @@ bool GraphEditor::OutNode::LinkSavePY( ostream &f , const char * aGraphName ,
         break ;
       }
     }
-    f << ")" << endl ;
+    f << " )" << endl ;
   }
   int i ;
   for ( i = 0 ; i < (int ) aLink.aListOfCoords.size() ; i++ ) {
-    f << aLink.ToNodeName.c_str()
-      << aLink.ToServiceParameterName.c_str() << ".AddCoord( " << i+1 << " , "
+    f << "L" << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str()
+      << aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() << ".AddCoord( " << i+1 << " , "
       << aLink.aListOfCoords[ i ].theX << " , "
       << aLink.aListOfCoords[ i ].theY << " )" << endl ;
   }
@@ -962,89 +1143,89 @@ bool GraphEditor::OutNode::LinkSavePY( ostream &f , const char * aGraphName ,
 }
 
 //bool GraphEditor::OutNode::SaveXML(ostream & f ) {
-bool GraphEditor::OutNode::SaveXML(QDomDocument & Graph ) {
+bool GraphEditor::OutNode::SaveXML(QDomDocument & GraphQDom ) {
   int i ;
 //  f << "<?xml version='1.0' encoding='us-ascii' ?>" << endl << endl ;
 //  f << "<!-- XML Dataflow -->" << endl << endl ;
 //  f << "<!-- Dataflow information -->" << endl ;
   QString Dataflow("Dataflow") ;
-  Graph = QDomDocument(Dataflow) ;
+  GraphQDom = QDomDocument(Dataflow) ;
 //  f << "<dataflow>" << endl ;
-  QDomElement dataflow = Graph.createElement( "dataflow" ) ;
-  Graph.appendChild( dataflow ) ;
+  QDomElement dataflow = GraphQDom.createElement( "dataflow" ) ;
+  GraphQDom.appendChild( dataflow ) ;
 //  f << "     <info-list>" << endl ;
-  QDomElement info = Graph.createElement( "info-list" ) ;
+  QDomElement info = GraphQDom.createElement( "info-list" ) ;
   dataflow.appendChild( info ) ;
 
 //  f << "             <node>" << endl ;
 
 //  GraphBase::DataNode::SaveXML( f , "                        " , 0 , 0 ) ;
-  GraphBase::DataNode::SaveXML( Graph , info , 0 , 0 ) ;
+  Graph()->SaveXML( GraphQDom , info , 0 , 0 ) ;
 
 //  f << "             </node>" << endl ;
 
 //  f << "     </info-list>" << endl << endl ;
 
 //  f << "     <node-list>" << endl ;
-  QDomElement nodelist = Graph.createElement( "node-list" ) ;
+  QDomElement nodelist = GraphQDom.createElement( "node-list" ) ;
   dataflow.appendChild( nodelist ) ;
-  for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
+  for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
 //      f << "         <node>" << endl ;
-      if ( GraphNodes( i )->IsComputingNode() ) {
+      if ( Graph()->GraphNodes( i )->IsComputingNode() ) {
 //        ((GraphBase::ComputingNode *)GraphNodes( i ))->SaveXML( f ,
 //                    "                        " ,
-        ((GraphBase::ComputingNode *)GraphNodes( i ))->SaveXML( Graph , nodelist ,
-                    GraphNodes( i )->XCoordinate() ,
-                    GraphNodes( i )->YCoordinate() ) ;
+        ((GraphBase::ComputingNode *) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist ,
+                    Graph()->GraphNodes( i )->XCoordinate() ,
+                    Graph()->GraphNodes( i )->YCoordinate() ) ;
       }
-      else if ( GraphNodes( i )->IsFactoryNode() ) {
+      else if ( Graph()->GraphNodes( i )->IsFactoryNode() ) {
 //        ((GraphBase::FactoryNode * ) GraphNodes( i ))->SaveXML( f ,
 //                    "                        " ,
-        ((GraphBase::FactoryNode * ) GraphNodes( i ))->SaveXML( Graph , nodelist ,
-                    GraphNodes( i )->XCoordinate() ,
-                    GraphNodes( i )->YCoordinate() ) ;
+        ((GraphBase::FactoryNode * ) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist ,
+                    Graph()->GraphNodes( i )->XCoordinate() ,
+                    Graph()->GraphNodes( i )->YCoordinate() ) ;
       }
-      else if ( GraphNodes( i )->IsInLineNode() ) {
+      else if ( Graph()->GraphNodes( i )->IsInLineNode() ) {
 //        ((GraphBase::InLineNode * ) GraphNodes( i ))->SaveXML( f ,
 //                    "                        " ,
-        ((GraphBase::InLineNode * ) GraphNodes( i ))->SaveXML( Graph , nodelist ,
-                    GraphNodes( i )->XCoordinate() ,
-                    GraphNodes( i )->YCoordinate() ) ;
+        ((GraphBase::InLineNode * ) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist ,
+                    Graph()->GraphNodes( i )->XCoordinate() ,
+                    Graph()->GraphNodes( i )->YCoordinate() ) ;
       }
-      else if ( GraphNodes( i )->IsGOTONode() ) {
+      else if ( Graph()->GraphNodes( i )->IsGOTONode() ) {
 //        ((GraphBase::GOTONode * ) GraphNodes( i ))->SaveXML( f ,
 //                    "                        " ,
-        ((GraphBase::GOTONode * ) GraphNodes( i ))->SaveXML( Graph , nodelist ,
-                    GraphNodes( i )->XCoordinate() ,
-                    GraphNodes( i )->YCoordinate() ) ;
+        ((GraphBase::GOTONode * ) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist ,
+                    Graph()->GraphNodes( i )->XCoordinate() ,
+                    Graph()->GraphNodes( i )->YCoordinate() ) ;
       }
-      else if ( GraphNodes( i )->IsLoopNode() ) {
+      else if ( Graph()->GraphNodes( i )->IsLoopNode() ) {
 //        ((GraphBase::LoopNode * ) GraphNodes( i ))->SaveXML( f ,
 //                    "                        " ,
-        ((GraphBase::LoopNode * ) GraphNodes( i ))->SaveXML( Graph , nodelist ,
-                    GraphNodes( i )->XCoordinate() ,
-                    GraphNodes( i )->YCoordinate() ) ;
+        ((GraphBase::LoopNode * ) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist ,
+                    Graph()->GraphNodes( i )->XCoordinate() ,
+                    Graph()->GraphNodes( i )->YCoordinate() ) ;
       }
-      else if ( GraphNodes( i )->IsEndLoopNode() ) {
+      else if ( Graph()->GraphNodes( i )->IsEndLoopNode() ) {
 //        ((GraphBase::EndOfLoopNode * ) GraphNodes( i ))->SaveXML( f ,
 //                    "                        " ,
-        ((GraphBase::EndOfLoopNode * ) GraphNodes( i ))->SaveXML( Graph , nodelist ,
-                    GraphNodes( i )->XCoordinate() ,
-                    GraphNodes( i )->YCoordinate() ) ;
+        ((GraphBase::EndOfLoopNode * ) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist ,
+                    Graph()->GraphNodes( i )->XCoordinate() ,
+                    Graph()->GraphNodes( i )->YCoordinate() ) ;
       }
-      else if ( GraphNodes( i )->IsSwitchNode() ) {
+      else if ( Graph()->GraphNodes( i )->IsSwitchNode() ) {
 //        ((GraphBase::SwitchNode * ) GraphNodes( i ))->SaveXML( f ,
 //                    "                        " ,
-        ((GraphBase::SwitchNode * ) GraphNodes( i ))->SaveXML( Graph , nodelist ,
-                    GraphNodes( i )->XCoordinate() ,
-                    GraphNodes( i )->YCoordinate() ) ;
+        ((GraphBase::SwitchNode * ) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist ,
+                    Graph()->GraphNodes( i )->XCoordinate() ,
+                    Graph()->GraphNodes( i )->YCoordinate() ) ;
       }
-      else if ( GraphNodes( i )->IsEndSwitchNode() ) {
+      else if ( Graph()->GraphNodes( i )->IsEndSwitchNode() ) {
 //        ((GraphBase::EndOfSwitchNode * ) GraphNodes( i ))->SaveXML( f ,
 //                    "                        " ,
-        ((GraphBase::EndOfSwitchNode * ) GraphNodes( i ))->SaveXML( Graph , nodelist ,
-                    GraphNodes( i )->XCoordinate() ,
-                    GraphNodes( i )->YCoordinate() ) ;
+        ((GraphBase::EndOfSwitchNode * ) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist ,
+                    Graph()->GraphNodes( i )->XCoordinate() ,
+                    Graph()->GraphNodes( i )->YCoordinate() ) ;
       }
 //      f << "         </node>" << endl ;
 //    }
@@ -1052,29 +1233,29 @@ bool GraphEditor::OutNode::SaveXML(QDomDocument & Graph ) {
 //  f << "     </node-list>" << endl << endl ;
 
 //  f << "     <link-list>" << endl ;
-  QDomElement linklist = Graph.createElement( "link-list" ) ;
+  QDomElement linklist = GraphQDom.createElement( "link-list" ) ;
   dataflow.appendChild( linklist ) ;
-  const GraphBase::ListOfLinks * Links = GetLinks( true ) ;
+  const GraphBase::ListOfLinks * Links = Graph()->GetLinks( true ) ;
   for ( i = 0 ; i < (int ) Links->size() ; i++ ) {
 //    f << "           <link>" << endl ;
-    QDomElement link = Graph.createElement( "link" ) ;
+    QDomElement link = GraphQDom.createElement( "link" ) ;
     linklist.appendChild( link ) ;
 //    LinkSaveXML( f , "                       " , (*Links)[ i ] , false ) ;
-    LinkSaveXML( Graph , link , (*Links)[ i ] , false ) ;
+    LinkSaveXML( GraphQDom , link , (*Links)[ i ] , false ) ;
 //    f << "           </link>" << endl ;
   }
 //  f << "     </link-list>" << endl << endl ;
 
 //  f << "     <data-list>" << endl ;
-  QDomElement datalist = Graph.createElement( "data-list" ) ;
+  QDomElement datalist = GraphQDom.createElement( "data-list" ) ;
   dataflow.appendChild( datalist ) ;
-  const GraphBase::ListOfLinks * Datas = GetDatas() ;
+  const GraphBase::ListOfLinks * Datas = Graph()->GetDatas() ;
   for ( i = 0 ; i < (int ) Datas->size() ; i++ ) {
 //    f << "           <data>" << endl ;
-    QDomElement data = Graph.createElement( "data" ) ;
+    QDomElement data = GraphQDom.createElement( "data" ) ;
     datalist.appendChild( data ) ;
 //    LinkSaveXML( f , "                       " , (*Datas)[ i ] , true ) ;
-    LinkSaveXML( Graph , data , (*Datas)[ i ] , true ) ;
+    LinkSaveXML( GraphQDom , data , (*Datas)[ i ] , true ) ;
 //    f << "           </data>" << endl ;
   }
 //#if 0
@@ -1111,26 +1292,26 @@ bool GraphEditor::OutNode::SaveXML(QDomDocument & Graph ) {
 bool GraphEditor::OutNode::SavePY( ostream & f ) {
   int i ;
   int j ;
-  f << endl << "# Generated python file of Graph " << Name() << endl << endl ;
+  f << endl << "# Generated python file of Graph " << Graph()->Name() << endl << endl ;
 
   f << "from SuperV import *" << endl ;
 
   f << "# Graph creation " << endl ;
-  GraphBase::DataNode::SavePY( f , Name() , 0 , 0 ) ;
+  Graph()->SavePY( f , Graph()->Name() , 0 , 0 ) ;
 
   f << endl << "# Creation of Factory Nodes" << endl ;
-  for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-    if ( GraphNodes( i )->IsFactoryNode() ) {
+  for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+    if ( Graph()->GraphNodes( i )->IsFactoryNode() ) {
       f << endl ;
-      ((GraphBase::FactoryNode * ) GraphNodes( i ))->SavePY( f , Name() ,
-                GraphNodes( i )->XCoordinate() ,
-                GraphNodes( i )->YCoordinate() ) ;
+      ((GraphBase::FactoryNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
+                Graph()->GraphNodes( i )->XCoordinate() ,
+                Graph()->GraphNodes( i )->YCoordinate() ) ;
     }
   }
 
   bool first = true ;
-  for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-    if ( GraphNodes( i )->IsComputingNode() ) {
+  for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+    if ( Graph()->GraphNodes( i )->IsComputingNode() ) {
       if ( first ) {
         f << endl << "# Creation of Computing Nodes" << endl ;
         first = false ;
@@ -1138,15 +1319,15 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) {
       else {
         f << endl ;
       }
-      ((GraphBase::ComputingNode * ) GraphNodes( i ))->SavePY( f , Name() ,
-                GraphNodes( i )->XCoordinate() ,
-                GraphNodes( i )->YCoordinate() ) ;
+      ((GraphBase::ComputingNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
+                Graph()->GraphNodes( i )->XCoordinate() ,
+                Graph()->GraphNodes( i )->YCoordinate() ) ;
     }
   }
 
   first = true ;
-  for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-    if ( GraphNodes( i )->IsInLineNode() ) {
+  for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+    if ( Graph()->GraphNodes( i )->IsInLineNode() ) {
       if ( first ) {
         f << endl << "# Creation of InLine Nodes" << endl ;
         first = false ;
@@ -1154,15 +1335,15 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) {
       else {
         f << endl ;
       }
-      ((GraphBase::InLineNode * ) GraphNodes( i ))->SavePY( f , Name() ,
-                GraphNodes( i )->XCoordinate() ,
-                GraphNodes( i )->YCoordinate() ) ;
+      ((GraphBase::InLineNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
+                Graph()->GraphNodes( i )->XCoordinate() ,
+                Graph()->GraphNodes( i )->YCoordinate() ) ;
     }
   }
 
   first = true ;
-  for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-    if ( GraphNodes( i )->IsLoopNode() ) {
+  for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+    if ( Graph()->GraphNodes( i )->IsLoopNode() ) {
       if ( first ) {
         f << endl << "# Creation of Loop Nodes" << endl ;
         first = false ;
@@ -1170,15 +1351,15 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) {
       else {
         f << endl ;
       }
-      ((GraphBase::LoopNode * ) GraphNodes( i ))->SavePY( f , Name() ,
-                GraphNodes( i )->XCoordinate() ,
-                GraphNodes( i )->YCoordinate() ) ;
+      ((GraphBase::LoopNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
+                Graph()->GraphNodes( i )->XCoordinate() ,
+                Graph()->GraphNodes( i )->YCoordinate() ) ;
     }
   }
 
   first = true ;
-  for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-    if ( GraphNodes( i )->IsSwitchNode() ) {
+  for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+    if ( Graph()->GraphNodes( i )->IsSwitchNode() ) {
       if ( first ) {
         f << endl << "# Creation of Switch Nodes" << endl ;
         first = false ;
@@ -1186,15 +1367,15 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) {
       else {
         f << endl ;
       }
-      ((GraphBase::SwitchNode * ) GraphNodes( i ))->SavePY( f , Name() ,
-                GraphNodes( i )->XCoordinate() ,
-                GraphNodes( i )->YCoordinate() ) ;
+      ((GraphBase::SwitchNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
+                Graph()->GraphNodes( i )->XCoordinate() ,
+                Graph()->GraphNodes( i )->YCoordinate() ) ;
     }
   }
 
   first = true ;
-  for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-    if ( GraphNodes( i )->IsGOTONode() ) {
+  for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+    if ( Graph()->GraphNodes( i )->IsGOTONode() ) {
       if ( first ) {
         f << endl << "# Creation of GOTO Nodes" << endl ;
         first = false ;
@@ -1202,19 +1383,19 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) {
       else {
         f << endl ;
       }
-      ((GraphBase::GOTONode * ) GraphNodes( i ))->SavePY( f , Name() ,
-                GraphNodes( i )->XCoordinate() ,
-                GraphNodes( i )->YCoordinate() ) ;
+      ((GraphBase::GOTONode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() ,
+                Graph()->GraphNodes( i )->XCoordinate() ,
+                Graph()->GraphNodes( i )->YCoordinate() ) ;
     }
   }
 
-  const GraphBase::ListOfLinks * Links = GetLinks() ;
-  bool intervar ;
-  map< string , int > aMapOfOutPorts ;
+  const GraphBase::ListOfLinks * Links = Graph()->GetLinks() ;
+//  bool intervar ;
+//  map< string , int > aMapOfOutPorts ;
   first = true ;
-  for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
+  for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
     for ( j = 0 ; j < (int ) Links->size() ; j++ ) {
-      if ( !strcmp( GraphNodes( i )->Name() , (*Links)[ j ].FromNodeName.c_str() ) ) {
+      if ( !strcmp( Graph()->GraphNodes( i )->Name() , (*Links)[ j ].FromNodeName.c_str() ) ) {
         if ( first ) {
           f << endl
             << "# Creation of Links"
@@ -1224,91 +1405,45 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) {
         else {
           f << endl ;
         }
-        char * NodePort = new char [ strlen( (*Links)[ j ].FromNodeName.c_str() ) +
-                                     strlen( (*Links)[ j ].FromServiceParameterName.c_str() ) + 1 ] ;
-        strcpy( NodePort , (*Links)[ j ].FromNodeName.c_str() ) ;
-        strcat( NodePort , (*Links)[ j ].FromServiceParameterName.c_str() ) ;
-        if ( aMapOfOutPorts[ NodePort ] == 0 ) {
-          aMapOfOutPorts[ NodePort ] = j + 1 ;
-          intervar = true ;
-        }
-        else {
-          intervar = false ;
-        }
-        LinkSavePY( f , Name() , (*Links)[ j ] , intervar , false ) ;
-        delete [] NodePort ;
-      }
-    }
-  }
-
-#if 0
-  first = true ;
-  for ( i = 0 ; i < Links->size() ; i++ ) {
-    if ( GetGraphNode( (*Links)[ i ].FromNodeName.c_str() )->IsSwitchNode() ||
-         GetGraphNode( (*Links)[ i ].ToNodeName.c_str() )->IsSwitchNode() ||
-         GetGraphNode( (*Links)[ i ].FromNodeName.c_str() )->IsEndSwitchNode() ||
-         GetGraphNode( (*Links)[ i ].ToNodeName.c_str() )->IsEndSwitchNode() ) {
-      if ( first ) {
-        f << endl
-          << "# Creation of Switch Links"
-          << endl ;
-        first = false ;
-      }
-      char * NodePort = new char [ strlen( (*Links)[ i ].FromNodeName.c_str() ) +
-                                   strlen( (*Links)[ i ].FromServiceParameterName.c_str() ) + 1 ] ;
-      strcpy( NodePort , (*Links)[ i ].FromNodeName.c_str() ) ;
-      strcat( NodePort , (*Links)[ i ].FromServiceParameterName.c_str() ) ;
-      if ( aMapOfOutPorts[ NodePort ] == 0 ) {
-        aMapOfOutPorts[ NodePort ] = i + 1 ;
-        intervar = true ;
-      }
-      else {
-        intervar = false ;
-      }
-      LinkSavePY( f , Name() , (*Links)[ i ] , intervar , false ) ;
-      delete [] NodePort ;
-    }
-  }
-
-  first = true ;
-  for ( i = 0 ; i < Links->size() ; i++ ) {
-    if ( GetGraphNode( (*Links)[ i ].FromNodeName.c_str() )->IsGOTONode() &&
-         GetGraphNode( (*Links)[ i ].ToNodeName.c_str() )->IsInLineNode() ) {
-      if ( first ) {
-        f << endl
-          << "# Creation of intermediate Output variables and of Loop Links"
-          << endl ;
-        first = false ;
-      }
-      char * NodePort = new char [ strlen( (*Links)[ i ].FromNodeName.c_str() ) +
-                                   strlen( (*Links)[ i ].FromServiceParameterName.c_str() ) + 1 ] ;
-      strcpy( NodePort , (*Links)[ i ].FromNodeName.c_str() ) ;
-      strcat( NodePort , (*Links)[ i ].FromServiceParameterName.c_str() ) ;
-      if ( aMapOfOutPorts[ NodePort ] == 0 ) {
-        aMapOfOutPorts[ NodePort ] = i + 1 ;
-        intervar = true ;
-      }
-      else {
-        intervar = false ;
+//        char * NodePort = new char [ strlen( (*Links)[ j ].FromNodeName.c_str() ) +
+//                                     strlen( (*Links)[ j ].FromServiceParameterName.c_str() ) + 1 ] ;
+//        strcpy( NodePort , (*Links)[ j ].FromNodeName.c_str() ) ;
+//        strcat( NodePort , (*Links)[ j ].FromServiceParameterName.c_str() ) ;
+//        if ( aMapOfOutPorts[ NodePort ] == 0 ) {
+//          aMapOfOutPorts[ NodePort ] = j + 1 ;
+//          intervar = true ;
+//        }
+//        else {
+//          intervar = false ;
+//        }
+        bool fromparam = false ;
+        if ( Graph()->GraphNodes( i )->GetOutPort( (*Links)[ j ].FromServiceParameterName.c_str() )->IsParam() ) {
+          fromparam = true ;
+       }
+        bool toparam = false ;
+        if ( Graph()->GetChangeGraphNode( (*Links)[ j ].ToNodeName.c_str() )->GetInPort( (*Links)[ j ].ToServiceParameterName.c_str() )->IsParam() ) {
+          toparam = true ;
+       }
+        LinkSavePY( f , Graph()->Name() , (*Links)[ j ] , fromparam , toparam , false ) ;
+//        delete [] NodePort ;
       }
-      LinkSavePY( f , Name() , (*Links)[ i ] , intervar , false ) ;
-      delete [] NodePort ;
     }
   }
-#endif
 
-  const GraphBase::ListOfLinks * Datas = GetDatas() ;
+  const GraphBase::ListOfLinks * Datas = Graph()->GetDatas() ;
   first = true ;
   for ( i = 0 ; i < (int ) Datas->size() ; i++ ) {
     if ( first ) {
-      f << endl << "# Creation of Input datas" << endl ;
+      f << endl << "# Input datas" << endl ;
       first = false ;
     }
-    LinkSavePY( f , Name() , (*Datas)[ i ] , false , true ) ;
+    bool fromparam = true ;
+    bool toparam = true ;
+    LinkSavePY( f , Graph()->Name() , (*Datas)[ i ] , fromparam , toparam , true ) ;
   }
 
   first = true ;
-  const SALOME_ModuleCatalog::ListOfServicesParameter ListOfInParam = ServiceInParameter() ;
+  const SALOME_ModuleCatalog::ListOfServicesParameter ListOfInParam = Graph()->ServiceInParameter() ;
   for ( i = 0 ; i < (int ) ListOfInParam.length() ; i++ ) {
     string _aParam = CORBA::string_dup(ListOfInParam[ i ].Parametername) ;
     const char * aParam = _aParam.c_str() ;
@@ -1325,20 +1460,21 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) {
         break ;
       }
     }
-    if ( !GetChangeGraphNode( aNodeName )->GetInPort( aPortName )->IsDataConnected() ) {
+    const GraphBase::InPort * anInPort = Graph()->GetChangeGraphNode( aNodeName )->GetInPort( aPortName ) ;
+    if ( !anInPort->IsDataConnected() ) {
       if ( first ) {
-        f << endl << "# Missing Input datas" << endl ;
+        f << endl << "# Input Ports of the graph" << endl ;
         first = false ;
       }
-      f << aNodeName << aPortName << " = " << aNodeName << ".Port( '"
+      f << "#I" << aNodeName << aPortName << " = " << aNodeName << ".GetInPort( '"
         << aPortName << "' )" << endl ;
     }
     delete [] aNodeName ;
     delete [] aPortName ;
   }
 
-  f << endl << "# Creation of Output variables" << endl ;
-  const SALOME_ModuleCatalog::ListOfServicesParameter ListOfOutParam = ServiceOutParameter() ;
+  f << endl << "# Output Ports of the graph" << endl ;
+  const SALOME_ModuleCatalog::ListOfServicesParameter ListOfOutParam = Graph()->ServiceOutParameter() ;
   for ( i = 0 ; i < (int ) ListOfOutParam.length() ; i++ ) {
     string _aParam = CORBA::string_dup(ListOfOutParam[ i ].Parametername) ;
     const char * aParam = _aParam.c_str() ;
@@ -1355,7 +1491,7 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) {
         break ;
       }
     }
-    f << aNodeName << aPortName << " = " << aNodeName << ".Port( '"
+    f << "#O" << aNodeName << aPortName << " = " << aNodeName << ".GetOutPort( '"
       << aPortName << "' )" << endl ;
     delete [] aNodeName ;
     delete [] aPortName ;
@@ -1366,28 +1502,28 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) {
 
 
 ostream & operator<< (ostream & f,const GraphEditor::OutNode & G) {
-  f << (GraphBase::ComputingNode ) G ;
+  f << (GraphBase::ComputingNode ) *(G.Graph()) ;
   f << endl ;
 
-  f << "  Nodes : " << G.GraphNodesSize() << " node" 
-    << (G.GraphNodesSize() > 1 ? "s" : "") << endl;
+  f << "  Nodes : " << (G.Graph())->GraphNodesSize() << " node" 
+    << ((G.Graph())->GraphNodesSize() > 1 ? "s" : "") << endl;
   
   int i ;
-  for ( i = 0 ; i < G.GraphNodesSize() ; i++ ) {
+  for ( i = 0 ; i < (G.Graph())->GraphNodesSize() ; i++ ) {
     f
-//      << hex << (void *) G.GraphNodes( i ) << dec << " "
-      << *G.GraphNodes( i ) << endl;
+//      << hex << (void *) G.Graph().GraphNodes( i ) << dec << " "
+      << (G.Graph())->GraphNodes( i ) << endl;
   }
 
   f << "  Links : " << endl ;
-  for ( i = 0 ; i < G.GraphNodesSize() ; i++ ) {
-    G.GraphNodes( i )->ListLinks( f ) ;
+  for ( i = 0 ; i < (G.Graph())->GraphNodesSize() ; i++ ) {
+    (G.Graph())->GraphNodes( i )->ListLinks( f ) ;
   }
 
   f << "  Datas : " << endl ;
-  G.ListDatas( f ) ;
+  (G.Graph())->ListDatas( f ) ;
 
-  f << "DataFlow " << G.Name() << " is " ;
+  f << "DataFlow " << (G.Graph())->Name() << " is " ;
   if ( G.IsNotValid() )
     f << "not " ;
   f << "valid and is " ;
index c36b24378cfd837c76c300c24f1a97aaf603e78d..351707ddef8fbc2376917364a52d05b49a1cea8f 100644 (file)
 #ifndef _DATAFLOWEDITOR_OUTNODE_HXX
 #define _DATAFLOWEDITOR_OUTNODE_HXX
 
-#include "DataFlowBase_Graph.hxx"
+#include "DataFlowBase_StreamGraph.hxx"
 
 #include "DataFlowEditor_InNode.hxx"
 
 namespace GraphEditor {
 
-  class OutNode : public GraphBase::Graph {
+//  class OutNode : public GraphBase::Graph {
+  class OutNode : public GraphBase::Base {
     
     private :
 
+      GraphBase::StreamGraph * _StreamGraph ;
+      GraphBase::Graph       * _Graph ;
+
+      int  _Graph_prof_debug ;
+
       bool _Imported ;
 
       bool _Valid ;
@@ -65,7 +71,8 @@ namespace GraphEditor {
       bool GraphEditor::OutNode::LinkSavePY( ostream &f ,
                                              const char *aGraphName ,
                                              GraphBase::SLink aLink ,
-                                             bool intervar ,
+                                             bool fromparam ,
+                                             bool toparam ,
                                              bool wdata ) const;
       bool SavePY(ostream &f ) ;
 
@@ -77,7 +84,8 @@ namespace GraphEditor {
       OutNode( CORBA::ORB_ptr ORB,
                SALOME_NamingService* ptrNamingService ,
                const char *DataFlowName ,
-               const char * DebugFileName );
+               const char * DebugFileName ,
+               const SUPERV::KindOfNode aKindOfNode );
       OutNode( CORBA::ORB_ptr ORB,
                SALOME_NamingService* ptrNamingService ,
                const SALOME_ModuleCatalog::Service& DataFlowService ,
@@ -94,8 +102,15 @@ namespace GraphEditor {
                const char * DebugFileName ) ;
       virtual ~OutNode();
 
-//      SALOME_NamingService* NamingService() const {
-//            return _theNamingService ; } ;
+      void Set_prof_debug( CORBA::ORB_ptr ORB , const char * DebugFileName ) ;
+      GraphBase::StreamGraph * StreamGraph() {
+                               return _StreamGraph ; } ;
+      GraphBase::StreamGraph * StreamGraph() const {
+                               return _StreamGraph ; } ;
+      GraphBase::Graph * Graph() {
+                         return _Graph ; } ;
+      const GraphBase::Graph * Graph() const {
+                               return _Graph ; } ;
 
       bool LoadDataFlow( const GraphBase::SGraph *aDataFlow ) ;
       bool LoadXml( const char* myFileName ) ;
@@ -127,7 +142,7 @@ namespace GraphEditor {
                         const int NodeX ,
                         const int NodeY ) ;
       GraphEditor::InNode * GetNode( const char* NodeName ) {
-               const GraphBase::Graph::ComputingNode * aNode = GraphBase::Graph::GetGraphNode( NodeName ) ;
+               const GraphBase::Graph::ComputingNode * aNode = _Graph->GetGraphNode( NodeName ) ;
                if ( aNode ) {
                  return (GraphEditor::InNode * ) (aNode->GetInNode()) ;
                }
@@ -137,34 +152,34 @@ namespace GraphEditor {
       bool RemoveNode( const char* NodeName ) {
            DateModification() ;
            _Valid = false ;
-           return GraphBase::Graph::RemoveNode( NodeName ) ; } ;
+           return _Graph->RemoveNode( NodeName ) ; } ;
       bool ReNameNode( const char* OldNodeName ,
                        const char* NewNodeName ) {
            DateModification() ;
            _Valid = false ;
-           return GraphBase::Graph::ReNameNode( OldNodeName , NewNodeName ) ; } ;
+           return _Graph->ReNameNode( OldNodeName , NewNodeName ) ; } ;
 
       void Coordinates( const int X , const int Y ) {
-           return GraphBase::Graph::Coordinates( X , Y ) ; } ;
+           return _Graph->Coordinates( X , Y ) ; } ;
       const int XCoordinate() {
-           return GraphBase::Graph::XCoordinate() ; } ;
+           return _Graph->XCoordinate() ; } ;
       const int YCoordinate() {
-           return GraphBase::Graph::YCoordinate() ; } ;
+           return _Graph->YCoordinate() ; } ;
       void Coordinates( const char* NodeName , const int X , const int Y ) ;
       const int XCoordinate( const char* NodeName ) ;
       const int YCoordinate( const char* NodeName ) ;
 
-      const GraphBase::InPort *GetInPort( const char *name ) {
-            return GraphBase::PortsOfNode::GetInPort( name ) ; } ;
-      const GraphBase::OutPort *GetOutPort( const char *name ) {
-            return GraphBase::PortsOfNode::GetOutPort( name ) ; } ;
-      GraphBase::InPort *GetChangeInPort( const char *name ) {
-            return GraphBase::PortsOfNode::GetChangeInPort( name ) ; } ;
-      GraphBase::OutPort *GetChangeOutPort( const char *name ) {
-            return GraphBase::PortsOfNode::GetChangeOutPort( name ) ; } ;
+      const GraphBase::InPort *GetInPort( const char * InPortName ) {
+            return _Graph->GetInPort( InPortName ) ; } ;
+      const GraphBase::OutPort *GetOutPort( const char * OutPortName ) {
+            return _Graph->GetOutPort( OutPortName ) ; } ;
+      GraphBase::InPort *GetChangeInPort( const char * InPortName ) {
+            return _Graph->GetChangeInPort( InPortName ) ; } ;
+      GraphBase::OutPort *GetChangeOutPort( const char * OutPortName ) {
+            return _Graph->GetChangeOutPort( OutPortName ) ; } ;
 
       bool HasInput(const char * ToServiceParameterName ) {
-           return GraphBase::ComputingNode::HasInput( ToServiceParameterName ) ;
+           return _Graph->HasInput( ToServiceParameterName ) ;
         }
 
       bool AddLink( const char* FromNodeName ,
@@ -174,20 +189,18 @@ namespace GraphEditor {
                     const CORBA::Any aValue ) {
            DateModification() ;
            _Valid = false ;
-           return GraphBase::Graph::AddLink(
-                                    FromNodeName , FromServiceParameterName ,
-                                    ToNodeName , ToServiceParameterName ,
-                                    aValue ) ; } ;
+           return _Graph->AddLink( FromNodeName , FromServiceParameterName ,
+                                   ToNodeName , ToServiceParameterName ,
+                                   aValue ) ; } ;
 
       bool RemoveLink( const char* FromNodeName ,
                        const char* FromServiceParameterName ,
                        const char* ToNodeName ,
                        const char* ToServiceParameterName ) {
-           bool RetVal = GraphBase::Graph::RemoveLink(
-                                                 FromNodeName ,
-                                                 FromServiceParameterName , 
-                                                 ToNodeName ,
-                                                 ToServiceParameterName ) ;
+           bool RetVal = _Graph->RemoveLink( FromNodeName ,
+                                             FromServiceParameterName , 
+                                             ToNodeName ,
+                                             ToServiceParameterName ) ;
            if ( RetVal )
              DateModification() ;
            _Valid = false ;
@@ -197,10 +210,10 @@ namespace GraphEditor {
                    const char* ToServiceParameterName ,
                    char** FromNodeName ,
                    char** FromServiceParameterName ) {
-           return GraphBase::Graph::GetLink( ToNodeName ,
-                                             ToServiceParameterName ,
-                                             FromNodeName ,
-                                            FromServiceParameterName ) ; } ;
+           return _Graph->GetLink( ToNodeName ,
+                                   ToServiceParameterName ,
+                                   FromNodeName ,
+                                  FromServiceParameterName ) ; } ;
 
       bool AddLinkCoord( const char* FromNodeName ,
                          const char* FromServiceParameterName ,
index d1acd912fc907fedaccf60251b5bb9cfc14a457f..6bd73f79a6a34faf6a9f9b6c757d3ef2cfe64403 100644 (file)
@@ -60,12 +60,11 @@ BIN_SERVER_IDL =
 
 CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) \
        -I${KERNEL_ROOT_DIR}/include/salome
-#CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wno-deprecated
 CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \
        -I${KERNEL_ROOT_DIR}/include/salome
-#LDFLAGS+= -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lSalomeSuperVisionExecutor -lOpUtil -lSalomeLoggerServer -lc $(PYTHON_LIBS) $(QT_MT_LIBS) $(OGL_LIBS)
 LDFLAGS+= -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lSalomeSuperVisionExecutor -lOpUtil -lSALOMELocalTrace \
        -lc $(QT_MT_LIBS) $(OGL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome
+#LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS)
 
 
 @CONCLUDE@
index ce7121885365b7c08f5967903e1551071063cf21..36d198c872b3e9f777314155e0618d8e55869f76 100644 (file)
@@ -41,8 +41,9 @@ GraphExecutor::DataFlow::DataFlow() :
 GraphExecutor::DataFlow::DataFlow( CORBA::ORB_ptr ORB,
                                   SALOME_NamingService* ptrNamingService ,
                                    const char *DataFlowName ,
-                                   const char * DebugFileName ) :
-  OutNode( ORB, ptrNamingService , DataFlowName , DebugFileName ) {
+                                   const char * DebugFileName ,
+                                   const SUPERV::KindOfNode aKindOfNode ) :
+  OutNode( ORB, ptrNamingService , DataFlowName , DebugFileName , aKindOfNode ) {
   cdebug_in << "GraphExecutor::DataFlow::DataFlow(" ;
   if ( DataFlowName ) {
     cdebug << DataFlowName ;
@@ -90,8 +91,8 @@ GraphExecutor::DataFlow::~DataFlow() {
 bool GraphExecutor::DataFlow::Ping( const char *aNodeName ) {
   cdebug_in << "GraphExecutor::DataFlow::Ping" << aNodeName << " )" << endl;
   bool RetVal = false ;
-  if ( GetGraphNode( aNodeName ) )
-    RetVal = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode())->Ping() ;
+  if ( Graph()->GetGraphNode( aNodeName ) )
+    RetVal = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode())->Ping() ;
   cdebug_out << "GraphExecutor::DataFlow::Ping" << endl;
   return RetVal ;
 }
@@ -106,7 +107,7 @@ bool GraphExecutor::DataFlow::ContainerKill() {
 bool GraphExecutor::DataFlow::ContainerKill( const char *aNodeName ) {
 //  cdebug_in << "GraphExecutor::DataFlow::ContainerKill( " << aNodeName << " )"<< endl;
   bool RetVal = false ;
-  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
+  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
   if ( aNode ) {
     RetVal = aNode->ContainerKill() ;
   }
@@ -124,7 +125,7 @@ bool GraphExecutor::DataFlow::Kill() {
 bool GraphExecutor::DataFlow::Kill( const char *aNodeName ) {
 //  cdebug_in << "GraphExecutor::DataFlow::Kill( " << aNodeName << " )"<< endl;
   bool RetVal = false ;
-  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
+  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
   if ( aNode ) {
     RetVal = aNode->Kill() ;
   }
@@ -135,7 +136,7 @@ bool GraphExecutor::DataFlow::Kill( const char *aNodeName ) {
 bool GraphExecutor::DataFlow::KillDone( const char *aNodeName ) {
 //  cdebug_in << "GraphExecutor::DataFlow::KillDone( " << aNodeName << " )"<< endl;
   bool RetVal = false ;
-  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
+  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
   if ( aNode ) {
     RetVal = aNode->KillDone() ;
   }
@@ -153,7 +154,7 @@ bool GraphExecutor::DataFlow::Suspend() {
 bool GraphExecutor::DataFlow::Suspend( const char *aNodeName ) {
 //  cdebug_in << "GraphExecutor::DataFlow::Suspend( " << aNodeName << " )"<< endl;
   bool RetVal = false ;
-  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
+  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
   if ( aNode ) {
     RetVal = aNode->Suspend() ;
   }
@@ -172,7 +173,7 @@ bool GraphExecutor::DataFlow::SuspendDone() {
 bool GraphExecutor::DataFlow::SuspendDone( const char *aNodeName ) {
 //  cdebug_in << "GraphExecutor::DataFlow::SuspendDone( " << aNodeName << " )"<< endl;
   bool RetVal = false ;
-  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
+  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
   if ( aNode ) {
     RetVal = aNode->SuspendDone() ;
   }
@@ -190,7 +191,7 @@ bool GraphExecutor::DataFlow::Resume() {
 bool GraphExecutor::DataFlow::Resume( const char *aNodeName ) {
 //  cdebug_in << "GraphExecutor::DataFlow::Resume( " << aNodeName << " )"<< endl;
   bool RetVal = false ;
-  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
+  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
   if ( aNode ) {
     RetVal = aNode->Resume() ;
   }
@@ -208,7 +209,7 @@ bool GraphExecutor::DataFlow::Stop() {
 bool GraphExecutor::DataFlow::Stop( const char *aNodeName ) {
 //  cdebug_in << "GraphExecutor::DataFlow::Stop( " << aNodeName << " )"<< endl;
   bool RetVal = false ;
-  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
+  GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
   if ( aNode ) {
     RetVal = aNode->Stop() ;
   }
index 5f1f153797e1bd980e4d4d689bd707f04c117678..b5774e7965bd7adefa79b86fb05f5eaebe99019d 100644 (file)
@@ -42,7 +42,8 @@ namespace GraphExecutor {
       DataFlow();
       DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService ,
                 const char * DataFlowName ,
-                const char * DebugFileName );
+                const char * DebugFileName ,
+                const SUPERV::KindOfNode aKindOfNode );
       DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService ,
                 const SALOME_ModuleCatalog::Service& DataFlowService ,
                 const char *DataFlowComponentName ,
index ce3c6061dcdce30f2fa9d1e90dbbbf1ac5fde8da..2cf8cf4c03ab43f0b2550e5dc881c6789c4d6039 100644 (file)
@@ -40,8 +40,8 @@ inline bool GraphExecutor::DataFlow::LoadXml( const char* myFileName ) {
 
 inline const SALOME_ModuleCatalog::Service * GraphExecutor::DataFlow::NodeService(
                                              const char * aNodeName ) {
-  if ( GetGraphNode( aNodeName ) )
-    return GetGraphNode( aNodeName )->GetService() ;
+  if ( Graph()->GetGraphNode( aNodeName ) )
+    return Graph()->GetGraphNode( aNodeName )->GetService() ;
   return NULL ;
 }
 
@@ -50,8 +50,7 @@ inline bool GraphExecutor::DataFlow::ChangeInputData( const char* ToNodeName ,
                                                  const CORBA::Any aValue ) {
   if ( !IsValid() )
     return false ;
-  return GraphBase::Graph::ChangeInputData( ToNodeName , ToParameterName ,
-                                            aValue ) ; 
+  return Graph()->ChangeInputData( ToNodeName , ToParameterName , aValue ) ; 
 } ;
 
 inline bool GraphExecutor::DataFlow::AddInputSharedData(const char* ToNodeName1 ,
index e63271f2f4e9a49ea6c8b2cd75059b0a51fa676b..448ad16da6410c86eed5eacf93fa5f5204192b9d 100644 (file)
@@ -570,7 +570,7 @@ bool GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncName , P
   
   bool RetVal = false ;
   if ( _MapOfPyFunctions[ aPyFuncName ] != NULL ) {
-    PyObject * aPyFunc = _MapOfPyFunctions[ aPyFuncName ] ;
+    //PyObject * aPyFunc = _MapOfPyFunctions[ aPyFuncName ] ;
     //cout << "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' , " << aPyFunction
     //     << " ) ob_refcnt " << aPyFunction->ob_refcnt << " already mapped : " << aPyFunc << " ob_refcnt "
     //     << aPyFunc->ob_refcnt << endl ;
index 45ebcad37193a08a3b81db394c2a531ddf8dfeab..1e12de895e4ce6e89af9343d24ec7be8575ab3c4 100644 (file)
@@ -345,8 +345,11 @@ GraphExecutor::InNode::InNode( CORBA::ORB_ptr ORB,
     _InLineNode = (GraphBase::InLineNode *) _ComputingNode ;
     break ;
   }
-  case SUPERV::DataFlowNode : {
-    cdebug << "GraphEditor::InNode::InNode SUPERV::DataFlowNode ERROR : " << NodeName ;
+  case SUPERV::DataFlowGraph : {
+    cdebug << "GraphEditor::InNode::InNode SUPERV::DataFlowGraph ERROR : " << NodeName ;
+  }
+  case SUPERV::DataStreamGraph : {
+    cdebug << "GraphEditor::InNode::InNode SUPERV::DataStreamGraph ERROR : " << NodeName ;
   }
   case SUPERV::UnknownNode : {
     cdebug << "GraphEditor::InNode::InNode SUPERV::UnknownNode ERROR : " << NodeName ;
@@ -793,7 +796,7 @@ bool GraphExecutor::InNode::Resume() {
 bool GraphExecutor::InNode::ReStart( const char * AtNodeName ,
                                      const bool AndSuspend ) {
   bool RetVal = false ;
-  GraphExecutor::InNode * aRestartNode = (GraphExecutor::InNode *) _OutNode->GetGraphNode( AtNodeName )->GetInNode() ;
+  GraphExecutor::InNode * aRestartNode = (GraphExecutor::InNode *) _OutNode->Graph()->GetGraphNode( AtNodeName )->GetInNode() ;
   cdebug_in << pthread_self() << "/" << ThreadNo()
             << " --> GraphExecutor::InNode::ReStartAt( "
             << AtNodeName << " , " << AndSuspend << ") " << endl
@@ -1058,7 +1061,11 @@ void GraphExecutor::InNode::InitialState( GraphExecutor::OutNode * theOutNode )
   ThreadNo( 0 ) ;
 
   for ( i = 0 ; i < GetNodeOutPortsSize() ; i++ ) {
-    if ( i != 0 || !IsGOTONode() ) {
+    if ( GetNodeOutPort(i)->IsDataStream() ) {
+      GetChangeNodeOutPort(i)->State(  SUPERV::ReadyState ) ;
+      GetChangeNodeOutPort(i)->Done( true ) ;
+    }
+    else if ( i != 0 || !IsGOTONode() ) {
       GetChangeNodeOutPort(i)->State(  SUPERV::WaitingState ) ;
       GetChangeNodeOutPort(i)->Done( false ) ;
     }
@@ -1091,21 +1098,32 @@ void GraphExecutor::InNode::InitialState( GraphExecutor::OutNode * theOutNode )
     if ( anInPort->IsGate() && anOutPort == NULL ) {
       Pc-- ;
     }
-    else {
-      if ( anOutPort->IsDataConnected() ) {
+    else if ( anOutPort ) {
+      if ( anOutPort->IsDataConnected() || anOutPort->IsDataStream() ) {
         Pc-- ;
       }
-      if ( anOutPort->IsPortConnected() ) {
-        anOutPort->State( SUPERV::WaitingState ) ;
-        anOutPort->Done( false ) ;
-      }
-      else if ( anOutPort->IsDataConnected() ) {
+      if ( anOutPort->IsDataConnected() || anOutPort->IsDataStream() ) {
         anOutPort->State( SUPERV::ReadyState ) ;
         anOutPort->Done( true ) ;
       }
+      else if ( anOutPort->IsPortConnected() ) {
+        anOutPort->State( SUPERV::WaitingState ) ;
+        anOutPort->Done( false ) ;
+      }
     }
     if ( anOutPort ) {
-      GetChangeNodeInPort(i)->State( anOutPort->State() ) ;
+      if ( !anOutPort->IsDataStream() || anInPort->IsDataStream() ) {
+        cdebug << "InPort" << i << " state change : " << anInPort->PortName() << " from OutPort "
+               << anOutPort->PortName() << " from Node " << anOutPort->NodeName()
+               << " with state " << theAutomaton->StateName( anOutPort->State() ) << endl ;
+        GetChangeNodeInPort(i)->State( anOutPort->State() ) ;
+      }
+      else {
+        cdebug << "InPort" << i << " state change : " << anInPort->PortName() << " from OutPort "
+               << anOutPort->PortName() << " from Node " << anOutPort->NodeName()
+               << " with state ReadyState" << endl ;
+        GetChangeNodeInPort(i)->State( SUPERV::ReadyState ) ;
+      }
     }
     if ( anOutPort ) {
       cdebug << "InPort" << i << " : " << anInPort->PortName() << " from OutPort "
@@ -1140,6 +1158,13 @@ void GraphExecutor::InNode::InitialState( GraphExecutor::OutNode * theOutNode )
     _OutNode->PushEvent( this , GraphExecutor::AllDataReadyEvent ,
                          _currentState ) ; 
   }
+
+  for ( i = 0 ; i < GetNodeOutPortsSize() ; i++ ) {
+    cdebug << "OutPort" << i << " : " << GetNodeOutPort(i)->PortName() << " "
+           << theAutomaton->StateName( GetChangeNodeOutPort(i)->State() )
+           << " " << GetNodeOutPort(i)->Kind() << endl ;
+  }
+
   cdebug << "CurrentState = " << theAutomaton->StateName( _currentState )
          << endl;
 
@@ -1152,32 +1177,40 @@ bool GraphExecutor::InNode::InitPythonFunctions(bool WithErr ) {
   if ( !PyFuncRunned() && IsOneOfInLineNodes() ) {
     if ( IsLoopNode() ) {
       PyObject * PyRunMethod = InLineNode()->PyRunMethod() ;
+      PyObject * PyMoreMethod = NULL ;
+      PyObject * PyNextMethod = NULL ;
       if ( PyRunMethod ) {
       }
       else {
-        PyObject * PyRunMethod = InitPyDynInvoke( InLineNode()->PyFuncName() ,
-                                                  InLineNode()->PythonFunction() ) ;
+        PyRunMethod = InitPyDynInvoke( InLineNode()->PyFuncName() ,
+                                       InLineNode()->PythonFunction() ,
+                                       Err ) ;
         InLineNode()->PyRunMethod( PyRunMethod ) ;
       }
-      PyObject * PyMoreMethod = LoopNode()->PyMoreMethod() ;
-      if ( PyMoreMethod ) {
-      }
-      else {
-        PyMoreMethod = InitPyDynInvoke( LoopNode()->PyMoreName() ,
-                                        LoopNode()->MorePythonFunction() ) ;
-        LoopNode()->PyMoreMethod( PyMoreMethod ) ;
-      }
-      PyObject * PyNextMethod = LoopNode()->PyNextMethod() ;
-      if ( PyNextMethod ) {
+      if ( !Err ) {
+        PyMoreMethod = LoopNode()->PyMoreMethod() ;
+        if ( PyMoreMethod ) {
+        }
+        else {
+          PyMoreMethod = InitPyDynInvoke( LoopNode()->PyMoreName() ,
+                                          LoopNode()->MorePythonFunction() ,
+                                          Err ) ;
+          LoopNode()->PyMoreMethod( PyMoreMethod ) ;
+        }
       }
-      else {
-        PyNextMethod = InitPyDynInvoke( LoopNode()->PyNextName() ,
-                                        LoopNode()->NextPythonFunction() ) ;
-        LoopNode()->PyNextMethod( PyNextMethod ) ;
+      if ( !Err ) {
+        PyNextMethod = LoopNode()->PyNextMethod() ;
+        if ( PyNextMethod ) {
+        }
+        else {
+          PyNextMethod = InitPyDynInvoke( LoopNode()->PyNextName() ,
+                                          LoopNode()->NextPythonFunction() ,
+                                          Err ) ;
+          LoopNode()->PyNextMethod( PyNextMethod ) ;
+        }
       }
       cdebug << "GraphExecutor::InNode::InitPythonFunctions " << Name() << " PyRunMethod(Init) " << PyRunMethod
              << " PyMoreMethod " << PyMoreMethod << " PyNextMethod " << PyNextMethod << endl;
-      Err = !PyRunMethod || !PyMoreMethod || !PyNextMethod ;
     }
     else if ( IsInLineNode() || IsSwitchNode() ) {
       PyObject * PyRunMethod = InLineNode()->PyRunMethod() ;
@@ -1185,11 +1218,11 @@ bool GraphExecutor::InNode::InitPythonFunctions(bool WithErr ) {
       }
       else {
        PyRunMethod = InitPyDynInvoke( InLineNode()->PyFuncName() ,
-                                       InLineNode()->PythonFunction() ) ;
+                                       InLineNode()->PythonFunction() ,
+                                       Err ) ;
         InLineNode()->PyRunMethod( PyRunMethod ) ;
       }
       cdebug << "GraphExecutor::InNode::InitPythonFunctions " << Name() << " PyRunMethod " << PyRunMethod << endl;
-      Err = !PyRunMethod ;
     }
     else if ( ( IsEndLoopNode() || IsEndSwitchNode() || IsGOTONode() ) &&
               (*InLineNode()->PythonFunction()).length() ) {
@@ -1198,11 +1231,11 @@ bool GraphExecutor::InNode::InitPythonFunctions(bool WithErr ) {
       }
       else {
         PyRunMethod = InitPyDynInvoke( InLineNode()->PyFuncName() ,
-                                       InLineNode()->PythonFunction() ) ;
+                                       InLineNode()->PythonFunction() ,
+                                       Err ) ;
         InLineNode()->PyRunMethod( PyRunMethod ) ;
       }
       cdebug << "GraphExecutor::InNode::InitPythonFunctions " << Name() << " PyRunMethod " << PyRunMethod << endl;
-      Err = !PyRunMethod ;
     }
   }
   Err = WithErr && Err ;
@@ -1211,7 +1244,7 @@ bool GraphExecutor::InNode::InitPythonFunctions(bool WithErr ) {
     cdebug << " Error " << Err ;
   }
   cdebug << endl;
-  return Err ;
+  return !Err ;
 }
 
 const long GraphExecutor::InNode::CpuUsed( bool tot ) {
index 6351e1fe2408ab98edd5e9e7433cf3d743b805a8..9e40b030d68b4f798130f73a158e2cfd7c80ad1e 100644 (file)
@@ -232,20 +232,25 @@ namespace GraphExecutor {
                               return GOTONode()->CoupledNode() ; } ;
 
       GraphBase::InPort * AddInPort( const char * InputParameterName ,
-                                     const char * InputParameterType ) {
+                                     const char * InputParameterType ,
+                                     const SUPERV::KindOfPort aKindOfPort ) {
                           return _ComputingNode->AddInPort( InputParameterName ,
-                                                            InputParameterType ) ; } ;
+                                                            InputParameterType ,
+                                                            aKindOfPort ) ; } ;
       GraphBase::OutPort * AddOutPort( const char * OutputParameterName ,
-                                       const char * OutputParameterType ) {
+                                       const char * OutputParameterType ,
+                                       const SUPERV::KindOfPort aKindOfPort ) {
                            return _ComputingNode->AddOutPort( OutputParameterName ,
-                                                              OutputParameterType ) ; } ;
+                                                              OutputParameterType ,
+                                                              aKindOfPort ) ; } ;
 //      void InOutPort( GraphBase::InPort * InputPort ,
 //                      GraphBase::OutPort * OutputPort ) {
 //           return _ComputingNode->InOutPort( InputPort , OutputPort ) ; } ;
       int LinkedNodesSize() const {
           return _ComputingNode->LinkedNodesSize() ; } ;
-      GraphBase::ComputingNode * LinkedNodes( int i ) const {
-                                 return _ComputingNode->LinkedNodes( i ) ; } ;
+//      GraphBase::ComputingNode * LinkedNodes( int i ) const {
+      GraphBase::StreamNode * LinkedNodes( int i ) const {
+                              return _ComputingNode->LinkedNodes( i ) ; } ;
       const int LinkedInPortsNumber( int i ) const {
                 return _ComputingNode->LinkedInPortsNumber( i ) ; } ;
 
@@ -294,7 +299,8 @@ namespace GraphExecutor {
 
       bool InitPython() ;
       PyObject * InitPyDynInvoke( char * PyFuncName ,
-                                  const SUPERV::ListOfStrings * aPythonFunction ) ;
+                                  const SUPERV::ListOfStrings * aPythonFunction ,
+                                  bool & Err ) ;
 
       void LockDataWait() ;
       void UnLockDataWait() ;
index ab2e17f93aae5ba94da278cc678877baa49e9002..0b02ac8042fe842381cf7543ccd2b360ff3f91c1 100644 (file)
@@ -46,6 +46,8 @@ using namespace std;
 
 #include "DataFlowExecutor_OutNode.hxx"
 
+#include "Graph_Impl.hxx"
+
 //static char *containerName = "FactoryServer" ;
 
 int GraphExecutor::InNode::SendEvent( const GraphExecutor::NodeEvent anEvent ) {  
@@ -754,9 +756,9 @@ int GraphExecutor::InNode::VoidAction() {
 
 
 int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() {
-//  cdebug << pthread_self() << "/" << ThreadNo()
-//         << " --> DataWaiting_SomeDataReadyAction from " << DataFromNode()
-//         << " to " << Name() << endl;
+  cdebug << pthread_self() << "/" << ThreadNo()
+         << " --> DataWaiting_SomeDataReadyAction from " << DataFromNode()
+         << " to " << Name() << endl;
   unsigned int k;
   int InReady = 0 ;
   int res = 1;
@@ -778,6 +780,7 @@ int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() {
   for ( k = 0 ; k < (unsigned int ) GetNodeInPortsSize() ; k++ ) {
     GraphBase::InPort * anInPort = GetChangeNodeInPort(k) ;
     GraphBase::OutPort * anOutPort = anInPort->GetOutPort() ;
+    cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " InPort " << anInPort->PortName() << endl ;
     if ( anInPort->IsGate() && anOutPort == NULL ) {
       InReady += 1 ;
       anInPort->State( SUPERV::ReadyState ) ;
@@ -1071,9 +1074,14 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() {
     }
   }
   else if ( CORBA::is_nil( Component() ) ) {
-    Err = !_OutNode->StartComponent( ThreadNo() , Computer() ,
-                                     my_strdup( ComponentName() ) ,
-                                     myContainer , myObjComponent ) ;
+    ostringstream astr ;
+    astr << "Graph " << _OutNode->Graph()->Name() << " Node " << Name()
+         << " : load of component " << ComponentName() << " in container "
+         << Computer() ;
+    _OutNode->Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ;
+    Err = !_OutNode->Graph()->StartComponent( ThreadNo() , Computer() ,
+                                              my_strdup( ComponentName() ) ,
+                                              myContainer , myObjComponent ) ;
     ObjInterface( false ) ;
     SetContainer( myContainer ) ;
     SetComponent( myObjComponent ) ;
@@ -1098,6 +1106,9 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() {
     }
     else {
       if ( !Err ) {
+        ostringstream astr ;
+        astr << "Graph " << _OutNode->Graph()->Name() << " Run of Node " << Name() ;
+        _OutNode->Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ;
         cdebug << ThreadNo() << " Run( '" << ServiceName() << "'" ;
         for ( i = 0 ; i < (int ) ServiceInParameter().length() ; i++ ) {
           cdebug << " , " << InParametersList[ i ].Name << "[kind"
@@ -1341,18 +1352,18 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() {
         else {
           try {
             try {
-              cdebug << "DynInvoke -> Names " << _OutNode->Name() << " " << Name() << endl ;
+              cdebug << "DynInvoke -> Names " << _OutNode->Graph()->Name() << " " << Name() << endl ;
               DynInvoke( myObjComponent, "Names" ,
-                         _OutNode->Name() , Name() ) ;
+                         _OutNode->Graph()->Name() , Name() ) ;
             }
             catch( ... ) {
               cdebug << "DynInvoke Names catched ERROR" << endl ;
            }
-            cdebug << ServiceInParameter().length() << " input parameters and "
-                   << ServiceOutParameter().length() << " output parameters" << endl ;
             if ( IsComputingNode() ) {
               cdebug << ThreadNo() << " !ObjInterface " << Name()
                      << " IsComputingNode DynInvoke"  << endl ;
+              cdebug << ServiceInParameter().length()-1 << " input parameters and "
+                     << ServiceOutParameter().length() << " output parameters" << endl ;
               DynInvoke( myObjComponent,
                          ServiceName() ,
                          &InParametersList[1] , ServiceInParameter().length()-1 ,
@@ -1361,6 +1372,8 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() {
             else if ( IsFactoryNode() ) {
               cdebug << ThreadNo() << " !ObjInterface " << Name()
                      << " IsFactoryNode DynInvoke"  << endl ;
+              cdebug << ServiceInParameter().length() << " input parameters and "
+                     << ServiceOutParameter().length() << " output parameters" << endl ;
               DynInvoke( myObjComponent,
                          ServiceName() ,
                          &InParametersList[0] , ServiceInParameter().length() ,
@@ -1383,6 +1396,10 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() {
 //    sleep( 1 ) ;
 //  }
 
+  ostringstream astr ;
+  astr << "Graph " << _OutNode->Graph()->Name() << " Node " << Name() << " is done : "
+       << Automaton()->StateName( State() ) ;
+  _OutNode->Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ;
   if ( Err ) {
     if ( ControlState() == SUPERV::ToKillState ||
          ControlState() == SUPERV::ToKillDoneState ||
@@ -1584,15 +1601,25 @@ void GraphExecutor::InNode::SetWaitingStates(GraphExecutor::InNode * EndNode ) {
 //               << " --> GraphExecutor::InNodeThreads::SetWaitingStates " << Name() << endl;
         docdebug = true ;
       }
-      anInPort->State( SUPERV::WaitingState ) ;
+      if ( !anInPort->IsDataStream() ) {
+        anInPort->State( SUPERV::WaitingState ) ;
+      }
     }
   }
   for ( i = 0 ; i < GetNodeOutPortsSize() ; i++ ) {
-    for ( j = 0 ; j < GetChangeNodeOutPort( i )->InPortsSize() ; j++ ) {
-      GraphBase::OutPort * anOutPort = GetChangeNodeOutPort( i ) ;
+    GraphBase::OutPort * anOutPort = GetChangeNodeOutPort( i ) ;
+    for ( j = 0 ; j < anOutPort->InPortsSize() ; j++ ) {
       if ( !( IsGOTONode() && anOutPort->IsGate() ) &&
-           !( IsEndLoopNode() && ( anOutPort->IsGate() || anOutPort->IsLoop() ) ) ) {
-        GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) _OutNode->GetChangeGraphNode( anOutPort->ChangeInPorts( j )->NodeName() )->GetInNode() ;
+           !( IsEndLoopNode() && ( anOutPort->IsGate() ||
+              anOutPort->IsLoop() ) ) &&
+           !anOutPort->IsDataStream() &&
+           !anOutPort->ChangeInPorts( j )->IsDataStream() ) {
+//        cdebug << ThreadNo()
+//               << " GraphExecutor::InNodeThreads::SetWaitingStates "
+//               << Name() << "( " << anOutPort->PortName() << " ) --> InPort "
+//               << anOutPort->ChangeInPorts( j )->PortName() << " from Node "
+//               << anOutPort->ChangeInPorts( j )->NodeName() << endl;
+        GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) _OutNode->Graph()->GetChangeGraphNode( anOutPort->ChangeInPorts( j )->NodeName() )->GetInNode() ;
         if ( aNode != EndNode ) {
           aNode->SetWaitingStates( EndNode ) ;
        }
@@ -1616,6 +1643,8 @@ int GraphExecutor::InNode::Successed_SuccessAction() {
 
   if ( IsGOTONode() ||
        ( IsEndLoopNode() && GetNodeInLoop()->GetOutPort()->BoolValue() ) ) {
+    cdebug << ThreadNo() << " Successed_SuccessAction " << Name()
+           << " SetWaitingStates " << endl ;
     const GraphBase::OutPort * aGateOutPort ;
     if ( IsGOTONode() ) {
       aGateOutPort = GetNodeOutGate() ;
@@ -1625,7 +1654,7 @@ int GraphExecutor::InNode::Successed_SuccessAction() {
     }
     for ( i = 0 ; i < aGateOutPort->InPortsSize() ; i++ ) {
       const GraphBase::InPort * anInPort = aGateOutPort->InPorts( i ) ;
-      GraphExecutor::InNode * aLabelNode = (GraphExecutor::InNode *) _OutNode->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ;
+      GraphExecutor::InNode * aLabelNode = (GraphExecutor::InNode *) _OutNode->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ;
 //      cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " will Loop to HeadNode "
 //             << aLabelNode->Name() << " from port " << anInPort->PortName() << endl ;
       aLabelNode->SetWaitingStates( this ) ;
@@ -1743,7 +1772,9 @@ int GraphExecutor::InNode::Successed_SuccessAction() {
 //    cdebug << endl;
     for ( i = 0 ; i < LinkedNodesSize() ; i++ ) {
       bool IgnoreForEndLoop = false ;
-      toNode = (GraphExecutor::InNode *) LinkedNodes( i )->GetInNode() ;
+      GraphBase::ComputingNode * aComputingNode ;
+      aComputingNode = (GraphBase::ComputingNode * ) LinkedNodes( i ) ;
+      toNode = (GraphExecutor::InNode *) aComputingNode->GetInNode() ;
 //      cdebug << ThreadNo() << " Successed_SuccessAction of " << Name()
 //             << " [" << i << "] " << LinkedNodes( i )->Name() << endl ;
       if ( toNode && !toNode->IsDataFlowNode() ) {
@@ -2123,7 +2154,9 @@ void GraphExecutor::InNode::InParametersSet( bool & Err ,
         *anAny <<= (long ) 0 ;
         theOutPort->Value( anAny ) ;
       }
-      anInPort->State( SUPERV::WaitingState ) ;
+      if ( !anInPort->IsDataStream() ) {
+        anInPort->State( SUPERV::WaitingState ) ;
+      }
       D.Name = CORBA::string_dup( anInPort->GetServicesParameter().Parametername ) ;
       cdebug << ThreadNo() << " ArgIn" << i << " " << anInPort->Kind() ;
       cdebug << "      " << D.Name << " " << anInPort->GetServicesParameter().Parametertype << " : " ;
@@ -2578,43 +2611,45 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err ,
        }
         }
         OutParametersList[i] = D ;
-        if ( anOutPort->IsGate() ) {
-          aGateOutPort = anOutPort ;
-          cdebug << " Gate " ;
-          long l = 1;
-          OutParametersList[i].Value <<= l;
-          anOutPort->Value( OutParametersList[i].Value );
-        }
-        else if ( anOutPort->IsLoop() ) {
-          cdebug << " Loop " ;
-          anOutPort->Value( OutParametersList[i].Value );
+        if ( !anOutPort->IsDataStream() ) {
+          if ( anOutPort->IsGate() ) {
+            aGateOutPort = anOutPort ;
+            cdebug << " Gate " ;
+            long l = 1;
+            OutParametersList[i].Value <<= l;
+            anOutPort->Value( OutParametersList[i].Value );
+          }
+          else if ( anOutPort->IsLoop() ) {
+            cdebug << " Loop " ;
+            anOutPort->Value( OutParametersList[i].Value );
 // InLoop Port of EndLoopNode is ready :
-          anOutPort->ChangeInPorts(0)->State( SUPERV::ReadyState ) ;
-        }
-        else if ( anOutPort->IsSwitch() ) {
-          cdebug << " Switch " ;
-          anOutPort->Value( OutParametersList[i].Value );
-          if ( anOutPort->InPortsSize() && anOutPort->ChangeInPorts( 0 )->IsGate() ) {
-            if ( OrSwitch && anOutPort->BoolValue() ) {
-              cdebug << "GraphExecutor::InNodeThreads::OutParameters more than one switch is true WARNING"
-                     << endl ;
-           }
-            else {
-              OrSwitch = OrSwitch | anOutPort->BoolValue() ;
-           }
-         }
-          cdebug << "OrSwitch " << OrSwitch ;
-        }
-        else {
-          cdebug << " Param " ;
-          anOutPort->Value( OutParametersList[i].Value );
-        }
-        anOutPort->State( NewState ) ;
-        anOutPort->Done( true ) ;
+            anOutPort->ChangeInPorts(0)->State( SUPERV::ReadyState ) ;
+          }
+          else if ( anOutPort->IsSwitch() ) {
+            cdebug << " Switch " ;
+            anOutPort->Value( OutParametersList[i].Value );
+            if ( anOutPort->InPortsSize() && anOutPort->ChangeInPorts( 0 )->IsGate() ) {
+              if ( OrSwitch && anOutPort->BoolValue() ) {
+                cdebug << "GraphExecutor::InNodeThreads::OutParameters more than one switch is true WARNING"
+                       << endl ;
+             }
+              else {
+                OrSwitch = OrSwitch | anOutPort->BoolValue() ;
+             }
+           }
+            cdebug << "OrSwitch " << OrSwitch ;
+          }
+          else {
+            cdebug << " Param " ;
+            anOutPort->Value( OutParametersList[i].Value );
+          }
+          anOutPort->State( NewState ) ;
+          anOutPort->Done( true ) ;
+       }
         int j ;
         for ( j = 0 ; j < anOutPort->InPortsSize() ; j++ ) {
           bool fromGOTO = false ;
-          GraphBase::OutPort * aGOTOPort = _OutNode->GetChangeGraphNode( anOutPort->ChangeInPorts( j )->NodeName() )->GetChangeNodeInGate()->GetOutPort() ;
+          GraphBase::OutPort * aGOTOPort = _OutNode->Graph()->GetChangeGraphNode( anOutPort->ChangeInPorts( j )->NodeName() )->GetChangeNodeInGate()->GetOutPort() ;
           if ( aGOTOPort ) {
             fromGOTO = aGOTOPort->IsGOTO() ;
          }
index d9e0fb886d5df5366f1df7a47b30a77f79f0390d..8f0ddefa29fa03191e77838419fa3bcab2b2e40f 100644 (file)
@@ -30,6 +30,8 @@ using namespace std;
 
 #include "DataFlowExecutor_OutNode.hxx"
 
+#include "Graph_Impl.hxx"
+
 // Implementation de la classe GraphEditor::GraphControl
 
 extern GraphExecutor::FiniteStateMachine * theAutomaton ;
@@ -39,8 +41,8 @@ extern GraphExecutor::FiniteStateMachine * theAutomaton ;
 extern int _ArgC ;
 extern char ** _ArgV ;
 
-GraphExecutor::OutNode::OutNode() :
-               Graph() {
+GraphExecutor::OutNode::OutNode() {
+//               Graph() {
   _Valid = false ;
   _Executable = false ;
   _Done = false ;
@@ -63,9 +65,23 @@ GraphExecutor::OutNode::OutNode() :
 GraphExecutor::OutNode::OutNode( CORBA::ORB_ptr ORB, 
                                 SALOME_NamingService* ptrNamingService ,
                                  const char *DataFlowName ,
-                                 const char * DebugFileName ) :
-               Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) {
-  cdebug_in << "GraphEditor::OutNode::OutNode(" << DataFlowName << ")" << endl;
+                                 const char * DebugFileName ,
+                                 const SUPERV::KindOfNode aKindOfNode ) {
+//               Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) {
+  Set_prof_debug( ORB , DebugFileName ) ;
+  cdebug_in << "GraphEditor::OutNode::OutNode(" << DataFlowName << " , " << aKindOfNode << ")" << endl;
+  if ( aKindOfNode == SUPERV::DataFlowGraph ) {
+    _StreamGraph = NULL ;
+//    _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ;
+    _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName ,
+                                   _prof_debug , _fdebug ) ;
+  }
+  else if ( aKindOfNode == SUPERV::DataStreamGraph ) {
+//    _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ;;
+    _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName ,
+                                               _prof_debug , _fdebug ) ;
+    _Graph = _StreamGraph ;
+  }
   _Valid = false ;
   _Executable = false ;
   _Done = false ;
@@ -101,12 +117,34 @@ GraphExecutor::OutNode::OutNode(
                const char * DataFlowAuthor ,
                const char * DataFlowComputer ,
                const char * DataFlowComment ,
-               const char * DebugFileName ) :
-               Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
-                      DataFlowInterfaceName , DataFlowName , DataFlowkind ,
-                      DataFlowFirstCreation , DataFlowLastModification  ,
-                      DataFlowEditorRelease , DataFlowAuthor ,
-                      DataFlowComputer , DataFlowComment , DebugFileName ) {
+               const char * DebugFileName ) {
+//               Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
+//                      DataFlowInterfaceName , DataFlowName , DataFlowkind ,
+//                      DataFlowFirstCreation , DataFlowLastModification  ,
+//                      DataFlowEditorRelease , DataFlowAuthor ,
+//                      DataFlowComputer , DataFlowComment , DebugFileName ) {
+  Set_prof_debug( ORB , DebugFileName ) ;
+
+  cdebug_in << "GraphEditor::OutNode::OutNode(" << DataFlowName << " , " << DataFlowkind << ")" << endl;
+  if ( DataFlowkind == SUPERV::DataFlowGraph ) {
+    _StreamGraph = NULL ;
+    _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
+                    DataFlowInterfaceName , DataFlowName , DataFlowkind ,
+                    DataFlowFirstCreation , DataFlowLastModification  ,
+                    DataFlowEditorRelease , DataFlowAuthor ,
+                    DataFlowComputer , DataFlowComment ,
+                    _prof_debug , _fdebug ) ;
+//                    DataFlowComputer , DataFlowComment , DebugFileName ) ;
+  }
+  else if ( DataFlowkind == SUPERV::DataStreamGraph ) {
+    _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName ,
+                    DataFlowInterfaceName , DataFlowName , DataFlowkind ,
+                    DataFlowFirstCreation , DataFlowLastModification  ,
+                    DataFlowEditorRelease , DataFlowAuthor ,
+                    DataFlowComputer , DataFlowComment ,
+                    _prof_debug , _fdebug ) ;
+    _Graph = _StreamGraph ;
+  }
   _Valid = false ;
   _Executable = false ;
   _Done = false ;
@@ -130,10 +168,20 @@ GraphExecutor::OutNode::OutNode(
 GraphExecutor::OutNode::~OutNode() {
 }
 
+void GraphExecutor::OutNode::Set_prof_debug( CORBA::ORB_ptr ORB ,
+                                             const char * DebugFileName ) {
+  _Graph_prof_debug = 0 ;
+  if ( DebugFileName ) {
+    _fdebug = new ofstream( DebugFileName );
+    SetDebug( ORB , &_Graph_prof_debug , _fdebug ) ;
+    MESSAGE( endl << "Trace redirected to file " << DebugFileName << endl)
+  }
+}
+
 bool GraphExecutor::OutNode::LoadDataFlow(const GraphBase::SGraph &aDataFlow ) {
   bool RetVal = false ;
   RetVal = LoadInfo( aDataFlow.Info ) ;
-  if ( GraphBase::Service::ServiceName() != NULL ) {
+  if ( Graph()->ServiceName() != NULL ) {
 //    MESSAGE( "GraphExecutor::OutNode::LoadDataFlow" );
     if ( RetVal ) {
       RetVal = LoadNodes( aDataFlow.Nodes ) ;
@@ -172,7 +220,7 @@ bool GraphExecutor::OutNode::LoadDataFlow(const GraphBase::SGraph &aDataFlow ) {
 bool GraphExecutor::OutNode::LoadXml( const char* myFileName ) {
   bool RetVal = false ;
   GraphBase::SGraph aDataFlow ;
-  if ( GraphBase::Graph::LoadXml( _Orb , myFileName , aDataFlow ) ) {
+  if ( Graph()->LoadXml( _Orb , myFileName , aDataFlow ) ) {
     RetVal = LoadDataFlow( aDataFlow ) ;
 //    if ( aConstructor && RetVal )
 //      RetVal = Name( aDataFlow.Info.theName.c_str() ) ;
@@ -181,19 +229,22 @@ bool GraphExecutor::OutNode::LoadXml( const char* myFileName ) {
 } 
 
 bool GraphExecutor::OutNode::LoadInfo(const GraphBase::SNode &aDataFlowInfo ) {
-  cdebug << "GraphExecutor::OutNode::LoadInfo" << endl ;
+  cdebug << "GraphExecutor::OutNode::LoadInfo _StreamGraph " << _StreamGraph << endl ;
 //  ComponentName( aDataFlowInfo.theComponentName.c_str()  ) ;
-  Name( aDataFlowInfo.theName.c_str()  ) ;
-  Kind( aDataFlowInfo.theKind ) ;
-  DataService( _Orb , aDataFlowInfo.theService , Graph_prof_debug() , Graph_fdebug() ) ;
-  FirstCreation( aDataFlowInfo.theFirstCreation ) ;
-  LastModification( aDataFlowInfo.theLastModification ) ;
-  EditorRelease( aDataFlowInfo.theEditorRelease.c_str()  ) ;
-  Author( aDataFlowInfo.theAuthor.c_str()   ) ;
-//  Computer( aDataFlowInfo.theContainer.c_str()  ) ;
-  Comment( aDataFlowInfo.theComment.c_str()  ) ;
+  Graph()->Name( aDataFlowInfo.theName.c_str()  ) ;
+  Graph()->Kind( aDataFlowInfo.theKind ) ;
+  if ( Graph()->IsDataStreamNode() ) {
+    StreamGraph()->SetStreamParams( aDataFlowInfo.theTimeout , aDataFlowInfo.theDataStreamTrace , aDataFlowInfo.theDeltaTime ) ;
+  }
+  Graph()->DataService( _Orb , aDataFlowInfo.theService , _prof_debug , _fdebug ) ;
+  Graph()->FirstCreation( aDataFlowInfo.theFirstCreation ) ;
+  Graph()->LastModification( aDataFlowInfo.theLastModification ) ;
+  Graph()->EditorRelease( aDataFlowInfo.theEditorRelease.c_str()  ) ;
+  Graph()->Author( aDataFlowInfo.theAuthor.c_str()   ) ;
+//  Graph()->Computer( aDataFlowInfo.theContainer.c_str()  ) ;
+  Graph()->Comment( aDataFlowInfo.theComment.c_str()  ) ;
 // Not in OutNode/DataFlow but in InNode/DataFlow_in_an_other_DataFlow
-//  Coordinates( aDataFlowInfo.theX , aDataFlowInfo.theY ) ;
+//  Graph()->Coordinates( aDataFlowInfo.theX , aDataFlowInfo.theY ) ;
   return true ;
 }
 
@@ -223,50 +274,70 @@ bool GraphExecutor::OutNode::LoadNodes(const GraphBase::ListOfNodes &aListOfNode
       anInNode->GraphExecutor::InNode::InLineNode()->DefPortsOfNode(
                                 _Orb , aNode.theService , anInNode->NamePtr() ,
                                 anInNode->Kind() ,
-                                Graph_prof_debug() , Graph_fdebug() ) ;
-#if 0
-      GraphBase::InLineNode * aINode = anInNode->InLineNode() ;
-      GraphBase::LoopNode * aLNode = NULL ;
-      if ( aINode->IsLoopNode() ) {
-        aLNode = anInNode->LoopNode() ;
-        aLNode->SetPythonFunction( aNode.theListOfFuncName[ 0 ].c_str() ,
-                                   *aNode.theListOfPythonFunctions[ 0 ] ) ;
-        aLNode->SetMorePythonFunction( aNode.theListOfFuncName[ 1 ].c_str() ,
-                                       *aNode.theListOfPythonFunctions[ 1 ] ) ;
-        aLNode->SetNextPythonFunction( aNode.theListOfFuncName[ 2 ].c_str() ,
-                                       *aNode.theListOfPythonFunctions[ 2 ] ) ;
-      }
-      else if ( aINode->IsInLineNode() || aINode->IsGOTONode() ||
-                aINode->IsSwitchNode() || aINode->IsEndSwitchNode() ) {
-        aINode->SetPythonFunction( aNode.theListOfFuncName[ 0 ].c_str() ,
-                                   *aNode.theListOfPythonFunctions[ 0 ] ) ;
-      }
-#endif
+                                _prof_debug , _fdebug ) ;
     }
-#if 0
-    if ( aNode.theListOfParameters.size() ) { // BusPorts ...
-      int j ;
-      for ( j = 0 ; j < aNode.theListOfParameters.size() ; j++ ) {
-        GraphBase::InPort * InputPort = anInNode->AddInPort(
-               aNode.theListOfParameters[ j ].theInParameter.Parametername ,
-               aNode.theListOfParameters[ j ].theInParameter.Parametertype ) ;
-        GraphBase::OutPort * OutputPort = anInNode->AddOutPort(
-               aNode.theListOfParameters[ j ].theOutParameter.Parametername ,
-               aNode.theListOfParameters[ j ].theOutParameter.Parametertype ) ;
-        anInNode->InOutPort( InputPort , OutputPort ) ;
-      }
+//    GraphBase::ComputingNode * theNode = Graph()->GetChangeGraphNode( aNode.theName.c_str() ) ;
+
+    unsigned int j ;
+    for ( j = 0 ; j < aNode.theListOfInDataStreams.size() ; j++ ) {
+      GraphBase::InPort * anInPort ;
+      anInPort = anInNode->ComputingNode()->AddInDataStreamPort( aNode.theListOfInDataStreams[ j ].theDataStreamParameter.Parametername ,
+                                                                 aNode.theListOfInDataStreams[ j ].theDataStreamParameter.Parametertype ,
+                                                                 aNode.theListOfInDataStreams[ j ].theDataStreamParameter.Parameterdependency ,
+                                                                 SUPERV::DataStreamParameter ) ;
+      ((GraphBase::InDataStreamPort * ) anInPort)->SetParams( aNode.theListOfInDataStreams[ j ].theKindOfSchema ,
+                                                              aNode.theListOfInDataStreams[ j ].theKindOfInterpolation ,
+                                                              aNode.theListOfInDataStreams[ j ].theKindOfExtrapolation ) ;
     }
-#endif
+    for ( j = 0 ; j < aNode.theListOfOutDataStreams.size() ; j++ ) {
+      GraphBase::OutPort * anOutPort ;
+      anOutPort = anInNode->ComputingNode()->AddOutDataStreamPort( aNode.theListOfOutDataStreams[ j ].theDataStreamParameter.Parametername ,
+                                                                   aNode.theListOfOutDataStreams[ j ].theDataStreamParameter.Parametertype ,
+                                                                   aNode.theListOfOutDataStreams[ j ].theDataStreamParameter.Parameterdependency ,
+                                                                   SUPERV::DataStreamParameter ) ;
+      ((GraphBase::OutDataStreamPort * ) anOutPort)->NumberOfValues( aNode.theListOfOutDataStreams[ j ].theNumberOfValues ) ;
+    }
+
+
+//    theNode->DataStreamInPortsNumber( aNode.theDataStreamInArgsNumber ) ;
+//    theNode->DataStreamOutPortsNumber( aNode.theDataStreamOutArgsNumber ) ;
+//    cdebug << "GraphExecutor::OutNode::LoadNodes " << anInNode->Name()
+//           << " InPortsSize " << theNode->GetNodeInPortsSize()
+//           << " OutPortsSize " << theNode->GetNodeOutPortsSize()
+//           << " DataStreamInPortsNumber " << aNode.theDataStreamInArgsNumber
+//           << " DataStreamOutPortsNumber " << aNode.theDataStreamOutArgsNumber
+//           << endl ;
+//    int j ;
+//    if ( aNode.theDataStreamInArgsNumber ) { // -1 because of Gates
+//      for ( j = theNode->GetNodeInPortsSize() - aNode.theDataStreamInArgsNumber - 1 ; j < theNode->GetNodeInPortsSize() - 1 ; j++ ) {
+//        cdebug << "GraphExecutor::OutNode::LoadNodes " << anInNode->Name()
+//               << " InPort " << theNode->GetChangeNodeInPort( j )->PortName()
+//               << " Kind( DataStreamParameter)" << endl ;
+//        theNode->GetChangeNodeInPort( j )->Kind( SUPERV::DataStreamParameter ) ;
+//      }
+//    }
+//    if ( aNode.theDataStreamOutArgsNumber ) {
+//      int withgate = 1 ;
+//      if ( theNode->IsLoopNode() || theNode->IsEndLoopNode() ) {
+//        withgate = 0 ;
+//      }
+//      for ( j = theNode->GetNodeOutPortsSize() - aNode.theDataStreamOutArgsNumber - withgate ; j < theNode->GetNodeOutPortsSize() - withgate ; j++ ) {
+//        cdebug << "GraphExecutor::OutNode::LoadNodes " << anInNode->Name()
+//               << " OutPort " << theNode->GetChangeNodeOutPort( j )->PortName()
+//               << " Kind( DataStreamParameter)" << endl ;
+//        theNode->GetChangeNodeOutPort( j )->Kind( SUPERV::DataStreamParameter ) ;
+//      }
+//    }
   }
   for ( i = 0 ; i < (int ) aListOfNodes.size() ; i++ ) {
     GraphBase::SNode aNode = aListOfNodes[ i ] ;
-    anInNode = (GraphExecutor::InNode * ) GetChangeGraphNode( aNode.theName.c_str() )->GetInNode() ;
-    cdebug << "GraphExecutor::OutNode::LoadNodes " << anInNode->Name() << "IsOneOfGOTONodes "
+    anInNode = (GraphExecutor::InNode * ) Graph()->GetChangeGraphNode( aNode.theName.c_str() )->GetInNode() ;
+    cdebug << "GraphExecutor::OutNode::LoadNodes " << anInNode->Name() << " IsOneOfGOTONodes "
            << anInNode->IsOneOfGOTONodes() << " " << aNode.theCoupledNode.c_str() << endl ;
     if ( anInNode->IsOneOfGOTONodes() && strlen( aNode.theCoupledNode.c_str() ) ) {
       GraphBase::GOTONode * aCoupledNode ;
-      aCoupledNode = (GraphBase::GOTONode * ) GetGraphNode( aNode.theName.c_str() ) ;
-      aCoupledNode->CoupledNode( (GraphBase::GOTONode * ) GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ) ; 
+      aCoupledNode = (GraphBase::GOTONode * ) Graph()->GetGraphNode( aNode.theName.c_str() ) ;
+      aCoupledNode->CoupledNode( (GraphBase::GOTONode * ) Graph()->GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ) ; 
     }
   }
   return RetVal ;
@@ -279,11 +350,11 @@ bool GraphExecutor::OutNode::LoadLinks(const GraphBase::ListOfLinks &aListOfLink
   int i ;
   for ( i = 0 ; i < (int ) aListOfLinks.size() ; i++ ) {
     GraphBase::SLink aLink = aListOfLinks[ i ] ;
-    RetVal = AddLink( aLink.FromNodeName.c_str() ,
-                      aLink.FromServiceParameterName.c_str() ,
-                      aLink.ToNodeName.c_str() ,
-                      aLink.ToServiceParameterName.c_str() ,
-                      aLink.aLinkValue ) ;
+    RetVal = Graph()->AddLink( aLink.FromNodeName.c_str() ,
+                               aLink.FromServiceParameterName.c_str() ,
+                               aLink.ToNodeName.c_str() ,
+                               aLink.ToServiceParameterName.c_str() ,
+                               aLink.aLinkValue ) ;
 //                      aLink.aLinkValue.Value , aLink.aLinkValue.Kind ) ;
     if ( !RetVal )
       break ;
@@ -298,22 +369,22 @@ bool GraphExecutor::OutNode::LoadDatas(const GraphBase::ListOfLinks &aListOfData
   int i ;
   for ( i = 0 ; i < (int ) aListOfDatas.size() ; i++ ) {
     GraphBase::SLink aLink = aListOfDatas[ i ] ;
-    if ( !strcmp( aLink.FromNodeName.c_str() , Name() ) )
-      RetVal = GraphBase::Graph::AddInputData( aLink.ToNodeName.c_str() ,
-                                               aLink.ToServiceParameterName.c_str() ,
-                                               aLink.aLinkValue ) ;
+    if ( !strcmp( aLink.FromNodeName.c_str() , Graph()->Name() ) )
+      RetVal = Graph()->AddInputData( aLink.ToNodeName.c_str() ,
+                                      aLink.ToServiceParameterName.c_str() ,
+                                      aLink.aLinkValue ) ;
 //                        aLink.aLinkValue.Value , aLink.aLinkValue.Kind ) ;
-    else if ( !strcmp( aLink.ToNodeName.c_str() , Name() ) ) {
-      RetVal = AddOutputData( aLink.FromNodeName.c_str() ,
-                              aLink.FromServiceParameterName.c_str() ,
-                              aLink.aLinkValue ) ;
+    else if ( !strcmp( aLink.ToNodeName.c_str() , Graph()->Name() ) ) {
+      RetVal = Graph()->AddOutputData( aLink.FromNodeName.c_str() ,
+                                       aLink.FromServiceParameterName.c_str() ,
+                                       aLink.aLinkValue ) ;
 //                              aLink.aLinkValue.Value ,
 //                              aLink.aLinkValue.Kind ) ;
-      AddLink( aLink.FromNodeName.c_str() , (GraphBase::ComputingNode *) this ) ;
+      Graph()->AddLink( aLink.FromNodeName.c_str() , (GraphBase::ComputingNode *) this ) ;
     }
     else {
       cdebug << "GraphExecutor::OutNode::LoadDatas Error " << aLink.FromNodeName
-           << " and " << aLink.ToNodeName << " differents from " << Name()
+           << " and " << aLink.ToNodeName << " differents from " << Graph()->Name()
            << endl ;
       RetVal = false ;
     }
@@ -342,15 +413,15 @@ GraphExecutor::InNode *GraphExecutor::OutNode::AddNode(
   cdebug_in << "GraphExecutor::OutNode::AddNode(" << NodeComponentName << " , "
             << NodeName << ")" << endl;
   GraphExecutor::InNode *Nd = NULL ;
-  Nd = new GraphExecutor::InNode( _Orb, NamingService() , NodeService ,
+  Nd = new GraphExecutor::InNode( _Orb, Graph()->NamingService() , NodeService ,
                                   NodeComponentName , NodeInterfaceName ,
                                   NodeName , NodeKindOfNode ,
                                   aFuncName , aPythonFunction ,
                                   NodeFirstCreation , NodeLastModification ,
                                   NodeEditorRelease , NodeAuthor ,
                                   NodeComputer , NodeComment , false , NodeX , NodeY ,
-                                  Graph_prof_debug() , Graph_fdebug() ) ;
-  GraphBase::Graph::AddNode( Nd->ComputingNode() ) ;
+                                  _prof_debug , _fdebug ) ;
+  Graph()->AddNode( Nd->ComputingNode() ) ;
   cdebug_out << "GraphExecutor::OutNode::AddNode" << endl;
   return Nd ;
 }
@@ -361,10 +432,10 @@ bool GraphExecutor::OutNode::AddInputData( const char* ToNodeName1 ,
                                            const char* ToNodeName2 ,
                                            const char* ToParameterName2 ) {
   cdebug_in << "GraphExecutor::OutNode::AddInputData" << endl;
-  bool RetVal = GraphBase::Graph::AddInputData( ToNodeName1 ,
-                                                ToParameterName1 ,
-                                                ToNodeName2 ,
-                                                ToParameterName2 ) ;
+  bool RetVal = Graph()->AddInputData( ToNodeName1 ,
+                                       ToParameterName1 ,
+                                       ToNodeName2 ,
+                                       ToParameterName2 ) ;
   cdebug_out << "GraphExecutor::OutNode::AddInputData" << endl;
   _Valid = false ;
   return RetVal ;
@@ -378,21 +449,24 @@ bool GraphExecutor::OutNode::Valid() {
 
   _Executable = false ;
 
-  if ( !CreateService() ) {
+  if ( !Graph()->CreateService() ) {
     cdebug << "This DataFlow has invalid type(s)." << endl ;
     return false ;
   }
-
-  if ( !Sort() ) {
+  int SubStreamGraphsNumber = 0 ;
+  if ( !Graph()->Sort( SubStreamGraphsNumber ) ) {
     cdebug << "This DataFlow is not valid." << endl ;
     return false ;
   }
+  if ( Graph()->IsDataStreamNode() ) {
+    StreamGraph()->SubStreamGraphsNumber( SubStreamGraphsNumber ) ;
+  }
 
 //  CreateService() ;
 
-  InLineServices() ;
+  Graph()->InLineServices() ;
 
-  ComputingNodes() ;
+  Graph()->ComputingNodes() ;
   
   _Valid = true ;
 
@@ -407,7 +481,7 @@ bool GraphExecutor::OutNode::Executable() {
   if ( !IsValid() )
     return false ;
 
-  if ( DataServerNodes() )
+  if ( Graph()->DataServerNodes() )
     _Executable = true ;
   else {
     cdebug << "This DataFlow is not executable." << endl ;
@@ -425,12 +499,12 @@ bool GraphExecutor::OutNode::Run( const bool AndSuspend ) {
   if ( Executable() ) {
     _ControlState = SUPERV::VoidState ;
     _SuspendedThreads = 0 ;
-    ThreadNo( pthread_self() ) ;
+    Graph()->ThreadNo( pthread_self() ) ;
     Done( false ) ;
     _JustStarted = true ;
     int i ;
-    for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-      GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) GraphNodes( i )->GetInNode() ;
+    for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+      GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) Graph()->GraphNodes( i )->GetInNode() ;
       if ( !PyInitialized() && anInNode->IsOneOfInLineNodes() ) {
         if ( !Py_IsInitialized() ) {
 //          Py_Initialize() ;
@@ -445,23 +519,26 @@ bool GraphExecutor::OutNode::Run( const bool AndSuspend ) {
       }
     }
 // One more time because inline nodes may share one definition of the same function
-    for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-      GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) GraphNodes( i )->GetInNode() ;
+    for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+      GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) Graph()->GraphNodes( i )->GetInNode() ;
       if ( anInNode->IsOneOfInLineNodes() ) {
-        if ( anInNode->InitPythonFunctions( true ) ) {
+        if ( !anInNode->InitPythonFunctions( true ) ) {
+          cdebug << "GraphExecutor::OutNode::Run InitPythonFunctions ERROR "
+                 << anInNode->Name() << endl ;
+          return false ;
        }
       }
     }
 
     cdebug << "Execution starting GraphExecutor::Action_DataOk_RunService Node "
-           << Name() << endl ;
+           << Graph()->Name() << endl ;
 
     PushEvent( NULL , GraphExecutor::ReadyEvent ,
                SUPERV::DataReadyState ) ; 
     State( SUPERV::DataReadyState ) ;
 
-    for ( i = 0 ; i < HeadNodesSize() ; i++ ) {
-      GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) HeadNodes( i )->GetInNode() ;
+    for ( i = 0 ; i < Graph()->HeadNodesSize() ; i++ ) {
+      GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) Graph()->HeadNodes( i )->GetInNode() ;
       if ( anInNode->State() != SUPERV::DataReadyState ) {
         cdebug << "GraphExecutor::OutNode::Run inconsistency State of Node "
              << anInNode->Name() << " : " << anInNode->State() << endl ;
@@ -471,7 +548,7 @@ bool GraphExecutor::OutNode::Run( const bool AndSuspend ) {
 //      PushEvent( anInNode , GraphExecutor::ReadyEvent ,
 //                 SUPERV::DataReadyState ) ; 
       anInNode->CreateNewThread( true ) ;
-      anInNode->DataFromNode( Name() ) ;
+      anInNode->DataFromNode( Graph()->Name() ) ;
       if ( AndSuspend ) {
         anInNode->State( SUPERV::DataWaitingState ) ;
         anInNode->ControlState( SUPERV::ToSuspendStartState ) ;
@@ -505,7 +582,9 @@ bool GraphExecutor::OutNode::Run( const bool AndSuspend ) {
           State( SUPERV::ExecutingState ) ;
       };
     }
-
+    ostringstream astr ;
+    astr << "Graph " << Graph()->Name() << " is running" ;
+    Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ;
     RetVal = true ;
   }
   else {
@@ -523,7 +602,7 @@ bool GraphExecutor::OutNode::Run( const char * aNodeName ,
   bool RetVal = false ;
   cdebug_in << "GraphExecutor::OutNode::Run( " << aNodeName << " , "
             << AtNodeName << " , " << AndSuspend << ")" << endl;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode() ;
   if ( anInNode ) {
     RetVal = anInNode->ReStart( AtNodeName , AndSuspend ) ;
   }
@@ -538,10 +617,10 @@ void GraphExecutor::OutNode::CheckAllDone() {
   SUPERV::AutomatonState InNodeState ;
   bool AllDone = true ;
   if ( !Done() ) {
-    for ( j = 0 ; j < QueueNodesSize() ; j++ ) {
-      InNodeState = ( (GraphExecutor::InNode * ) QueueNodes( j )->GetInNode() )->State() ;
+    for ( j = 0 ; j < Graph()->QueueNodesSize() ; j++ ) {
+      InNodeState = ( (GraphExecutor::InNode * ) Graph()->QueueNodes( j )->GetInNode() )->State() ;
       cdebug << j << ". "
-             << ( (GraphExecutor::InNode * ) QueueNodes( j )->GetInNode() )->Name()
+             << ( (GraphExecutor::InNode * ) Graph()->QueueNodes( j )->GetInNode() )->Name()
              << " " << theAutomaton->StateName( InNodeState ) << endl ;
       if ( InNodeState != SUPERV::SuccessedState &&
            InNodeState != SUPERV::ErroredState &&
@@ -566,9 +645,9 @@ void GraphExecutor::OutNode::CheckAllDone() {
     }
     if ( AllDone ) {
       int alivenodes = 0 ;
-      for ( j = 0 ; j < GraphNodesSize()  ; j++ ) {
+      for ( j = 0 ; j < Graph()->GraphNodesSize()  ; j++ ) {
         GraphExecutor::InNode * aNode ;
-        aNode = (GraphExecutor::InNode * ) GraphNodes( j )->GetInNode() ;
+        aNode = (GraphExecutor::InNode * ) Graph()->GraphNodes( j )->GetInNode() ;
         SUPERV::GraphState aState = AutomatonGraphState( aNode->State() ) ;
         cdebug << "GraphExecutor::OutNode::CheckAllDone " << aNode->Name() << " "
                << theAutomaton->StateName( aNode->State() ) << " CreateNewThread " << aNode->CreateNewThread()
@@ -607,14 +686,18 @@ void GraphExecutor::OutNode::CheckAllDone() {
   }
   if ( IsDone() ) {
     MESSAGE("================================================================================") ;
-    MESSAGE( Name() << " IS DONE : " <<  theAutomaton->StateName( AutomatonState() ) << " EventQSize "
+    MESSAGE( Graph()->Name() << " IS DONE : " <<  theAutomaton->StateName( AutomatonState() ) << " EventQSize "
              << EventQSize() ) ;
     MESSAGE("================================================================================") ;
     cdebug << "================================================================================" << endl ;
-    cdebug << Name() << " IS DONE : " <<  theAutomaton->StateName( AutomatonState() ) << " EventQSize "
+    cdebug << Graph()->Name() << " IS DONE : " <<  theAutomaton->StateName( AutomatonState() ) << " EventQSize "
              << EventQSize() << endl  ;
     cdebug << "================================================================================" << endl ;
-    //cout << Name() << " IS DONE : " <<  theAutomaton->StateName( AutomatonState() ) << " EventQSize "
+    ostringstream astr ;
+    astr << "Graph " << Graph()->Name() << " is done : "
+         << theAutomaton->StateName( AutomatonState() ) ;
+    Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ;
+    //cout << Graph()->Name() << " IS DONE : " <<  theAutomaton->StateName( AutomatonState() ) << " EventQSize "
     //     << EventQSize() << endl  ;
   }
   cdebug_out << "GraphExecutor::OutNode::CheckAllDone " << IsDone()
@@ -758,7 +841,7 @@ void GraphExecutor::OutNode::ResumeThread() {
 
 long GraphExecutor::OutNode::Thread( const char * aNodeName ) {
   long RetVal = 0 ;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode() ;
   if ( anInNode ) {
     RetVal = anInNode->ThreadNo() ;
   }
@@ -1070,7 +1153,7 @@ bool GraphExecutor::OutNode::PushEvent( GraphExecutor::InNode * aNode ,
     _EventNodes.push_back( aNode->Name() ) ;
   }
   else {
-    _EventNodes.push_back( Name() ) ;
+    _EventNodes.push_back( Graph()->Name() ) ;
   }
   _Events.push_back( anEvent ) ;
   _States.push_back( aState ) ;
@@ -1083,7 +1166,7 @@ bool GraphExecutor::OutNode::PushEvent( GraphExecutor::InNode * aNode ,
 //           << aNode->Automaton()->ControlStateName( aNode->ControlState() ) ;
   }
   else {
-//    cdebug << "PushEvent " << Name() ;
+//    cdebug << "PushEvent " << Graph()->Name() ;
 //    cdebug << " " << theAutomaton->EventName( anEvent ) << " "
 //           << theAutomaton->StateName( aState ) ;
   }
@@ -1192,8 +1275,8 @@ bool GraphExecutor::OutNode::EventW( char ** aNodeName ,
           aState != SUPERV::RunningState &&
           aState != SUPERV::SuspendDoneState &&
           aState != SUPERV::SuspendErroredState ) {
-    NodeName = Name() ;
-    while ( sts && !strcmp( NodeName , Name() ) ) {
+    NodeName = Graph()->Name() ;
+    while ( sts && !strcmp( NodeName , Graph()->Name() ) ) {
       sts = EventWait( aNodeName , anEvent , aState ) ;
       NodeName = *aNodeName ;
     }
@@ -1242,7 +1325,7 @@ bool GraphExecutor::OutNode::EventWait( char ** aNodeName ,
         _States.pop_front() ;
       }
 
-      aNode = ((GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode()) ;
+      aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode()) ;
       cdebug << "EventW Previous Node " << NodeName << " ThreadsNumber "
              << ThreadsNumber
              << " _EventNodes.size() " << _EventNodes.size() << " "
@@ -1355,7 +1438,7 @@ void GraphExecutor::OutNode::EventList() {
 }
 
 void GraphExecutor::OutNode::State(SUPERV::AutomatonState aState ) {
-//  cdebug << "GraphExecutor::OutNode::State " << Name() << " "
+//  cdebug << "GraphExecutor::OutNode::State " << Graph()->Name() << " "
 //         << theAutomaton->StateName( AutomatonGraphState( _State ) ) << " ---> "
 //         << theAutomaton->StateName( AutomatonGraphState( aState ) ) << endl ;
   _State = aState ;
@@ -1372,7 +1455,7 @@ SUPERV::GraphState GraphExecutor::OutNode::State() {
 SUPERV::GraphState GraphExecutor::OutNode::State( const char * NodeName ) {
 //  cdebug_in << "GraphExecutor::OutNode::State " << NodeName << endl;
   SUPERV::AutomatonState aret = SUPERV::UnKnownState ;
-  const GraphBase::ComputingNode * aCNode =  GetGraphNode( NodeName ) ;
+  const GraphBase::ComputingNode * aCNode =  Graph()->GetGraphNode( NodeName ) ;
   if ( aCNode ) {
     GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *)aCNode->GetInNode() ;
     if ( anInNode ) {
@@ -1389,7 +1472,7 @@ SUPERV::GraphState GraphExecutor::OutNode::State( const char * NodeName ,
                                                   const char * ServiceParameterName )  {
 //  cdebug_in << "GraphExecutor::OutNode::State " << NodeName << " "
 //            << ServiceParameterName<< endl;
-  SUPERV::GraphState aret = PortState( NodeName , ServiceParameterName ) ;
+  SUPERV::GraphState aret = Graph()->PortState( NodeName , ServiceParameterName ) ;
 //  cdebug_out << "GraphExecutor::OutNode::State" << endl ;
   return aret ;
 }
@@ -1403,7 +1486,7 @@ SUPERV::AutomatonState GraphExecutor::OutNode::AutomatonState() {
 SUPERV::AutomatonState GraphExecutor::OutNode::AutomatonState( const char * NodeName ) {
 //  cdebug_in << "GraphExecutor::OutNode::AutomatonState " << NodeName << endl;
   SUPERV::AutomatonState aret = SUPERV::UnKnownState ;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode )
     aret = anInNode->State() ;
 //  cdebug_out << "GraphExecutor::OutNode::AutomatonState" << endl ;
@@ -1419,7 +1502,7 @@ SUPERV::ControlState GraphExecutor::OutNode::ControlState() {
 SUPERV::ControlState GraphExecutor::OutNode::ControlState( const char * NodeName ) {
 //  cdebug_in << "GraphExecutor::OutNode::ControlState " << NodeName << endl;
   SUPERV::ControlState aret = SUPERV::VoidState ;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode )
     aret = anInNode->ControlState() ;
 //  cdebug_out << "GraphExecutor::OutNode::ControlState" << endl ;
@@ -1434,7 +1517,7 @@ void GraphExecutor::OutNode::ControlClear() {
 
 void GraphExecutor::OutNode::ControlClear( const char * NodeName ) {
 //  cdebug_in << "GraphExecutor::OutNode::ControlClear " << NodeName << endl;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode )
     anInNode->ControlClear() ;
 //  cdebug_out << "GraphExecutor::OutNode::ControlClear" << endl ;
@@ -1497,7 +1580,7 @@ bool GraphExecutor::OutNode::IsStopped() {
 bool GraphExecutor::OutNode::IsWaiting( const char * NodeName ) {
   bool aret = false ;
 //  cdebug_in << "GraphExecutor::OutNode::IsWaiting " << NodeName << endl;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode ) {
     aret = anInNode->IsWaiting() ;
   }
@@ -1508,7 +1591,7 @@ bool GraphExecutor::OutNode::IsWaiting( const char * NodeName ) {
 bool GraphExecutor::OutNode::IsReady( const char * NodeName ) {
   bool aret = false ;
 //  cdebug_in << "GraphExecutor::OutNode::IsReady " << NodeName << endl;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode ) {
     aret = anInNode->IsReady() ;
   }
@@ -1519,7 +1602,7 @@ bool GraphExecutor::OutNode::IsReady( const char * NodeName ) {
 bool GraphExecutor::OutNode::IsRunning( const char * NodeName ) {
   bool aret = false ;
 //  cdebug_in << "GraphExecutor::OutNode::IsRunning " << NodeName << endl;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode ) {
     aret = anInNode->IsRunning() ;
   }
@@ -1530,7 +1613,7 @@ bool GraphExecutor::OutNode::IsRunning( const char * NodeName ) {
 bool GraphExecutor::OutNode::IsDone( const char * NodeName ) {
   bool aret = false ;
 //  cdebug_in << "GraphExecutor::OutNode::IsDone " << NodeName << endl;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode ) {
     aret = anInNode->IsDone() ;
   }
@@ -1541,7 +1624,7 @@ bool GraphExecutor::OutNode::IsDone( const char * NodeName ) {
 bool GraphExecutor::OutNode::IsSuspended( const char * NodeName ) {
   bool aret = false ;
 //  cdebug_in << "GraphExecutor::OutNode::IsSuspended " << NodeName << endl;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode ) {
     aret = anInNode->IsSuspended() ;
   }
@@ -1553,7 +1636,7 @@ bool GraphExecutor::OutNode::IsDone( const char * NodeName ,
                                      const char * ServiceParameterName )  {
 //  cdebug_in << "GraphExecutor::OutNode::IsDone " << NodeName << " "
 //            << ServiceParameterName<< endl;
-  bool aret = PortDone( NodeName , ServiceParameterName ) ;
+  bool aret = Graph()->PortDone( NodeName , ServiceParameterName ) ;
 //  cdebug_out << "GraphExecutor::OutNode::IsDone" << endl ;
   return aret ;
 }
@@ -1563,8 +1646,8 @@ bool GraphExecutor::OutNode::ContainerKill() {
   cdebug_in << "GraphExecutor::OutNode::ContainerKill" << endl;
   _ControlState = SUPERV::ToSuspendState ;
   int i ;
-  for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-    GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) GraphNodes( i )->GetInNode() ;
+  for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+    GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) Graph()->GraphNodes( i )->GetInNode() ;
     bool sts = aNode->ContainerKill() ;
     if ( sts && aNode->IsKilled() ) {
       cdebug << aNode->Name() << " killed" << endl ;
@@ -1580,8 +1663,8 @@ bool GraphExecutor::OutNode::ContainerKill() {
     }
   }
   if ( !RetVal || Threads() != 0 ) {
-    for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-      GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) GraphNodes( i )->GetInNode() ;
+    for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+      GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) Graph()->GraphNodes( i )->GetInNode() ;
       if ( !aNode->IsKilled() && !aNode->IsWaiting() && !aNode->IsDone() ) {
         aNode->KilledAction() ;
       }
@@ -1598,8 +1681,8 @@ bool GraphExecutor::OutNode::Suspend() {
   cdebug_in << "GraphExecutor::OutNode::Suspend" << endl;
 //  _ControlState = SUPERV::ToSuspendState ;
   int i ;
-  for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-    GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) GraphNodes( i )->GetInNode() ;
+  for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+    GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) Graph()->GraphNodes( i )->GetInNode() ;
     bool sts = aNode->Suspend() ;
     if ( sts && aNode->IsSuspended() ) {
       RetVal += 1 ;
@@ -1618,12 +1701,12 @@ bool GraphExecutor::OutNode::Suspend() {
   if ( RetVal ) {
     State( SUPERV::SuspendedState ) ;
     MESSAGE("================================================================================") ;
-    MESSAGE( Name() << " IS SUSPENDED" ) ;
+    MESSAGE( Graph()->Name() << " IS SUSPENDED" ) ;
     MESSAGE("================================================================================") ;
   }
   else {
     MESSAGE("================================================================================") ;
-    MESSAGE( Name() << " IS NOT SUSPENDED" ) ;
+    MESSAGE( Graph()->Name() << " IS NOT SUSPENDED" ) ;
     MESSAGE("================================================================================") ;
   }
   cdebug_out << "GraphExecutor::OutNode::Suspend" << theAutomaton->StateName( State() ) << endl ;
@@ -1636,8 +1719,8 @@ bool GraphExecutor::OutNode::Resume() {
   if ( IsSuspended() ) {
     State( SUPERV::ExecutingState ) ;
     int i ;
-    for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-      GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) GraphNodes( i )->GetInNode() ;
+    for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+      GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) Graph()->GraphNodes( i )->GetInNode() ;
       aNode->ControlState( SUPERV::VoidState ) ;
       if ( aNode->IsSuspended() ) {
         cdebug << aNode->Name() << "->Resume " << theAutomaton->StateName( aNode->State() )
@@ -1659,16 +1742,16 @@ bool GraphExecutor::OutNode::Resume() {
     }
   }
   else {
-    cdebug << Name() << " not suspended " << theAutomaton->StateName( State() ) << endl ;
+    cdebug << Graph()->Name() << " not suspended " << theAutomaton->StateName( State() ) << endl ;
   }
   if ( RetVal ) {
     MESSAGE("================================================================================") ;
-    MESSAGE( Name() << " IS RESUMED" ) ;
+    MESSAGE( Graph()->Name() << " IS RESUMED" ) ;
     MESSAGE("================================================================================") ;
   }
   else {
     MESSAGE("================================================================================") ;
-    MESSAGE( Name() << " IS NOT RESUMED" ) ;
+    MESSAGE( Graph()->Name() << " IS NOT RESUMED" ) ;
     MESSAGE("================================================================================") ;
   }
   cdebug_out << "GraphExecutor::OutNode::Resume" << theAutomaton->StateName( State() ) << " " << RetVal << endl ;
@@ -1680,8 +1763,8 @@ bool GraphExecutor::OutNode::Kill() {
   cdebug_in << "GraphExecutor::OutNode::Kill" << endl;
   _ControlState = SUPERV::ToSuspendState ;
   int i ;
-  for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-    GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) GraphNodes( i )->GetInNode() ;
+  for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+    GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) Graph()->GraphNodes( i )->GetInNode() ;
     bool sts = aNode->Kill() ;
     if ( sts && aNode->IsKilled() ) {
       cdebug << aNode->Name() << " killed" << endl ;
@@ -1697,8 +1780,8 @@ bool GraphExecutor::OutNode::Kill() {
     }
   }
   if ( !RetVal || Threads() != 0 ) {
-    for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
-      GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) GraphNodes( i )->GetInNode() ;
+    for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) {
+      GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) Graph()->GraphNodes( i )->GetInNode() ;
       if ( !aNode->IsKilled() && !aNode->IsWaiting() && !aNode->IsDone() ) {
         cdebug << aNode->Name() << " not killed : "
                << theAutomaton->StateName( aNode->State() ) << " " << aNode->Name() << "->"
@@ -1711,12 +1794,12 @@ bool GraphExecutor::OutNode::Kill() {
   State( SUPERV::KilledState ) ;
   if ( RetVal ) {
     MESSAGE("================================================================================") ;
-    MESSAGE( Name() << " IS KILLED" ) ;
+    MESSAGE( Graph()->Name() << " IS KILLED" ) ;
     MESSAGE("================================================================================") ;
   }
   else {
     MESSAGE("================================================================================") ;
-    MESSAGE( Name() << " IS NOT KILLED" ) ;
+    MESSAGE( Graph()->Name() << " IS NOT KILLED" ) ;
     MESSAGE("================================================================================") ;
   }
   cdebug_out << "GraphExecutor::OutNode::Kill" << endl ;
@@ -1730,7 +1813,7 @@ bool GraphExecutor::OutNode::Stop() {
   cdebug_out << "GraphExecutor::OutNode::Stop" << endl ;
   if ( RetVal ) {
     MESSAGE("================================================================================") ;
-    MESSAGE( Name() << " IS STOPPED" ) ;
+    MESSAGE( Graph()->Name() << " IS STOPPED" ) ;
     MESSAGE("================================================================================") ;
   }
   return RetVal ;
@@ -1840,7 +1923,7 @@ bool GraphExecutor::OutNode::SuspendedWait() {
 bool GraphExecutor::OutNode::ReadyWait( const char * NodeName ) {
   bool aret = false ;
   cdebug_in << "GraphExecutor::OutNode::ReadyWait " << NodeName << endl;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode ) {
     aret = anInNode->ReadyWait() ;
   }
@@ -1851,7 +1934,7 @@ bool GraphExecutor::OutNode::ReadyWait( const char * NodeName ) {
 bool GraphExecutor::OutNode::RunningWait( const char * NodeName ) {
   bool aret = false ;
   cdebug_in << "GraphExecutor::OutNode::RunningWait " << NodeName << endl;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode ) {
     aret = anInNode->RunningWait() ;
   }
@@ -1862,7 +1945,7 @@ bool GraphExecutor::OutNode::RunningWait( const char * NodeName ) {
 bool GraphExecutor::OutNode::DoneWait( const char * NodeName ) {
   bool aret = false ;
   cdebug_in << "GraphExecutor::OutNode::DoneWait " << NodeName << endl;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode ) {
     aret = anInNode->DoneWait() ;
   }
@@ -1873,7 +1956,7 @@ bool GraphExecutor::OutNode::DoneWait( const char * NodeName ) {
 bool GraphExecutor::OutNode::SuspendedWait( const char * NodeName ) {
   bool aret = false ;
   cdebug_in << "GraphExecutor::OutNode::SuspendedWait " << NodeName << endl;
-  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) GetGraphNode( NodeName )->GetInNode() ;
+  GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ;
   if ( anInNode ) {
     aret = anInNode->SuspendedWait() ;
   }
@@ -1884,14 +1967,14 @@ bool GraphExecutor::OutNode::SuspendedWait( const char * NodeName ) {
 long GraphExecutor::OutNode::LastLevelDone() {
   int RetVal = -1 ;
   int i , j ;
-  for ( i = 0 ; i <= LevelMax() ; i++ ) {
-    for ( j = 0 ; j <= NodesNumber( i ) ; j++ ) {
-      GraphBase::ComputingNode * aNode = SortedNodes( i , j ) ;
+  for ( i = 0 ; i <= Graph()->LevelMax() ; i++ ) {
+    for ( j = 0 ; j <= Graph()->NodesNumber( i ) ; j++ ) {
+      GraphBase::ComputingNode * aNode = Graph()->SortedNodes( i , j ) ;
       if ( !IsDone( aNode->Name() ) ) {
         break ;
       }
     }
-    if ( j != NodesNumber( i ) + 1 )
+    if ( j != Graph()->NodesNumber( i ) + 1 )
       break ;
     RetVal = i ;
   }
@@ -1903,7 +1986,7 @@ const CORBA::Any *GraphExecutor::OutNode::GetInData( const char * NodeName ,
                                                      const char * ServiceParameterName ) {
 //  cdebug_in << "GraphExecutor::OutNode::GetInData " << NodeName << " "
 //            << ServiceParameterName << endl ;
-  const CORBA::Any * retdata = PortInData( NodeName , ServiceParameterName ) ;
+  const CORBA::Any * retdata = Graph()->PortInData( NodeName , ServiceParameterName ) ;
 //  cdebug_out << "GraphExecutor::OutNode::GetInData" << endl ;
   return retdata ;
 }
@@ -1912,17 +1995,17 @@ const CORBA::Any *GraphExecutor::OutNode::GetOutData( const char * NodeName ,
                                                       const char * ServiceParameterName ) {
 //  cdebug_in << "GraphExecutor::OutNode::GetOutData " << NodeName << " "
 //            << ServiceParameterName << endl ;
-  const CORBA::Any * retdata = PortOutData( NodeName , ServiceParameterName ) ;
+  const CORBA::Any * retdata = Graph()->PortOutData( NodeName , ServiceParameterName ) ;
 //  cdebug_out << "GraphExecutor::OutNode::GetOutData" << endl ;
   return retdata ;
 }
 
 const long GraphExecutor::OutNode::CpuUsed() {
-  return GraphBase::Graph::CpuUsed() ;
+  return Graph()->CpuUsed() ;
 }
 
 const long GraphExecutor::OutNode::CpuUsed( const char * aNodeName ) {
-  GraphBase::ComputingNode * aNode = GetChangeGraphNode( aNodeName ) ;
+  GraphBase::ComputingNode * aNode = Graph()->GetChangeGraphNode( aNodeName ) ;
   if ( aNode ) {
     GraphExecutor::InNode * anInNode = (GraphExecutor::InNode * ) aNode->GetInNode() ;
     if ( anInNode ) {
index 1f764f58b587185f74d7a35f95cbcb844ea5ea37..16fd6f0717eefbd38e929de85af0d35151fe400c 100644 (file)
 
 #include "SALOME_Component_i.hxx"
 
-#include "DataFlowBase_Graph.hxx"
+#include "DataFlowBase_StreamGraph.hxx"
 
 #include "DataFlowExecutor_InNode.hxx"
 
 namespace GraphExecutor {
 
-  class OutNode : public GraphBase::Graph {
+//  class OutNode : public GraphBase::Graph {
+  class OutNode : public GraphBase::Base {
 
     private :
 
+      GraphBase::StreamGraph * _StreamGraph ;
+      GraphBase::Graph       * _Graph ;
+
+      int  _Graph_prof_debug ;
+
       bool                    _PyInitialized ;
       bool                    _Valid ;
       bool                    _Executable ;
@@ -74,7 +80,8 @@ namespace GraphExecutor {
       OutNode() ;
       OutNode( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService ,
                const char *DataFlowName ,
-               const char * DebugFileName );
+               const char * DebugFileName ,
+               const SUPERV::KindOfNode aKindOfNode );
       OutNode( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService ,
                const SALOME_ModuleCatalog::Service& DataFlowService ,
                const char *DataFlowComponentName ,
@@ -90,6 +97,16 @@ namespace GraphExecutor {
                const char * DebugFileName ) ;
       virtual ~OutNode() ;
 
+      void Set_prof_debug( CORBA::ORB_ptr ORB , const char * DebugFileName ) ;
+      GraphBase::StreamGraph * StreamGraph() {
+                               return _StreamGraph ; } ;
+      GraphBase::StreamGraph * StreamGraph() const {
+                               return _StreamGraph ; } ;
+      GraphBase::Graph * Graph() {
+                         return _Graph ; } ;
+      GraphBase::Graph * Graph() const {
+                         return _Graph ; } ;
+
       bool LoadDataFlow( const GraphBase::SGraph &aDataFlow ) ;
       bool LoadXml( const char* myFileName ) ;
       bool LoadInfo( const GraphBase::SNode &aDataFlowInfo ) ;
@@ -147,6 +164,8 @@ namespace GraphExecutor {
       long SuspendedThreads() { return _SuspendedThreads ; } ;
       void JoinedWait() ;
 
+      pthread_t ThreadNo() {
+                return _Graph->ThreadNo() ; } ;
       long Thread( const char * NodeName ) ;
 
       bool PushEvent( GraphExecutor::InNode * aNode ,
index 03fe20f43cec906a4eb7614d2ff8d994e70a3386..22ac4d0be1f10593360f6fe9bc285f7f146b1002 100644 (file)
@@ -104,8 +104,10 @@ bool GraphExecutor::InNode::InitPython() {
 }
 
 PyObject * GraphExecutor::InNode::InitPyDynInvoke( char * PyFuncName ,
-                                                   const SUPERV::ListOfStrings * aPythonFunction ) {
+                                                   const SUPERV::ListOfStrings * aPythonFunction ,
+                                                   bool & Err ) {
   bool RetVal = true ;
+  Err = false ;
   string aPyFunc ;
   PyObject * thePyRunMethod = NULL ;
 
@@ -129,6 +131,7 @@ PyObject * GraphExecutor::InNode::InitPyDynInvoke( char * PyFuncName ,
         if ( PyRun_SimpleString( (char *) aPyFunc.c_str() ) ) {
           cdebug << ThreadNo() << " " << Name() << " PyRun_SimpleString ERROR " << endl << aPyFunc << endl ;
           RetVal = false ;
+          Err = true ;
         }
         else {
          PyFuncRunned( true ) ;
index 6582602e8d8cd4412efda935dc5437ed919e3f24..2786b4f0317273fbc706bc6b65bfeb47f33678ba 100644 (file)
@@ -47,13 +47,12 @@ BIN_SERVER_IDL =
 
 CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) \
        -I${KERNEL_ROOT_DIR}/include/salome
-#CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wno-deprecated
 CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \
        -I${KERNEL_ROOT_DIR}/include/salome
-#LDFLAGS+= -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lOpUtil -lSalomeLoggerServer -lc $(PYTHON_LIBS) $(QT_MT_LIBS) $(OGL_LIBS)
 LDFLAGS+= -export-dynamic -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lOpUtil -lSALOMELocalTrace \
        -lc $(QT_MT_LIBS) $(OGL_LIBS) \
        -L${KERNEL_ROOT_DIR}/lib/salome
+#LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS)
 
 
 @CONCLUDE@