From: apo Date: Wed, 27 Jun 2007 13:43:36 +0000 (+0000) Subject: To implement temporary MED files handling. X-Git-Tag: T_MULTIPR_INDUS_Dump_python~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8285e1222a93e9ee3e447e4ad6b94ab63921cbe2;p=modules%2Fvisu.git To implement temporary MED files handling. --- diff --git a/src/VISU_I/VISU_MultiResult_i.cc b/src/VISU_I/VISU_MultiResult_i.cc index 012c00b6..cc8f5bb3 100644 --- a/src/VISU_I/VISU_MultiResult_i.cc +++ b/src/VISU_I/VISU_MultiResult_i.cc @@ -39,6 +39,10 @@ #include #include +#include +#include +#include + #include @@ -460,20 +464,34 @@ VISU::MultiResult_i //--------------------------------------------------------------- VISU::MultiResult_i ::~MultiResult_i() -{} +{ + //cout<<"MultiResult_i::~MultiResult_i - '"<second; + std::string aFileName = anInput->GetName(); + //cout<<"'"<first; - const MultiResult_i::TResolutionID& aResolutionID = anIter->second; - if(aResolutionID == 'F') - UpdateRepresentationKey(thePartName2FileName, aRepresentationKey, aPartName); - if(aResolutionID == 'M') - UpdateRepresentationKey(thePartName2FileName, aRepresentationKey, aPartName + "_MED"); - else if(aResolutionID == 'L') - UpdateRepresentationKey(thePartName2FileName, aRepresentationKey, aPartName + "_LOW"); + if(IsFullResolution(aPartName)){ + const MultiResult_i::TResolutionID& aResolutionID = anIter->second; + if(aResolutionID == 'F') + UpdateRepresentationKey(thePartName2FileName, aRepresentationKey, aPartName); + if(aResolutionID == 'M') + UpdateRepresentationKey(thePartName2FileName, aRepresentationKey, aPartName + "_MED"); + else if(aResolutionID == 'L') + UpdateRepresentationKey(thePartName2FileName, aRepresentationKey, aPartName + "_LOW"); + } } return aRepresentationKey; } @@ -609,14 +629,22 @@ VISU::MultiResult_i TRepresentation2Input::iterator anIter = myRepresentation2Input.find(aRepresentationKey); if(anIter == myRepresentation2Input.end()){ std::string aFileName = SALOMEDS_Tool::GetTmpDir() + "tmp.med"; - //cout<<"MultiResult_i::GetInput - '"<Build(); + anInput->BuildFields(); myRepresentation2Input[aRepresentationKey] = anInput; return anInput; } diff --git a/src/VISU_I/VISU_Result_i.cc b/src/VISU_I/VISU_Result_i.cc index 1b3bf77c..c199ec62 100644 --- a/src/VISU_I/VISU_Result_i.cc +++ b/src/VISU_I/VISU_Result_i.cc @@ -909,6 +909,14 @@ VISU::Result_i } +const VISU::Result_i::ESourceId& +VISU::Result_i +::GetSourceId() const +{ + return mySourceId; +} + + //--------------------------------------------------------------- std::string VISU::Result_i diff --git a/src/VISU_I/VISU_Result_i.hh b/src/VISU_I/VISU_Result_i.hh index bd8ec41d..191dafd3 100644 --- a/src/VISU_I/VISU_Result_i.hh +++ b/src/VISU_I/VISU_Result_i.hh @@ -174,6 +174,9 @@ namespace VISU Storable* BuildAll(SALOMEDS::SObject_ptr theSObject) ; + const ESourceId& + GetSourceId() const; + _PTR(Study) myStudy; CORBA::Boolean myIsBuildImmediately;