map< string , int > _MapOfGraphNames;
string GraphInstanceName( const char * aGraphName ) {
+ // mkr : PAL8004 -->
+ // For Macro nodes : names of subgraphs must be unique and differ from the main dataflow
+ // name (i.e. the dataflow with MacroLevel = 0).
+ // It is neccessary for reqursive call of LoadDataFlows(...) method for MacroNodes execution.
int GraphInstanceNumber = _MapOfGraphNames[ aGraphName ] ;
- if ( GraphInstanceNumber ) {
- _MapOfGraphNames[ aGraphName ] = GraphInstanceNumber + 1 ;
- }
- else {
- GraphInstanceNumber = 0 ;
- _MapOfGraphNames[ aGraphName ] = GraphInstanceNumber + 1 ;
- }
string theGraphInstanceName = string( aGraphName ) ;
if ( GraphInstanceNumber ) {
theGraphInstanceName += "_" ;
astr << GraphInstanceNumber ;
theGraphInstanceName += astr.str() ;
}
+ if ( theGraphInstanceName != string( aGraphName ) )
+ _MapOfGraphNames[ theGraphInstanceName ] = GraphInstanceNumber ;
+ _MapOfGraphNames[ aGraphName ] = GraphInstanceNumber + 1 ;
+ // mkr : PAL8004 <--
return theGraphInstanceName ;
}