]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To provide a way to customize VISU::ScalarMap_i::Build method
authorapo <apo@opencascade.com>
Fri, 26 Aug 2005 05:57:58 +0000 (05:57 +0000)
committerapo <apo@opencascade.com>
Fri, 26 Aug 2005 05:57:58 +0000 (05:57 +0000)
src/VISU_I/VISU_ScalarMap_i.cc
src/VISU_I/VISU_ScalarMap_i.hh

index b943952ee2396b5a6df340ae307f091d80f53b81..c78a08305cecc0369fad3419c6f9d22fbf82600a 100644 (file)
@@ -464,6 +464,21 @@ VISU::Storable* VISU::ScalarMap_i::Build(int theRestoring){
 }
 
 
+void VISU::ScalarMap_i::DoSetInput(Result_i* theResult){
+  if(theResult->GetInput() == NULL)
+    throw std::runtime_error("Mesh_i::Build - theResult->GetInput() == NULL !!!");
+  myField = theResult->GetInput()->GetField(myMeshName,myEntity,myFieldName);
+  if(myField == NULL) 
+    throw std::runtime_error("There is no Field with the parameters !!!");
+  VISU_Convertor::TOutput *anOutput =
+    theResult->GetInput()->GetTimeStampOnMesh(myMeshName,myEntity,myFieldName,myIteration);
+  if(anOutput == NULL) 
+    throw std::runtime_error("There is no TimeStamp with the parameters !!!");
+  myScalarMapPL->SetInput(anOutput);
+  myScalarMapPL->Build();
+}
+
+
 void VISU::ScalarMap_i::DoHook(){
   if(MYDEBUG)  MESSAGE("ScalarMap_i::DoHook() - "<<myPipeLine);
   if(!myPipeLine) {
index ec5a60c1a4e80a0764ab060c49be4e02a020da80..3ff150209184e1f5993f98d0109ee32f4fc02136 100644 (file)
@@ -133,6 +133,7 @@ namespace VISU{
 
   protected:
     Storable* Build(int theRestoring);
+    virtual void DoSetInput(Result_i* theResult);
     virtual void DoHook();
 
     VISU_ScalarMapPL* myScalarMapPL;