TSting2ObjDataMap& theEntry2ObjData,
const TSting2ObjDataPtrMap& theStEntry2ObjDataPtr,
Resource_DataMapOfAsciiStringAsciiString& theNameToEntry,
- TSting2StringMap& theEntryToCmdMap,
+ std::map< int, TCollection_AsciiString >& theEntryToCmdMap,
std::set<TCollection_AsciiString>& theMapOfPublished);
namespace
aObjListToPublish, objectCounter, aNameToEntry );
// publish collected objects
- TSting2StringMap anEntryToCmdMap; // sort publishing commands by study entry
+ std::map< int, TCollection_AsciiString > anEntryToCmdMap; // sort publishing commands by study entry
int i = 1, n = aObjListToPublish.Length();
for ( ; i <= n; i++ )
{
aNameToEntry, anEntryToCmdMap, anIgnoreObjMap );
}
// add publishing commands to the script
- TSting2StringMap::iterator anEntryToCmd = anEntryToCmdMap.begin();
+ std::map< int, TCollection_AsciiString >::iterator anEntryToCmd = anEntryToCmdMap.begin();
for ( ; anEntryToCmd != anEntryToCmdMap.end(); ++anEntryToCmd )
aFuncScript += anEntryToCmd->second;
TSting2ObjDataPtrMap::iterator aStEntry2ObjDataPtrIt;
if ( isPublished )
{
- TSting2StringMap anEntryToCmdMap; // sort publishing commands by object entry
+ std::map< int, TCollection_AsciiString > anEntryToCmdMap; // sort publishing commands by object entry
for (aStEntry2ObjDataPtrIt = aStEntry2ObjDataPtr.begin();
aStEntry2ObjDataPtrIt != aStEntry2ObjDataPtr.end();
aNameToEntry, anEntryToCmdMap, anIgnoreObjMap );
}
// add publishing commands to the script
- TSting2StringMap::iterator anEntryToCmd = anEntryToCmdMap.begin();
+ std::map< int, TCollection_AsciiString >::iterator anEntryToCmd = anEntryToCmdMap.begin();
for ( ; anEntryToCmd != anEntryToCmdMap.end(); ++anEntryToCmd )
aScript += anEntryToCmd->second;
}
healPyName( data._pyName, anEntry, aNameToEntry);
}
else {
- do {
- data._pyName = aBaseName + TCollection_AsciiString(++objectCounter);
- } while(aNameToEntry.IsBound(data._pyName));
+ do {
+ data._pyName = aBaseName + TCollection_AsciiString(++objectCounter);
+ } while(aNameToEntry.IsBound(data._pyName));
}
}
TSting2ObjDataMap& theEntry2ObjData,
const TSting2ObjDataPtrMap& theStEntry2ObjDataPtr,
Resource_DataMapOfAsciiStringAsciiString& theNameToEntry,
- TSting2StringMap& theEntryToCmdMap,
+ std::map< int, TCollection_AsciiString >& theEntryToCmdMap,
std::set< TCollection_AsciiString>& theIgnoreMap)
{
if ( theObjectData._studyEntry.IsEmpty() )
if ( stEntry2DataPtr != theStEntry2ObjDataPtr.end() )
aFatherData = stEntry2DataPtr->second;
+ const int geomObjDepth = 3;
+
// treat multiply published object
if ( theObjectData._pyName.IsEmpty() )
{
aCreationCommand += theObjectData._pyName + " = " + data0._pyName;
// store aCreationCommand before publishing commands
- TCollection_AsciiString mapKey(" ");
- mapKey += theObjectData._studyEntry;
- theEntryToCmdMap.insert( std::make_pair( mapKey, aCreationCommand ));
+ int tag = theObjectData._entry.Token( ":", geomObjDepth ).IntegerValue();
+ theEntryToCmdMap.insert( std::make_pair( tag + 2*theEntry2ObjData.size(), aCreationCommand ));
}
// make a command
aCommand += theObjectData._pyName + ", '" + theObjectData._name + "' )";
// bind a command to the study entry
- theEntryToCmdMap.insert( std::make_pair( theObjectData._studyEntry, aCommand ));
+ int tag = theObjectData._entry.Token( ":", geomObjDepth ).IntegerValue();
+ theEntryToCmdMap.insert( std::make_pair( tag, aCommand ));
theObjectData._studyEntry.Clear(); // not to publish any more
}