"",
aComment.latin1(),
true);
- myComment2EntryMap[aComment.latin1()] = aResultEntry;
mySObject = myStudyDocument->FindObjectID(aResultEntry.c_str());
if(mySObject->_is_nil()) throw std::runtime_error("Build - There is no SObject for the Result !!!");
if(!CORBA::is_nil(theSObject)){
"",
aComment.latin1(),
true);
- myComment2EntryMap[aComment.latin1()] = aMeshEntry;
if(aMeshOnEntityMap.empty())
continue;
aComment.sprintf("myComment=FAMILIES;myMeshName=%s",
"",
aComment.latin1(),
true);
- myComment2EntryMap[aComment.latin1()] = aSubMeshesEntry;
//Import entities and according families
aMeshOnEntityMapIter = aMeshOnEntityMap.begin();
- typedef map<VISU::TEntity,string> TEntity2Entry;
- TEntity2Entry aEntity2Entry;
+ typedef std::map<std::string,std::string> TComment2EntryMap;
+ TComment2EntryMap aComment2EntryMap;
+ typedef std::map<VISU::TEntity,std::string> TEntity2EntryMap;
+ TEntity2EntryMap aEntity2EntryMap;
for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++){
const VISU::TEntity& anEntity = aMeshOnEntityMapIter->first;
aComment.sprintf("myComment=ENTITY;myType=%d;myMeshName=%s;myId=%d",
default:
throw std::runtime_error("Build >> Value of entity is incorrect!");
}
- string aTmpEntry =
+ aEntity2EntryMap[anEntity] =
CreateAttributes(myStudyDocument,
aSubMeshesEntry.c_str(),
aRefFatherEntry.c_str(),
"",
aComment.latin1(),
true);
- aEntity2Entry[anEntity] = aTmpEntry;
- myComment2EntryMap[aComment.latin1()] = aTmpEntry;
const VISU::TMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
const VISU::TFamilyMap& aFamilyMap = aMeshOnEntity.myFamilyMap;
VISU::TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin();
aMeshName.c_str(),
anEntity,
aFamilyName.c_str());
- aTmpEntry =
+ aComment2EntryMap[aComment.latin1()] =
CreateAttributes(myStudyDocument,
- aEntity2Entry[anEntity].c_str(),
+ aEntity2EntryMap[anEntity].c_str(),
aRefFatherEntry.c_str(),
"",
aFamilyName.c_str(),
"",
aComment.latin1(),
true);
- myComment2EntryMap[aComment.latin1()] = aTmpEntry;
}
}
//Importing groups
"",
aComment.latin1(),
true);
- myComment2EntryMap[aComment.latin1()] = aGroupsEntry;
VISU::TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin();
for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
const string& aGroupName = aGroupMapIter->first;
"",
aComment.latin1(),
true);
- myComment2EntryMap[aComment.latin1()] = aGroupEntry;
const VISU::TGroup& aGroup = aGroupMapIter->second;
const VISU::TFamilyAndEntitySet& aFamilyAndEntitySet = aGroup.myFamilyAndEntitySet;
VISU::TFamilyAndEntitySet::const_iterator aFamilyAndEntitySetIter = aFamilyAndEntitySet.begin();
aMeshName.c_str(),
anEntity,
aFamilyName.c_str());
- string anEntry = myComment2EntryMap[aComment.latin1()];
- CreateReference(myStudyDocument,aGroupEntry,anEntry);
+ CreateReference(myStudyDocument,aGroupEntry,aComment2EntryMap[aComment.latin1()]);
}
}
}
"",
aComment.latin1(),
true);
- myComment2EntryMap[aComment.latin1()] = aFieldsEntry;
isFieldEntryCreated = true;
}
const string& aFieldName = aFieldMapIter->first;
"",
aComment.latin1(),
true);
- myComment2EntryMap[aComment.latin1()] = aFieldEntry;
- CreateReference(myStudyDocument,aFieldEntry,aEntity2Entry[anEntity]);
+ CreateReference(myStudyDocument,aFieldEntry,aEntity2EntryMap[anEntity]);
VISU::TField::TValField::const_iterator aValFieldIter = aValField.begin();
for(; aValFieldIter != aValField.end(); aValFieldIter++){
int aTimeStamp = aValFieldIter->first;
"",
aComment.latin1(),
true);
- myComment2EntryMap[aComment.latin1()] = aTimeStampEntry;
}
}
}
const SALOMEDS::SObject_var& VISU::Result_i::GetSObject() const { return mySObject;}
const SALOMEDS::Study_var& VISU::Result_i::GetStudyDocument() const { return myStudyDocument;}
const SALOMEDS::SComponent_var& VISU::Result_i::GetSComponent() const { return mySComponent;}
-std::string VISU::Result_i::GetEntry(const std::string& theComment) const
+std::string VISU::Result_i::GetEntry(const std::string& theComment)
{
- TComment2EntryMap::const_iterator aComment2EntryMapIter = myComment2EntryMap.find(theComment);
- if(aComment2EntryMapIter == myComment2EntryMap.end())
- return "";
- return aComment2EntryMapIter->second;
+ return FindEntryWithComment(myStudyDocument,GetEntry().c_str(),theComment.c_str());
}
VISU::Result_i::~Result_i() {