//----------------------------------------------------------------------------
void
BuildGroups(Result_i* theResult,
- Result_i::PInput theInput,
- CORBA::Boolean* theIsDone,
- CORBA::Boolean theIsBuild,
- CORBA::Boolean theIsAtOnce,
- _PTR(Study) theStudy)
+ Result_i::PInput theInput,
+ CORBA::Boolean* theIsDone,
+ CORBA::Boolean theIsBuild,
+ CORBA::Boolean theIsAtOnce,
+ _PTR(Study) theStudy)
{
if(!theIsBuild || *theIsDone)
return;
const TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
if(aMeshOnEntityMap.empty())
- continue;
+ continue;
TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter = aMeshOnEntityMap.begin();
for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++){
- const TEntity& anEntity = aMeshOnEntityMapIter->first;
- const PMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
-
- const TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
- TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin();
- for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){
- const string& aFamilyName = aFamilyMapIter->first;
- const PFamily& aFamily = aFamilyMapIter->second;
+ const TEntity& anEntity = aMeshOnEntityMapIter->first;
+ const PMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
+ const TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
+ TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin();
+ for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){
+ const string& aFamilyName = aFamilyMapIter->first;
+ const PFamily& aFamily = aFamilyMapIter->second;
aComment=QString("myComment=FAMILY;myMeshName=%1;myEntityId=%2;myName=%3");
aComment=aComment.arg(aMeshName.c_str());
aComment=aComment.arg(anEntity);
aComment=aComment.arg(aFamilyName.c_str());
- aFamily->myEntry =
- CreateAttributes(theStudy,
- aMeshOnEntity->myEntry,
- NO_ICON,
- NO_IOR,
- aFamilyName,
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- true);
- }
+ aFamily->myEntry = CreateAttributes(theStudy,
+ aMeshOnEntity->myEntry,
+ NO_ICON,
+ NO_IOR,
+ aFamilyName,
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ true);
+ }
}
//Importing groups
const TGroupMap& aGroupMap = aMesh->myGroupMap;
if(!aGroupMap.empty()){
- aComment = QString("myComment=GROUPS;myMeshName=%1").arg(aMeshName.c_str());
-
- CreateAttributes(theStudy,
- aMesh->myGroupsEntry,
- NO_ICON,
- NO_IOR,
- "Groups",
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- false);
-
- TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin();
- for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
- const string& aGroupName = aGroupMapIter->first;
- const PGroup& aGroup = aGroupMapIter->second;
- aComment = QString("myComment=GROUP;myMeshName=%1;myName=%2").arg(aMeshName.c_str()).arg(aGroupName.c_str());
- aGroup->myEntry =
- CreateAttributes(theStudy,
- aMesh->myGroupsEntry,
- NO_ICON,
- NO_IOR,
- aGroupName,
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- true);
- const TFamilySet& aFamilySet = aGroup->myFamilySet;
- TFamilySet::const_iterator aFamilyIter = aFamilySet.begin();
- for(; aFamilyIter != aFamilySet.end(); aFamilyIter++){
- const PFamily& aFamily = (*aFamilyIter).second;
- CreateReference(theStudy,
- aGroup->myEntry,
- aFamily->myEntry);
- }
- }
+ aComment = QString("myComment=GROUPS;myMeshName=%1").arg(aMeshName.c_str());
+
+ CreateAttributes(theStudy,
+ aMesh->myGroupsEntry,
+ NO_ICON,
+ NO_IOR,
+ "Groups",
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ false);
+
+ TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin();
+ for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
+ const string& aGroupName = aGroupMapIter->first;
+ const PGroup& aGroup = aGroupMapIter->second;
+ aComment = QString("myComment=GROUP;myMeshName=%1;myName=%2").arg(aMeshName.c_str()).arg(aGroupName.c_str());
+ aGroup->myEntry = CreateAttributes(theStudy,
+ aMesh->myGroupsEntry,
+ NO_ICON,
+ NO_IOR,
+ aGroupName,
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ true);
+ const TFamilySet& aFamilySet = aGroup->myFamilySet;
+ TFamilySet::const_iterator aFamilyIter = aFamilySet.begin();
+ for(; aFamilyIter != aFamilySet.end(); aFamilyIter++){
+ const PFamily& aFamily = (*aFamilyIter).second;
+ CreateReference(theStudy,
+ aGroup->myEntry,
+ aFamily->myEntry);
+ }
+ }
}else if(!theIsAtOnce)
- RemoveSObject(theStudy,
- aMesh->myGroupsEntry);
+ RemoveSObject(theStudy,
+ aMesh->myGroupsEntry);
}
ProcessVoidEvent(new TUpdateObjBrowser(theStudy->StudyId(),theIsDone));
const TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
if(aMeshOnEntityMap.empty())
- continue;
+ continue;
//Import fields
bool anIsFieldsEntryUpdated = false;
for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++)
{
- const TEntity& anEntity = aMeshOnEntityMapIter->first;
- const PMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
- const TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
- TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
-
- for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++)
- {
- if(!anIsFieldsEntryUpdated)
- {
- aComment = "";
- aComment.append("myComment=FIELDS;");
- aComment.append("myMeshName=");aComment.append(aMeshName.c_str());
-
- CreateAttributes(theStudy,
- aMesh->myFieldsEntry,
- NO_ICON,
- NO_IOR,
- "Fields",
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- false);
-
- anIsFieldsEntryUpdated = true;
- }
-
- const string& aFieldName = aFieldMapIter->first;
- const PField& aField = aFieldMapIter->second;
- const TValField& aValField = aField->myValField;
- QString aFieldNameWithUnit = GenerateFieldName(aFieldName,aField->myUnitNames[0]);
- aComment = QString("myComment=FIELD;myMeshName=%1;myEntityId=%2;myName=%3;myNbTimeStamps=%4;myNumComponent=%5");
+ const TEntity& anEntity = aMeshOnEntityMapIter->first;
+ const PMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
+ const TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
+ TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
+
+ for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++)
+ {
+ if(!anIsFieldsEntryUpdated)
+ {
+ aComment = "";
+ aComment.append("myComment=FIELDS;");
+ aComment.append("myMeshName=");aComment.append(aMeshName.c_str());
+
+ CreateAttributes(theStudy,
+ aMesh->myFieldsEntry,
+ NO_ICON,
+ NO_IOR,
+ "Fields",
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ false);
+ anIsFieldsEntryUpdated = true;
+ }
+
+ const string& aFieldName = aFieldMapIter->first;
+ const PField& aField = aFieldMapIter->second;
+ const TValField& aValField = aField->myValField;
+ QString aFieldNameWithUnit = GenerateFieldName(aFieldName,aField->myUnitNames[0]);
+ aComment = QString("myComment=FIELD;myMeshName=%1;myEntityId=%2;myName=%3;myNbTimeStamps=%4;myNumComponent=%5");
aComment = aComment.arg(aMeshName.c_str());
aComment = aComment.arg(anEntity);
aComment = aComment.arg(aFieldName.c_str());
aComment = aComment.arg(aValField.size());
aComment = aComment.arg(aField->myNbComp);
-
- aField->myEntry = CreateAttributes(theStudy,
- aMesh->myFieldsEntry,
- NO_ICON,
- NO_IOR,
- aFieldNameWithUnit.toLatin1().data(),
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- true);
-
- CreateReference(theStudy,
- aField->myEntry,
- aMeshOnEntity->myEntry);
-
- TValField::const_iterator aValFieldIter = aValField.begin();
-
- for(; aValFieldIter != aValField.end(); aValFieldIter++)
- {
- int aTimeStamp = aValFieldIter->first;
- const PValForTime& aValForTime = aValFieldIter->second;
- aComment = QString("myComment=TIMESTAMP;myMeshName=%1;myEntityId=%2;myFieldName=%3;myTimeStampId=%4;myNumComponent=%5");
+
+ aField->myEntry = CreateAttributes(theStudy,
+ aMesh->myFieldsEntry,
+ NO_ICON,
+ NO_IOR,
+ aFieldNameWithUnit.toLatin1().data(),
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ true);
+
+ CreateReference(theStudy,
+ aField->myEntry,
+ aMeshOnEntity->myEntry);
+
+ TValField::const_iterator aValFieldIter = aValField.begin();
+
+ for(; aValFieldIter != aValField.end(); aValFieldIter++)
+ {
+ int aTimeStamp = aValFieldIter->first;
+ const PValForTime& aValForTime = aValFieldIter->second;
+ aComment = QString("myComment=TIMESTAMP;myMeshName=%1;myEntityId=%2;myFieldName=%3;myTimeStampId=%4;myNumComponent=%5");
aComment = aComment.arg(aMeshName.c_str());
aComment = aComment.arg(anEntity);
aComment = aComment.arg(aFieldName.c_str());
aComment = aComment.arg(aTimeStamp);
aComment = aComment.arg(aField->myNbComp);
-
- string aTimeStampId = VISU_Convertor::GenerateName(aValForTime->myTime);
-
- aValForTime->myEntry = CreateAttributes(theStudy,
- aField->myEntry,
- NO_ICON,
- NO_IOR,
- aTimeStampId,
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- true);
- }
- }
+
+ string aTimeStampId = VISU_Convertor::GenerateName(aValForTime->myTime);
+
+ aValForTime->myEntry = CreateAttributes(theStudy,
+ aField->myEntry,
+ NO_ICON,
+ NO_IOR,
+ aTimeStampId,
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ true);
+ }
+ }
}
if(!anIsFieldsEntryUpdated && !theIsAtOnce)
- RemoveSObject(theStudy, aMesh->myFieldsEntry);
+ RemoveSObject(theStudy, aMesh->myFieldsEntry);
}
ProcessVoidEvent(new TUpdateObjBrowser(theStudy->StudyId(),theIsDone));
//----------------------------------------------------------------------------
void
BuildMinMax(Result_i* theResult,
- Result_i::PInput theInput,
- CORBA::Boolean* theIsDone,
- CORBA::Boolean theIsBuild)
+ Result_i::PInput theInput,
+ CORBA::Boolean* theIsDone,
+ CORBA::Boolean theIsBuild)
{
if(!theIsBuild || *theIsDone)
return;
//----------------------------------------------------------------------------
void
BuildFieldDataTree(Result_i* theResult,
- Result_i::PInput theInput,
- CORBA::Boolean* theIsFieldsDone,
- CORBA::Boolean theIsBuildFields,
- CORBA::Boolean* theIsMinMaxDone,
- CORBA::Boolean theIsBuildMinMax,
- _PTR(Study) theStudy)
+ Result_i::PInput theInput,
+ CORBA::Boolean* theIsFieldsDone,
+ CORBA::Boolean theIsBuildFields,
+ CORBA::Boolean* theIsMinMaxDone,
+ CORBA::Boolean theIsBuildMinMax,
+ _PTR(Study) theStudy)
{
BuildFields(theResult,
- theInput,
- theIsFieldsDone,
- theIsBuildFields,
- false,
- theStudy);
+ theInput,
+ theIsFieldsDone,
+ theIsBuildFields,
+ false,
+ theStudy);
BuildMinMax(theResult,
theInput,