]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To improve the following functionalities.
authorapo <apo@opencascade.com>
Fri, 24 Nov 2006 12:07:25 +0000 (12:07 +0000)
committerapo <apo@opencascade.com>
Fri, 24 Nov 2006 12:07:25 +0000 (12:07 +0000)
  1. Prs3d::CreateActor need not SALOME Interactive Object as its input parameter.
  2. Prs3d and its descendants can be created without passing Result_i* as input parameter.
  3. RemovableObject_i::SetName will take one addtional argument which says wether to modify the corresponding name in the SALOMEDS.Study or not

40 files changed:
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_CutLinesDlg.cxx
src/VISUGUI/VisuGUI_CutPlanesDlg.cxx
src/VISU_I/Makefile.in
src/VISU_I/VISU_ColoredPrs3dCache_i.cc
src/VISU_I/VISU_ColoredPrs3dFactory.cc
src/VISU_I/VISU_ColoredPrs3dFactory.hh
src/VISU_I/VISU_ColoredPrs3dHolder_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.hh
src/VISU_I/VISU_CutLines_i.cc
src/VISU_I/VISU_CutLines_i.hh
src/VISU_I/VISU_CutPlanes_i.cc
src/VISU_I/VISU_CutPlanes_i.hh
src/VISU_I/VISU_DeformedShape_i.cc
src/VISU_I/VISU_DeformedShape_i.hh
src/VISU_I/VISU_GaussPoints_i.cc
src/VISU_I/VISU_GaussPoints_i.hh
src/VISU_I/VISU_Gen_i.cc
src/VISU_I/VISU_IsoSurfaces_i.cc
src/VISU_I/VISU_IsoSurfaces_i.hh
src/VISU_I/VISU_Mesh_i.cc
src/VISU_I/VISU_Mesh_i.hh
src/VISU_I/VISU_Plot3D_i.cc
src/VISU_I/VISU_Plot3D_i.hh
src/VISU_I/VISU_Prs3d_i.cc
src/VISU_I/VISU_Prs3d_i.hh
src/VISU_I/VISU_PrsObject_i.cc
src/VISU_I/VISU_PrsObject_i.hh
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh
src/VISU_I/VISU_ScalarMap_i.cc
src/VISU_I/VISU_ScalarMap_i.hh
src/VISU_I/VISU_StreamLines_i.cc
src/VISU_I/VISU_StreamLines_i.hh
src/VISU_I/VISU_Table_i.cc
src/VISU_I/VISU_Table_i.hh
src/VISU_I/VISU_TimeAnimation.cxx
src/VISU_I/VISU_Vectors_i.cc
src/VISU_I/VISU_Vectors_i.hh

index e6bd286038e371ed7d45c7aea2d11ee39e7847c3..87143741017a1dbdd1128df17c6aa6e9e73be418 100644 (file)
@@ -1528,7 +1528,7 @@ OnRename()
                 VISU::Curve_i* curve =
                   dynamic_cast<VISU::Curve_i*>(VISU::GetServant(aCurve).in());
                 if (curve)
-                  curve->SetName(Name.latin1());
+                  curve->SetName(Name.latin1(), true);
               }
               break;
             }
@@ -1539,7 +1539,7 @@ OnRename()
                 VISU::Table_i* table =
                   dynamic_cast<VISU::Table_i*>(VISU::GetServant(aTable).in());
                 if (table)
-                  table->SetName(Name.latin1());
+                  table->SetName(Name.latin1(), true);
               }
               break;
             }
@@ -1550,7 +1550,7 @@ OnRename()
                 VISU::Container_i* container =
                   dynamic_cast<VISU::Container_i*>(VISU::GetServant(aContainer).in());
                 if (container)
-                  container->SetName(Name.latin1());
+                  container->SetName(Name.latin1(), true);
               }
               break;
             }
@@ -1723,6 +1723,18 @@ OnShowAnimation()
   aAnimationDlg->show();
 }
 
+//----------------------------------------------------------------------------
+template<unsigned int colored_prs3d_type_enum> 
+void
+DoSameAs(VISU::Prs3d_i* thePrs3d)
+{
+  typedef typename TL::TColoredEnum2Type<colored_prs3d_type_enum>::TResult TColoredPrs3d;
+  TColoredPrs3d* aColoredPrs3d = dynamic_cast<TColoredPrs3d*>(thePrs3d);
+  TColoredPrs3d* aSameColoredPrs3d = new TColoredPrs3d(VISU::ColoredPrs3d_i::EPublishUnderTimeStamp);
+  aSameColoredPrs3d->SameAs(aColoredPrs3d);
+}
+
+//----------------------------------------------------------------------------
 void
 VisuGUI::
 OnCopyPresentation()
@@ -1743,75 +1755,37 @@ OnCopyPresentation()
   switch (aPrsObject->GetType()) {
   case VISU::TMESH:
     {
-      VISU::Mesh_i* aMeshPrs = dynamic_cast<VISU::Mesh_i*>(aPrsObject);
-      VISU::Mesh_i* aSameMesh = new VISU::Mesh_i(aMeshPrs->GetCResult());
-      aSameMesh->SameAs(aMeshPrs);
+      VISU::Mesh_i* aPrs = dynamic_cast<VISU::Mesh_i*>(aPrsObject);
+      VISU::Mesh_i* aSamePrs = new VISU::Mesh_i(aPrs->GetCResult());
+      aSamePrs->SameAs(aPrs);
     }
     break;
   case VISU::TSCALARMAP:
-    {
-      VISU::ScalarMap_i* aScalarPrs = dynamic_cast<VISU::ScalarMap_i*>(aPrsObject);
-      VISU::ScalarMap_i* aSameScalar = new VISU::ScalarMap_i(aScalarPrs->GetCResult());
-      aSameScalar->SameAs(aScalarPrs);
-    }
+    DoSameAs<VISU::TSCALARMAP>(aPrsObject);
     break;
   case VISU::TDEFORMEDSHAPE:
-    {
-      VISU::DeformedShape_i* aDefPrs = dynamic_cast<VISU::DeformedShape_i*>(aPrsObject);
-      VISU::DeformedShape_i* aSameDeformed = new VISU::DeformedShape_i(aDefPrs->GetCResult());
-      aSameDeformed->SameAs(aDefPrs);
-    }
+    DoSameAs<VISU::TDEFORMEDSHAPE>(aPrsObject);
     break;
   case VISU::TSCALARMAPONDEFORMEDSHAPE:
-    {
-      VISU::ScalarMapOnDeformedShape_i* aDefPrs =
-        dynamic_cast<VISU::ScalarMapOnDeformedShape_i*>(aPrsObject);
-      VISU::ScalarMapOnDeformedShape_i* aSameScalarMapOnDeformed =
-        new VISU::ScalarMapOnDeformedShape_i(aDefPrs->GetCResult());
-      aSameScalarMapOnDeformed->SameAs(aDefPrs);
-    }
+    DoSameAs<VISU::TSCALARMAPONDEFORMEDSHAPE>(aPrsObject);
     break;
   case VISU::TCUTPLANES:
-    {
-      VISU::CutPlanes_i* aCutPrs = dynamic_cast<VISU::CutPlanes_i*>(aPrsObject);
-      VISU::CutPlanes_i* aSameCut = new VISU::CutPlanes_i(aCutPrs->GetCResult());
-      aSameCut->SameAs(aCutPrs);
-    }
+    DoSameAs<VISU::TCUTPLANES>(aPrsObject);
     break;
   case VISU::TCUTLINES:
-    {
-      VISU::CutLines_i* aCutPrs = dynamic_cast<VISU::CutLines_i*>(aPrsObject);
-      VISU::CutLines_i* aSameCut = new VISU::CutLines_i(aCutPrs->GetCResult());
-      aSameCut->SameAs(aCutPrs);
-    }
+    DoSameAs<VISU::TCUTLINES>(aPrsObject);
     break;
   case VISU::TISOSURFACE:
-    {
-      VISU::IsoSurfaces_i* aIsoPrs = dynamic_cast<VISU::IsoSurfaces_i*>(aPrsObject);
-      VISU::IsoSurfaces_i* aSameIso = new VISU::IsoSurfaces_i(aIsoPrs->GetCResult());
-      aSameIso->SameAs(aIsoPrs);
-    }
+    DoSameAs<VISU::TISOSURFACE>(aPrsObject);
     break;
   case VISU::TSTREAMLINES:
-    {
-      VISU::StreamLines_i* aLinesPrs = dynamic_cast<VISU::StreamLines_i*>(aPrsObject);
-      VISU::StreamLines_i* aSameLines = new VISU::StreamLines_i(aLinesPrs->GetCResult());
-      aSameLines->SameAs(aLinesPrs);
-    }
+    DoSameAs<VISU::TSTREAMLINES>(aPrsObject);
     break;
   case VISU::TVECTORS:
-    {
-      VISU::Vectors_i* aVectorsPrs = dynamic_cast<VISU::Vectors_i*>(aPrsObject);
-      VISU::Vectors_i* aSameVectors = new VISU::Vectors_i(aVectorsPrs->GetCResult());
-      aSameVectors->SameAs(aVectorsPrs);
-    }
+    DoSameAs<VISU::TVECTORS>(aPrsObject);
     break;
   case VISU::TPLOT3D:
-    {
-      VISU::Plot3D_i* aPlot3DPrs = dynamic_cast<VISU::Plot3D_i*>(aPrsObject);
-      VISU::Plot3D_i* aSamePlot3D = new VISU::Plot3D_i(aPlot3DPrs->GetCResult());
-      aSamePlot3D->SameAs(aPlot3DPrs);
-    }
+    DoSameAs<VISU::TPLOT3D>(aPrsObject);
     break;
   }
   UpdateObjBrowser(this);
