::Result_i (SALOMEDS::Study_ptr theStudy,
const ESourceId& theSourceId,
const ECreationId& theCreationId,
- CORBA::Boolean theIsBuildImmediately):
+ CORBA::Boolean theIsBuildImmediately,
+ CORBA::Boolean theIsBuildFields,
+ CORBA::Boolean theIsBuildMinMax,
+ CORBA::Boolean theIsBuildGroups):
myStudyDocument(SALOMEDS::Study::_duplicate(theStudy)),
myCreationId(theCreationId),
mySourceId(theSourceId),
myIsBuildImmediately(theIsBuildImmediately),
- myInput(NULL),
+ myIsBuildFields(theIsBuildFields),
+ myIsBuildGroups(theIsBuildMinMax),
+ myIsBuildMinMax(theIsBuildGroups),
myIsEntitiesDone(false),
myIsFieldsDone(false),
myIsGroupsDone(false),
myIsMinMaxDone(false),
- myIsBuildFields(true),
- myIsBuildGroups(true),
- myIsBuildMinMax(true),
- myIsAllDone(false)
+ myIsAllDone(false),
+ myInput(NULL)
{
myStudy = ProcessEvent(new TGetStudy(myStudyDocument->StudyId()));
}
SALOMEDS::SObject_var aRefSObj, aTargetRefSObj;
if (mySObject->FindSubObject(1, aRefSObj) &&
- aRefSObj->ReferencedObject(aTargetRefSObj)) {
+ aRefSObj->ReferencedObject(aTargetRefSObj))
+ {
if(MYDEBUG) MESSAGE("Result_i::GetInput - There is some reference.");
SALOMEDS::SComponent_var aCompRefSObj = aTargetRefSObj->GetFatherComponent();
CORBA::String_var aDataType = aCompRefSObj->ComponentDataType();
}
if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - mySourceId = " << mySourceId);
myInput = CreateConvertor(myFileInfo.filePath().latin1());
- myInput->Build();
+
+ myInput->BuildEntities();
+ if(myIsBuildFields){
+ myInput->BuildFields();
+ if(myIsBuildMinMax){
+ myInput->BuildMinMax();
+ }
+ }
+ if(myIsBuildGroups)
+ myInput->BuildGroups();
+
QString aComment;
aComment.sprintf("myComment=%s;myType=%d;myFileName=%s;myInitFileName=%s",
GetComment(), VISU::TRESULT, myFileInfo.filePath().latin1(),
SALOMEDS::AttributeComment_var aCmnt = SALOMEDS::AttributeComment::_narrow(anAttr);
aCmnt->SetValue(aComment.latin1());
}
- bool isBuildAll = VISU::GetResourceMgr()->booleanValue("VISU", "full_med_loading", false);
- if (isBuildAll)
+ bool anIsBuildAll = VISU::GetResourceMgr()->booleanValue("VISU", "full_med_loading", false);
+ if(anIsBuildAll)
BuildAll();
return this;
} catch(std::exception& exc) {
Storable::DataToStream(theStr,"myName",myName.c_str());
Storable::DataToStream(theStr,"myInitFileName",myInitFileName.c_str());
Storable::DataToStream(theStr,"myCreationId",myCreationId);
+ Storable::DataToStream(theStr,"myIsBuildFields",myIsFieldsDone);
+ Storable::DataToStream(theStr,"myIsBuildMinMax",myIsMinMaxDone);
+ Storable::DataToStream(theStr,"myIsBuildGroups",myIsGroupsDone);
}
if(aCreationId == eImportMed || aCreationId == eImportMedField)
aSourceId = eRestoredComponent;
- VISU::Result_i* pResult = new VISU::Result_i(aStudy,aSourceId,aCreationId);
- if (pResult == NULL)
+ CORBA::Boolean anIsBuildFields = Storable::FindValue(theMap,"myIsBuildFields","0").toInt();
+ CORBA::Boolean anIsBuildMinMax = Storable::FindValue(theMap,"myIsBuildMinMax","0").toInt();
+ CORBA::Boolean anIsBuildGroups = Storable::FindValue(theMap,"myIsBuildGroups","0").toInt();
+
+ VISU::Result_i* aResult = new VISU::Result_i(aStudy,
+ aSourceId,
+ aCreationId,
+ anIsBuildFields,
+ anIsBuildMinMax,
+ anIsBuildGroups);
+ if (aResult == NULL)
return NULL;
- return pResult->Restore(theSObject,theMap,thePrefix);
+ return aResult->Restore(theSObject,theMap,thePrefix);
}