]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Small merge with V2_2_0_maintainance
authorjfa <jfa@opencascade.com>
Wed, 3 Aug 2005 13:33:06 +0000 (13:33 +0000)
committerjfa <jfa@opencascade.com>
Wed, 3 Aug 2005 13:33:06 +0000 (13:33 +0000)
src/VISU_I/VISU_Result_i.cc

index 20594a77bea8b3af0f1266f16ea0980a77034413..5de0d259f714f6ee2c86c5cdc8b7f4dafb83d80c 100644 (file)
@@ -32,8 +32,6 @@
 
 #include "SUIT_ResourceMgr.h"
 
-#include "SALOME_Event.hxx"
-
 #include "SALOMEDS_Tool.hxx"
 #include "HDFascii.hxx"
 
@@ -67,7 +65,7 @@ VISU::Result_var VISU::FindResult (SALOMEDS::SObject_ptr theSObject)
     CORBA::Object_var anObject = VISU::SObjectToObject(aFather);
     if (!CORBA::is_nil(anObject)) {
       aResult = VISU::Result::_narrow(anObject);
-      if(!aResult->_is_nil()) return aResult;
+      if (!aResult->_is_nil()) return aResult;
     }
     aFather = aFather->GetFather();
     aFatherID = aFather->GetID();
@@ -115,7 +113,6 @@ void CreateReference (SALOMEDS::Study_ptr theStudyDocument,
 
 string GetComponentDataType (SALOMEDS::SObject_ptr theSObject)
 {
-  SALOMEDS::Study_var aStudy = theSObject->GetStudy();
   SALOMEDS::SComponent_var aCompRefSObj = theSObject->GetFatherComponent();
   CORBA::String_var aDataType = aCompRefSObj->ComponentDataType();
   return aDataType.in();
@@ -318,8 +315,8 @@ Build(SALOMEDS::SObject_ptr theSObject)
          throw std::runtime_error("Build >> Value of entity is incorrect!");
        }
        aEntity2EntryMap[anEntity] = CreateAttributes
-         (myStudyDocument,aSubMeshesEntry.c_str(),aRefFatherEntry.c_str(),
-          "",anEntityName.c_str(),"",aComment.latin1(),true);
+         (myStudyDocument, aSubMeshesEntry.c_str(), aRefFatherEntry.c_str(),
+          "", anEntityName.c_str(), "", aComment.latin1(), true);
        const VISU::PMeshOnEntity aMeshOnEntity = aMeshOnEntityMapIter->second;
        const VISU::TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
        VISU::TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin();
@@ -555,7 +552,7 @@ Restore(SALOMEDS::SObject_ptr theSObject,
       SALOMEDS::StudyBuilder_var aStudyBuilder = myStudyDocument->NewBuilder();
       SALOMEDS::Driver_var aDriver = SALOMEDS::Driver::_narrow(aEngComp);
       aStudyBuilder->LoadWith(aCompRefSObj, aDriver);
-      if (strcmp(aDataType,"MED") == 0)
+      if (strcmp(aDataType, "MED") == 0)
        myInput = CreateMEDConvertor(aTargetRefSObj);
       else
        throw std::runtime_error("GetInput - There is no convertor for the aDataType !!!");
@@ -623,7 +620,8 @@ Restore(SALOMEDS::SObject_ptr theSObject,
       aCmnt->SetValue(aComment.latin1());
     }
     bool isBuildAll = VISU::GetResourceMgr()->booleanValue("VISU", "full_med_loading", false);
-    if (isBuildAll) BuildAll();
+    if (isBuildAll)
+      BuildAll();
     return this;
   } catch(std::exception& exc) {
     INFOS("Follow exception was occured :\n"<<exc.what());
@@ -657,7 +655,7 @@ VISU::Result_i::Restore(SALOMEDS::SObject_ptr theSObject,
     aSourceId = eRestoredComponent;
 
   VISU::Result_i* pResult = new VISU::Result_i(aStudy,aSourceId,aCreationId);
-  if(pResult == NULL)
+  if (pResult == NULL)
     return NULL;
 
   return pResult->Restore(theSObject,theMap,thePrefix);
@@ -681,9 +679,10 @@ std::string VISU::Result_i::GetEntry(const std::string& theComment)
   return FindEntryWithComment(myStudyDocument,GetEntry().c_str(),theComment.c_str());
 }
 
-VISU::Result_i::~Result_i() {
+VISU::Result_i::~Result_i()
+{
   MESSAGE("Result_i::~Result_i() - this = "<<this);
-  if(mySourceId == eRestoredFile){
+  if (mySourceId == eRestoredFile) {
     static QString aCommand;
     aCommand.sprintf("rm %s",myFileInfo.filePath().latin1());
     MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<system(aCommand));