index 0b79b5ffe81f96e7e7b82c4c3e27eb07c8bf3356..172dd49a4077fb4de5e7e43449739605964b59c3 100644 (file)
@@ -313,8 +313,7 @@ void VisuGUI_CutLinesDlg::initFromPrsObject (VISU::CutLines_i* thePrs)
   setOrientation2(thePrs->GetOrientationType2());
 
   hasInit = true;
-  myCutLines = new VISU::CutLines_i(thePrs->GetCResult(),
-                                   VISU::ColoredPrs3d_i::EDoNotPublish);
+  myCutLines = new VISU::CutLines_i(VISU::ColoredPrs3d_i::EDoNotPublish);
   myCutLines->SameAs(thePrs);
   myCutLines->CopyCurvesInverted(thePrs->GetCurvesInverted());
   if (myCutLines->IsAllCurvesInverted()) myAllCurvesInvertedCheck->setChecked(true);
index bc0e0ec4fca974cd20c3a23fcfd781528390f2ca..b369535dfc055ac0dc85fa1c28b8b9c59f0e4c00 100644 (file)
@@ -186,8 +186,7 @@ void VisuGUI_CutPlanesPane::initFromPrsObject (VISU::CutPlanes_i* thePrs)
   myPosSpn->setValue(thePrs->GetDisplacement());
   hasInit = true;
   // init table
-  myCutPlanes = new VISU::CutPlanes_i(thePrs->GetCResult(),
-                                     VISU::ColoredPrs3d_i::EDoNotPublish);
+  myCutPlanes = new VISU::CutPlanes_i(VISU::ColoredPrs3d_i::EDoNotPublish);
   myCutPlanes->SameAs(thePrs);
   DrawTable();
 
index 4aab6f41e1b2c662fcb2652d70c86d2e46ce61f5..5e6ae2dd11c283711b5ee991805c38c698c5f279 100644 (file)
@@ -47,18 +47,18 @@ LIB_SRC = \
        VISU_CutLines_i.cc \
        VISU_Vectors_i.cc \
        VISU_StreamLines_i.cc \
+       VISU_ScalarMapOnDeformedShape_i.cc \
+       VISU_ColoredPrs3dHolder_i.cc \
+       VISU_ColoredPrs3dCache_i.cc \
+       VISU_ColoredPrs3dFactory.cc \
        VISU_Mesh_i.cc \
-       VISU_Table_i.cc \
-       VISU_Gen_i.cc \
        VISU_ViewManager_i.cc \
-       VISU_View_i.cc \
        VISU_TimeAnimation.cxx \
+       VISU_View_i.cc \
+       VISU_Table_i.cc \
+       VISU_Gen_i.cc \
        VISU_CorbaMedConvertor.cxx \
-       VISU_DumpPython.cc \
-       VISU_ScalarMapOnDeformedShape_i.cc \
-       VISU_ColoredPrs3dHolder_i.cc \
-       VISU_ColoredPrs3dCache_i.cc \
-       VISU_ColoredPrs3dFactory.cc
+       VISU_DumpPython.cc 
 
 LIB_MOC = \
        VISU_TimeAnimation.h
index b8fc76607950de8c79cdf6080503f1bebb82d3df..dd16a33153660946d00ec0889480001f71c9d1a6 100644 (file)
@@ -48,7 +48,7 @@ VISU::ColoredPrs3dCache_i
   if(MYDEBUG) MESSAGE("ColoredPrs3dCache_i::ColoredPrs3dCache_i - this = "<<this);
   SetStudyDocument(theStudy);
 
-  SetName(GetFolderName());
+  SetName(GetFolderName(), false);
   CORBA::String_var anIOR = GetID();
   SALOMEDS::SComponent_var aSComponent = VISU::FindOrCreateVisuComponent(theStudy);
   CORBA::String_var aFatherEntry = aSComponent->GetID();
