// decrease composite features stack
--gCompositeStackDepth;
- // dump folders if any
- dumpPostponed(true);
return isOk;
}
// dump "setName" for composite feature
if (isDumpSetName)
dumpEntitySetName();
- // dump folders if any
- dumpPostponed(true);
return isOk;
}
if (!aFile.is_open())
return false;
- // standard header
+ // standard header (encoding + imported modules)
+ aFile << "# -*- coding: utf-8 -*-" << std::endl << std::endl;
for (ModulesMap::const_iterator aModIt = myModules.begin();
aModIt != myModules.end(); ++aModIt) {
aFile << "from " << aModIt->first << " import ";
ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(const FolderPtr& theFolder)
{
myDumpBuffer << name(theFolder);
+
+ // add dumped folder to a stack
+ if (!myNames[theFolder].myIsDumped &&
+ (myEntitiesStack.empty() || myEntitiesStack.top().myEntity != theFolder))
+ myEntitiesStack.push(LastDumpedEntity(theFolder, !myNames[theFolder].myIsDefault));
+
return *this;
}