getShapeAndContext(theAttrSelect, aShape, aContext);
if (aShape.get()) {
- myDumpBuffer << "\"" << aShape->shapeTypeStr() << "\", \""
- << theAttrSelect->namingName() << "\"";
+ //TODO: vsv myDumpBuffer << "\"" << aShape->shapeTypeStr() << "\", \""
+ // << theAttrSelect->namingName() << "\"";
}
myDumpBuffer << ")";
GeomAlgoAPI_NExplode aNExplode(aContext->shape(), aShape->shapeType());
int anIndex = aNExplode.index(aShape);
if (anIndex != 0) { // found a week-naming index, so, export it
- myDumpBuffer << "model.selection(\"" << aShape->shapeTypeStr() << "\", \""
- << theAttrSelect->contextName(aContext) << "\", " << anIndex << ")";
+ //TODO: vsv myDumpBuffer << "model.selection(\"" << aShape->shapeTypeStr() << "\", \""
+ // << theAttrSelect->contextName(aContext) << "\", " << anIndex << ")";
aStandardDump = false;
}
}
return aFound->second.myCurrentName;
}
// entity is not found, store it
- std::string aName, aKind;
+ std::string aName;
+ std::string aKind;
bool isDefaultName = false;
bool isSaveNotDumped = theSaveNotDumped;
std::ostringstream aDefaultName;
FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theEntity);
if (aFeature) {
- aName = aFeature->name();
+ aName = ModelAPI_Tools::toString(aFeature->name());
aKind = aFeature->getKind();
} else {
FolderPtr aFolder = std::dynamic_pointer_cast<ModelAPI_Folder>(theEntity);
if (aFolder) {
- aName = aFolder->data()->name();
+ aName = ModelAPI_Tools::toString(aFolder->data()->name());
aKind = ModelAPI_Folder::ID();
isSaveNotDumped = false;
}
std::list<ResultPtr> allRes;
ModelAPI_Tools::allResults(theFeature, allRes);
for(std::list<ResultPtr>::iterator aRes = allRes.begin(); aRes != allRes.end(); aRes++) {
- std::pair<std::string, bool> aName = ModelAPI_Tools::getDefaultName(*aRes);
- std::string aDefaultName = aName.first;
- std::string aResName = (*aRes)->data()->name();
+ std::pair<std::wstring, bool> aName = ModelAPI_Tools::getDefaultName(*aRes);
+ std::string aDefaultName = ModelAPI_Tools::toString(aName.first);
+ std::string aResName = ModelAPI_Tools::toString((*aRes)->data()->name());
bool isUserDefined = !(isFeatureDefaultName && aDefaultName == aResName);
myNames[*aRes] =
EntityName(aResName, (isUserDefined ? aResName : std::string()), !isUserDefined);
const FeaturePtr& theSubFeature)
{
name(theSubFeature, false);
- myNames[theSubFeature] = EntityName(theSubFeatureGet, theSubFeature->name(), false);
+ myNames[theSubFeature] =
+ EntityName(theSubFeatureGet, ModelAPI_Tools::toString(theSubFeature->name()), false);
// store results if they have user-defined names or colors
std::list<ResultPtr> aResultsWithNameOrColor;
const std::list<ResultPtr>& aResults = theSubFeature->results();
std::list<ResultPtr>::const_iterator aResIt = aResults.begin();
for (; aResIt != aResults.end(); ++aResIt) {
- std::string aResName = (*aResIt)->data()->name();
+ std::string aResName = ModelAPI_Tools::toString((*aResIt)->data()->name());
myNames[*aResIt] = EntityName(aResName, aResName, false);
aResultsWithNameOrColor.push_back(*aResIt);
}
return *this;
}
+ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(const std::wstring& theString)
+{
+ *myDumpStorage << ModelAPI_Tools::toString(theString);
+ return *this;
+}
+
ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(const bool theValue)
{
*myDumpStorage << (theValue ? "True" : "False");