Salome HOME
Update Help for VISU module.
[modules/visu.git] / src / VISU_I / VISU_IsoSurfaces_i.cc
index d7e6bf15bb323b0664ccc22015a8a9f06e8ee1f3..79b2a877fd328bda3c1605e5d1aa3fcb1298cdba 100644 (file)
@@ -34,16 +34,14 @@ using namespace std;
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
 #else
 static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
 #endif
 
 int VISU::IsoSurfaces_i::IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
-                                   const char* theFieldName, int theIteration)
+                                   const char* theFieldName, int theIteration, int isMemoryCheck)
 {
-  return VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration);
+  return VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck);
 }
 
 int VISU::IsoSurfaces_i::myNbPresent = 0;
@@ -52,43 +50,50 @@ QString VISU::IsoSurfaces_i::GenerateName() { return VISU::GenerateName("IsoSurf
 const string VISU::IsoSurfaces_i::myComment = "ISOSURFACES";
 const char* VISU::IsoSurfaces_i::GetComment() const { return myComment.c_str();}
 
-VISU::IsoSurfaces_i::IsoSurfaces_i(Result_i* theResult, bool theAddToStudy) :
-       PrsObject_i(theResult->GetStudyDocument()), 
-       Prs3d_i(theResult),       
-       ScalarMap_i(theResult, theAddToStudy)
+
+VISU::IsoSurfaces_i::
+IsoSurfaces_i(Result_i* theResult, 
+             bool theAddToStudy) :
+  PrsObject_i(theResult->GetStudyDocument()), 
+  Prs3d_i(theResult,theAddToStudy),
+  ScalarMap_i(theResult,theAddToStudy),
+  myIsoSurfacesPL(NULL)
 {
-  myIsoSurfacesPL = NULL;
 }
 
-void VISU::IsoSurfaces_i::Destroy(){
-  ScalarMap_i::Destroy();
+
+VISU::IsoSurfaces_i::
+IsoSurfaces_i(Result_i* theResult, 
+             SALOMEDS::SObject_ptr theSObject) :
+  PrsObject_i(theResult->GetStudyDocument()), 
+  Prs3d_i(theResult,theSObject),
+  ScalarMap_i(theResult,theSObject),
+  myIsoSurfacesPL(NULL)
+{
 }
 
+
 void VISU::IsoSurfaces_i::SameAs(const IsoSurfaces_i* theOrigin) {
-  IsoSurfaces_i* aIsoSurfaces = const_cast<IsoSurfaces_i*>(theOrigin);
   VISU::ScalarMap_i::SameAs(theOrigin);
-
-  //SetNbSurfaces(aIsoSurfaces->GetNbSurfaces());
-  //SetSubRange(aIsoSurfaces->GetSubMin(),aIsoSurfaces->GetSubMax());
 }
 
+
 VISU::Storable* VISU::IsoSurfaces_i::Create(const char* theMeshName, VISU::Entity theEntity, 
                                            const char* theFieldName, int theIteration)
 {
   return ScalarMap_i::Create(theMeshName,theEntity,theFieldName,theIteration);
 }
 
+
 VISU::Storable* VISU::IsoSurfaces_i::Restore(const Storable::TRestoringMap& theMap)
-     throw(std::logic_error&)
 {
-  ScalarMap_i::Restore(theMap);
-
+  DoHook();
   SetNbSurfaces(VISU::Storable::FindValue(theMap,"myNbSurface").toInt());
   float aMin = VISU::Storable::FindValue(theMap,"myRange[0]").toDouble();
   float aMax = VISU::Storable::FindValue(theMap,"myRange[1]").toDouble();
   SetSubRange(aMin,aMax);
     
-  return Build(true);
+  return ScalarMap_i::Restore(theMap);
 }
 
 void VISU::IsoSurfaces_i::ToStream(std::ostringstream& theStr){
@@ -99,18 +104,6 @@ void VISU::IsoSurfaces_i::ToStream(std::ostringstream& theStr){
   Storable::DataToStream( theStr, "myRange[1]", GetSubMax() );
 }
 
-VISU::Storable* VISU::IsoSurfaces_i::Restore(SALOMEDS::SObject_ptr theSObject, 
-                                            const string& thePrefix, const Storable::TRestoringMap& theMap)
-     throw(std::logic_error&)
-{
-  VISU::Result_i* pResult = GetResult(theSObject);
-  if(pResult != NULL){
-    VISU::IsoSurfaces_i* pResent = new VISU::IsoSurfaces_i(pResult);
-    return pResent->Restore(theMap);
-  }
-  return NULL;
-}
-
 
 VISU::IsoSurfaces_i::~IsoSurfaces_i(){
   if(MYDEBUG) MESSAGE("IsoSurfaces_i::~IsoSurfaces_i()");