Salome HOME
SMH: 3.0.0 preparation = merged version (POLYWORK + RTVDEBUG01) + adopation for new GUI
[modules/superv.git] / src / GraphBase / DataFlowBase_Graph.hxx
index 6f4e1fd15d9bc174783b36d3b6594651d13c9c28..108d1c12b0cd38fa41229aa3d7cef764dd944b3a 100644 (file)
@@ -70,11 +70,13 @@ 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
+// For StreamGraphs. It is not the same Service if it belongs to
 // a different Interface and/or a different Component ...
       map< string , GraphBase::Service * > _MapOfServiceNames ;
 
+// For automactic rename of nodes if unique names in graphs
+      map< string , int >      _MapOfServiceInstanceNumber ;
+
 // Total number of SubGraphs
       int                              _SubGraphsNumber ;
 // _SubGraphs[ SubGraphNumero ] [ NodeNumero ]
@@ -155,6 +157,8 @@ namespace GraphBase {
       void DelGraphNodeIndex( const char *name ) {
            _MapOfGraphNodes.erase( name ) ; } ;
 
+      int GetGraphNodeSize() const {
+          return _MapOfGraphNodes.size() ; }
       const GraphBase::ComputingNode * GetGraphNode( const int index ) const {
             const ComputingNode * aNode = GetChangeGraphNode( index ) ;
             return aNode ; } ;
@@ -244,10 +248,12 @@ namespace GraphBase {
         if ( aState == SUPERV::DoneState )
           aRet = true ;
         return aRet ; } ;
-      const CORBA::Any * PortInData( const char* ToNodeName ,
-                                     const char* ToServiceParameterName ) ;
-      const CORBA::Any * PortOutData( const char* FromNodeName ,
-                                      const char* FromServiceParameterName ) ;
+//JR 30.03.2005      const CORBA::Any * PortInData( const char* ToNodeName ,
+      const CORBA::Any PortInData( const char* ToNodeName ,
+                                   const char* ToServiceParameterName ) ;
+//JR 30.03.2005      const CORBA::Any * PortOutData( const char* FromNodeName ,
+      const CORBA::Any PortOutData( const char* FromNodeName ,
+                                    const char* FromServiceParameterName ) ;
 
       bool LoadXml( CORBA::ORB_ptr Orb , const char* anXmlFile ,
                     GraphBase::ListOfSGraphs & aListOfDataFlows ) ;
@@ -285,9 +291,9 @@ namespace GraphBase {
       bool ChangeInputData( const char* ToNodeName ,
                             const char* ToParameterName ,
                             const CORBA::Any aValue ) ;
-      bool AddInputData( const char* ToNodeName ,
-                         const char* ToParameterName ,
-                         const CORBA::Any ** aValue ) ;
+//      bool AddInputData( const char* ToNodeName ,
+//                         const char* ToParameterName ,
+//                         const CORBA::Any ** aValue ) ;
 
       bool AddOutputData( const char* FromNodeName ,
                           const char* FromParameterName ,
@@ -300,6 +306,7 @@ namespace GraphBase {
 
       bool Sort( int & SubStreamGraphsNumber ) ;
       bool ValidLoops() const ;
+      bool ValidSwitchs() const ;
       bool ComputingNodes() const ;
       bool LinkLoopNodes(bool & NewLink ) ;
       bool DataServerNodes() const ;
@@ -310,7 +317,7 @@ namespace GraphBase {
       map< string , GraphBase::Service * > MapOfServiceNames() ;
       GraphBase::Service * GetServiceOfMap( char * name ) ;
       bool SetServiceOfMap( GraphBase::Service * aService ) ;
-      int GetServiceNameNumber( SALOME_ModuleCatalog::Service aService ) ;
+      int GetNewServiceInstanceNumber( char * aServiceName ) ;
 
       SUPERV::ListOfStrings * LevelNodes(long aLevel ) ;
       long ThreadsMax() {