// 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
//
//
//
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 ]
// 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:
// 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 ) ; } ;
+ int GetGraphNodeSize() const {
+ return _MapOfGraphNodes.size() ; }
const GraphBase::ComputingNode * GetGraphNode( const int index ) const {
const ComputingNode * aNode = GetChangeGraphNode( index ) ;
return aNode ; } ;
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 ) ;
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 ,
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 ;
bool LinkLoopNodes(bool & NewLink ) ;
bool DataServerNodes() const ;
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() {
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();
+ }
+
};
};