@@ -264,7 +264,7 @@ VISU::ColoredPrs3dCache_i
            VISU::ColoredPrs3dHolder::BasicInput theInput,
            VISU::ColoredPrs3dHolder_i* theHolder)
 {
-  VISU::ColoredPrs3d_i* aPrs3d = VISU::CreatePrs3d_i(theType, GetStudyDocument());
+  VISU::ColoredPrs3d_i* aPrs3d = VISU::CreatePrs3d_i(theType, GetStudyDocument(), ColoredPrs3d_i::ERegisterInCache);
   aPrs3d->SetHolderEntry( theHolder->GetEntry() );
   aPrs3d->SetResultObject( theInput.myResult );  
   aPrs3d->SetMeshName( theInput.myMeshName );  
index 3fda8c5a37cfbd40c5ff9d7311c2abd8729bfb4f..456d5ea59195f4c70234c6c301975fa7c42ceff8 100644 (file)
@@ -51,6 +51,7 @@ namespace VISU
   //----------------------------------------------------------------------------
   bool
   CreatColoredPrs3d(ColoredPrs3d_i* theColoredPrs3d,
+                   Result_i* theResult,
                    const std::string& theMeshName, 
                    VISU::Entity theEntity,
                    const std::string& theFieldName, 
@@ -65,7 +66,12 @@ namespace VISU
        try{
 #endif
 #endif
-         if(theColoredPrs3d->Create(theMeshName, theEntity, theFieldName, theIteration))
+         theColoredPrs3d->SetCResult(theResult);
+         theColoredPrs3d->SetMeshName(theMeshName.c_str());
+         theColoredPrs3d->SetEntity(theEntity);
+         theColoredPrs3d->SetFieldName(theFieldName.c_str());
+         theColoredPrs3d->SetTimeStampNumber(theIteration);
+         if(theColoredPrs3d->Apply())
            return true;
 #ifndef _DEXCEPT_
 #ifdef NO_CAS_CATCH
@@ -96,29 +102,30 @@ namespace VISU
   //----------------------------------------------------------------------------
   VISU::ColoredPrs3d_i*
   CreatePrs3d_i(VISUType theType,
-               SALOMEDS::Study_ptr theStudy)
+               SALOMEDS::Study_ptr theStudy,
+               ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode)
   {
     switch(theType){
     case TSCALARMAP:
-      return VISU::CreatePrs3dByEnum<TSCALARMAP>(theStudy);
+      return VISU::CreatePrs3dByEnum<TSCALARMAP>(theStudy, thePublishInStudyMode);
     case TGAUSSPOINTS:
-      return VISU::CreatePrs3dByEnum<TGAUSSPOINTS>(theStudy);
+      return VISU::CreatePrs3dByEnum<TGAUSSPOINTS>(theStudy, thePublishInStudyMode);
     case TDEFORMEDSHAPE:
-      return VISU::CreatePrs3dByEnum<TDEFORMEDSHAPE>(theStudy);
+      return VISU::CreatePrs3dByEnum<TDEFORMEDSHAPE>(theStudy, thePublishInStudyMode);
     case TSCALARMAPONDEFORMEDSHAPE:
-      return VISU::CreatePrs3dByEnum<TSCALARMAPONDEFORMEDSHAPE>(theStudy);
+      return VISU::CreatePrs3dByEnum<TSCALARMAPONDEFORMEDSHAPE>(theStudy, thePublishInStudyMode);
     case TISOSURFACE:
-      return VISU::CreatePrs3dByEnum<TISOSURFACE>(theStudy);
+      return VISU::CreatePrs3dByEnum<TISOSURFACE>(theStudy, thePublishInStudyMode);
     case TSTREAMLINES:
-      return VISU::CreatePrs3dByEnum<TSTREAMLINES>(theStudy);
+      return VISU::CreatePrs3dByEnum<TSTREAMLINES>(theStudy, thePublishInStudyMode);
     case TPLOT3D:
-      return VISU::CreatePrs3dByEnum<TPLOT3D>(theStudy);
+      return VISU::CreatePrs3dByEnum<TPLOT3D>(theStudy, thePublishInStudyMode);
     case TCUTPLANES:
-      return VISU::CreatePrs3dByEnum<TCUTPLANES>(theStudy);
+      return VISU::CreatePrs3dByEnum<TCUTPLANES>(theStudy, thePublishInStudyMode);
     case TCUTLINES:
-      return VISU::CreatePrs3dByEnum<TCUTLINES>(theStudy);
+      return VISU::CreatePrs3dByEnum<TCUTLINES>(theStudy, thePublishInStudyMode);
     case TVECTORS:
-      return VISU::CreatePrs3dByEnum<TVECTORS>(theStudy);
+      return VISU::CreatePrs3dByEnum<TVECTORS>(theStudy, thePublishInStudyMode);
     }
     return NULL;
   }
index 7dff7758318f633f15ef6f3f7c22dd11fc5d9ad3..cd7a6a3e49138fb564aebc19e0dca7dae059dad9 100644 (file)
@@ -154,11 +154,12 @@ namespace VISU
   //----------------------------------------------------------------------------
   template<typename TPrs3d_i> 
   ColoredPrs3d_i*
-  CreatePrs3dByType(SALOMEDS::Study_ptr theStudy)
+  CreatePrs3dByType(SALOMEDS::Study_ptr theStudy,
+                   ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode)
   {
     if(!theStudy->GetProperties()->IsLocked()){
       typedef typename TPrs3d_i::TInterface TPrs3d;
-      if(TPrs3d_i* aPresent = new TPrs3d_i(NULL,ColoredPrs3d_i::EPublishIndependently)){
+      if(TPrs3d_i* aPresent = new TPrs3d_i(thePublishInStudyMode)){
        return aPresent;
       }
     }
@@ -169,22 +170,26 @@ namespace VISU
   //----------------------------------------------------------------------------
   template<unsigned int type_enum> 
   ColoredPrs3d_i*
-  CreatePrs3dByEnum(SALOMEDS::Study_ptr theStudy)
+  CreatePrs3dByEnum(SALOMEDS::Study_ptr theStudy,
+                   ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode)
   {
     typedef typename TL::TColoredEnum2Type<type_enum>::TResult TColoredPrs3d;
-    return CreatePrs3dByType<TColoredPrs3d>(theStudy);
+    return CreatePrs3dByType<TColoredPrs3d>(theStudy,
+                                           thePublishInStudyMode);
   };
 
 
   //----------------------------------------------------------------------------
   ColoredPrs3d_i*
   CreatePrs3d_i(VISUType theType,
-               SALOMEDS::Study_ptr theStudy);
+               SALOMEDS::Study_ptr theStudy,
+               ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode);
   
   
   //----------------------------------------------------------------------------
   bool
   CreatColoredPrs3d(ColoredPrs3d_i* theColoredPrs3d,
+                   Result_i* theResult,
                    const std::string& theMeshName, 
                    VISU::Entity theEntity,
                    const std::string& theFieldName, 
@@ -209,9 +214,9 @@ namespace VISU
        return NULL;
     
       if(TPrs3d_i::IsPossible(aResult, theMeshName, theEntity, theFieldName, theIteration)){
-       TPrs3d_i* aPresent = new TPrs3d_i(aResult);
+       TPrs3d_i* aPresent = new TPrs3d_i(ColoredPrs3d_i::EPublishUnderTimeStamp);
        
-       if(CreatColoredPrs3d(aPresent, theMeshName, theEntity, theFieldName, theIteration))
+       if(CreatColoredPrs3d(aPresent, aResult, theMeshName, theEntity, theFieldName, theIteration))
          return aPresent;
        
        aPresent->_remove_ref();
index e8cd3cfcc7a21059a115819c22aa2773936544d0..e67888aa23ae6ed51d188f7ec70d66d71b2865e6 100644 (file)
@@ -85,7 +85,7 @@ VISU::ColoredPrs3dHolder_i
     default: break;
   }
 
-  SetName(GenerateName().latin1());
+  SetName(GenerateName().latin1(), false);
   CORBA::String_var anIOR = GetID();
   std::string aFatherEntry = theCache.GetEntry();
   QString aComment = QString("myComment=") + aType;
index b5248103bfc46ca0662c8fcc8c41221ade0bb8bd..3098f582ad63e2cd49b811d204970d14730182f2 100644 (file)
@@ -46,10 +46,9 @@ static int MYDEBUG = 0;
 
 //============================================================================
 VISU::ColoredPrs3d_i::
-ColoredPrs3d_i(Result_i* theResult,
-              EPublishInStudyMode thePublishInStudyMode) :
+ColoredPrs3d_i(EPublishInStudyMode thePublishInStudyMode) :
   PrsObject_i(SALOMEDS::Study::_nil()),
-  Prs3d_i(theResult),
+  Prs3d_i(),
   myPublishInStudyMode(thePublishInStudyMode),
   myIsTimeStampFixed(thePublishInStudyMode == EPublishUnderTimeStamp),
   myScalarMapPL(NULL),
@@ -394,6 +393,7 @@ VISU::ColoredPrs3d_i
   if(const ColoredPrs3d_i* aPrs3d = dynamic_cast<const ColoredPrs3d_i*>(theOrigin)){
     ColoredPrs3d_i* anOrigin = const_cast<ColoredPrs3d_i*>(aPrs3d);
  
+    SetCResult(anOrigin->GetCResult());
     SetMeshName(anOrigin->GetCMeshName().c_str());
     SetEntity(anOrigin->GetEntity());
     SetFieldName(anOrigin->GetCFieldName().c_str());
@@ -435,7 +435,7 @@ void
 VISU::ColoredPrs3d_i
 ::SameAsParams(const ColoredPrs3d_i* theOrigin)
 {
-  int aTimeStampNumber = GetTimeStampNumber();
+  CORBA::Long aTimeStampNumber = GetTimeStampNumber();
   SameAs(theOrigin);
   SetTimeStampNumber(aTimeStampNumber);
   OnSetInput();
@@ -1155,13 +1155,14 @@ VISU::ColoredPrs3d_i
   if(MYDEBUG)
     MESSAGE("ColoredPrs3d_i::Build - "<<myFieldName<<"; theBuildMode = "<<theBuildMode);
   SALOMEDS::StudyBuilder_var aStudyBuilder = GetStudyDocument()->NewBuilder();
-  if(myPublishInStudyMode != EDoNotPublish) 
+  bool anIsPublishInStudy = (myPublishInStudyMode == EPublishUnderTimeStamp || myPublishInStudyMode == EPublishIndependently);
+  if(anIsPublishInStudy) 
     aStudyBuilder->NewCommand();  // There is a transaction
 #ifndef _DEXCEPT_
   try{
 #endif
     QString aComment;
-    SetName("NoName");
+    SetName("NoName", false);
     if(theBuildMode == ECreateNew || theBuildMode == ESameAs){
       if(!IsRangeFixed()) 
        SetSourceRange();
@@ -1169,7 +1170,7 @@ VISU::ColoredPrs3d_i
        SetTitle(GetCFieldName().c_str());
     }
     if(myPublishInStudyMode == EPublishUnderTimeStamp){
-      SetName(GenerateName().latin1());
+      SetName(GenerateName().latin1(), false);
       aComment.sprintf("myComment=TIMESTAMP;myType=%d;myMeshName=%s;myEntityId=%d;myFieldName=%s;myTimeStampId=%d;myNumComponent=%d",
                       VISU::TTIMESTAMP,
                       GetCMeshName().c_str(),
@@ -1200,7 +1201,7 @@ VISU::ColoredPrs3d_i
                       true);
       SetSObject(GetStudyDocument()->FindObjectIOR(anIOR));
     }else if(myPublishInStudyMode == EPublishIndependently){
-      SetName(GenerateName().latin1());
+      SetName(GenerateName().latin1(), false);
       CORBA::String_var anIOR = GetID();
       std::string aFatherEntry = VISU::FindOrCreate3DPresentationsFolder(GetStudyDocument());
       aComment.sprintf("myComment=%s",
@@ -1224,7 +1225,7 @@ VISU::ColoredPrs3d_i
     throw;
   }
 #endif
-  if(myPublishInStudyMode != EDoNotPublish
+  if(anIsPublishInStudy
     aStudyBuilder->CommitCommand();
   return this;
 }
index bed9333e4ff200649e2994af5364f0d5118e95c0..eb46188e41625f93c041286425164c6774bf29eb 100644 (file)
@@ -49,11 +49,10 @@ namespace VISU
     /*! 
       The enumeration allow to define what mode should be used for the presentation building.
     */
-    enum EPublishInStudyMode {EPublishUnderTimeStamp, EPublishIndependently, EDoNotPublish};
+    enum EPublishInStudyMode {EPublishUnderTimeStamp, EPublishIndependently, ERegisterInCache, EDoNotPublish};
 
     explicit
-    ColoredPrs3d_i(Result_i* theResult,
-                  EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+    ColoredPrs3d_i(EPublishInStudyMode thePublishInStudyMode);
     explicit
     ColoredPrs3d_i(Result_i* theResult,
                   SALOMEDS::SObject_var theSObject);
index 0957d2bc2f60d7977b4cd8acb303e9c8126fc258..e5db69d219dd90ac207eaa62d44ed731f197d111 100644 (file)
@@ -87,12 +87,11 @@ VISU::CutLines_i
 
 //---------------------------------------------------------------
 VISU::CutLines_i::
-CutLines_i(Result_i* theResult, 
-          EPublishInStudyMode thePublishInStudyMode) :
+CutLines_i(EPublishInStudyMode thePublishInStudyMode) :
   PrsObject_i(SALOMEDS::Study::_nil()), 
-  Prs3d_i(theResult),
-  ColoredPrs3d_i(theResult,thePublishInStudyMode),
-  ScalarMap_i(theResult,thePublishInStudyMode),
+  Prs3d_i(),
+  ColoredPrs3d_i(thePublishInStudyMode),
+  ScalarMap_i(thePublishInStudyMode),
   myCutLinesPL(NULL)
 {}
 
@@ -485,9 +484,9 @@ VISU::CutLines_i
 //---------------------------------------------------------------
 VISU_Actor* 
 VISU::CutLines_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
 {
-  if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
+  if(VISU_Actor* anActor = TSuperClass::CreateActor()){
     anActor->SetVTKMapping(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int aDispMode = aResourceMgr->integerValue("VISU" , "cut_lines_represent", 2);
index c9c7b726a50d0155deaa7cf3b991dfabede2767f..0a934d5d41144764cffc844269d1fb0c44317888 100644 (file)
@@ -44,8 +44,7 @@ namespace VISU
     typedef ScalarMap_i TSuperClass;
 
     explicit
-    CutLines_i(Result_i* theResult,
-              EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+    CutLines_i(EPublishInStudyMode thePublishInStudyModep);
     explicit
     CutLines_i(Result_i* theResult,
               SALOMEDS::SObject_var theSObject);
@@ -233,7 +232,7 @@ namespace VISU
     //! Extends VISU_ColoredPrs3d_i::CreateActor
     virtual 
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    CreateActor();
 
     void BuildTableOfReal(SALOMEDS::SObject_var theSObject);
 
index c9286737b8df9d2b3214ad0ab9b99934ece3e164..3577406502574352bf62645a2d0df6c6e8524ea0 100644 (file)
@@ -77,12 +77,11 @@ VISU::CutPlanes_i
 
 //----------------------------------------------------------------------------
 VISU::CutPlanes_i
-::CutPlanes_i(Result_i* theResult, 
-             EPublishInStudyMode thePublishInStudyMode):
+::CutPlanes_i(EPublishInStudyMode thePublishInStudyMode):
   PrsObject_i(SALOMEDS::Study::_nil()), 
-  Prs3d_i(theResult),
-  ColoredPrs3d_i(theResult,thePublishInStudyMode),
-  ScalarMap_i(theResult,thePublishInStudyMode),
+  Prs3d_i(),
+  ColoredPrs3d_i(thePublishInStudyMode),
+  ScalarMap_i(thePublishInStudyMode),
   myCutPlanesPL(NULL)
 {}
 
@@ -292,9 +291,9 @@ VISU::CutPlanes_i
 //----------------------------------------------------------------------------
 VISU_Actor* 
 VISU::CutPlanes_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
 {
-  if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
+  if(VISU_Actor* anActor = TSuperClass::CreateActor()){
     anActor->SetVTKMapping(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int aDispMode = aResourceMgr->integerValue("VISU" , "cut_planes_represent", 1);
index f011b773b892ac71d72bf8087f17fe3b5a54dc2d..e15479293a251fce15781caa1a62607d7f19c392 100644 (file)
@@ -44,8 +44,7 @@ namespace VISU
     typedef ScalarMap_i TSuperClass;
 
     explicit
-    CutPlanes_i(Result_i* theResult,
-               EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+    CutPlanes_i(EPublishInStudyMode thePublishInStudyModep);
     explicit
     CutPlanes_i(Result_i* theResult,
                SALOMEDS::SObject_var theSObject);
@@ -162,7 +161,7 @@ namespace VISU
     //! Redefines VISU_ColoredPrs3d_i::CreateActor
     virtual 
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    CreateActor();
 
     static const std::string myComment;
 
index 9552cb48eb779929af5ac3c8446406f8b69c1905..b8d0f05feb6581bdd3cdc88ca19d9c219167741d 100644 (file)
@@ -101,12 +101,11 @@ VISU::DeformedShape_i
 
 //---------------------------------------------------------------
 VISU::DeformedShape_i
-::DeformedShape_i(Result_i* theResult, 
-                 EPublishInStudyMode thePublishInStudyMode):
+::DeformedShape_i(EPublishInStudyMode thePublishInStudyMode):
   PrsObject_i(SALOMEDS::Study::_nil()), 
-  Prs3d_i(theResult),
-  ColoredPrs3d_i(theResult,thePublishInStudyMode),
-  ScalarMap_i(theResult,thePublishInStudyMode),
+  Prs3d_i(),
+  ColoredPrs3d_i(thePublishInStudyMode),
+  ScalarMap_i(thePublishInStudyMode),
   myDeformedShapePL(NULL)
 {
   if(MYDEBUG) MESSAGE("DeformedShape_i::DeformedShape_i");
@@ -288,10 +287,9 @@ VISU::DeformedShape_i
 //---------------------------------------------------------------
 VISU_Actor* 
 VISU::DeformedShape_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO, 
-             bool toSupressShrinking) 
+::CreateActor(bool toSupressShrinking) 
 {
-  VISU_Actor* anActor = TSuperClass::CreateActor(theIO, true);
+  VISU_Actor* anActor = TSuperClass::CreateActor(true);
   anActor->SetVTKMapping(false);
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   int  aDispMode = aResourceMgr->integerValue("VISU", "deformed_shape_represent", 1);
@@ -306,9 +304,9 @@ VISU::DeformedShape_i
 //---------------------------------------------------------------
 VISU_Actor* 
 VISU::DeformedShape_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO
+::CreateActor() 
 {
-  return CreateActor(theIO, false);
+  return CreateActor(false);
 }
 
 
index ae6ae7893540ef22a1ed46d9280810a7db7189f4..84d7e846d2cf811ce8e17d5f898cb6563c1d3788 100644 (file)
@@ -44,8 +44,7 @@ namespace VISU
     typedef ScalarMap_i TSuperClass;
 
     explicit
-    DeformedShape_i(Result_i* theResult,
-                   EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+    DeformedShape_i(EPublishInStudyMode thePublishInStudyModep);
     explicit
     DeformedShape_i(Result_i* theResult,
                    SALOMEDS::SObject_var theSObject);
@@ -151,12 +150,11 @@ namespace VISU
 
     virtual 
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    CreateActor();
 
     virtual 
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO, 
-               bool toSupressShrinking);
+    CreateActor(bool toSupressShrinking);
 
     virtual 
     void
index 5a895bc8da5313a21126209acc95fb66d72c85cc..0ced6ab82ef6b6f052fff9efc846e79ea0272d66 100644 (file)
@@ -94,12 +94,11 @@ VISU::GaussPoints_i
 
 
 //----------------------------------------------------------------------------
-VISU::GaussPoints_i::
-GaussPoints_i(Result_i* theResult, 
-             EPublishInStudyMode thePublishInStudyMode) : 
+VISU::GaussPoints_i
+::GaussPoints_i(EPublishInStudyMode thePublishInStudyMode) : 
   PrsObject_i(SALOMEDS::Study::_nil()), 
-  Prs3d_i(theResult),
-  ColoredPrs3d_i(theResult,thePublishInStudyMode),
+  Prs3d_i(),
+  ColoredPrs3d_i(thePublishInStudyMode),
   myGaussPointsPL(NULL),
   myColor(Qt::blue),
   myIsActiveLocalScalarBar(true),
@@ -112,9 +111,9 @@ GaussPoints_i(Result_i* theResult,
 
 
 //----------------------------------------------------------------------------
-VISU::GaussPoints_i::
-GaussPoints_i(Result_i* theResult, 
-             SALOMEDS::SObject_var theSObject) : 
+VISU::GaussPoints_i
+::GaussPoints_i(Result_i* theResult, 
+               SALOMEDS::SObject_var theSObject) : 
   PrsObject_i(theSObject->GetStudy()), 
   Prs3d_i(theResult,theSObject),
   ColoredPrs3d_i(theResult,theSObject),
@@ -574,11 +573,10 @@ VISU::GaussPoints_i
 //----------------------------------------------------------------------------
 bool 
 VISU::GaussPoints_i
-::OnCreateActor(VISU_GaussPtsAct* theActor,
-               const Handle(SALOME_InteractiveObject)& theIO)
+::OnCreateActor(VISU_GaussPtsAct* theActor)
 {
   try{
-    TSuperClass::CreateActor(theActor,theIO);
+    TSuperClass::CreateActor(theActor);
     theActor->GetPipeLine()->Delete();
     UpdateActor(theActor);
     return true;
@@ -591,29 +589,29 @@ VISU::GaussPoints_i
 
 VISU_GaussPtsAct1* 
 VISU::GaussPoints_i
-::OnCreateActor1(const Handle(SALOME_InteractiveObject)& theIO)
+::OnCreateActor1()
 {
   VISU_GaussPtsAct1* anActor = VISU_GaussPtsAct1::New();
-  if(OnCreateActor(anActor,theIO))
+  if(OnCreateActor(anActor))
     return anActor;
   return NULL;
 }
 
 VISU_GaussPtsAct2* 
 VISU::GaussPoints_i
-::OnCreateActor2(const Handle(SALOME_InteractiveObject)& theIO)
+::OnCreateActor2()
 {
   VISU_GaussPtsAct2* anActor = VISU_GaussPtsAct2::New();
-  if(OnCreateActor(anActor,theIO))
+  if(OnCreateActor(anActor))
     return anActor;
   return NULL;
 }
 
 VISU_Actor* 
 VISU::GaussPoints_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO
+::CreateActor() 
 {
-  return OnCreateActor1(theIO);
+  return OnCreateActor1();
 }
 
 //----------------------------------------------------------------------------
index bc44b491fd29eebe8ebb48eec6ecc50c5907d52a..98af17b3f239507108c887ad1fe2005a61a7a70c 100644 (file)
@@ -53,8 +53,7 @@ namespace VISU
     typedef ColoredPrs3d_i TSuperClass;
 
     explicit
-    GaussPoints_i(Result_i* theResult,
-                 EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+    GaussPoints_i(EPublishInStudyMode thePublishInStudyModep);
     explicit
     GaussPoints_i(Result_i* theResult,
                  SALOMEDS::SObject_var theSObject);
@@ -281,14 +280,13 @@ namespace VISU
     GetPL();
     
     bool
-    OnCreateActor(VISU_GaussPtsAct* theActor,
-                 const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    OnCreateActor(VISU_GaussPtsAct* theActor);
 
     VISU_GaussPtsAct1* 
-    OnCreateActor1(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    OnCreateActor1();
 
     VISU_GaussPtsAct2* 
-    OnCreateActor2(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    OnCreateActor2();
 
     void
     UpdateScalarBar(vtkScalarBarActor *theScalarBar,
@@ -343,7 +341,7 @@ namespace VISU
     //----------------------------------------------------------------------------
     virtual 
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    CreateActor();
 
     virtual 
     VISU_GaussPtsAct2* 
index 36079e800cc36b2db0b71586e729f286efb97129..be084e93d1a1c2f6e41b06c11e0f3e875ab52d6b 100644 (file)
@@ -244,7 +244,7 @@ namespace VISU
   ::CreatePrs3d(VISUType theType,
                SALOMEDS::Study_ptr theStudy)
   {
-    if(ColoredPrs3d_i* aPrs3d = VISU::CreatePrs3d_i(theType, theStudy))
+    if(ColoredPrs3d_i* aPrs3d = CreatePrs3d_i(theType, theStudy, ColoredPrs3d_i::EPublishIndependently))
       return aPrs3d->_this();
     return Prs3d::_nil();
   }
index c8e4a79e8ec81aa650d407c648158978b67ee38e..bf5a8e0d1e9fedd32e1a939c629fe2099367c31b 100644 (file)
@@ -78,12 +78,11 @@ VISU::IsoSurfaces_i
 
 //---------------------------------------------------------------
 VISU::IsoSurfaces_i
-::IsoSurfaces_i(Result_i* theResult, 
-               EPublishInStudyMode thePublishInStudyMode) :
+::IsoSurfaces_i(EPublishInStudyMode thePublishInStudyMode) :
   PrsObject_i(SALOMEDS::Study::_nil()), 
-  Prs3d_i(theResult),
-  ColoredPrs3d_i(theResult,thePublishInStudyMode),
-  ScalarMap_i(theResult,thePublishInStudyMode),
+  Prs3d_i(),
+  ColoredPrs3d_i(thePublishInStudyMode),
+  ScalarMap_i(thePublishInStudyMode),
   myIsoSurfacesPL(NULL)
 {}
 
@@ -228,9 +227,9 @@ VISU::IsoSurfaces_i
 //---------------------------------------------------------------
 VISU_Actor* 
 VISU::IsoSurfaces_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
 {
-  if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
+  if(VISU_Actor* anActor = TSuperClass::CreateActor()){
     anActor->SetVTKMapping(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int  aDispMode = aResourceMgr->integerValue("VISU" , "iso_surfaces_represent", 2);
index 5f92ca20f779e36fe5b73ab16fd42762ce3b0b5b..89985fcdd2b92c2a775c53997214b9b096eec404 100644 (file)
@@ -44,8 +44,7 @@ namespace VISU
     typedef ScalarMap_i TSuperClass;
 
     explicit
-    IsoSurfaces_i(Result_i* theResult,
-                 EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+    IsoSurfaces_i(EPublishInStudyMode thePublishInStudyModep);
     explicit
     IsoSurfaces_i(Result_i* theResult,
                  SALOMEDS::SObject_var theSObject);
@@ -142,7 +141,7 @@ namespace VISU
 
     virtual 
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    CreateActor();
     
     virtual 
     void 
index cb3790c5b1362bac2e5a837e30aa1843efc4b980..c958c2b123b8bc8bb5c2d90f09692b1d1a56e72c 100644 (file)
@@ -84,7 +84,7 @@ VISU::Mesh_i
 //----------------------------------------------------------------------------
 VISU::Mesh_i
 ::Mesh_i(Result_i* theResult,
-       SALOMEDS::SObject_ptr theSObject) :
+        SALOMEDS::SObject_ptr theSObject) :
   PrsObject_i(theResult->GetStudyDocument()),
   Prs3d_i(theResult,theSObject),
   myMeshPL(VISU_MeshPL::New())
@@ -272,7 +272,7 @@ VISU::Mesh_i
       myPresentType =  VISU::PresentationType(VISU::GetResourceMgr()->integerValue("VISU" , "mesh_represent", 2));
       if(myEntity == VISU::NODE_ENTITY)
        myPresentType = VISU::POINT;
-      SetName(GenerateName().latin1());
+      SetName(GenerateName().latin1(), false);
       myCellColor.R = 0.0;  myCellColor.G = myCellColor.B = 1.0;
       myNodeColor.R = myNodeColor.G = 1.0;  myNodeColor.B = 1.0;
       myLinkColor.R = myLinkColor.G = myLinkColor.B = 83/255.;
@@ -362,11 +362,11 @@ VISU::Mesh_i
 
 VISU_Actor* 
 VISU::Mesh_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
 {
   VISU_MeshAct* anActor = VISU_MeshAct::New();
   try{
-    VISU::Prs3d_i::CreateActor(anActor,theIO);
+    VISU::Prs3d_i::CreateActor(anActor);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     bool toShrink  = aResourceMgr->booleanValue("VISU", "mesh_shrink", false);
     if (toShrink) anActor->SetShrink();
index 2f87b943ef8925ac971bc0e5589cbcfb15ac8f15..4a16acbf468b0dd78a0092dd033162b0952028c9 100644 (file)
@@ -102,7 +102,7 @@ namespace VISU
 
     virtual Storable* Restore(const Storable::TRestoringMap& theMap);
 
-    virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    virtual VISU_Actor* CreateActor();
 
     virtual void UpdateActor(VISU_Actor* theActor);
   };
index 5ef41c8953ad4a8e5895381c90bbd3424fdb418c..b76c1a0f7240fb4ca5cddf355f2fbda52ed9f353 100644 (file)
@@ -74,12 +74,11 @@ VISU::Plot3D_i
 
 //---------------------------------------------------------------
 VISU::Plot3D_i
-::Plot3D_i(Result_i* theResult, 
-          EPublishInStudyMode thePublishInStudyMode) :
+::Plot3D_i(EPublishInStudyMode thePublishInStudyMode) :
   PrsObject_i(SALOMEDS::Study::_nil()),
-  Prs3d_i(theResult),
-  ColoredPrs3d_i(theResult,thePublishInStudyMode),
-  ScalarMap_i(theResult,thePublishInStudyMode),
+  Prs3d_i(),
+  ColoredPrs3d_i(thePublishInStudyMode),
+  ScalarMap_i(thePublishInStudyMode),
   myPlot3DPL(NULL)
 {}
 
@@ -301,9 +300,9 @@ VISU::Plot3D_i
 //---------------------------------------------------------------
 VISU_Actor* 
 VISU::Plot3D_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
 {
-  if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
+  if(VISU_Actor* anActor = TSuperClass::CreateActor()){
     anActor->SetVTKMapping(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int aDispMode = aResourceMgr->integerValue("VISU", "plot3d_represent", 2);
index d7c6bb29a7f60bf398496068de0fa60bf78fbf23..906aa6a96a09a8350f2cc84bbb0ad2adbdbde97b 100644 (file)
@@ -38,8 +38,7 @@ namespace VISU
     typedef ScalarMap_i TSuperClass;
 
     explicit
-    Plot3D_i(Result_i* theResult, 
-            EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+    Plot3D_i(EPublishInStudyMode thePublishInStudyModep);
     explicit
     Plot3D_i(Result_i* theResult, 
             SALOMEDS::SObject_var theSObject);
@@ -156,7 +155,7 @@ namespace VISU
 
     virtual 
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    CreateActor();
 
     static const std::string myComment;
 
index cea375328b28b4ca6e8e3d17403ba4a8a95d478d..126ad99520b4ab2b4b84c0bd21036a380c71b5d9 100644 (file)
@@ -50,20 +50,16 @@ static int MYDEBUG = 0;
 
 //----------------------------------------------------------------------------
 VISU::Prs3d_i
-::Prs3d_i(Result_i* theResult) :
+::Prs3d_i() :
   PrsObject_i(SALOMEDS::Study::_nil()),
   myActorCollection(vtkActorCollection::New()),
   mySObject(SALOMEDS::SObject::_nil()),
-  myResult(theResult),
-  myPipeLine(NULL)
+  myPipeLine(NULL),
+  myResult(NULL)
 {
   if(MYDEBUG) MESSAGE("Prs3d_i::Prs3d_i - this = "<<this);
   myOffset[0] = myOffset[1] = myOffset[2] = 0;
   myActorCollection->Delete();
-  if(theResult){
-    SetStudyDocument(theResult->GetStudyDocument());
-    theResult->Register();
-  }
 }
 
 
@@ -143,36 +139,44 @@ VISU::Prs3d_i
 //----------------------------------------------------------------------------
 void
 VISU::Prs3d_i
-::SetResultObject(VISU::Result_ptr theResult)
+::SetCResult(VISU::Result_i* theResult)
 {
-  Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in());
-  if(myResult != aResult){
+  if(myResult != theResult){
     if(myResult)
       myResult->Destroy();
-    if(aResult)
-      aResult->Register();
-    SetStudyDocument(aResult->GetStudyDocument());
-    myResult = aResult;
+    if(theResult){
+      theResult->Register();
+      SetStudyDocument(theResult->GetStudyDocument());
+    }
+    myResult = theResult;
     myParamsTime.Modified();
   }
 }
 
+//----------------------------------------------------------------------------
+Result_i* 
+VISU::Prs3d_i
+::GetCResult() const 
+{ 
+  return myResult;
+}
+
 
 //----------------------------------------------------------------------------
-VISU::Result_ptr
+void
 VISU::Prs3d_i
-::GetResultObject()
+::SetResultObject(VISU::Result_ptr theResult)
 {
-  return myResult->_this();
+  SetCResult(dynamic_cast<Result_i*>(GetServant(theResult).in()));
 }
 
 
 //----------------------------------------------------------------------------
-Result_i* 
+VISU::Result_ptr
 VISU::Prs3d_i
-::GetCResult() const 
-{ 
-  return myResult;
+::GetResultObject()
+{
+  return myResult->_this();
 }
 
 
@@ -222,7 +226,7 @@ VISU::Storable*
 VISU::Prs3d_i
 ::Restore(const Storable::TRestoringMap& theMap)
 {
-  SetName(VISU::Storable::FindValue(theMap,"myName").latin1());
+  SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
   myOffset[0] = VISU::Storable::FindValue(theMap,"myOffset[0]").toFloat();
   myOffset[1] = VISU::Storable::FindValue(theMap,"myOffset[1]").toFloat();
   myOffset[2] = VISU::Storable::FindValue(theMap,"myOffset[2]").toFloat();
@@ -394,13 +398,11 @@ VISU::Prs3d_i
 //----------------------------------------------------------------------------
 void
 VISU::Prs3d_i
-::CreateActor(VISU_Actor* theActor, 
-             const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor(VISU_Actor* theActor)
 {
   try{
-    Handle(SALOME_InteractiveObject) anIO = theIO;
-    if(anIO.IsNull() && (!mySObject->_is_nil())){
-      anIO = GetIO();
+    Handle(SALOME_InteractiveObject) anIO = GetIO();
+    if(!anIO.IsNull() && anIO->hasEntry()){
       theActor->setIO(anIO);
     }
 
index 28fac17313db76c1cdc8f5c57fad4fb40b6ff0fd..ce9415d7a7906971719135603727cc9db18afb35 100644 (file)
@@ -69,14 +69,12 @@ namespace VISU
     public virtual PrsObject_i
 
   {
-    Prs3d_i();
     Prs3d_i(const Prs3d_i&);
 
   public:
     //----------------------------------------------------------------------------
     //! A constructor to create a fresh instance of the class
-    explicit
-    Prs3d_i(Result_i* theResult);
+    Prs3d_i();
 
     //! A constructor to restore an instance of the class
     explicit
@@ -96,6 +94,13 @@ namespace VISU
     CORBA::Boolean 
     Apply();
 
+    //----------------------------------------------------------------------------
+    void 
+    SetCResult(Result_i* theResult);
+
+    Result_i* 
+    GetCResult() const;
+
     virtual
     void 
     SetResultObject(VISU::Result_ptr theResult);
@@ -104,10 +109,7 @@ namespace VISU
     VISU::Result_ptr
     GetResultObject();
 
-    //! Get corresponding Result_i
-    Result_i* 
-    GetCResult() const;
-
+    //----------------------------------------------------------------------------
     virtual
     void 
     SetMeshName(const char* theMeshName);
@@ -173,7 +175,7 @@ namespace VISU
     //! To define a way to create VTK representation of the instance
     virtual 
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL) = 0;
+    CreateActor() = 0;
 
     //! To unregister the pointed actor
     virtual 
@@ -257,8 +259,7 @@ namespace VISU
     SetPipeLine(VISU_PipeLine* thePipeLine);
 
     void
-    CreateActor(VISU_Actor* theActor, 
-               const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    CreateActor(VISU_Actor* theActor);
 
     virtual 
     VISU_PipeLine* 
index 497050cc0cf13a59ab1c321fd284f54f53be306b..7fcb4805fdf5d58bea107528377bc411af5ecaa7 100644 (file)
@@ -51,15 +51,18 @@ VISU::RemovableObject_i
 //---------------------------------------------------------------
 void
 VISU::RemovableObject_i
-::SetName(const std::string& theName)
+::SetName(const std::string& theName,
+         bool theIsUpdateStudyAttr)
 {
   myName = theName;
-  SALOMEDS::SObject_var aSObject = myStudy->FindObjectID(GetEntry().c_str());
-  if(!aSObject->_is_nil()){
-    SALOMEDS::StudyBuilder_var aBuilder = myStudy->NewBuilder();
-    SALOMEDS::GenericAttribute_var anAttr = aBuilder->FindOrCreateAttribute( aSObject, "AttributeName" );
-    SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr );
-    aNameAttr->SetValue( theName.c_str() );
+  if(theIsUpdateStudyAttr){
+    SALOMEDS::SObject_var aSObject = myStudy->FindObjectID(GetEntry().c_str());
+    if(!aSObject->_is_nil()){
+      SALOMEDS::StudyBuilder_var aBuilder = myStudy->NewBuilder();
+      SALOMEDS::GenericAttribute_var anAttr = aBuilder->FindOrCreateAttribute( aSObject, "AttributeName" );
+      SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr );
+      aNameAttr->SetValue( theName.c_str() );
+    }
   }
 }
 
index eb4a3b07b1f27566600d90ae3aa3a33e15f88179..c898cc6e375f5dbe0404f2e7fe8d46edfedbfe81 100644 (file)
@@ -54,7 +54,8 @@ namespace VISU
 
     virtual 
     void
-    SetName(const std::string& theName);
+    SetName(const std::string& theName,
+           bool theIsUpdateStudyAttr);
 
   protected:
     RemovableObject_i();
index bd1c1f846cd137a1b4ba0b866c0e930e18ead1e9..87a41fa69915d38318ba720b3c7b6cc951f8f7a3 100644 (file)
@@ -114,12 +114,11 @@ VISU::ScalarMapOnDeformedShape_i
 
 //---------------------------------------------------------------
 VISU::ScalarMapOnDeformedShape_i
-::ScalarMapOnDeformedShape_i(Result_i* theResult, 
-                            EPublishInStudyMode thePublishInStudyMode) :
+::ScalarMapOnDeformedShape_i(EPublishInStudyMode thePublishInStudyMode) :
   PrsObject_i(SALOMEDS::Study::_nil()), 
-  Prs3d_i(theResult),
-  ColoredPrs3d_i(theResult,thePublishInStudyMode),
-  ScalarMap_i(theResult,thePublishInStudyMode),
+  Prs3d_i(),
+  ColoredPrs3d_i(thePublishInStudyMode),
+  ScalarMap_i(thePublishInStudyMode),
   myScalarMapOnDeformedShapePL(NULL),
   myScalarIteration(1)
 {}
@@ -317,9 +316,9 @@ VISU::ScalarMapOnDeformedShape_i
 //---------------------------------------------------------------
 VISU_Actor* 
 VISU::ScalarMapOnDeformedShape_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO
+::CreateActor() 
 {
-  VISU_Actor* anActor = TSuperClass::CreateActor(theIO, true);
+  VISU_Actor* anActor = TSuperClass::CreateActor(true);
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   int  aDispMode = aResourceMgr->integerValue("VISU", "scalar_def_represent", 2);
   bool toShrink  = aResourceMgr->booleanValue("VISU", "scalar_def_shrink", false);
index 2d694336c77352b4daadf06caa03af9c00c219bb..033df7b06b4312046f2ca14e077ba75fc88a0797 100644 (file)
@@ -47,8 +47,7 @@ namespace VISU
     typedef ScalarMap_i TSuperClass;
     
     explicit
-    ScalarMapOnDeformedShape_i(Result_i* theResult,
-                              EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+    ScalarMapOnDeformedShape_i(EPublishInStudyMode thePublishInStudyModep);
     explicit
     ScalarMapOnDeformedShape_i(Result_i* theResult,
                               SALOMEDS::SObject_var theSObject);
@@ -162,7 +161,7 @@ namespace VISU
 
     virtual
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    CreateActor();
 
     virtual
     void
index b2e12a830135509d757f6dea5dd28dbc08164d79..881aec5f1c63685b60dc1019fa18f6f9a21223db 100644 (file)
@@ -105,11 +105,10 @@ VISU::ScalarMap_i
 
 //----------------------------------------------------------------------------
 VISU::ScalarMap_i::
-ScalarMap_i(Result_i* theResult,
-           EPublishInStudyMode thePublishInStudyMode) :
+ScalarMap_i(EPublishInStudyMode thePublishInStudyMode) :
   PrsObject_i(SALOMEDS::Study::_nil()),
-  Prs3d_i(theResult),
-  ColoredPrs3d_i(theResult,thePublishInStudyMode)
+  Prs3d_i(),
+  ColoredPrs3d_i(thePublishInStudyMode)
 {}
 
 //----------------------------------------------------------------------------
@@ -312,11 +311,11 @@ VISU::ScalarMap_i
 //----------------------------------------------------------------------------
 VISU_Actor* 
 VISU::ScalarMap_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking)
+::CreateActor(bool toSupressShrinking)
 {
   VISU_ScalarMapAct* anActor = VISU_ScalarMapAct::New();
   try{
-    TSuperClass::CreateActor(anActor,theIO);
+    TSuperClass::CreateActor(anActor);
     anActor->SetBarVisibility(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int  aDispMode = aResourceMgr->integerValue("VISU", "scalar_map_represent", 2);
@@ -336,9 +335,9 @@ VISU::ScalarMap_i
 //----------------------------------------------------------------------------
 VISU_Actor* 
 VISU::ScalarMap_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
 {
-  return CreateActor(theIO, false);
+  return CreateActor(false);
 }
 
 //----------------------------------------------------------------------------
index 9ee01ff2c83e0bf5db5400f01f91008774f30049..978e552fb1fb6b776457b96a6073ddd020e4581e 100644 (file)
@@ -45,8 +45,7 @@ namespace VISU
     typedef ColoredPrs3d_i TSuperClass;
 
     explicit
-    ScalarMap_i(Result_i* theResult,
-               EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+    ScalarMap_i(EPublishInStudyMode thePublishInStudyModep);
     explicit
     ScalarMap_i(Result_i* theResult,
                SALOMEDS::SObject_var theSObject);
@@ -155,12 +154,11 @@ namespace VISU
 
     virtual 
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    CreateActor();
     
     virtual 
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO, 
-               bool toSupressShrinking);
+    CreateActor(bool toSupressShrinking);
 
     virtual
     void
index a803592738b07aa44c8cd798e3d086fbb756019d..d3d6c26188a344530a35860c2ba43dfe24558ea4 100644 (file)
@@ -98,13 +98,12 @@ VISU::StreamLines_i
 
 //---------------------------------------------------------------
 VISU::StreamLines_i
-::StreamLines_i(Result_i* theResult, 
-               EPublishInStudyMode thePublishInStudyMode) :
+::StreamLines_i(EPublishInStudyMode thePublishInStudyMode) :
   PrsObject_i(SALOMEDS::Study::_nil()), 
-  Prs3d_i(theResult),
-  ColoredPrs3d_i(theResult,thePublishInStudyMode),
-  ScalarMap_i(theResult,thePublishInStudyMode),
-  DeformedShape_i(theResult,thePublishInStudyMode),
+  Prs3d_i(),
+  ColoredPrs3d_i(thePublishInStudyMode),
+  ScalarMap_i(thePublishInStudyMode),
+  DeformedShape_i(thePublishInStudyMode),
   myStreamLinesPL(NULL),
   myAppendFilter(vtkAppendFilter::New())
 {}
@@ -371,9 +370,9 @@ VISU::StreamLines_i
 //---------------------------------------------------------------
 VISU_Actor* 
 VISU::StreamLines_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO
+::CreateActor() 
 {
-  if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO, true)){
+  if(VISU_Actor* anActor = TSuperClass::CreateActor(true)){
     anActor->SetVTKMapping(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int  aDispMode = aResourceMgr->integerValue("VISU", "stream_lines_represent", 1);
index 41fd93cbe03362f4c0be15d87c38b2009252b99e..edf55fbe9dbc9cdab74973b2168f24c4f5b2518b 100644 (file)
@@ -45,8 +45,7 @@ namespace VISU
     typedef DeformedShape_i TSuperClass;
 
     explicit
-    StreamLines_i(Result_i* theResult,
-                 EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+    StreamLines_i(EPublishInStudyMode thePublishInStudyModep);
     explicit
     StreamLines_i(Result_i* theResult,
                  SALOMEDS::SObject_var theSObject);
@@ -179,7 +178,7 @@ namespace VISU
     //! Extends VISU_ColoredPrs3d_i::CreateActor
     virtual 
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    CreateActor();
 
     //! Extends VISU_ColoredPrs3d_i::UpdateActor
     virtual
index 6e2ad6cb00930dae1ce1d411aa1ada48401c67b9..cc62432e2172bf7064e57ca51b8fe731ce085ae5 100644 (file)
@@ -84,6 +84,56 @@ VISU::Table_i::~Table_i()
 {
   MESSAGE("Table_i::~Table_i");
 }
+
+//----------------------------------------------------------------------------
+void
+VISU::Table_i
+::SetTitle( const char* theTitle )
+{
+  SetName( theTitle, true );
+}
+
+//----------------------------------------------------------------------------
+char*
+VISU::Table_i
+::GetTitle()
+{
+  return CORBA::string_dup( GetName().c_str() );
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Table_i
+::SetOrientation( VISU::Table::Orientation theOrientation )
+{
+  myOrientation = theOrientation;
+}
+
+//----------------------------------------------------------------------------
+VISU::Table::Orientation
+VISU::Table_i
+::GetOrientation()
+{
+  return myOrientation;
+}
+
+//----------------------------------------------------------------------------
+SALOMEDS::SObject_var
+VISU::Table_i
+::GetSObject() const
+{
+  return mySObj;
+}
+
+//----------------------------------------------------------------------------
+char* 
+VISU::Table_i
+::GetObjectEntry() 
+{
+  return CORBA::string_dup( mySObj->GetID() ); 
+}
+
+//----------------------------------------------------------------------------
 /*!
   Gets number of rows in table
 */
@@ -130,7 +180,7 @@ CORBA::Long VISU::Table_i::GetNbColumns()
 VISU::Storable* VISU::Table_i::Create()
 {
   // generate name ...
-  SetName(GetTableTitle());
+  SetName(GetTableTitle(), false);
 
   // mpv (PAL 5357): if name attribute already exist at this label, use it as name of table
   if ( GetName() == "" )
@@ -143,11 +193,11 @@ VISU::Storable* VISU::Table_i::Create()
            pCutLines = dynamic_cast<CutLines_i*>(GetServant(aCutLines).in());
        }
       if (!pCutLines)
-       if (mySObj->GetName()) SetName(mySObj->GetName());
+       if (mySObj->GetName()) SetName(mySObj->GetName(), false);
     }
 
   if ( GetName() == "" )
-    SetName(GenerateName());
+    SetName(GenerateName(), false);
   // ... and build the object
   return Build( false );
 }
@@ -223,7 +273,7 @@ VISU::Storable* VISU::Table_i::Build( int theRestoring )
 VISU::Storable* VISU::Table_i::Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO)
 {
   if(MYDEBUG) MESSAGE(GetComment());
-  SetName(VISU::Storable::FindValue(theMap,"myName").latin1());
+  SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
   myTitle = VISU::Storable::FindValue(theMap,"myTitle").latin1();
   myOrientation = ( VISU::Table::Orientation )( VISU::Storable::FindValue(theMap,"myOrientation").toInt() );
   mySObj = SALOMEDS::SObject::_duplicate(SO);
@@ -348,15 +398,93 @@ VISU::Curve_i::~Curve_i()
 {
   MESSAGE("Curve_i::~Curve_i");
 }
+
+//----------------------------------------------------------------------------
+void
+VISU::Curve_i
+::SetTitle( const char* theTitle )
+{
+  SetName( theTitle, true );
+}
+
+//----------------------------------------------------------------------------
+char*
+VISU::Curve_i
+::GetTitle()
+{
+  return CORBA::string_dup( GetName().c_str() );
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Curve_i
+::SetColor( const SALOMEDS::Color& theColor )
+{
+  myColor = theColor; 
+  myAuto = false;
+}
+
+//----------------------------------------------------------------------------
+SALOMEDS::Color
+VISU::Curve_i
+::GetColor()
+{
+  return myColor;
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Curve_i
+::SetMarker( VISU::Curve::MarkerType theType )
+{
+  myMarker = theType; 
+  myAuto = false;
+}
+
+//----------------------------------------------------------------------------
+VISU::Curve::MarkerType
+VISU::Curve_i
+::GetMarker()
+{
+  return myMarker;
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Curve_i
+::SetLine( VISU::Curve::LineType theType, CORBA::Long theWidth )
+{
+  myLine = theType; 
+  myLineWidth = theWidth; 
+  myAuto = false;
+}
+
+//----------------------------------------------------------------------------
+VISU::Curve::LineType
+VISU::Curve_i
+::GetLine()
+{
+  return myLine;
+}
+
+//----------------------------------------------------------------------------
+CORBA::Long
+VISU::Curve_i
+::GetLineWidth()
+{
+  return myLineWidth;
+}
+
+//----------------------------------------------------------------------------
 /*!
   Creates curve object
 */
 VISU::Storable* VISU::Curve_i::Create()
 {
   // generate name ...
-  SetName(GetVerTitle());
+  SetName(GetVerTitle(), false);
   if ( GetName() == "" )
-    SetName(GenerateName());
+    SetName(GenerateName(), false);
   // ... and build the object
   return Build( false );
 }
@@ -672,7 +800,7 @@ VISU::Storable* VISU::Curve_i::Restore( const Storable::TRestoringMap& theMap, S
 {
   if(MYDEBUG) MESSAGE(GetComment());
   mySObj = SALOMEDS::SObject::_duplicate(theSO);
-  SetName(VISU::Storable::FindValue(theMap,"myName").latin1());
+  SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
   myHRow = VISU::Storable::FindValue(theMap,"myHRow").toInt();
   myVRow = VISU::Storable::FindValue(theMap,"myVRow").toInt();
   bool ok = false;
@@ -874,7 +1002,7 @@ void VISU::Container_i::Clear()
 VISU::Storable* VISU::Container_i::Create()
 {
   // generate name ...
-  SetName(GenerateName());
+  SetName(GenerateName(), false);
   // ... and build the object
   return Build( false );
 }
@@ -989,7 +1117,7 @@ VISU::Storable* VISU::Container_i::Restore( const Storable::TRestoringMap& theMa
 {
   if(MYDEBUG) MESSAGE(GetComment());
   mySObj = SALOMEDS::SObject::_duplicate(SO);
-  SetName(VISU::Storable::FindValue( theMap, "myName" ).latin1());
+  SetName(VISU::Storable::FindValue( theMap, "myName" ).latin1(), false);
   QString val = VISU::Storable::FindValue( theMap, "myCurves" );
   myCurves = QStringList::split( QString( "*" ), val, false );
   return Build( true );
index 75f4d0bd48d90167e30a719859c6dabda90529f6..86f8715a51d72264ee89cc78d92b66c15f401e6c 100644 (file)
@@ -46,11 +46,11 @@ namespace VISU{
     virtual ~Table_i();
     virtual VISU::VISUType GetType() { return VISU::TTABLE;};
 
-    virtual void SetTitle( const char* theTitle ) { SetName( theTitle ); }
-    virtual char* GetTitle() { return CORBA::string_dup( GetName().c_str() ); }
+    virtual void SetTitle( const char* theTitle );
+    virtual char* GetTitle();
 
-    virtual void SetOrientation( VISU::Table::Orientation theOrientation ) { myOrientation = theOrientation; }
-    virtual VISU::Table::Orientation GetOrientation() { return myOrientation; }
+    virtual void SetOrientation( VISU::Table::Orientation theOrientation );
+    virtual VISU::Table::Orientation GetOrientation();
 
     virtual CORBA::Long GetNbRows();
     virtual CORBA::Long GetNbColumns();
@@ -67,19 +67,22 @@ namespace VISU{
 
   public:
     virtual Storable* Create();
-    SALOMEDS::SObject_var GetSObject() const { return mySObj;}
+    SALOMEDS::SObject_var GetSObject() const;
+
+    virtual Storable* Restore( const Storable::TRestoringMap& theMap,
+                              SALOMEDS::SObject_ptr SO);
 
-    virtual Storable* Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO);
     static Storable* Restore(SALOMEDS::SObject_ptr theSObject,
                             const std::string& thePrefix,
                             const Storable::TRestoringMap& theMap);
+
     virtual void ToStream( std::ostringstream& theStr );
     static const std::string myComment;
     virtual const char* GetComment() const;
     virtual const char* GenerateName();
     virtual const char* GetTableTitle();
 
-    virtual char* GetObjectEntry() { return CORBA::string_dup( mySObj->GetID() ); }
+    virtual char* GetObjectEntry();
   };
   SALOMEDS::SObject_var ImportTables(const char* theFileName, SALOMEDS::Study_ptr theStudy);
   bool ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName);
@@ -96,19 +99,18 @@ namespace VISU{
     virtual ~Curve_i();
     virtual VISU::VISUType GetType() { return VISU::TCURVE;};
 
-    virtual void SetTitle( const char* theTitle ) { SetName( theTitle ); }
-    virtual char* GetTitle() { return CORBA::string_dup( GetName().c_str() ); }
+    virtual void SetTitle( const char* theTitle );
+    virtual char* GetTitle();
 
-    virtual void SetColor( const SALOMEDS::Color& theColor ) { myColor = theColor; myAuto = false; }
-    virtual SALOMEDS::Color GetColor() { return myColor; }
+    virtual void SetColor( const SALOMEDS::Color& theColor );
+    virtual SALOMEDS::Color GetColor();
 
-    virtual void SetMarker( VISU::Curve::MarkerType theType ) { myMarker = theType; myAuto = false; }
-    virtual VISU::Curve::MarkerType GetMarker() { return myMarker; }
+    virtual void SetMarker( VISU::Curve::MarkerType theType );
+    virtual VISU::Curve::MarkerType GetMarker();
 
-    virtual void SetLine( VISU::Curve::LineType theType, CORBA::Long theWidth )
-                                                { myLine = theType; myLineWidth = theWidth; myAuto = false; }
-    virtual VISU::Curve::LineType GetLine() { return myLine; }
-    virtual CORBA::Long GetLineWidth() { return myLineWidth; }
+    virtual void SetLine( VISU::Curve::LineType theType, CORBA::Long theWidth );
+    virtual VISU::Curve::LineType GetLine();
+    virtual CORBA::Long GetLineWidth();
 
     virtual void RemoveFromStudy();
 
index 7e61ebf5118fc75ee55938172be2e3cd3b8e61c3..0657e52840fc471f902fa5787f9d1c7b8275420b 100644 (file)
@@ -245,7 +245,12 @@ namespace
       int aTimeStampId = VISU::Storable::FindValue(aTimeMap,"myTimeStampId").toInt();
       
       bool anIsCreated = false;
-      TPrs3d* aPresent = new TPrs3d(theResult,VISU::ColoredPrs3d_i:: EDoNotPublish);
+      TPrs3d* aPresent = new TPrs3d(VISU::ColoredPrs3d_i::EDoNotPublish);
+      aPresent->SetCResult(theResult);
+      aPresent->SetMeshName(aMeshName.latin1());
+      aPresent->SetEntity(anEntity);
+      aPresent->SetFieldName(aFieldName.latin1());
+      aPresent->SetTimeStampNumber(aTimeStampId);
 #ifdef NO_CAS_CATCH
       try{       
         OCC_CATCH_SIGNALS;
@@ -253,7 +258,7 @@ namespace
       CASCatch_TRY{
         try{
 #endif
-          if(aPresent->Create(aMeshName.latin1(),anEntity,aFieldName.latin1(),aTimeStampId)){
+          if(aPresent->Apply()){
             anIsCreated = true;
             theData.myPrs[aFrameId++] = aPresent;
             aMin = std::min(aPresent->GetMin(), aMin);
index cbea1cb7dce737b412f3df433bd23ef2629bbf0b..f7634ac73485410c3a1e3fde0658bbce5f4da727 100644 (file)
@@ -105,13 +105,12 @@ VISU::Vectors_i
 
 //---------------------------------------------------------------
 VISU::Vectors_i
-::Vectors_i(Result_i* theResult, 
-           EPublishInStudyMode thePublishInStudyMode) :
+::Vectors_i(EPublishInStudyMode thePublishInStudyMode) :
   PrsObject_i(SALOMEDS::Study::_nil()), 
-  Prs3d_i(theResult),
-  ColoredPrs3d_i(theResult,thePublishInStudyMode),
-  ScalarMap_i(theResult,thePublishInStudyMode),
-  DeformedShape_i(theResult,thePublishInStudyMode),
+  Prs3d_i(),
+  ColoredPrs3d_i(thePublishInStudyMode),
+  ScalarMap_i(thePublishInStudyMode),
+  DeformedShape_i(thePublishInStudyMode),
   myLineWidth(1.0),
   myVectorsPL(NULL)
 {}
@@ -282,11 +281,11 @@ VISU::Vectors_i
 //---------------------------------------------------------------
 VISU_Actor* 
 VISU::Vectors_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
 {
   VISU_VectorsAct* anActor = VISU_VectorsAct::New();
   try{
-    VISU::Prs3d_i::CreateActor(anActor,theIO);
+    VISU::Prs3d_i::CreateActor(anActor);
     anActor->SetVTKMapping(true);
     anActor->SetBarVisibility(true);
     anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
index 019110cd86afa84c933c387bd89ac159d5dc65e6..e83613b70ccf6ec961095676880a3f1f6c8aa3b5 100644 (file)
@@ -44,8 +44,7 @@ namespace VISU
     typedef DeformedShape_i TSuperClass;
 
     explicit
-    Vectors_i(Result_i* theResult,
-             EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+    Vectors_i(EPublishInStudyMode thePublishInStudyModep);
     explicit
     Vectors_i(Result_i* theResult,
              SALOMEDS::SObject_var theSObject);
@@ -157,7 +156,7 @@ namespace VISU
     //! Redefines VISU_ColoredPrs3d_i::CreateActor
     virtual
     VISU_Actor* 
-    CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    CreateActor();
 
     //! Redefines VISU_ColoredPrs3d_i::UpdateActor
     virtual