Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/superv.git] / src / GraphBase / DataFlowBase_Graph.hxx
index 108d1c12b0cd38fa41229aa3d7cef764dd944b3a..a5a026cf92fbbcca6a7638cf755519a028f2952f 100644 (file)
@@ -17,7 +17,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
@@ -90,10 +90,14 @@ namespace GraphBase {
 //      int                              _SubStreamGraphsSize ;
 //      vector<vector<ComputingNode *> > _SubStreamGraphs ;
 
-      bool AddLink( GraphBase::ComputingNode *fromNode ,
-                    GraphBase::OutPort *fromPort ,
-                    GraphBase::ComputingNode *toNode ,
-                    GraphBase::InPort *toPort ) ;
+    string _Messages ;
+
+    map< string, string > _MapOfComponentNameContainer ; // mkr : PAL13947
+    
+    bool AddLink( GraphBase::ComputingNode *fromNode ,
+                 GraphBase::OutPort *fromPort ,
+                 GraphBase::ComputingNode *toNode ,
+                 GraphBase::InPort *toPort ) ;
 
     public:
 
@@ -147,12 +151,41 @@ namespace GraphBase {
 //              cdebug << "GetGraphNodeIndex of " << name << " in _MapOfGraphNodes : "
 //                     << index << " Node " << hex << (void *) _GraphNodes[ index ]
 //                     << dec << " '" << _GraphNodes[ index ]->Name() << "'" << endl ;
+#if 0
+           cdebug << "Graph::GetGraphNodeIndex " << _GraphNodesSize << " known nodes" << endl;
+           int i ;
+           for ( i = 0 ; i < _GraphNodesSize ; i++ ) {
+             cdebug << "Node" << i << _GraphNodes[ i ]->Name() << endl ;
+           }
+           map< string , int >::iterator aMapOfGraphNodesIterator ;
+           i = 0 ;
+           for ( aMapOfGraphNodesIterator = _MapOfGraphNodes.begin() ;
+             aMapOfGraphNodesIterator != _MapOfGraphNodes.end() ; aMapOfGraphNodesIterator++ ) {
+             cdebug << "MapOfGraphNodes " << i++ << " " << aMapOfGraphNodesIterator->first
+                    << " --> " << aMapOfGraphNodesIterator->second << " - 1" << endl ;
+           }
+#endif
             return index ; } ;
       void SetGraphNodeIndex( const char *name , const int index ) {
            _MapOfGraphNodes[ name ] = index + 1 ;
            cdebug << "SetGraphNodeIndex of " << name << " in _MapOfGraphNodes : "
                   << index << " Node " << (void *) _GraphNodes[ index ]
-                  << " '" << _GraphNodes[ index ]->Name() << "'" << endl ;
+                  << " '" << _GraphNodes[ index ]->Name() << "' MapOfGraphNodessize "
+                  << GetGraphNodeSize() << endl ;
+#if 1
+           cdebug << "Graph::SetGraphNodeIndex " << _GraphNodesSize << " known nodes" << endl;
+           int i ;
+           for ( i = 0 ; i < _GraphNodesSize ; i++ ) {
+             cdebug << "Node" << i << _GraphNodes[ i ]->Name() << endl ;
+           }
+           map< string , int >::iterator aMapOfGraphNodesIterator ;
+           i = 0 ;
+           for ( aMapOfGraphNodesIterator = _MapOfGraphNodes.begin() ;
+             aMapOfGraphNodesIterator != _MapOfGraphNodes.end() ; aMapOfGraphNodesIterator++ ) {
+             cdebug << "MapOfGraphNodes " << i++ << " " << aMapOfGraphNodesIterator->first
+                    << " --> " << aMapOfGraphNodesIterator->second << " - 1" << endl ;
+           }
+#endif
            } ;
       void DelGraphNodeIndex( const char *name ) {
            _MapOfGraphNodes.erase( name ) ; } ;
@@ -301,10 +334,15 @@ namespace GraphBase {
 
       void SetGraphPorts() ;
 
+      string Messages() ;
+      void ReSetMessages() ;
+      void SetMessages( string anErrorMessage ) ;
+
       bool CreateService() ;
       bool InLineServices() ;
 
       bool Sort( int & SubStreamGraphsNumber ) ;
+      bool ValidGOTO() ; // mkr : PAL12575
       bool ValidLoops() const ;
       bool ValidSwitchs() const ;
       bool ComputingNodes() const ;
@@ -337,6 +375,28 @@ namespace GraphBase {
                            Engines::Container_var & myContainer ,
                            Engines::Component_var & objComponent ) ;
 
+    // mkr : PAL13947
+    void InsertToMapOfComponentNameContainer( const char * theComponentName, 
+                                             const char * theContainer) {
+      _MapOfComponentNameContainer[ theComponentName ] = theContainer ;
+    }
+
+    // mkr : PAL13947    
+    const char * RetrieveFromMapOfComponentNameContainer( const char * theComponentName ) {
+      if ( _MapOfComponentNameContainer.empty() 
+          ||
+          _MapOfComponentNameContainer.find(theComponentName) == _MapOfComponentNameContainer.end() )
+       return NULL ;
+      
+      return _MapOfComponentNameContainer[ theComponentName ].c_str() ;
+    }
+
+    // mkr : PAL13947
+    void ClearMapOfComponentNameContainer() {
+      if ( !_MapOfComponentNameContainer.empty() )
+       _MapOfComponentNameContainer.clear();
+    }
+
   };
   
 };