Salome HOME
DCQ : Merge with Ecole Ete a6.
[modules/visu.git] / src / VISU_I / VISU_Result_i.cc
index f378c2c17eb89330a3b49b57adf2f4be27ffe0c6..3fcdc2b1432ab76a7253956a0146c7996e63c961 100644 (file)
@@ -134,7 +134,7 @@ VISU::Result_i::Result_i(SALOMEDS::Study_ptr theStudy, const TSourceId& aSourceI
   myInput = NULL;
   myIsDone = 0;
   CORBA::String_var aName = theStudy->Name();
-  INFOS("Result_i::Result_i - this = "<<this<<"; StudyId = "<<
+  MESSAGE("Result_i::Result_i - this = "<<this<<"; StudyId = "<<
        theStudy->StudyId()<<"; Name = '"<<aName.in()<<"'");
 }
 
@@ -148,7 +148,7 @@ int VISU::Result_i::IsPossible(){
   try{
     float aSize = myInput->GetSize();
     bool aResult = VISU_PipeLine::CheckAvailableMemory(aSize);
-    INFOS("Result_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<float(aResult));
+    MESSAGE("Result_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<float(aResult));
     return aResult;
   }catch(std::runtime_error& exc){
     INFOS("Follow exception was accured :\n"<<exc.what());
@@ -240,7 +240,6 @@ CORBA::Boolean VISU::Result_i::BuildAll(){
 }
 
 VISU::Storable* VISU::Result_i::Build(SALOMEDS::SObject_ptr theSObject) 
-     throw (std::runtime_error&)
 {
   SALOMEDS::StudyBuilder_var aStudyBuilder = myStudyDocument->NewBuilder();
   aStudyBuilder->NewCommand();  // There is a transaction
@@ -398,7 +397,7 @@ VISU::Storable* VISU::Result_i::Create(const char* theFileName){
       static QString aCommand;
       aCommand.sprintf("cp %s %s",myFileInfo.absFilePath().latin1(),aTmpDir.get());
       if(system(aCommand) == -1){
-       INFOS("Create - Can't execute the command :"<<aCommand);
+       MESSAGE("Create - Can't execute the command :"<<aCommand);
        return NULL;
       }
       if(MYDEBUG) MESSAGE("Result_i::Create - aCommand = "<<aCommand);
@@ -421,6 +420,7 @@ VISU::Storable* VISU::Result_i::Create(SALOMEDS::SObject_ptr theMedSObject){
   try{
     myInput = CreateMEDConvertor(theMedSObject);
     if(myInput == NULL) return NULL;
+    mySourceId = eComponent;
     string aCompDataType = GetComponentDataType(theMedSObject);
     myFileInfo.setFile(aCompDataType.c_str());
     myName = ::GenerateName("aResult").latin1();
@@ -439,6 +439,7 @@ VISU::Storable* VISU::Result_i::Create(SALOME_MED::FIELD_ptr theField){
   try{
     myInput = CreateMEDFieldConvertor(theField);
     if(myInput == NULL) return NULL;
+    mySourceId = eComponent;
     string aCompDataType = "MED";
     myFileInfo.setFile(aCompDataType.c_str());
     myInitFileName = aCompDataType;
@@ -455,7 +456,6 @@ VISU::Storable* VISU::Result_i::Create(SALOME_MED::FIELD_ptr theField){
 
 VISU::Storable* VISU::Result_i::Restore(SALOMEDS::SObject_ptr theSObject, 
                                        const Storable::TRestoringMap& theMap, const string& thePrefix)
-     throw(std::logic_error&)
 {
   if(MYDEBUG)  MESSAGE("Result_i::Restore - "<<thePrefix);
   try{
@@ -560,7 +560,6 @@ void VISU::Result_i::ToStream(std::ostringstream& theStr){
 
 VISU::Storable* VISU::Result_i::Restore(SALOMEDS::SObject_ptr theSObject, 
                                        const string& thePrefix, const Storable::TRestoringMap& theMap)
-     throw(std::logic_error&)
 {
   SALOMEDS::Study_var aStudy = theSObject->GetStudy();
   VISU::Result_i* pResult = new VISU::Result_i(aStudy);
@@ -583,13 +582,13 @@ const SALOMEDS::Study_var& VISU::Result_i::GetStudyDocument() const { return myS
 const SALOMEDS::SComponent_var& VISU::Result_i::GetSComponent() const { return mySComponent;}
 
 VISU::Result_i::~Result_i() {
-  INFOS("Result_i::~Result_i() - this = "<<this);
+  MESSAGE("Result_i::~Result_i() - this = "<<this);
   if(GetSourceId() == eRestoredFile){ 
     static QString aCommand;
     aCommand.sprintf("rm %s",myFileInfo.filePath().latin1());
-    INFOS("Result_i::~Result_i - system("<<aCommand<<") = "<<system(aCommand));
+    MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<system(aCommand));
     aCommand.sprintf("rmdir --ignore-fail-on-non-empty %s",myFileInfo.dirPath().latin1());
-    INFOS("Result_i::~Result_i - system("<<aCommand<<") = "<<system(aCommand));
+    MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<system(aCommand));
   }
   if(myInput) delete myInput;
 }